summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/libstdc++/ChangeLog9286
-rw-r--r--contrib/libstdc++/ChangeLog-20025590
-rw-r--r--contrib/libstdc++/ChangeLog-20038619
-rw-r--r--contrib/libstdc++/Makefile.am41
-rw-r--r--contrib/libstdc++/Makefile.in681
-rw-r--r--contrib/libstdc++/README15
-rw-r--r--contrib/libstdc++/acconfig.h74
-rw-r--r--contrib/libstdc++/acinclude.m43147
-rw-r--r--contrib/libstdc++/aclocal.m44089
-rw-r--r--contrib/libstdc++/config.h.in898
-rw-r--r--contrib/libstdc++/config/allocator/bitmap_allocator_base.h37
-rw-r--r--contrib/libstdc++/config/allocator/malloc_allocator_base.h37
-rw-r--r--contrib/libstdc++/config/allocator/mt_allocator_base.h37
-rw-r--r--contrib/libstdc++/config/allocator/new_allocator_base.h37
-rw-r--r--contrib/libstdc++/config/allocator/pool_allocator_base.h37
-rw-r--r--contrib/libstdc++/config/cpu/alpha/atomicity.h41
-rw-r--r--contrib/libstdc++/config/cpu/cris/atomic_word.h36
-rw-r--r--contrib/libstdc++/config/cpu/cris/atomicity.h46
-rw-r--r--contrib/libstdc++/config/cpu/generic/atomic_word.h35
-rw-r--r--contrib/libstdc++/config/cpu/generic/atomicity.h69
-rw-r--r--contrib/libstdc++/config/cpu/hppa/atomicity.h167
-rw-r--r--contrib/libstdc++/config/cpu/i386/atomicity.h89
-rw-r--r--contrib/libstdc++/config/cpu/i486/atomicity.h48
-rw-r--r--contrib/libstdc++/config/cpu/ia64/atomicity.h31
-rw-r--r--contrib/libstdc++/config/cpu/m68k/atomicity.h192
-rw-r--r--contrib/libstdc++/config/cpu/mips/atomicity.h104
-rw-r--r--contrib/libstdc++/config/cpu/powerpc/atomicity.h82
-rw-r--r--contrib/libstdc++/config/cpu/s390/atomicity.h54
-rw-r--r--contrib/libstdc++/config/cpu/sparc/atomic_word.h39
-rw-r--r--contrib/libstdc++/config/cpu/sparc/atomicity.h190
-rw-r--r--contrib/libstdc++/config/io/basic_file_stdio.cc305
-rw-r--r--contrib/libstdc++/config/io/basic_file_stdio.h39
-rw-r--r--contrib/libstdc++/config/io/c_io_stdio.h20
-rw-r--r--contrib/libstdc++/config/linker-map.gnu588
-rw-r--r--contrib/libstdc++/config/locale/generic/c_locale.cc123
-rw-r--r--contrib/libstdc++/config/locale/generic/c_locale.h35
-rw-r--r--contrib/libstdc++/config/locale/generic/codecvt_members.cc179
-rw-r--r--contrib/libstdc++/config/locale/generic/collate_members.cc2
-rw-r--r--contrib/libstdc++/config/locale/generic/ctype_members.cc115
-rw-r--r--contrib/libstdc++/config/locale/generic/messages_members.cc2
-rw-r--r--contrib/libstdc++/config/locale/generic/messages_members.h17
-rw-r--r--contrib/libstdc++/config/locale/generic/monetary_members.cc136
-rw-r--r--contrib/libstdc++/config/locale/generic/numeric_members.cc66
-rw-r--r--contrib/libstdc++/config/locale/generic/time_members.cc202
-rw-r--r--contrib/libstdc++/config/locale/generic/time_members.h22
-rw-r--r--contrib/libstdc++/config/locale/gnu/c++locale_internal.h6
-rw-r--r--contrib/libstdc++/config/locale/gnu/c_locale.cc102
-rw-r--r--contrib/libstdc++/config/locale/gnu/c_locale.h35
-rw-r--r--contrib/libstdc++/config/locale/gnu/codecvt_members.cc267
-rw-r--r--contrib/libstdc++/config/locale/gnu/collate_members.cc2
-rw-r--r--contrib/libstdc++/config/locale/gnu/ctype_members.cc144
-rw-r--r--contrib/libstdc++/config/locale/gnu/messages_members.cc2
-rw-r--r--contrib/libstdc++/config/locale/gnu/messages_members.h50
-rw-r--r--contrib/libstdc++/config/locale/gnu/monetary_members.cc532
-rw-r--r--contrib/libstdc++/config/locale/gnu/numeric_members.cc104
-rw-r--r--contrib/libstdc++/config/locale/gnu/time_members.cc394
-rw-r--r--contrib/libstdc++/config/locale/gnu/time_members.h36
-rw-r--r--contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc4
-rw-r--r--contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h62
-rw-r--r--contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc2
-rw-r--r--contrib/libstdc++/config/os/aix/atomicity.h42
-rw-r--r--contrib/libstdc++/config/os/aix/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/aix/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/aix/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/os_defines.h16
-rw-r--r--contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h32
-rw-r--r--contrib/libstdc++/config/os/bsd/netbsd/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/djgpp/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/djgpp/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/djgpp/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_inline.h18
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/generic/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/ctype_base.h7
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h55
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/os_defines.h30
-rw-r--r--contrib/libstdc++/config/os/hpux/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/hpux/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/hpux/os_defines.h21
-rw-r--r--contrib/libstdc++/config/os/irix/atomic_word.h35
-rw-r--r--contrib/libstdc++/config/os/irix/atomicity.h42
-rw-r--r--contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/irix/irix5.2/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/os_defines.h7
-rw-r--r--contrib/libstdc++/config/os/mingw32/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/mingw32/os_defines.h17
-rw-r--r--contrib/libstdc++/config/os/newlib/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/newlib/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_base.h55
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_inline.h69
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_noninline.h103
-rw-r--r--contrib/libstdc++/config/os/tpf/os_defines.h45
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_base.h59
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_inline.h71
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_noninline.h91
-rw-r--r--contrib/libstdc++/config/os/vxworks/os_defines.h37
-rw-r--r--contrib/libstdc++/config/os/windiss/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/windiss/os_defines.h5
-rwxr-xr-xcontrib/libstdc++/configure95125
-rw-r--r--contrib/libstdc++/configure.ac355
-rw-r--r--contrib/libstdc++/configure.host242
-rw-r--r--contrib/libstdc++/crossconfig.m4505
-rw-r--r--contrib/libstdc++/fragment.am26
-rw-r--r--contrib/libstdc++/include/Makefile.am417
-rw-r--r--contrib/libstdc++/include/Makefile.in797
-rw-r--r--contrib/libstdc++/include/backward/algo.h124
-rw-r--r--contrib/libstdc++/include/backward/algobase.h32
-rw-r--r--contrib/libstdc++/include/backward/alloc.h16
-rw-r--r--contrib/libstdc++/include/backward/backward_warning.h8
-rw-r--r--contrib/libstdc++/include/backward/bvector.h11
-rw-r--r--contrib/libstdc++/include/backward/complex.h10
-rw-r--r--contrib/libstdc++/include/backward/defalloc.h28
-rw-r--r--contrib/libstdc++/include/backward/deque.h6
-rw-r--r--contrib/libstdc++/include/backward/fstream.h6
-rw-r--r--contrib/libstdc++/include/backward/function.h120
-rw-r--r--contrib/libstdc++/include/backward/hash_map.h6
-rw-r--r--contrib/libstdc++/include/backward/hash_set.h6
-rw-r--r--contrib/libstdc++/include/backward/hashtable.h8
-rw-r--r--contrib/libstdc++/include/backward/heap.h6
-rw-r--r--contrib/libstdc++/include/backward/iomanip.h4
-rw-r--r--contrib/libstdc++/include/backward/iostream.h6
-rw-r--r--contrib/libstdc++/include/backward/istream.h4
-rw-r--r--contrib/libstdc++/include/backward/iterator.h39
-rw-r--r--contrib/libstdc++/include/backward/list.h6
-rw-r--r--contrib/libstdc++/include/backward/map.h6
-rw-r--r--contrib/libstdc++/include/backward/multimap.h6
-rw-r--r--contrib/libstdc++/include/backward/multiset.h6
-rw-r--r--contrib/libstdc++/include/backward/new.h18
-rw-r--r--contrib/libstdc++/include/backward/ostream.h6
-rw-r--r--contrib/libstdc++/include/backward/pair.h6
-rw-r--r--contrib/libstdc++/include/backward/queue.h6
-rw-r--r--contrib/libstdc++/include/backward/rope.h18
-rw-r--r--contrib/libstdc++/include/backward/set.h6
-rw-r--r--contrib/libstdc++/include/backward/slist.h6
-rw-r--r--contrib/libstdc++/include/backward/stack.h6
-rw-r--r--contrib/libstdc++/include/backward/stream.h6
-rw-r--r--contrib/libstdc++/include/backward/streambuf.h6
-rw-r--r--contrib/libstdc++/include/backward/strstream17
-rw-r--r--contrib/libstdc++/include/backward/tempbuf.h12
-rw-r--r--contrib/libstdc++/include/backward/tree.h6
-rw-r--r--contrib/libstdc++/include/backward/vector.h8
-rw-r--r--contrib/libstdc++/include/bits/allocator.h130
-rw-r--r--contrib/libstdc++/include/bits/allocator_traits.h237
-rw-r--r--contrib/libstdc++/include/bits/atomicity.h46
-rw-r--r--contrib/libstdc++/include/bits/basic_ios.h185
-rw-r--r--contrib/libstdc++/include/bits/basic_ios.tcc165
-rw-r--r--contrib/libstdc++/include/bits/basic_string.h1645
-rw-r--r--contrib/libstdc++/include/bits/basic_string.tcc795
-rw-r--r--contrib/libstdc++/include/bits/boost_concept_check.h150
-rw-r--r--contrib/libstdc++/include/bits/c++config89
-rw-r--r--contrib/libstdc++/include/bits/char_traits.h291
-rw-r--r--contrib/libstdc++/include/bits/codecvt.h327
-rw-r--r--contrib/libstdc++/include/bits/concept_check.h38
-rw-r--r--contrib/libstdc++/include/bits/concurrence.h95
-rw-r--r--contrib/libstdc++/include/bits/cpp_type_traits.h271
-rw-r--r--contrib/libstdc++/include/bits/deque.tcc860
-rw-r--r--contrib/libstdc++/include/bits/fstream.tcc864
-rw-r--r--contrib/libstdc++/include/bits/functexcept.h8
-rw-r--r--contrib/libstdc++/include/bits/gslice.h125
-rw-r--r--contrib/libstdc++/include/bits/gslice_array.h92
-rw-r--r--contrib/libstdc++/include/bits/indirect_array.h176
-rw-r--r--contrib/libstdc++/include/bits/ios_base.h440
-rw-r--r--contrib/libstdc++/include/bits/istream.tcc1067
-rw-r--r--contrib/libstdc++/include/bits/list.tcc293
-rw-r--r--contrib/libstdc++/include/bits/locale_classes.h601
-rw-r--r--contrib/libstdc++/include/bits/locale_facets.h4128
-rw-r--r--contrib/libstdc++/include/bits/locale_facets.tcc3050
-rw-r--r--contrib/libstdc++/include/bits/localefwd.h91
-rw-r--r--contrib/libstdc++/include/bits/mask_array.h100
-rw-r--r--contrib/libstdc++/include/bits/ostream.tcc654
-rw-r--r--contrib/libstdc++/include/bits/postypes.h215
-rw-r--r--contrib/libstdc++/include/bits/slice_array.h111
-rw-r--r--contrib/libstdc++/include/bits/sstream.tcc222
-rw-r--r--contrib/libstdc++/include/bits/stl_algo.h5612
-rw-r--r--contrib/libstdc++/include/bits/stl_algobase.h557
-rw-r--r--contrib/libstdc++/include/bits/stl_bvector.h1213
-rw-r--r--contrib/libstdc++/include/bits/stl_construct.h61
-rw-r--r--contrib/libstdc++/include/bits/stl_deque.h2556
-rw-r--r--contrib/libstdc++/include/bits/stl_function.h1486
-rw-r--r--contrib/libstdc++/include/bits/stl_heap.h357
-rw-r--r--contrib/libstdc++/include/bits/stl_iterator.h398
-rw-r--r--contrib/libstdc++/include/bits/stl_iterator_base_funcs.h62
-rw-r--r--contrib/libstdc++/include/bits/stl_iterator_base_types.h23
-rw-r--r--contrib/libstdc++/include/bits/stl_list.h2004
-rw-r--r--contrib/libstdc++/include/bits/stl_map.h1045
-rw-r--r--contrib/libstdc++/include/bits/stl_multimap.h987
-rw-r--r--contrib/libstdc++/include/bits/stl_multiset.h728
-rw-r--r--contrib/libstdc++/include/bits/stl_numeric.h163
-rw-r--r--contrib/libstdc++/include/bits/stl_pair.h176
-rw-r--r--contrib/libstdc++/include/bits/stl_queue.h596
-rw-r--r--contrib/libstdc++/include/bits/stl_raw_storage_iter.h31
-rw-r--r--contrib/libstdc++/include/bits/stl_relops.h114
-rw-r--r--contrib/libstdc++/include/bits/stl_set.h735
-rw-r--r--contrib/libstdc++/include/bits/stl_stack.h296
-rw-r--r--contrib/libstdc++/include/bits/stl_tempbuf.h186
-rw-r--r--contrib/libstdc++/include/bits/stl_threads.h168
-rw-r--r--contrib/libstdc++/include/bits/stl_tree.h1623
-rw-r--r--contrib/libstdc++/include/bits/stl_uninitialized.h223
-rw-r--r--contrib/libstdc++/include/bits/stl_vector.h532
-rw-r--r--contrib/libstdc++/include/bits/stream_iterator.h166
-rw-r--r--contrib/libstdc++/include/bits/streambuf.tcc196
-rw-r--r--contrib/libstdc++/include/bits/streambuf_iterator.h154
-rw-r--r--contrib/libstdc++/include/bits/stringfwd.h14
-rw-r--r--contrib/libstdc++/include/bits/type_traits.h508
-rw-r--r--contrib/libstdc++/include/bits/valarray_after.h499
-rw-r--r--contrib/libstdc++/include/bits/valarray_array.h115
-rw-r--r--contrib/libstdc++/include/bits/valarray_array.tcc299
-rw-r--r--contrib/libstdc++/include/bits/valarray_before.h701
-rw-r--r--contrib/libstdc++/include/bits/vector.tcc315
-rw-r--r--contrib/libstdc++/include/c/std_cctype.h8
-rw-r--r--contrib/libstdc++/include/c/std_cerrno.h6
-rw-r--r--contrib/libstdc++/include/c/std_cfloat.h6
-rw-r--r--contrib/libstdc++/include/c/std_climits.h6
-rw-r--r--contrib/libstdc++/include/c/std_clocale.h6
-rw-r--r--contrib/libstdc++/include/c/std_cmath.h26
-rw-r--r--contrib/libstdc++/include/c/std_csetjmp.h6
-rw-r--r--contrib/libstdc++/include/c/std_csignal.h6
-rw-r--r--contrib/libstdc++/include/c/std_cstdarg.h6
-rw-r--r--contrib/libstdc++/include/c/std_cstddef.h6
-rw-r--r--contrib/libstdc++/include/c/std_cstdio.h6
-rw-r--r--contrib/libstdc++/include/c/std_cstdlib.h8
-rw-r--r--contrib/libstdc++/include/c/std_cstring.h4
-rw-r--r--contrib/libstdc++/include/c/std_ctime.h6
-rw-r--r--contrib/libstdc++/include/c/std_cwchar.h16
-rw-r--r--contrib/libstdc++/include/c/std_cwctype.h10
-rw-r--r--contrib/libstdc++/include/c_compatibility/ctype.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/errno.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/float.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/iso646.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/limits.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/locale.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/math.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/setjmp.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/signal.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/stdarg.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/stddef.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/stdio.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/stdlib.h4
-rw-r--r--contrib/libstdc++/include/c_compatibility/string.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/time.h6
-rw-r--r--contrib/libstdc++/include/c_compatibility/wchar.h20
-rw-r--r--contrib/libstdc++/include/c_compatibility/wctype.h6
-rw-r--r--contrib/libstdc++/include/c_std/cmath.tcc12
-rw-r--r--contrib/libstdc++/include/c_std/std_cassert.h2
-rw-r--r--contrib/libstdc++/include/c_std/std_cctype.h6
-rw-r--r--contrib/libstdc++/include/c_std/std_cerrno.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_cfloat.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_climits.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_clocale.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_cmath.h657
-rw-r--r--contrib/libstdc++/include/c_std/std_csetjmp.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_csignal.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_cstdarg.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_cstddef.h6
-rw-r--r--contrib/libstdc++/include/c_std/std_cstdio.h14
-rw-r--r--contrib/libstdc++/include/c_std/std_cstdlib.h48
-rw-r--r--contrib/libstdc++/include/c_std/std_cstring.h6
-rw-r--r--contrib/libstdc++/include/c_std/std_ctime.h4
-rw-r--r--contrib/libstdc++/include/c_std/std_cwchar.h56
-rw-r--r--contrib/libstdc++/include/c_std/std_cwctype.h24
-rw-r--r--contrib/libstdc++/include/debug/bitset299
-rw-r--r--contrib/libstdc++/include/debug/debug.h531
-rw-r--r--contrib/libstdc++/include/debug/deque386
-rw-r--r--contrib/libstdc++/include/debug/formatter.h391
-rw-r--r--contrib/libstdc++/include/debug/hash_map38
-rw-r--r--contrib/libstdc++/include/debug/hash_map.h270
-rw-r--r--contrib/libstdc++/include/debug/hash_multimap.h261
-rw-r--r--contrib/libstdc++/include/debug/hash_multiset.h236
-rw-r--r--contrib/libstdc++/include/debug/hash_set38
-rw-r--r--contrib/libstdc++/include/debug/hash_set.h245
-rw-r--r--contrib/libstdc++/include/debug/list505
-rw-r--r--contrib/libstdc++/include/debug/map38
-rw-r--r--contrib/libstdc++/include/debug/map.h323
-rw-r--r--contrib/libstdc++/include/debug/multimap.h314
-rw-r--r--contrib/libstdc++/include/debug/multiset.h320
-rw-r--r--contrib/libstdc++/include/debug/safe_base.h207
-rw-r--r--contrib/libstdc++/include/debug/safe_iterator.h618
-rw-r--r--contrib/libstdc++/include/debug/safe_iterator.tcc140
-rw-r--r--contrib/libstdc++/include/debug/safe_sequence.h180
-rw-r--r--contrib/libstdc++/include/debug/set38
-rw-r--r--contrib/libstdc++/include/debug/set.h325
-rw-r--r--contrib/libstdc++/include/debug/string1001
-rw-r--r--contrib/libstdc++/include/debug/vector412
-rw-r--r--contrib/libstdc++/include/ext/algorithm274
-rw-r--r--contrib/libstdc++/include/ext/bitmap_allocator.h859
-rw-r--r--contrib/libstdc++/include/ext/debug_allocator.h121
-rw-r--r--contrib/libstdc++/include/ext/demangle.h2789
-rw-r--r--contrib/libstdc++/include/ext/enc_filebuf.h37
-rw-r--r--contrib/libstdc++/include/ext/functional32
-rw-r--r--contrib/libstdc++/include/ext/hash_fun.h122
-rw-r--r--contrib/libstdc++/include/ext/hash_map89
-rw-r--r--contrib/libstdc++/include/ext/hash_set112
-rw-r--r--contrib/libstdc++/include/ext/hashtable.h994
-rw-r--r--contrib/libstdc++/include/ext/iterator22
-rw-r--r--contrib/libstdc++/include/ext/malloc_allocator.h118
-rw-r--r--contrib/libstdc++/include/ext/memory37
-rw-r--r--contrib/libstdc++/include/ext/mt_allocator.h718
-rw-r--r--contrib/libstdc++/include/ext/new_allocator.h113
-rw-r--r--contrib/libstdc++/include/ext/numeric21
-rw-r--r--contrib/libstdc++/include/ext/pod_char_traits.h158
-rw-r--r--contrib/libstdc++/include/ext/pool_allocator.h254
-rw-r--r--contrib/libstdc++/include/ext/rb_tree48
-rw-r--r--contrib/libstdc++/include/ext/rope2452
-rw-r--r--contrib/libstdc++/include/ext/ropeimpl.h327
-rw-r--r--contrib/libstdc++/include/ext/slist203
-rw-r--r--contrib/libstdc++/include/ext/stdio_filebuf.h111
-rw-r--r--contrib/libstdc++/include/ext/stdio_sync_filebuf.h281
-rw-r--r--contrib/libstdc++/include/std/std_algorithm.h10
-rw-r--r--contrib/libstdc++/include/std/std_bitset.h367
-rw-r--r--contrib/libstdc++/include/std/std_complex.h291
-rw-r--r--contrib/libstdc++/include/std/std_deque.h17
-rw-r--r--contrib/libstdc++/include/std/std_fstream.h376
-rw-r--r--contrib/libstdc++/include/std/std_functional.h12
-rw-r--r--contrib/libstdc++/include/std/std_iomanip.h10
-rw-r--r--contrib/libstdc++/include/std/std_ios.h7
-rw-r--r--contrib/libstdc++/include/std/std_iosfwd.h14
-rw-r--r--contrib/libstdc++/include/std/std_iostream.h8
-rw-r--r--contrib/libstdc++/include/std/std_istream.h55
-rw-r--r--contrib/libstdc++/include/std/std_iterator.h11
-rw-r--r--contrib/libstdc++/include/std/std_limits.h328
-rw-r--r--contrib/libstdc++/include/std/std_list.h18
-rw-r--r--contrib/libstdc++/include/std/std_locale.h6
-rw-r--r--contrib/libstdc++/include/std/std_map.h12
-rw-r--r--contrib/libstdc++/include/std/std_memory.h109
-rw-r--r--contrib/libstdc++/include/std/std_numeric.h11
-rw-r--r--contrib/libstdc++/include/std/std_ostream.h42
-rw-r--r--contrib/libstdc++/include/std/std_queue.h20
-rw-r--r--contrib/libstdc++/include/std/std_set.h12
-rw-r--r--contrib/libstdc++/include/std/std_sstream.h159
-rw-r--r--contrib/libstdc++/include/std/std_stack.h16
-rw-r--r--contrib/libstdc++/include/std/std_stdexcept.h6
-rw-r--r--contrib/libstdc++/include/std/std_streambuf.h361
-rw-r--r--contrib/libstdc++/include/std/std_string.h11
-rw-r--r--contrib/libstdc++/include/std/std_utility.h11
-rw-r--r--contrib/libstdc++/include/std/std_valarray.h435
-rw-r--r--contrib/libstdc++/include/std/std_vector.h18
-rw-r--r--contrib/libstdc++/include/stdc++.h82
-rw-r--r--contrib/libstdc++/libmath/Makefile.am12
-rw-r--r--contrib/libstdc++/libmath/Makefile.in512
-rw-r--r--contrib/libstdc++/libmath/mathconf.h5
-rw-r--r--contrib/libstdc++/libmath/stubs.c195
-rw-r--r--contrib/libstdc++/libsupc++/Makefile.am144
-rw-r--r--contrib/libstdc++/libsupc++/Makefile.in731
-rw-r--r--contrib/libstdc++/libsupc++/cxxabi.h917
-rw-r--r--contrib/libstdc++/libsupc++/del_op.cc9
-rw-r--r--contrib/libstdc++/libsupc++/del_opnt.cc8
-rw-r--r--contrib/libstdc++/libsupc++/del_opv.cc8
-rw-r--r--contrib/libstdc++/libsupc++/del_opvnt.cc8
-rw-r--r--contrib/libstdc++/libsupc++/eh_alloc.cc14
-rw-r--r--contrib/libstdc++/libsupc++/eh_aux_runtime.cc9
-rw-r--r--contrib/libstdc++/libsupc++/eh_catch.cc18
-rw-r--r--contrib/libstdc++/libsupc++/eh_exception.cc8
-rw-r--r--contrib/libstdc++/libsupc++/eh_globals.cc15
-rw-r--r--contrib/libstdc++/libsupc++/eh_personality.cc18
-rw-r--r--contrib/libstdc++/libsupc++/eh_term_handler.cc51
-rw-r--r--contrib/libstdc++/libsupc++/eh_terminate.cc14
-rw-r--r--contrib/libstdc++/libsupc++/eh_throw.cc12
-rw-r--r--contrib/libstdc++/libsupc++/eh_type.cc8
-rw-r--r--contrib/libstdc++/libsupc++/eh_unex_handler.cc34
-rw-r--r--contrib/libstdc++/libsupc++/exception12
-rw-r--r--contrib/libstdc++/libsupc++/exception_defines.h7
-rw-r--r--contrib/libstdc++/libsupc++/new16
-rw-r--r--contrib/libstdc++/libsupc++/new_handler.cc8
-rw-r--r--contrib/libstdc++/libsupc++/new_op.cc8
-rw-r--r--contrib/libstdc++/libsupc++/new_opnt.cc8
-rw-r--r--contrib/libstdc++/libsupc++/new_opv.cc8
-rw-r--r--contrib/libstdc++/libsupc++/new_opvnt.cc8
-rw-r--r--contrib/libstdc++/libsupc++/pure.cc10
-rw-r--r--contrib/libstdc++/libsupc++/tinfo.cc28
-rw-r--r--contrib/libstdc++/libsupc++/tinfo.h28
-rw-r--r--contrib/libstdc++/libsupc++/tinfo2.cc8
-rw-r--r--contrib/libstdc++/libsupc++/typeinfo12
-rw-r--r--contrib/libstdc++/libsupc++/unwind-cxx.h14
-rw-r--r--contrib/libstdc++/libsupc++/vec.cc40
-rw-r--r--contrib/libstdc++/libsupc++/vterminate.cc98
-rw-r--r--contrib/libstdc++/linkage.m4526
-rwxr-xr-xcontrib/libstdc++/scripts/check_performance73
-rwxr-xr-xcontrib/libstdc++/scripts/check_survey.in449
-rwxr-xr-xcontrib/libstdc++/scripts/create_testsuite_files61
-rwxr-xr-xcontrib/libstdc++/scripts/extract_symvers67
-rwxr-xr-xcontrib/libstdc++/scripts/testsuite_flags.in64
-rw-r--r--contrib/libstdc++/src/Makefile.am186
-rw-r--r--contrib/libstdc++/src/Makefile.in741
-rw-r--r--contrib/libstdc++/src/allocator-inst.cc51
-rw-r--r--contrib/libstdc++/src/allocator.cc169
-rw-r--r--contrib/libstdc++/src/codecvt.cc63
-rw-r--r--contrib/libstdc++/src/complex_io.cc4
-rw-r--r--contrib/libstdc++/src/concept-inst.cc8
-rw-r--r--contrib/libstdc++/src/ctype.cc100
-rw-r--r--contrib/libstdc++/src/debug.cc660
-rw-r--r--contrib/libstdc++/src/debug_list.cc34
-rw-r--r--contrib/libstdc++/src/ext-inst.cc17
-rw-r--r--contrib/libstdc++/src/fstream-inst.cc8
-rw-r--r--contrib/libstdc++/src/functexcept.cc28
-rw-r--r--contrib/libstdc++/src/globals_io.cc129
-rw-r--r--contrib/libstdc++/src/globals_locale.cc210
-rw-r--r--contrib/libstdc++/src/io-inst.cc9
-rw-r--r--contrib/libstdc++/src/ios.cc228
-rw-r--r--contrib/libstdc++/src/ios_failure.cc48
-rw-r--r--contrib/libstdc++/src/ios_init.cc196
-rw-r--r--contrib/libstdc++/src/ios_locale.cc60
-rw-r--r--contrib/libstdc++/src/istream-inst.cc2
-rw-r--r--contrib/libstdc++/src/limits.cc4
-rw-r--r--contrib/libstdc++/src/list.cc141
-rw-r--r--contrib/libstdc++/src/locale-inst.cc555
-rw-r--r--contrib/libstdc++/src/locale-misc-inst.cc47
-rw-r--r--contrib/libstdc++/src/locale.cc626
-rw-r--r--contrib/libstdc++/src/locale_facets.cc93
-rw-r--r--contrib/libstdc++/src/locale_init.cc347
-rw-r--r--contrib/libstdc++/src/localename.cc518
-rw-r--r--contrib/libstdc++/src/misc-inst.cc39
-rw-r--r--contrib/libstdc++/src/ostream-inst.cc2
-rw-r--r--contrib/libstdc++/src/sstream-inst.cc8
-rw-r--r--contrib/libstdc++/src/stdexcept.cc6
-rw-r--r--contrib/libstdc++/src/streambuf-inst.cc8
-rw-r--r--contrib/libstdc++/src/string-inst.cc69
-rw-r--r--contrib/libstdc++/src/strstream.cc8
-rw-r--r--contrib/libstdc++/src/tree.cc431
-rw-r--r--contrib/libstdc++/src/wlocale-inst.cc39
-rw-r--r--contrib/libstdc++/src/wstring-inst.cc35
435 files changed, 156575 insertions, 54149 deletions
diff --git a/contrib/libstdc++/ChangeLog b/contrib/libstdc++/ChangeLog
index a9a9a64..bec5e2b 100644
--- a/contrib/libstdc++/ChangeLog
+++ b/contrib/libstdc++/ChangeLog
@@ -1,6798 +1,3476 @@
-2003-10-25 Paolo Carlini <pcarlini@suse.de>
+2004-07-20 Danny Smith <dannysmith@users.sourceforge.net>
- * include/bits/locale_facets.tcc (money_get::do_get(...,
- long double&): Properly size the temporary buffer.
+ * include/c_std/std_cwchar.h (wcsstr): Correct signature.
-2003-10-20 Benjamin Kosnik <bkoz@redhat.com>
+2004-07-19 Benjamin Kosnik <bkoz@redhat.com>
- PR libstdc++/10081
- * include/bits/basic_ios.h (basic_ios::basic_ios): Initialize
- _M_fctype, _M_fnumput, _M_fnumget.
-
-2003-10-16 Release Manager
-
- * GCC 3.3.2 Released.
-
-2003-10-07 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/11740
- * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_is):
- Fix to actually return (M & m) != 0 as per 22.2.1.1.2.
- * config/locale/generic/ctype_members.cc: Same.
-
-2003-10-02 Harald Boehme <boehme@informatik.hu-berlin.de>
-
- PR libstdc++/12451
- * libsupc++/cxxabi.h: Move forward declaration of __class_type_info.
+ PR libstdc++/15488
+ * testsuite/lib/libstdc++.exp (v3-copy-files): Revert.
-2003-10-01 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * configure.target: Handle Solaris 2.5 micro releases explicitly.
- Remove wildcards from Solaris 2.6, 7-9: there were no
- micro releases.
- Treat Solaris 10 and up like 7-9.
-
-2003-09-30 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/12296
- * include/bits/istream.tcc (peek): Set eofbit if sgetc
- returns eof.
-
-2003-09-30 Nathan Myers <ncm@cantrip.org>
- Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/11400
- * include/bits/stl_algo.h (search_n):
- Use iterator_traits<>::difference_type for __n.
-
-2003-09-25 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/11065
- * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_is): Fix.
- * config/locale/generic/ctype_members.cc: Same.
-
- * config/os/generic/ctype_inline.h: Update.
-
-2003-09-10 Daniel Jacobowitz <drow@mvista.com>
- Andreas Jaeger <aj@suse.de>
-
- PR libstdc++/12189
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Don't build
- abi_check if cross compiling.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
-
-2003-09-09 Alan Modra <amodra@bigpond.net.au>
-
- * configure: Regenerate.
-
-2003-08-25 Zack Weinberg <zack@codesourcery.com>
-
- * config/os/hpux/os_defines.h: Unconditionally define
- _GLIBCPP_GTHREAD_USE_WEAK to 0.
-
-2003-08-11 Andreas Jaeger <aj@suse.de>
+2004-07-17 Richard Sandiford <rsandifo@redhat.com>
- * include/Makefile.am (stamp-c_base): Add dependency on stamp-bits
- to make SMP-safe.
- * include/Makefile.in: Regenerated.
+ PR bootstrap/16469
+ * scripts/create_testsuite_files: Pass -print to find.
-2003-08-07 Bernardo Innocenti <bernie@develer.com>
+2004-07-15 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/11784
- * libstdc++-v3/config/cpu/m68k/atomicity.h (__exchange_and_add):
- Replace variants with new BSET-based version.
+ * docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 30.
+ * docs/html/ext/howto.html: Tweak entries for DRs 167/253/389/402.
-2003-08-04 Release Manager
+2004-07-15 Jakub Jelinek <jakub@redhat.com>
- * GCC 3.3.1 Released.
+ PR libstdc++/14697
+ * acinclude.m4 (glibcxx_shared_libgcc): Correct
+ glibcxx_shared_libgcc test for multilibs.
+ * configure: Rebuilt.
-2003-08-04 Release Manager
+2004-07-14 Paolo Carlini <pcarlini@suse.de>
- * GCC 3.3.1 Released.
+ * include/bits/locale_facets.tcc (time_get<>::do_get_time,
+ time_get<>::do_get_date): Use only once _M_extract_via_format,
+ instead of going through "%X"/"%x" and calling it two times
+ (+ using widen).
-2003-07-24 Nathan Myers <ncm-nospam@cantrip.org>
+2004-07-14 Paolo Carlini <pcarlini@suse.de>
- * testsuite/23_containers/map_operators.cc: Conform to
- container requirement as value must be Assignable.
+ PR libstdc++/16401
+ * include/bits/sstream.tcc (overflow): When reallocating _M_string
+ use an exponential grow policy.
+ * testsuite/27_io/basic_stringbuf/overflow/char/1.cc: New.
+ * testsuite/performance/27_io/stringbuf_overflow.cc: New.
-2003-07-18 Andreas Jaeger <aj@suse.de>
+2004-07-12 Benjamin Kosnik <bkoz@redhat.com>
- * config/abi/sparc-linux-gnu/baseline_symbols.txt: New file.
- * config/abi/mips-linux-gnu/baseline_symbols.txt: New file.
- * config/abi/hppa-linux-gnu/baseline_symbols.txt: New file.
- * config/abi/x86_64-linux-gnu/baseline_symbols.txt: Regenerated.
+ * include/bits/concurrence.h: Tweak comments.
-2003-07-17 Greg Schafer <gschafer@zip.com.au>
+2004-07-12 Benjamin Kosnik <bkoz@redhat.com>
+ Per Bothner <per@bothner.com>
+ Mohan Embar <gnustuff@thisiscool.com>
- * configure.in: Use 'true' and 'false' for
- GLIBCPP_IS_CROSS_COMPILING, otherwise memory limits are
- not checked when not cross compiling.
- * configure: Regenerate.
+ PR libstdc++/16248
+ * include/bits/concurrence.h (__glibcxx_mutex_type): New.
+ (__glibcxx_mutex): Encapsulate mutex init function into type for
+ threaded configurations without __GTHREAD_MUTEX_INIT.
+ (lock::lock): Make device member a reference.
+ (lock::~lock): Same.
+ * include/ext/pool_allocator.h (__pool_base::_M_get_mutex): Change
+ to mutex_type.
+ * src/allocator.cc: Same.
-2003-07-17 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/11528
- * include/bits/locale_facets.tcc (money_get::do_get):
- Strip only _leading_ zeros.
-
-2003-07-15 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/thread/pthread4.cc: Further tweak to avoid fini race.
-
-2003-07-15 Petur Runolfsson <peturr02@ru.is>
-
- * Revert previous commit: not safe on platforms with
- wint_t != size_t.
-
-2003-07-15 Petur Runolfsson <peturr02@ru.is>
-
- * include/bits/char_traits.h (char_traits<wchar_t>::move):
- Change last parameter from int_type to size_t.
-
-2003-07-08 Benjamin Kosnik <bkoz@redhat.com>
- Jerry Quinn <jlquinn@optonline.net>
-
- * include/bits/ios_base.h (ios_base::_M_getloc): Return reference
- to the imbued locale.
- * include/bits/locale_classes.h
- (__locale_cache_base,__locale_cache): Declare.
- (locale,locale::_Impl): Befriend __use_cache.
- (locale::_Impl::_M_get_cache): New function.
- (locale::_Impl::_M_install_cache): New function.
- * include/bits/locale_facets.h (__locale_cache): Declare.
- (numpunct): Befriend __locale_cache.
- (__locale_cache_base): New class.
- (__locale_cache): New class.
- * include/bits/locale_facets.tcc (__use_cache): New function.
- (num_put::_M_convert_int,_M_convert_float,do_put): Use it.
- Use cache data members in place of calls to facet.
- (num_put::_M_convert_int): Use _M_getloc.
- (num_put::_M_convert_float): Use _M_getloc.
- (__locale_cache::__locale_cache(locale&): New.
- (__locale_cache::__locale_cache(locale&,bool)): New.
- * src/globals.cc (facet_cache_vec): New.
- (locale_cache_np_c, locale_cache_np_w): New.
- * src/locale-inst.cc
- (__locale_cache<numpunct<char> >): Define.
- (__locale_cache<numpunct<wchar_t> >): Define.
- (__use_cache<numpunct<char> >): Define.
- (__use_cache<numpunct<wchar_t> >): Define.
- * src/localename.cc (facet_cache_vec): Declare.
- (locale_cache_np_c, locale_cache_np_w): Declare.
- (locale::_Impl::~Impl): Destroy caches.
- (locale::_Impl::Impl): Initialize cache storage. Fill in
- static caches.
- (locale::_Impl::_M_install_facet): Expand cache storage.
-
-2003-07-04 Jerry Quinn <jlquinn@optonline.net>
-
- * include/bits/locale_facets.tcc (__int_to_char): Move common
- case to the top.
-
-2003-07-04 Jerry Quinn <jlquinn@optonline.net>
-
- * testsuite/27_io/ostream_inserter_arith.cc (test05, test06):
- Add missing bool test.
-
-2003-07-04 H.J. Lu <hongjiu.lu@intel.com>
-
- * Makefile.am: Replace PWD with PWD_COMMAND.
- * Makefile.in: Regenerated.
- * docs/html/Makefile: Likewise.
-
-2003-07-01 Roger Sayle <roger@eyesopen.com>
-
- * acinclude.m4 (GLIBCPP_CHECK_STDLIB_SUPPORT): Fix typo in CXXFLAGS.
- (GLIBCPP_CHECK_MATH_SUPPORT): Likewise.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
-
-2003-06-27 Matthias Klose <doko@debian.org>
-
- * testsuite/Makefile.am (check-abi, check-abi-verbose): Save
- output of abi-check in libstdc++-v3-abi.sum.
- * testsuite/Makefile.in: Regenerate.
+2004-07-12 Brad Spencer <spencer@infointeractive.com>
-2003-06-25 Phil Edwards <pme@gcc.gnu.org>
+ * include/ext/mt_allocator.h: Handle allocations at static
+ initialization that happen before _S_options is (automatically)
+ constructed; set _S_init even if _M_force_new is true.
- Bulk documentation merge (copy) from trunk.
- * docs/doxygen/filter, docs/doxygen/filter.sed,
- docs/doxygen/mainpage.html, docs/doxygen/run_doxygen,
- docs/doxygen/user.cfg.in, docs/html/configopts.html,
- docs/html/documentation.html, docs/html/explanations.html,
- docs/html/install.html, docs/html/test.html, docs/html/17_intro/BUGS,
- docs/html/17_intro/CHECKLIST, docs/html/17_intro/contribute.html,
- docs/html/20_util/howto.html, docs/html/ext/howto.html,
- docs/html/ext/sgiexts.html, docs/html/faq/index.html,
- docs/html/faq/index.txt: Merge from trunk.
+2004-07-12 Paul Brook <paul@codesourcery.com>
-2003-06-23 Loren J. Rittle <ljrittle@acm.org>
+ * include/bits/concurrence.h: Still create mutex object when
+ single-threaded.
- * configure.target (freebsd*): Set abi_baseline_pair.
- * config/abi/i386-freebsd4/baseline_symbols.txt: Update from 3.2
- (at or near first release) to 3.3.
- * config/abi/i386-freebsd5/baseline_symbols.txt: New file.
- * config/abi/alpha-freebsd5/baseline_symbols.txt: New file.
- * config/abi/sparc-freebsd5/baseline_symbols.txt: New file.
+2004-07-12 Benjamin Kosnik <bkoz@redhat.com>
-2003-06-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+ * include/bits/concurrence.h (__gnu_cxx::lock): New.
+ * include/ext/pool_allocator.h (__pool_base::_Lock::_S_lock): Remove.
+ (__pool_base::_M_get_mutex): New.
+ * include/bits/allocator.h: Tweak.
+ * src/allocator.cc (__pool_base::_M_get_free_list): Correct offset.
- PR bootstrap/11272
- Backport from mainline:
+ * src/allocator.cc: Move all instantiations...
+ * src/allocator-inst.cc: ...here.
- 2003-03-09 Paolo Carlini <pcarlini@unitus.it>
+2004-07-12 Benjamin Kosnik <bkoz@redhat.com>
- * config/io/basic_file_stdio.cc: include <unistd.h>.
+ * include/ext/pool_allocator.h: Qualify __throw_bad_alloc.
+ (__pool_base): Remove unused template parameter. Add
+ protected. Move lock data into __pool_base::_Lock. Remove static
+ on member functions.
+ (__pool_base::_M_get_free_list): New.
+ (__pool_alloc): Move _S_force new here.
+ * src/allocator.cc: Move out of line __pool_base definitions here.
+ * config/linker-map.gnu: Export bits from __pool_base.
-2003-06-20 Matthias Klose <doko@debian.org>
+2004-07-07 Benjamin Kosnik <bkoz@redhat.com>
- * configure.target: Set try_cpu to target_cpu for existing
- baseline files.
-
-2003-06-19 Andreas Jaeger <aj@suse.de>
-
- * configure.in: Pass MULTISUBDIR to testsuite/Makefile.
+ * configure.ac (libtool_VERSION): To 6:2:0.
* configure: Regenerated.
-2003-06-19 Andreas Jaeger <aj@suse.de>
-
- Backport from mainline:
- 2003-06-18 Andreas Jaeger <aj@suse.de>
+ * testsuite/testsuite_abi.cc (check_version): Add 3.4.2.
- * testsuite/Makefile.am (new-abi-baseline): Create baseline
- directory.
- (baseline_file): Use baseline_dir.
- (baseline_dir): New.
- (mkinstalldirs): New.
+2004-07-07 Aaron W. LaFramboise <aaronraolete36@aaronwl.com>
- * acinclude.m4: Rename baseline_file to baseline_dir, strip
- filename from baseline_dir.
-
- * testsuite/Makefile.in: Regenerated.
- * Makefile.in: Regenerated.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
-
- 2003-06-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/abi/i486-linux-gnu/baseline_symbols.txt: Update to 3.3.0.
-
- 2003-06-16 Benjamin Kosnik <bkoz@redhat.com>
+ PR libstdc++/16411
+ * config/linker-map.gnu: Add stdio_sync_filebuf::file exports.
+
+2004-07-06 Anssi Hannula <anssi.hannula@mbnet.fi>
- * Makefile.am (check-abi): Move...
- (new-abi-baseline): Move...
- * testsuite/Makefile.am: ...here.
- (new-abi-baseline): Conditionalize.
- (check-abi): Conditionalize.
- (check-abi-verbose): New.
- * Makefile.in: Regenerate.
- * testsuite/Makefile.in: Regenerate.
- * configure.in: Consolidate testsuite configure bits.
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Same.
+ PR libstdc++/15928
+ * crossconfig.m4: Add in bits for djgpp.
* configure: Regenerate.
- * aclocal.m4: Regenerate.
- * testsuite/abi_check.cc: Add --check-verbose.
- Only output detailed information if --check-verbose.
+2004-07-06 Paolo Carlini <pcarlini@suse.de>
- 2003-06-16 Andreas Jaeger <aj@suse.de>
-
- * testsuite/abi_check.cc: Create summary report.
-
- 2003-06-16 Andreas Jaeger <aj@suse.de>
-
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Make
- check-abi multilib aware.
+ PR libstdc++/16210
+ * acinclude.m4 (GLIBCXX_ENABLE_LONG_LONG): Do not check for the
+ availability of strto(u)ll, not used anymore in the iostreams.
* aclocal.m4: Regenerate.
* configure: Regenerate.
- 2003-06-16 Benjamin Kosnik <bkoz@redhat.com>
- Andreas Jaeger <aj@suse.de>
+2004-07-06 Paolo Carlini <pcarlini@suse.de>
- * configure.target: Set x86_64 abi_baseline pair correctly.
+ * include/bits/cpp_type_traits.h: Move the additions to
+ namespace __gnu_internal outside of namespace std; trivial
+ formatting fixes.
+2004-07-06 Paolo Carlini <pcarlini@suse.de>
- 2003-06-13 Benjamin Kosnik <bkoz@redhat.com>
+ * docs/html/17_intro/contribute.html: Update some links.
+ * docs/html/17_intro/porting-howto.html: Likewise.
+ * docs/html/17_intro/porting-howto.xml: Likewise.
+ * docs/html/18_support/howto.html: Likewise.
+ * docs/html/21_strings/howto.html: Likewise.
+ * docs/html/27_io/howto.html: Likewise.
+ * docs/html/configopts.html: Likewise.
+ * docs/html/ext/howto.html: Likewise.
+ * docs/html/faq/index.html: Likewise.
+ * docs/html/install.html: Don't mention 2.x compilers.
- * config/abi/i686-pc-linux-gnu: To..
- * config/abi/i486-linux-gnu: ...this.
- * config/abi/alphaev67-unknown-linux-gnu: To..
- * config/abi/alpha-linux-gnu: ...this.
- * config/abi/ia64-unknown-linux-gnu: To...
- * config/abi/ia64-linux-gnu: ...this.
- * config/abi/x86_64-unknown-linux-gnu: To...
- * config/abi/x86_64-linux-gnu: ...this.
- * config/abi/i386-unknown-freebsd4: To...
- * config/abi/i386-freebsd4: ...this.
- * configure.target: abi_baseline_triplet to abi_baseline_pair.
- Simplify cpu bits so that abi_baseline_pair can use the same
- cpu configuration.
- * acinclude.m4: Same.
- * aclocal.m4: Regenerate.
- * configure.in: Can't get enable_abi_check to yes unless native.
- * configure: Regenerate.
+2004-07-01 Release Manager
-2003-06-11 Benjamin Kosnik <bkoz@redhat.com>
+ * GCC 3.4.1 released.
- * configure.in (libtool_VERSION): To 5:5:0.
- * configure: Regenerated.
+2004-06-28 Benjamin Kosnik <bkoz@redhat.com>
-2003-06-07 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/11095
- * include/bits/istream.tcc (operator>>(basic_istream&, _CharT*)):
- Deal with width() smaller than zero.
- * include/bits/ostream.tcc (operator<<(basic_ostream&, _CharT),
- operator<<(basic_ostream&, char), operator<<(basic_ostream&,
- const _CharT*), operator<<(basic_ostream<_CharT, _Traits>&,
- const char*), operator<<(basic_ostream<char, _Traits>&,
- const char*), operator<<(basic_ostream, const basic_string&)): Likewise.
-
-2003-06-06 Nathan Myers <ncm-nospam@cantrip.org>
-
- * include/bits/stl_iterator.h (reverse_iterator::reverse_iterator()):
- Apply DR235: default constructor default-initializes data member.
- Instantiated on a pointer type, the member has to end up equal
- to zero.
-
-2003-06-02 Andrew Pinski <pinskia@physics.uc.edu>
-
- PR libstdc++/9815
- * config/cpu/i386/atomicity.h (__exchange_and_add): add intel
- asm case to asm.
- * config/cpu/i486/atomicity.h (__exchange_and_add): Likewise.
- (__atomic_add): likewise.
-
-2003-06-02 Richard Kreckel <Richard.Kreckel@GiNaC.DE>
-
- PR libstdc++/11062
- * config/cpu/mips/atomicity.h: Change __attribute__ ((unused)) to
- __attribute__ ((__unused__)).
- * config/os/aix/atomicity.h: Likewise.
-
-2003-05-27 Steve Ellcey <sje@cup.hp.com>
-
- * config/os/hpux/os_defines.h: Define _LIBUNWIND_STD_ABI if we are
- on IA64 HP-UX.
- * libsupc++/eh_throw.cc: Don't call _Unwind_Resume_or_Rethrow if
- _LIBUNWIND_STD_ABI is set.
-
-2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * libmath/stubs.c (hypot, hypotf, hypotl): Don't divide by
- zero.
- Update copyright year.
-
-2003-05-21 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
-
- * include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
- Cast via void* to avoid -Wcast-align warnings.
- (__default_alloc_template::_S_refill): Likewise.
-
-2003-05-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- PR libstdc++/10689
- * include/std/std_complex.h (pow): Tidy.
-
-2003-05-17 Nathan Myers <ncm@cantrip.org>
-
- * include/bits/streambuf.tcc (__copy_streambufs): Rewrote.
-
-2003-05-15 Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite/Makefile.am: Properly quote LD_RUN_PATH.
- * testsuite/Makefile.in: Regenerate.
-
-2003-05-14 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/thread/pthread4.cc: Tweak test.
-
-2003-05-13 Release Manager
-
- * GCC 3.3 Released.
-
-2003-05-06 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/faq/index.html (3.10): Add note about mips atomicity.h.
- * docs/html/faq/index.txt: Regenerated.
-
-2003-05-02 Joel Sherrill <joel.sherrill@OARcorp.com>
- Loren J. Rittle <ljrittle@acm.org>
- Martin v. Loewis <martin@v.loewis.de>
-
- libstdc++/10556
- * config/cpu/i386/atomicity.h: New file.
-
-2003-05-02 Richard Henderson <rth@redhat.com>
-
- PR c++/10570
- * libsupc++/eh_catch.cc (__cxa_begin_catch): Handle foreign exceptions.
- (__cxa_end_catch): Likewise.
- * libsupc++/eh_throw.cc (__cxa_rethrow): Likewise. Use
- _Unwind_Resume_or_Rethrow.
- * libsupc++/eh_personality.cc (empty_exception_spec): New.
- (PERSONALITY_FUNCTION): Don't ignore terminate or catch-all
- for _UA_FORCE_UNWIND. Honor empty filter spec for foreign
- exceptions. Don't push terminate/unexpected to cxa functions.
- (__cxa_call_unexpected): Remove foreign exception fixmes.
-
-2003-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- Revert __locale_cache.
- * include/bits/locale_facets.tcc (num_put::_M_convert_int): Remove
- __locale_cache.
- (num_put::_M_convert_int): Same.
- (num_put::do_put(bool)): Same.
- (__locale_cache::_M_init): Same.
- (__locale_cache::_S_callback): Same.
- * include/bits/locale_facets.h (__locale_cache_base): Remove.
- (__locale_cache): Remove.
- * include/bits/basic_ios.h (basic_ios::init): Remove __locale_cache.
- (basic_ios::_M_cache_locale): Same.
- * include/bits/basic_ios.tcc: Same.
- * include/bits/ios_base.h: Same.
- (ios_base::_M_cache): Remove.
- * src/locale-inst.cc: Same.
- * src/ios.cc: Same.
- * src/globals.cc: Same.
-
- * config/linker-map.gnu: Same.
-
-2003-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (libtool_VERSION): To 5:4:0.
- * configure: Regenerated.
-
- * testsuite/abi_check.cc (check_version): Update known versions.
- Check added symbols for version_name != base version. Add missing
- symbols to incompatible list.
-
- * config/linker-map.gnu: Fixup for __basic_file::showmanyc_helper.
-
-2003-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * acinclude.m4 (GLIBCPP_EXPORT_FLAGS): Remove -Winline.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
+ * include/debug/safe_base.h (__gnu_debug::_Safe_sequence_base):
+ Revert -Weffc++ changes that defined copy ctory and or assignment
+ operator.
+ * libsupc++/tinfo.cc (__upcast_result): Same.
+
+2004-06-25 Benjamin Kosnik <bkoz@redhat.com>
-2003-05-01 Paolo Carlini <pcarlini@unitus.it>
- Nathan Myers <ncm@cantrip.org>
-
- Backport from mainline fix of 2003-03-28.
- PR libstdc++/9533
- * include/bits/fstream.tcc (basic_filebuf<>::open): Don't
- call underflow().
- (basic_filebuf<>::showmanyc): Use the information provided
- by codecvt and __basic_file<>::showmanyc_helper to implement
- a non-trivial showmanyc.
- * config/io/basic_file_stdio.h
- (__basic_file<>::showmanyc_helper): New, declare.
- * config/io/basic_file_stdio.cc
- (__basic_file<>::showmanyc_helper): Define.
- (__basic_file<>::_M_open_mode): Don't set O_NONBLOCK.
- (__basic_file<char>::open): Don't call fcntl().
- * acinclude.m4 (GLIBCPP_CHECK_S_ISREG_OR_S_IFREG,
- GLIBCPP_CHECK_POLL): New macros.
- * configure.in: Call here.
- * acconfig.h: Add #undefs for the corresponding symbols.
- * aclocal.m4: Regenerate.
+ PR libstdc++/16182
+ * linkage.m4 (GLIBCXX_CHECK_BUILTIN_MATH_DEC): Revert to
+ AC_DEFINE_UNQUOTED.
* configure: Regenerate.
- * config.h.in: Regenerate.
-
-2003-04-29 Phil Edwards <pme@gcc.gnu.org>
-
- Bulk documentation merge (copy) from trunk.
- * docs/doxygen/Intro.3, docs/doxygen/TODO, docs/doxygen/mainpage.html,
- docs/doxygen/run_doxygen, docs/doxygen/user.cfg.in,
- docs/html/configopts.html, docs/html/debug.html,
- docs/html/documentation.html, docs/html/explanations.html,
- docs/html/install.html, docs/html/17_intro/howto.html,
- docs/html/17_intro/porting.html, docs/html/18_support/howto.html,
- docs/html/19_diagnostics/howto.html, docs/html/27_io/howto.html,
- docs/html/ext/howto.html, docs/html/ext/sgiexts.html,
- docs/html/faq/index.html, docs/html/faq/index.txt:
- Merge from trunk.
-
-2003-04-28 Nathan Myers <ncm@cantrip.org>
-
- Move some basic_string members out of line because
- they are too big to reasonably be inline.
- * include/bits/basic_string.h
- (assign(const basic_string&, size_type, size_type),
- assign(const _CharT*, size_type),
- insert(size_type, const basic_string&, size_type, size_type),
- insert(size_type, const _CharT*, size_type),
- replace(size_type, size_type, const _CharT*, size_type)):
- Move from here to...
- * include/bits/basic_string.tcc: ...here.
-
-2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/10132
- * include/std/std_fstream.h (basic_filebuf::is_open): Add throw()
- exception specifications.
- (basic_filebuf::close): Same.
- (basic_filebuf::_M_destroy_internal_buffer): Same.
- (basic_filebuf): Remove __res_type typedef.
- * include/std/std_streambuf.h:
- (basic_streambuf::_M_pback_destroy): Same.
- * src/fstream.cc: Same.
- * include/bits/fstream.tcc
- (basic_filebuf::_M_convert_to_external): Simplify.
- (basic_filebuf::seekoff): Use has_facet before use_facet.
- (basic_filebuf::close): Add exception specification of throw().
-
-2003-04-25 Ranjit Mathew <rmathew@hotmail.com>
- Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite_flags.in: Guard against the possibility
- of having "xgcc" as a part of a folder name in the
- path to the GCC build folder.
- * testsuite/Makefile.am: Likewise.
- * testsuite/Makefile.in: Regenerated.
-
-2003-04-24 Richard Sandiford <rsandifo@redhat.com>
-
- * src/localename.cc (__gnu_cxx::facet_vec): Correct types.
-2003-04-24 Benjamin Kosnik <bkoz@redhat.com>
+2004-06-25 Benjamin Kosnik <bkoz@redhat.com>
- * config/locale/generic/c_locale.h: Fix placement for old parser.
-
-2003-04-23 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/locale/generic/c_locale.h (__convert_from_v): Use
- attribute unused.
-
-2003-04-23 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/istream.tcc (putback, unget, sync, tellg, seekg):
- Comment and change to comply with DR 60 and the effect on gcount().
- * include/std/std_istream.h: Update comments.
-
-2003-04-22 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/27_io/filebuf_members.cc (test_07): Adjust timing.
-
-2003-04-22 Jerry Quinn <jlquinn@optonline.net>
- Benjamin Kosnik <bkoz at redhat dot com>
-
- * include/bits/basic_ios.h (ios_base::Init::_S_ios_create):
- Declare friend.
- (basic_ios::init, basic_ios::_M_cache_locale): Add locale
- cache argument.
- * include/bits/basic_ios.tcc (basic_ios::init): Pass cache to
- _M_cache_locale.
- (basic_ios::_M_cache_locale): Use placement new if cache is
- provided. Track the distinction in iword(0).
- * include/bits/locale_facets.tcc
- (__locale_cache::_S_callback): Only delete cache if iword(0)
- is 0, i.e. not static.
- * src/globals.cc: Allocate space for __locale_cache objects.
- * src/ios.cc (__gnu_cxx): Declare extern __locale_cache objects
- for standard wide and narrow stream objects.
- (ios_base::Init::_S_ios_create): Use them.
-
-2003-04-18 Loren J. Rittle <ljrittle@acm.org>
-
- * config/os/bsd/freebsd/ctype_inline.h: Support _M_table
- when so installed.
-
- * docs/html/17_intro/porting.texi (_GLIBCPP_USE_C99_CHECK): New macro.
- (_GLIBCPP_USE_C99_DYNAMIC): New macro.
- (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
- (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
- * config/os/bsd/freebsd/os_defines.h (_GLIBCPP_USE_C99_CHECK):
- New macro.
- (_GLIBCPP_USE_C99_DYNAMIC): New macro.
- (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
- (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
- * include/c_std/std_cstdlib.h: Use new macros.
- * include/c_std/std_cstdio.h: Use new macros.
- * include/c_std/std_cwchar.h: Use new macros.
-
-2003-04-17 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/9555
- * include/bits/ostream.tcc: Catch all exceptions for formatted
- output, instead of std::exception and derivatives.
- * include/bits/istream.tcc: Same.
-
-2003-04-17 Andreas Tobler <toa@pop.agri.ch>
- Benjamin Kosnik <bkoz@redhat.com>
-
- * config/os/generic/ctype_inline.h: Fix.
-
-2003-04-17 Andreas Tobler <toa@pop.agri.ch>
-
- * configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses
- solaris includes, not generic.
-
-2003-04-15 Benjamin Kosnik <bkoz@redhat.com>
- Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9423
- * docs/html/27_io/howto.html
- ('The buffering is screwing up my program!'): Explain that
- opening counts as an I/O operation.
-
-2003-04-15 Andreas Tobler <a.tobler@schweiz.ch>
+ * include/debug/formatter.h (__gnu_debug::_Error_formatter):
+ Remove copy constructor and assignment operator.
+
+2004-06-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/16154
+ * include/bits/boost_concept_check.h (struct _TrivialIteratorConcept):
+ Don't require the _DefaultConstructibleConcept.
+ (struct _ForwardIteratorConcept): Require it here.
+
+2004-06-21 Loren J. Rittle <ljrittle@acm.org>
+
+ * config/linker-map.gnu: Use wildcards for
+ __basic_file::sys_open(FILE*, _Ios_Openmode).
+
+2004-06-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/mt_allocator (__mt_alloc<>::_Tune): Add _M_align,
+ the alignment requested.
+ (__mt_alloc<>::_Tune::_Tune): Tweak consistently.
+ (__mt_alloc<>::allocate): Use it instead of sizeof(_Block_record).
+ (__mt_alloc<>::deallocate): Likewise.
+
+2004-06-18 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/16020
+ * include/debug/safe_base.h
+ (_Safe_sequence_base::_Safe_sequence_base(const _Safe_sequence_base&),
+ _Safe_sequence_base::operator=): Provide definitions.
+ * testsuite/23_containers/bitset/cons/16020.cc: New.
+
+2004-06-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/rope (rope(_CharT, const allocator_type&)): Fix
+ to use _Data_allocate.
+ * include/ext/ropeimpl.h (rope<>::_S_leaf_concat_char_iter): Likewise.
+ (rope<>::_S_substring): Likewise.
+ (rope<>::rope(size_t, _CharT, const allocator_type&)): Likewise.
+ (rope<>::c_str()): Likewise.
+ (rope<>::replace_with_c_str()): Likewise.
+
+ * include/ext/ropeimpl.h (_Rope_iterator_base<>::_S_setbuf):
+ Correctly qualify _S_leaf, _S_function, etc., with _Rope_constants::,
+ not _RopeRep.
+ (_Rope_iterator_base<>::_S_setcache): Likewise.
+ (_Rope_iterator_base<>::_S_setcache_for_incr): Likewise.
+ (rope<>::_S_substring): Likewise.
+ (rope<>::_S_dump): Likewise.
+ (rope<>::_S_fetch_ptr): Likewise.
+ (rope<>::_S_compare): Likewise.
+ (rope<>::replace_with_c_str()): Likewise.
+
+ * testsuite/ext/rope.cc: Rename to testsuite/ext/rope/1.cc.
+ * testsuite/ext/rope/2.cc: New.
+
+2004-06-18 Paolo Carlini <pcarlini@suse.de>
+ Matt Austern <austern@apple.com>
+
+ * testsuite/ext/rope/3.cc: New.
+
+2004-06-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get<>::_M_extract_name):
+ Don't use the 'magic number' 10 in the computation of __minlen;
+ never access __name past __minlen; in the loop over __i3, don't
+ decrease __nmatches and increase __i3 at once, only either of
+ the two; tidy.
+
+2004-06-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/pool_allocator.h: Convert to a global free-list,
+ as per the original SGI/HP design: move the implementation
+ details to struct __pool_base, from which __pool_alloc derives.
+ * src/allocator.cc: Instantiate __pool_base.
+
+2004-06-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/15775
+ * include/bits/stl_deque.h: Consistently with stl_set.h, define
+ pointer as allocator's pointer, likewise for reference,
+ const_pointer, and const_reference.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+
+2004-06-11 Dhruv Matani <dhruvbird@gmx.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/testsuite_performance.h
+ (resource_counter::allocated_memory): Make it return the right
+ number of bytes requested by the allocators/application. This is
+ the sbrk+mmaped memory.
+
+2004-06-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * crossconfig.m4: Remove signbit, signbitf, signbitl.
+ * linkage.m4: Comment LIBMATHOBJS, tweak others. AC_DEFINES for
+ builtin math functions instead of AC_DEFINE_UNQUOTED.
+ * configure: Regenerate.
- * testsuite/thread/pthread1.cc: Enable for darwin test.
- * testsuite/thread/pthread2.cc: Same.
- * testsuite/thread/pthread3.cc: Same.
- * testsuite/thread/pthread4.cc: Same.
- * testsuite/thread/pthread5.cc: Same.
- * testsuite/thread/pthread6.cc: Same.
+2004-06-10 Benjamin Kosnik <bkoz@redhat.com>
-2003-04-15 Loren J. Rittle <ljrittle@acm.org>
+ * docs/doxygen/filter.sed: Rename _GLIBCXX_STD to std.
+ * docs/doxygen/mainpage.html: Remove links.
- * include/bits/concept_check.h: Fix multi-line comment.
- * testsuite/17_intro/headers.cc (dg-options): Add -Wall -Wsystem-header
- when target is *-*-freebsd*.
+2004-06-08 Jason Merrill <jason@redhat.com>
- libstdc++/7680
- * include/c_std/std_cmath.h (__gnu_cx::__c99_binding): New namespace.
- Populate it with multiple legal ways to obtain the C99 float
- transcendentals. Use them instead of direct global reference.
- (C99 FP capture): Guard usage with _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC.
- * docs/html/17_intro/porting.texi
- (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
- (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
- (_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC): New macro.
- * config/os/bsd/freebsd/os_defines.h
- (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
- (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
- * testsuite/26_numerics/c_math_dynamic.cc: New file.
+ * config/linker-map.gnu: Use wildcards for
+ __basic_file::{xsgetn,xsputn,seekoff,xsputn_2}.
- * testsuite/26_numerics/c99_classification_macros_c.cc: Add XFAIL.
+2004-05-31 Benjamin Kosnik <bkoz@redhat.com>
-2003-04-14 M. Warner Losh <imp@bsdimp.com>
+ * config/linker-map.gnu (GLIBCXX_3.4.1): Add.
+ * testsuite/testsuite_abi.cc: Same.
+ * configure.ac (libtool_VERSION): Bump to 6:1:0.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
- * include/std/std_fstream.h: Add required typename.
+2004-05-31 Richard B. Kreckel <Richard.Kreckel@Framatome-ANP.com>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/14600
+ * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): New.
+ * include/ext/stdio_filebuf.h (stdio_filebuf::file): New.
+ * config/io/basic_file_stdio.cc (__basic_file::file): New.
+ * config/io/basic_file_stdio.h: Define.
-2003-04-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2004-05-30 Benjamin Kosnik <bkoz@redhat.com>
- * os/hpux/ctype_inline.h: Replace with gnu-linux version.
+ PR libstdc++/15675
+ * docs/html/documentation.html: Update doxygen links for 3.4.0.
-2003-04-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2004-05-30 Jan Beulich <jbeulich@novell.com>
- * basic_file_stdio.cc (__basic_file<char>::close): Don't flush stream
- twice. Always set _M_cfile to 0 when stream was open.
+ * scripts/create_testsuite_files: Tweak.
-2003-04-04 Jerry Quinn <jlquinn@optonline.net>
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/10276
- * src/ios.cc (ios_base::_M_init): Remove _M_callbacks
- initialization.
+ * include/ext/mt_allocator.h:(__mt_alloc::allocate): Minor
+ tweaks.
-2003-03-31 Paolo Carlini <pcarlini@unitus.it>
+2004-05-30 Dhruv Matani <dhruvbird@gmx.net>
- * include/ext/stdio_filebuf.h
- (stdio_filebuf::stdio_filebuf(int, openmode, bool, size_t),
- stdio_filebuf::stdio_filebuf(__c_file*, openmode, size_t):
- _M_buf_size_opt == 0 means only "not to use an allocated buffer"
- since a stack-based buffer is used for small values of the size_t
- parameter.
- * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow).
- If _M_buf_size != 0 flush out the buffer (any kind, stack-based too).
- * testsuite/ext/stdio_filebuf_2.cc: New testfile.
+ * include/ext/mt_allocator.h:(__mt_alloc::allocate): Re-write
+ allocation loop which removes blocks from the global free list
+ from O(N) to O(1) when the required blocks are <= the number
+ available.
-2003-03-25 Paolo Carlini <pcarlini@unitus.it>
- Petur Runolfsson <peturr02@ru.is>
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/10097
- * src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
- basic_filebuf<wchar_t>::_M_underflow_common):
- if (gptr() < egptr()) return *gptr().
- * testsuite/27_io/filebuf_virtuals.cc (test15): Add.
+ * include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
+ Consistently update __bin._M_free[0].
+ (__mt_alloc<>::allocate): When __bin._M_first[0] != NULL use
+ __bin._M_free[0] to simplify the while loop (i.e., the number
+ of iterations becomes known at the outset).
- * testsuite/27_io/filebuf_members.cc (test_04): Minor
- changes: unlink fifo before making it, fix spelling error.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-22 Loren J. Rittle <ljrittle@acm.org>
+ * include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
+ The critical section is actually very small, only two assignments.
- * config/os/hpux/ctype_noninline.h (ctype<char>::classic_table):
- Correct return value.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-21 Jerry Quinn <jlquinn@optonline.net>
+ * include/ext/mt_allocator.h (__mt_alloc<>::allocate): Factor out
+ some duplicated code.
+ (__mt_alloc<>::_Bin_record): Spare the space of _M_free and _M_used
+ in the single threaded case.
- PR libstdc++/5730
- * include/bits/c++config (_GLIBCPP_FAST_MATH): Define.
- * include/std/std_complex.h (norm): Use faster,
- less accurate computation for builtin float types under --fast-math.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-21 Paolo Carlini <pcarlini@unitus.it>
+ * include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
+ Rearrange arithmetic to avoid computing two divisions at
+ each deallocation.
- PR libstdc++/10167
- * config/locale/ieee_1003.1-2001/codecvt_specializations.h
- (do_out, do_unshift, do_in): qualify 'ok', 'error', 'partial',
- 'noconv' with codecvt_base::.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-19 Alexandre Oliva <aoliva@redhat.com>
+ * include/ext/mt_allocator.h (__mt_alloc<>::_S_initialize):
+ Streamline the second half, wrapping it in a single
+ '#ifdef __GTHREADS if (__gthread_active_p())' and avoiding
+ conditionals inside loops.
- * src/strstream.cc (strstreambuf::overflow): Make sure operands of
- min and max have the same type.
- * include/bits/basic_string.tcc (append, rfind, compare): Likewise.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-17 Benjamin Kosnik <bkoz@redhat.com>
+ * include/ext/mt_allocator.h: Uglify consistently names of
+ variables, members and classes; tidy.
- * testsuite/Makefile.am (CLEANFILES): Add tmp*.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/27_io/filebuf_members.cc: Consistently name tmp files.
- Cleanups.
+2004-05-30 Dhruv Matani <dhruvbird@gmx.net>
-2003-03-17 Petur Runolfsson <peturr02@ru.is>
+ * include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
+ Deallocation loop rewrote.
- PR libstdc++/9964
- * include/bits/fstream.tcc (basic_filebuf::close):
- Always close file, even when write fails.
- * testsuite/27_io/filebuf_members.cc (test_07): New test.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-17 Danny Smith <dannysmith@users.sourceforge.net>
+ * include/ext/mt_allocator.h (__mt_alloc<>::allocate,
+ __mt_alloc<>::deallocate): Protect two instances of
+ block->thread_id with __GTHREADS.
- * libsupc++/Makefile.am (LTCOMPILE): Add $(AM_CFLAGS) $(CFLAGS).
- * libsupc++/Makefile.in: Regenerate.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-09 Paolo Carlini <pcarlini@unitus.it>
+ * include/ext/mt_allocator.h (__mt_alloc<>::tune):
+ Add _M_min_bin, the size in bytes of the smallest bin.
+ (__mt_alloc<>::tune()): Tweak accordingly.
+ (__mt_alloc<>::tune(size_t, ...)): Likewise.
+ (__mt_alloc<>::block_record): Change to a union: members next
+ and thread_id are never used at the same time.
+ (__mt_alloc<>::allocate): Update consistently.
+ (__mt_alloc<>::deallocate): Likewise.
+ (__mt_alloc<>::_S_initialize): Update setups of _S_binmap and
+ _S_bin_size for the configurable _M_min_size.
- PR libstdc++/9988
- * include/bits/fstream.tcc (overflow): don't write EOF to file.
- * testsuite/27_io/filebuf_virtuals.cc (test14): Add.
+2004-05-30 Paolo Carlini <pcarlini@suse.de>
-2003-03-09 Paolo Carlini <pcarlini@unitus.it>
- Petur Runolfsson <peturr02@ru.is>
+ * include/ext/mt_allocator.h (__mt_alloc<>::allocate,
+ __mt_alloc<>::deallocate): Avoid redundant conditionals.
- PR libstdc++/9424
- * include/bits/streambuf.tcc (__copy_streambufs): Use
- sgetn-sputn only when sputn cannot fail, otherwise fall back
- to safe snextc-sputc.
- * testsuite/27_io/streambuf_members.cc (test11, test12): Add.
+2004-05-27 Paolo Carlini <pcarlini@suse.de>
-2003-03-08 Jerry Quinn <jlquinn@optonline.net>
+ PR libstdc++/15565
+ * include/bits/locale_facets.tcc (__int_to_char(unsigned long),
+ __int_to_char(unsigned long long)): Showpos is not relevant
+ for unsigned types.
+ * testsuite/22_locale/num_put/put/char/15565.cc: New.
+ * testsuite/22_locale/num_put/put/wchar_t/15565.cc: New.
- PR libstdc++/9561
- * include/bits/basic_ios.h (_M_setstate): New.
- * include/bits/ostream.tcc (operator<<): Use it.
- * include/bits/istream.tcc (operator>>): Use it.
- * include/std/std_ostream.h (operator<<): Make friends.
- * include/std/std_istream.h (operator>>): Make friends.
- * testsuite/27_io/ostream_exception.cc,
- testsuite/27_io/istream_exception.cc: New tests.
+ * testsuite/22_locale/num_put/put/wchar_t/1.cc: Use L for the fill
+ char.
+ * testsuite/22_locale/num_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/8.cc: Likewise.
-2003-03-08 Paolo Carlini <pcarlini@unitus.it>
+2004-05-25 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/9182
- * include/bits/fstream.tcc (_M_really_overflow): Check
- for _M_convert_to_external possible failures.
- * include/std/std_fstream.h (sync): Check _M_really_overflow
- return value and return -1 in case of failure.
- * testsuite/27_io/filebuf_virtuals.cc (test12, test13): Add.
+ * include/bits/istream.tcc (ignore): Correctly deal with
+ n == numeric_limits<streamsize>::max().
+ * testsuite/27_io/basic_istream/ignore/char/2.cc: New.
- * include/bits/fstream.tcc (_M_convert_to_external):
- Set __elen to zero if codecvt::out eventually fails.
+ * include/bits/istream.tcc (basic_istream<>::getline): Prefer
+ '_M_gcount + 1 < __n' to '--__n; _M_gcount < __n', just in case
+ __n == numeric_limits<>::min().
-2003-03-08 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/istream.tcc: Minor tweaks.
- PR libstdc++/9826
- * include/bits/istream.tcc (operator>>(_CharT*),
- operator>>(basic_string&), ws): Pass a char_type to __ctype.is.
- * testsuite/27_io/stringstream.cc (test02): Add.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
+ Tighten.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.
- * include/bits/istream.tcc (operator>>(_CharT*)):
- Assign a char_type to *__s.
+2004-05-25 Paolo Carlini <pcarlini@suse.de>
-2003-03-08 Jerry Quinn <jlquinn@optonline.net>
+ * include/bits/istream.tcc (ignore): Remove redundant line.
+ (readsome): Tidy, closely following 27.6.1.3, p30.
- * src/ios.cc (ios_base::ios_base): Correct order of _M_word and
- _M_word_size initialization.
+2004-05-25 Paolo Carlini <pcarlini@suse.de>
-2003-03-07 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/istream.tcc (operator>>(basic_istream<>&,
+ basic_string<>&)): Use a temporary buffer, thus avoiding
+ reallocation for common case.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
+ New.
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
+ Likewise.
- * config/linker-map.gnu: Tweak.
+ * include/bits/istream.tcc: Const-ification of a few variables.
-2003-03-07 Petur Runolfsson <peturr02@ru.is>
+ * include/bits/ostream.tcc: Trivial formatting fixes and
+ const-ification of some variables.
- PR libstdc++/9817
- * include/bits/locale_facets.tcc
- (collate::do_compare, collate::do_transform):
- Handle nul characters in input.
+2004-05-25 Benjamin Kosnik <bkoz@redhat.com>
-2003-03-07 Jerry Quinn <jlquinn@tiamat>
+ PR libstdc++/15489
+ * scripts/create_testsuite_files: Revert xtype change, add
+ non-GNU bits to do the same thing.
- * include/bits/streambuf_iterator.h (_M_put): Set _M_failed if
- sputn fails.
- * testsuite/27_io/ostream_fail.cc: New test.
+2004-05-24 Benjamin Kosnik <bkoz@redhat.com>
-2003-03-07 Matthias Klose <doko@debian.org>
+ PR libstdc++/12854
+ Fixups for -Weffc++.
+ * include/bits/basic_string.h (basic_string::operator=): Return
+ pointer to this instead of result of assign. Although redundant,
+ this doesn't impact resultant codegen.
+
+ * include/bits/locale_facets.h (__numpunct_cache): Declare
+ assignment opxserator and copy constructor private.
+ (__timepunct_cache): Same.
+ (__moneypunct_cache): Same.
+ (collate): Use member initialization list for _M_c_locale_collate.
+ * config/locale/gnu/messages_members.h: Same.
+ * config/locale/gnu/time_members.h (__timepunct): Same.
+ * src/codecvt.cc: Use member initialization list to initialize
+ _M_c_locale_codecvt.
+ * src/ctype.cc: Same, with _M_c_locale_ctype and _M_narrow_ok.
+ * config/os/gnu-linux/ctype_noninline.h: Same.
+ * src/locale.cc (_Impl): Same.
+ * src/locale_init.cc: Same.
+ * src/localename.cc: Same.
+
+ * include/bits/basic_ios.h (basic_ios): Complete member
+ initialization list.
+ * include/bits/istream.tcc (basic_istream::sentry): Same.
+ * include/bits/ostream.tcc (basic_ostream::sentry): Same.
+ * include/bits/fstream.tcc (basic_filebuf): Add _M_lock and
+ _M_pback to member initialization list.
+ * include/std/std_streambuf.h: Same.
+ * include/std/std_sstream.h: Same, for _M_mode.
+ * src/ios.cc (ios_base): Same.
+
+ * include/ext/rope: Make derived classes match exception
+
+ specifications. Add copy constructors and assignment operators.
+
+ * include/debug/safe_base.h (_Safe_sequence_base): Declare copy
+ constructor and assignment operator protected.
+ (_Safe_iterator_base): Same.
+ * include/debug/formatter.h (_Error_formatter): Define copy
+ constructor and assignment operator.
+
+ * include/backward/strstream: Declare assignment operator and copy
+ constructor private.
+
+2004-05-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_hooks.h (func_callback): Declare copy
+ constructor and assignment operator private.
+ * testsuite/23_containers/deque/cons/clear_allocator.cc: Match
+ exception specifications of base class.
+ * testsuite/23_containers/list/cons/clear_allocator.cc: Same.
+ * testsuite/23_containers/vector/cons/clear_allocator.cc: Same.
+ * testsuite/23_containers/vector/bool/clear_allocator.cc: New.
+
+2004-05-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libsupc++/cxxabi.h: Remove duplicated and useless public and
+ private keywords in class declarations. Format. Use
+ stddef.h. Expose declarations to "C" compilation.
+ * libsupc++/tinfo.cc (__upcast_result): Add copy constructor and
+ assignment operator.
+ (__dyncast_result): Same.
+ * libsupc++/vec.cc (uncatch_exception): Same, use member
+ initialization list.
+
+2004-05-22 Benjamin Kosnik <bkoz@redhat.com>
- * Makefile.am (AM_MAKEFLAGS): Also pass gxx_include_dir.
- FLAGS_TO_PASS: Set to AM_MAKEFLAGS
- * Makefile.in: Regenerate.
- * libsupc++/Makefile.am: Express glibcppinstalldir in terms
- of gxx_include_dir.
- AM_MAKEFLAGS: Pass gxx_include_dir.
- * libsupc++/Makefile.in: Regenerate.
+ * testsuite/abi_check.cc: Add unistd.h.
-2003-03-06 Jerry Quinn <jlquinn@optonline.net>
+2004-05-21 Matthias Klose <doko@debian.org>
+
+ * docs/doxygen/run_doxygen: Bump required version.
- * src/ios.cc (ios_base::_M_init): Remove _M_word_size.
- (ios_base::ios_base): Set _M_word, _M_word_size.
- (ios_base::~ios_base): Remove redundant test.
- * testsuite/27_io/ios_base_storage.cc (test03): New.
+2004-05-21 Benjamin Kosnik <bkoz@redhat.com>
-2003-03-05 Jerry Quinn <jlquinn@optonline.net>
+ * docs/html/abi.html (libgcc_s): Additions suggested by Matthias Klose.
+ * docs/doxygen/Intro.3: Subtractions suggested by Phil Edwards.
- * testsuite/27_io/ios_base_storage.cc (test02): Set exception
- mask. Test setting small-numbered pword and iword slots. Test
- behavior at limit of numeric_limits::max. Check that values are
- still good after failures.
+2004-05-21 Benjamin Kosnik <bkoz@redhat.com>
-2003-03-05 Carlo Wood <carlo@alinoe.com>
+ PR libstdc++/15123
+ PR libstdc++/13928
+ * docs/doxygen/Intro.3: Remove Allocators.3.
+ Add new extension headers, extension namespace list.
+ * docs/doxygen/run_doxygen (problematic): Remove Allocators.3
+ Rename GLIBCXXSTD names to std::. Rename __gnu_debug to
+ __gnu_debug::. Remove __policy_ renames.
+ * docs/doxygen/guide.html: Add dot note.
+ * docs/doxygen/stdheader.cc: Edit, add files.
+ * docs/doxygen/user.cfg.in: Regenerate with Doxygen 1.3.7.
- * include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added
- _S_initialized() in order to allow debugging libraries to detect
- when the std streams are initialized from an overloaded operator
- new.
+2004-05-19 Jan Beulich <jbeulich@novell.com>
+
+ PR libstdc++/15489
+ * scripts/create_testsuite_files: Also find source files through
+ symbolic links.
-2003-03-04 Benjamin Kosnik <bkoz@redhat.com>
+2004-05-19 Jan Beulich <jbeulich@novell.com>
- * config/linker-map.gnu: Version.
+ PR libstdc++/15488
+ * testsuite/lib/libstdc++.exp: Make test files writable.
-2003-03-04 Jerry Quinn <jlquinn@optonline.net>
+2004-05-18 Jonathan Wakely <redi@gcc.gnu.org>
- * include/bits/basic_ios.h: Update copyright.
- (_M_cache_locale): New.
- (_M_cache_facets): Deprecate.
- * include/bits/basic_ios.tcc (basic_ios::copyfmt): Set up locale
- caching.
- (basic_ios::imbue,basic_ios::init): Use _M_cache_locale.
- (basic_ios::_M_cache_locale): New.
- (basic_ios::_M_cache_facets): Deprecate.
- * include/bits/ios_base.h (__locale_cache_base): Declare.
- (ios_base::_M_cache): Define.
- * include/bits/locale_facets.h
- (__locale_cache_base,__locale_cache<_CharT>): New classes.
- * include/bits/locale_facets.tcc
- (num_put::_M_convert_int): Use locale cache literal string,
- grouping flag, thousands separator.
- (num_out::_M_convert_float): Use locale cache grouping flag, decimal
- point, thousands separator.
- (__locale_cache<_CharT>::_M_init,__locale_cache<_CharT>::_S_callback):
- New.
- * src/locale-inst.cc
- (__locale_cache<_CharT>::_S_callback, __locale_cache<char>,
- __locale_cache<wchar_t>): New.
-
-2003-03-04 Jerry Quinn <jlquinn@optonline.net>
-
- * src/ios.cc (ios_base::_M_grow_words): Don't delete _M_word on
- new failure. Throw exception if badbit and exception mask when ix
- >= numeric_limits<int>::max().
-
-2003-03-03 Benjamin Kosnik <benjamin@redhat.com>
-
- * config/linker-map.gnu (GLIBCPP_3.2.3): New.
- Add new symbols.
- * testsuite/abi_check.cc: Update.
-
-2003-03-03 Jerry Quinn <jlquinn@optonline.net>
- Benjamin Kosnik <benjamin@redhat.com>
-
- * include/bits/locale_facets.h (__num_base): Add _S_atoms_out.
- Add indexes into this array.
- (__num_base::_S_atoms): To _S_atoms_in.
- (num_put::_M_insert): Rename to _M_pad.
- (num_put::_M_convert_int): Adjust remove __mod, __modl arguments.
- (num_put::_M_widen_int): Rename to _M_group_int.
- (num_put::_M_widen_float): Rename to _M_group_float.
- * include/bits/locale_facets.tcc (__int_to_char): New inline
- function and adapter functions.
- (num_put::_M_group_int): Streamline.
- (num_put::_M_group_float): Streamline.
- (num_put::_M_convert_int): Remove unused parameter names. Choose
- large enough buffer for text. Use __int_to_char instead of
- __convert_from_v. Formatted text is now at the end of the buffer.
- (num_put::_M_convert_float): Preliminary fixups.
- * src/locale-inst.cc (__convert_from_v<long long>): Add ifdef.
- (__int_to_char<unsigned long long>): Same.
- (__int_to_char<char, unsigned long>): New.
- (__int_to_char<char, unsigned long long>): New.
- (__int_to_char<wchar_t, unsigned long>): New.
- (__int_to_char<wchar_t, unsigned long long>): New.
- * src/locale.cc: Add _S_atoms_in, _S_atoms_out.
-
-2003-02-28 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/27_io/ios_base_storage.cc (main): Call
- set_memory_limits.
-
-2003-02-28 Brad Spencer <spencer@infointeractive.com>
- Nathan Myers <ncm@cantrip.org>
-
- * src/Makefile.am (stamp-debug): Clean.
- * src/Makefile.in: Regenerate.
+ * include/ext/stdio_filebuf.h: Update comments to reflect PR 11691.
-2002-02-28 Loren J. Rittle <ljrittle@acm.org>
+2004-05-18 Benjamin Kosnik <bkoz@redhat.com>
- * src/Makefile.am: Resolve non-portable use of $<.
- * src/Makefile.in: Rebuilt.
+ * testsuite/testsuite_hooks.h (__gnu_test::conversion): New class.
+ * testsuite/23_containers/deque/14340.cc: New.
+ * testsuite/23_containers/list/14340.cc: New.
+ * testsuite/23_containers/map/14340.cc: New.
+ * testsuite/23_containers/multimap/14340.cc: New.
+ * testsuite/23_containers/multiset/14340.cc: New.
+ * testsuite/23_containers/set/14340.cc: New.
+ * testsuite/23_containers/vector/14340.cc: New.
-2002-02-28 Phil Edwards <pme@gcc.gnu.org>
+2004-05-18 Douglas Gregor <gregod@cs.rpi.edu>
- * configure.in (GLIBCPP_ENABLE_CXX_FLAGS): Do not pass arguments,
- let the defaults work.
- * configure: Regenerate.
+ PR libstdc++/14340
+ * include/debug/safe_iterator.h (_Safe_iterator converting
+ constructor): Only allow declaration to instantiate when the
+ incoming _Safe_iterator has exactly the right iterator type.
-2002-02-28 Phil Edwards <pme@gcc.gnu.org>
+2004-05-18 Jonathan Wakely <redi@gcc.gnu.org>
- * acinclude.m4: Remove trailing whitespace.
- (GLIBCPP_ENABLE_CXX_FLAGS): Fix.
- * aclocal.m4, configure: Regenerate.
+ * include/ext/enc_filebuf.h: Move concept-check macro to class scope.
-2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
+2004-05-17 Jonathan Wakely <redi@gcc.gnu.org>
- * configure.in (GLIBCPP_ENABLE_DEBUG): Default to none.
- Call GLIBCPP_ENABLE_DEBUG_FLAGS.
- * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): GLIBCPP_BUILD_DEBUG, new
- conditional if --enable-debug is yes. Rework.
- (GLIBCPP_ENABLE_DEBUG_FLAGS): New.
- * aclocal.m4: Regenerate.
- * libio/Makefile.am: Remove DEBUG_FLAGS.
- * libio/Makefile.in: Regenerate.
- * libsupc++/Makefile.am: Remove DEBUG_FLAGS.
- * libsupc++/Makefile.in: Regenerate.
- * docs/html/configopts.html: Add docs for --enable-debug,
- --enable-debug-flags.
+ * include/bits/boost_concept_check.h: Fix old attribute syntax.
+ * testsuite/23_containers/map/modifiers/swap.cc: Define operator<
+ to pass concept-checks.
+ * testsuite/23_containers/multimap/modifiers/swap.cc: Same.
+ * testsuite/23_containers/set/modifiers/swap.cc: Same.
+ * testsuite/23_containers/multiset/modifiers/swap.cc: Same.
-2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
+2004-05-15 Benjamin Kosnik <bkoz@redhat.com>
- Correct dependency tracking, build warts.
- * configure.in: Correct repeated AC_OUTPUT thrashing by
- config-ml.in
+ PR libstdc++/15046
+ * crossconfig.m4: Add C99 math bits for linux crosses.
* configure: Regenerate.
- * include/Makefile.am (stamp-target): Stamp in top_builddir.
- * include/Makefile.in: Regenerate.
- * src/Makefile.am (codecvt_members.cc): New rule.
- (collate_members.cc): Same.
- (ctype_members.cc): Same.
- (messages_members.cc): Same.
- (monetary_members.cc): Same.
- (numeric_members.cc): Same.
- (time_members.cc): Same.
- (c++locale.cc): Same.
- (basic_file.cc): Same.
- * src/Makefile.in: Regenerate.
- * acinclude.m4 (CCTYPE_CHAR_CC): Remove.
- (CCCODECVT_CC): Don't link, AC_SUBST.
- (CCOLLATE_CC): Same.
- (CCTYPE_CC): Same.
- (CMESSAGES_CC): Same.
- (CMONEY_CC): Same.
- (CNUMERIC_CC): Same.
- (CTIME_CC): Same.
- (CLOCALE_CC): Same.
- * aclocal.m4: Regenerate.
- * src/Makefile.am (libstdc___la_LIBADD): Use top_builddir
- for convenience libraries.
- (version_arg): Rename linker.map to libstdc++.ver.
- (libstdc___la_DEPENDENCIES): Remove linker.map, add
- libstdc++-symbol.ver as a dependency.
- (libstdc++-symbol.ver): Add rule.
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Change LINKER_MAP to
- SYMVER_MAP. Don't link, AC_SUBST.
-
- * include/Makefile.am (target_headers_noinst): New.
- (stamp-target): Add CLOCALE_INTERNAL_H.
- * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't link
- CLOCALE_INTERNAL_H, AC_SUBST.
- * config/locale/gnu/c_locale.cc: Modify c++locale_internal.h
- include.
- * config/locale/gnu/time_members.cc: Same.
- * config/locale/gnu/numeric_members.cc: Same.
- * config/locale/gnu/monetary_members.cc: Same.
- * config/locale/gnu/messages_members.cc: Same.
- * config/locale/gnu/ctype_members.cc: Same.
- * config/locale/gnu/collate_members.cc: Same.
- * config/locale/gnu/codecvt_members.cc: Same.
- * config/locale/generic/codecvt_members.cc: Remove.
-
-2003-02-27 Jerry Quinn <jlquinn@optonline.net>
-
- * config/locale/generic/messages_members.h (messages::messages):
- Remove name from unused parameter.
-
-2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am (stamp-std-precompile): Add rule.
- * include/Makefile.in: Regenerated.
-
-2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/c++config (_GLIBCPP_EXTERN_TEMPLATE): Define.
- * include/bits/basic_ios.tcc: Guard use of extern template.
- * include/std/std_iomanip.h: Same.
- * include/bits/streambuf.tcc: Same.
- * include/bits/stl_alloc.h: Same.
- * include/bits/locale_facets.tcc: Same.
- * include/bits/ostream.tcc: Same.
- * include/bits/istream.tcc: Same.
- * include/bits/fstream.tcc: Same.
- * include/bits/basic_string.tcc: Same.
-
-2003-02-25 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9825
- * src/fstream.cc
- (basic_filebuf<char/wchar_t>::_M_underflow_common): When
- __bump is true (uflow), always increment the read pointer
- (_M_in_cur) before returning successfully.
- * testsuite/27_io/filebuf_virtuals.cc (test11): Add.
-
-2003-02-25 Paolo Carlini <pcarlini@unitus.it>
-
- * include/std/std_sstream.h (str()): the size of the
- current string may be different from the initial one
- whenever _M_out_end > _M_out_beg.
- * testsuite/27_io/stringbuf_members.cc (test07): Add.
-
-2003-02-21 Phil Edwards <pme@gcc.gnu.org>
-
- * config/cpu/generic/atomicity.h (_Atomic_add_mutex): Fix declaration.
- (_GLIBCPP_NEED_GENERIC_MUTEX): Define for this file.
- (_Atomic_add_mutex_once, __gthread_atomic_add_mutex_once): Declare
- when we don't have static mutex initialization.
- (__exchange_and_add): Use _Atomic_add_mutex_once.
- * src/misc-inst.cc: Definitions of all the above.
- * config/linker-map.gnu: Also export locking symbols needed for the
- generic atomicity.h case.
-
-2003-02-20 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
- config.status.
- * configure: Rebuilt.
-
-2003-02-19 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/9582
- * include/bits/stl_alloc.h: Remove all traces of assert().
-
-2003-02-18 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9582
- * include/bits/stl_alloc.h (__pool_alloc::allocate): Remove assert.
-
-2003-02-17 Paolo Carlini <pcarlini@unitus.it>
+2004-05-15 Simon Marshall <simon.marshall@misys.com>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/15090
+ * include/bits/locale_facets.h: Fix for -fno-for-scope.
+ * include/debug/safe_sequence.h: Same.
+ * include/debug/safe_iterator.tcc: Same.
+ * src/debug.cc: Same.
+ * src/locale.cc: Same.
+ * src/locale_init.cc: Same.
+ * src/localename.cc: Same.
+ * config/locale/gnu/ctype_members.cc: Same.
+ * config/locale/gnu/numeric_members.cc: Same.
+ * testsuite/testsuite_abi.cc: Same.
+ * testsuite/testsuite_hooks.cc: Same.
+
+2004-05-15 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/abi.html: Document effect of -fabi-version on value
+ of __GXX_ABI_VERSION, and that it's defined in c-cppbuiltin.c.
+ Fix markup.
- * src/locale-inst.cc: Do not include <cassert>.
- * src/locale.cc: Likewise.
+2004-05-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/abi.html: New.
+ * docs/html/abi.txt: Remove.
+ * docs/html/documentation.html: Add link.
+ * testsuite/Makefile.am: Add files.
+ * testsuite/Makefile.in: Regenerated.
+ * testsuite/abi_check.cc: Move and modify code into...
+ * testsuite/testsuite_abi.cc: Add.
+ * testsuite/testsuite_abi.h: Add.
-2003-02-17 Paolo Carlini <pcarlini@unitus.it>
+ * docs/html/17_intro/TODO: Update.
+ * include/bits/stl_pair.h: Format.
+
+2004-05-14 Paolo Carlini <pcarlini@suse.de>
+ Ivan Godard <igodard@pacbell.net>
+
+ PR libstdc++/15361
+ * include/std/std_bitset.h (_Base_bitset<_Nw>::_M_do_find_next): Fix.
+ * testsuite/23_containers/bitset/ext/15361.cc: New.
+
+2004-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14775
+ * acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS.
+ * acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define
+ to _GLIBCXX_RES_LIMITS.
+ (GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to
+ HAVE_LIMIT_*.
+ * testsuite/testsuite_hooks.h: Declare set_file_limit.
+ * testsuite/testsuite_hooks.cc: Define it, using getrlimit
+ and setrlimit(RLIMIT_FSIZE).
+ * testsuite/27_io/fpos/14775.cc: New.
+ * config.h.in: Regenerate.
+ * configure: Likewise.
- PR libstdc++/9169
- * include/bits/fstream.tcc (_M_convert_to_external):
- Deal correctly with noconv, as prescribed by 27.8.1.4,p8.
- * testsuite/27_io/filebuf_virtuals.cc (test10): Add.
+2004-05-13 Benjamin Kosnik <bkoz@redhat.com>
-2003-02-13 Paolo Carlini <pcarlini@unitus.it>
+ PR libstdc++/15074
+ * docs/html/faq/index.html: Update docs for libsupc++ usage.
- * include/bits/ostream.tcc (sentry::sentry): Improve
- performance-wise the fix for libstdc++/9563.
+2004-05-13 Benjamin Kosnik <bkoz@redhat.com>
-2003-02-13 Paolo Carlini <pcarlini@unitus.it>
+ PR libstdc++/15412
+ * include/bits/stl_threads.h (_GLIBCXX_mutex): Move to namespace
+ __gnu_internal.
+ (_GLIBCXX_mutex_address): Same.
+ (_GLIBCXX_once): Same.
+ (_GLIBCXX_mutex_init): Same.
+ (_GLIBCXX_mutex_address_init): Same.
+
+2004-05-09 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/9320
- * include/ext/stdio_filebuf.h
- (stdio_filebuf(int, std::ios_base::openmode, bool, int_type),
- stdio_filebuf(std::__c_file*, std::ios_base::openmode, int_type)):
- Change to take a __size parameter of type size_t, not
- of type (template parameter dependent) int_type.
- * src/ios.cc (ios_base::Init::_S_ios_create): Change type of
- size vars to size_t.
- * testsuite/ext/stdio_filebuf.cc: Add.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
+ New.
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.
-2003-02-12 Paolo Carlini <pcarlini@unitus.it>
+2004-05-09 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/9563
- * include/bits/ostream.tcc (sentry::sentry): Check
- the state of the stream after the preparation.
- * testsuite/27_io/ostream_sentry.cc: Add.
+ PR libstdc++/15002 (continued again)
+ * include/bits/istream.tcc (getline(basic_istream<>&,
+ basic_string<>&, _CharT)): Use a temporary buffer, thus
+ avoiding reallocation for common case.
-2003-02-11 Scott Snyder <snyder@fnal.gov>
+ * include/bits/basic_string.tcc (_S_construct(_InIterator,
+ _InIterator, const _Alloc&, input_iterator_tag)): Tweak size
+ of temporary buffer to a power of two.
- PR libstdc++/9659
- * include/bits/fstream.tcc (seekoff): Avoid operator+
- for pos_type.
+ * testsuite/27_io/basic_istream/getline/char/4.cc: Add comment.
-2003-02-11 Paolo Carlini <pcarlini@unitus.it>
+2004-05-09 Paolo Carlini <pcarlini@suse.de>
Petur Runolfsson <peturr02@ru.is>
- PR libstdc++/9318
- * include/bits/streambuf.tcc (__copy_streambufs):
- Don't conditionalize the copy to __testput.
- * testsuite/27_io/streambuf_members.cc (test09, test10): Add.
-
-2003-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa/atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock):
- Correct alignment.
- (__exchange_and_add, __atomic_add): Use PA 2.0 ordered store to reset
- lock.
-
-2003-02-07 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9548
- Implement resolution of DR 231 (Ready)
- * include/bits/locale_facets.h (__num_base::_S_format_float):
- Return void.
- * src/locale.cc (__num_base::_S_format_float): Implement
- resolution of DR 231.
- * include/bits/locale_facets.tcc (num_put::_M_convert_float):
- Tweak uses. Check for negative precision.
- * testsuite/22_locale/num_put_members_char.cc (test06): Add
- * testsuite/22_locale/num_put_members_wchar_t.cc (test06): Ditto.
-
-2003-02-07 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/filebuf_virtuals.cc (test08): Fix for
- unsigned char platforms.
-
-2003-02-05 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (time_put::do_put): Use __write.
- (money_put::do_put): Same.
-
-2003-02-05 Jerry Quinn <jlquinn@optonline.net>
-
- * include/bits/ios_base.h (ios_base): Document reserved storage.
+ PR libstdc++/15002 (continued)
+ * include/bits/istream.tcc (basic_istream<>::getline(char_type*,
+ streamsize, char_type)): Use traits::find/copy in a loop to speed
+ up greatly the function in the common case (I/O buffer size >> 1).
- * include/bits/locale_facets.h: (struct __pad): Comment on
- implementation.
- (__verify_grouping): Same.
- (__add_grouping): Same.
- * include/bits/locale_facets.tcc (__verify_grouping): Move
- comments to declaration.
- (__add_grouping): Same.
+2004-05-09 Paolo Carlini <pcarlini@suse.de>
- * include/bits/locale_facets.tcc:
- (__write<_CharT, _OutIter>): New function.
- (__write<_CharT>): New function specialization.
- (num_put::_M_insert): Remove explicit loop over iterator. Use
- __write.
- (num_put::_M_widen_float): Remove __basefield.
- (num_put::_M_widen_int): Move __basefield to within grouping block.
+ * testsuite/27_io/basic_istream/getline/char/4.cc: New.
- * include/bits/streambuf_iterator.h: Include <streambuf>.
- (ostreambuf_iterator::_M_put): Add.
+ * include/bits/istream.tcc (getline(basic_istream<>&,
+ basic_string<>&, _CharT)): Change to use sgetc()/snextc() instead
+ of sbumpc(), consistently with the other functions, thus also
+ dealing correctly with the case of exceeded string::max_size().
-2003-02-05 Paolo Carlini <pcarlini@unitus.it>
+2004-05-06 Matthias Klose <doko@debian.org>
- * testsuite/26_numerics/valarray_name_lookup.cc: Fix typo.
+ * include/backward/iterator.h: Add GPL copyright info,
+ with exception clause.
+ * include/bits/boost_concept_check.h: Likewise.
+ * include
+ * libsupc++/tinfo.h: Likewise.
+ * po/string_literals.cc: Likewise.
-2003-02-05 Paolo Carlini <pcarlini@unitus.it>
+2004-05-02 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/9439, PR libstdc++/9425
- * config/io/basic_file_stdio.cc
- (__basic_file<char>::seekoff, seekpos): Return -1L if
- fseek fails.
- * include/bits/fstream.tcc (basic_filebuf::seekoff):
- Check _M_file.seekoff return value; always return
- pos_type(off_type(-1)) in case of failure.
- (basic_filebuf::pbackfail): Check this->seekoff return
- value and return traits_type::eof() in case of failure.
- * testsuite/27_io/filebuf_virtuals.cc (test09): Add.
-
-2003-02-05 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/26_numerics/valarray_name_lookup.cc: Fix.
-
-2003-02-05 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (libtool_VERSION): To 5:3:0.
- * configure: Regenerated.
-
-2003-02-04 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9538
- * include/bits/streambuf.tcc (sputbackc): Access
- this->gptr()[-1] only if _M_in_beg < _M_in_cur.
- * testsuite/27_io/filebuf_virtuals.cc (test08): Add.
-
-2003-02-04 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/9507
- * include/bits/fstream.tcc (open): If the 'ate' repositioning
- operation fails, calls close _and_ returns a null pointer
- to indicate failure (27.8.1.3,4).
- * testsuite/27_io/filebuf_members.cc (test_06): Add.
-
-2003-02-04 Petur Runolfsson <peturr02@ru.is>
-
- * testsuite/27_io/filebuf_members.cc (test_04): Remove exit(0).
-
-2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
-
- * docs/html/17_intro/porting.texi: Update to GFDL 1.2.
- * docs/html/17_intro/porting.html: Regenerate.
-
-2003-02-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
-
- PR libstdc++/9234
- * include/bits/valarray_meta.h (_UnBase::operator[]): Apply unary
- operator.
-
- * include/bits/valarray_meta.h (__not_equal_to): Use != instead of ==.
-
- * testsuite/26_numerics/valarray_operators.cc: New test.
-
-2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
-
- PR c++/9433
- * libsupc++/tinfo.cc (__vmi_class_type_info::__do_dyncast): Cope
- with bases which are very ambiguous.
-
-2003-01-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * src/Makefile.am (CONFIG_CXXFLAGS): Reverse order of
- @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@.
- * libsupc++/Makefile.am (CONFIG_CXXFLAGS): Likewise.
- * src/Makefile.in: Regenerate.
- * libsupc++/Makefile.in: Regenerate.
-
-2003-01-27 Alexandre Oliva <aoliva@redhat.com>
-
- * acinclude.m4 (glibcpp_toolexeclibdir): Instead of
- $(MULTISUBDIR), use `$CC -print-multi-os-directory`, unless
- version_specific_libs is enabled.
- * aclocal.m4, configure: Rebuilt.
-
-2003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de>
-
- * include/Makefile.am (install-data-local): Prepend
- $(DESTDIR) to destination paths in all (un)installation
- commands. Use ${c_base_builddir} and ${std_builddir}
- as destination subdirectories to achieve consistency with
- preceding mkinstalldirs commands. No effect because both
- variables contain "." only.
- * include/Makefile.in: Regenerate.
-
-2003-01-23 Phil Edwards <pme@gcc.gnu.org>
-
- Bulk documentation merge (copy) from trunk.
- * docs/doxygen/tables.html, docs/doxygen/user.cfg.in,
- docs/html/configopts.html, docs/html/debug.html,
- docs/html/documentation.html, docs/html/17_intro/howto.html,
- docs/html/19_diagnostics/howto.html, docs/html/ext/sgiexts.html:
- Merge from trunk.
-
-2003-01-23 Petur Runolfsson <peturr02@ru.is>
-
- PR libstdc++/9322
- * include/std/std_streambuf.h
- (basic_streambuf::basic_streambuf,
- basic_streambuf::~basic_streambuf,
- basic_streambuf::getloc, basic_streambuf::imbue):
- Remove _M_buf_locale_init use.
- * include/bits/fstream.tcc (basic_filebuf::imbue): Likewise
- * testsuite/27_io/filebuf_virtuals.cc (test08): Add.
- * testsuite/27_io/streambuf_members.cc (test08): Add.
- * testsuite/27_io/stringbuf_virtuals.cc (test08): Add.
-
-2003-01-23 Benjamin Kosnik <bkoz@redhat.com>
-
- Revert include ordering.
- * config/locale/generic/c_locale.h: Add include guards.
- * config/locale/gnu/c_locale.h: Same.
- * include/bits/locale_classes.h: Remove cctype include.
- * include/std/std_iosfwd.h: Add c++locale.h, cctype includes.
- * include/std/std_fstream.h: Remove streambuf include.
- * include/std/std_sstream.h: Remove streambuf include.
-
-2003-01-23 Benjamin Kosnik <bkoz@redhat.com>
-
- Match 3.2.0 ABI.
- * include/bits/stl_alloc.h: Revert.
-
- * include/bits/codecvt.h: Revert.
- * config/locale/gnu/codecvt_members.cc: Revert.
- * src/codecvt.cc: Revert.
- * src/localename.cc: Revert.
-
- * include/bits/ios_base.h (ios_base::~ios_base): Revert.
-
- * config/linker-map.gnu: Mostly match 3_2-branch file.
-
-2003-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h: Move non-facet classes requiring
- <string> to...
- * include/bits/locale_classes.h: New.
- * include/bits/Makefile.am (bits_headers_src): Add locale_classes.h.
- * include/bits/Makefile.in: Regenerate.
-
- * include/bits/locale_facets.tcc (__convert_from_v): Move to...
- * config/locale/gnu/c_locale.h: ...here.
- * config/locale/generic/c_locale.h: Same.
-
- * include/bits/locale_facets.tcc: Move declarations to...
- * include/bits/locale_facets.h: ...here.
- * include/bits/basic_ios.h: Tweak includes accordingly.
- * include/std/std_sstream.h: Add streambuf include.
- * include/std/std_fstream.h: Ditto.
- * include/std/std_locale.h: Add locale_classes.h include.
- * include/std/std_iosfwd.h: Tweak.
- * src/concept-inst.cc: Add iterator include.
-
- * config/linker-map.gnu: Specify __cxa functions, mark __cxa_dyn_*
- bits as unexported in the future.
-
-2003-01-15 Benjamin Kosnik <bkoz@redhat.com>
-
- * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Substitute
- GLIBCPP_TEST_WCHAR_T if building wchar_t bits in the library.
+ * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator.
* aclocal.m4: Regenerate.
* configure: Regenerate.
- * testsuite/Makefile.am (all-local): Add conditional rule to
- generate testsuite_wchar_t.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/lib/libstdc++-v3-dg.exp
- (libstdc++-v3-list-sourcefiles): Remove wchar_t files if
- testsuite_wchar_t is not present in the build directory.
- * testsuite/libstdc++-v3.dg/dg.exp: Add -g -O2 to DEFAULT_CXXFLAGS.
- Remove setulimit bits.
- * testsuite/26_numerics/complex_value.cc: Set to noopts.
- * testsuite/Makefile.am (CLEANFILES): Add.
- * testsuite/Makefile.in: Regenerate.
-
-2003-01-15 Benjamin Kosnik <bkoz@redhat.com>
-
- Renames, namespaces for testsuite utilities.
- * testsuite/testsuite_hooks.h: Put into namespace __gnu_cxx_test.
- (gnu_allocator_tracker): Rename to allocation_tracker.
- (gnu_new_allocator): Rename to tracker_alloc.
- (__set_testsuite_memlimit): Rename to set_memory_limits.
- (gnu_assignment_operator): Rename to assignment_operator.
- (gnu_destructor): Rename to destructor.
- (gnu_copy_tracker): Rename to copy_tracker.
- (gnu_char, gnu_int, gnu_long): Rename to pod_char, pod_int, pod_long.
- (run_tests_wrapped_locale): New.
- (run_tests_wrapped_env): New.
- * testsuite/testsuite_hooks.cc: Same.
- (class locale_data): Add.
- (class enviornment_variable): Add.
- (class not_found): Add.
- * testsuite/testsuite_allocator.h: Same.
- * testsuite/testsuite_allocator.cc: Same.
- * testsuite/23_containers/deque_ctor.cc
- (test_copy_ctor_exception_safety): Change gnu_allocator_tracker to
- allocation_tracker.
- Change gnu_new_allocator to tracker_alloc.
- Change gnu_counting_struct to counter.
- Change gnu_copy_tracker to copy_tracker.
- Change gnu_copy_constructor to copy_constructor.
- Change gnu_assignment_operator to assignment_operator.
- Inject.
- * testsuite/23_containers/vector_capacity.cc: Same.
- * testsuite/23_containers/vector_ctor.cc (test01): Same.
- * testsuite/23_containers/list_modifiers.cc: Change
- gnu_copy_tracker to copy_tracker.
- * testsuite/21_strings/ctor_copy_dtor.cc (main): Change
- __set_testsuite_memlimit to set_memory_limits.
- * testsuite/21_strings/insert.cc (main): Same.
- * testsuite/27_io/filebuf.cc: Change gnu_char to pod_char.
- * testsuite/27_io/stringstream.cc: Same.
- * testsuite/27_io/stringbuf.cc: Same.
- * testsuite/27_io/streambuf.cc: Same.
- * testsuite/27_io/ostream.cc: Same.
- * testsuite/27_io/istream.cc: Same.
- * testsuite/27_io/fstream.cc: Same.
- * testsuite/lib/libstdc++-v3-dg.exp
- (libstdc++-v3-list-sourcefiles): Additionally handle files two and
- three levels deeper in glob patterns.
-
-2003-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * config/os/hpux/os_defines.h (_GLIBCPP_GTHREAD_USE_WEAK): Define for
- __hppa__.
-
-2003-01-10 Benjamin Kosnik <bkoz@redhat.com>
- Sysoltsev Slawa <Vyatcheslav.Sysoltsev@intel.com>
-
- PR libstdc++/9269
- * include/std/std_fstream.h (basic_filebuf::uflow): Declare.
- (basic_filebuf::underflow): Declare.
- Move definitions.
-
-2003-01-07 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8707
- * Makefile.am (distclean-multi): Fix.
- * Makefile.in: Regenerate.
-
-2003-01-06 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h (messages): Move ctor, dtor
- definitions to..
- (__timepunct): Same.
- * config/locale/gnu/messages_members.h (messages): Add dtor, ctor
- definitions. Conditionalize for GNU systems.
- * config/locale/generic/messages_members.h (messages): Add dtor, ctor
- definitions.
- * config/locale/gnu/time_members.h (messages): New. Add dtor, ctor
- definitions. Conditionalize for GNU systems.
- * config/locale/generic/time_members.h (messages): New. Add dtor, ctor
- definitions.
- * include/bits/localefwd.h (locale::facet::_S_c_name): Add.
- * src/locale.cc: Define.
- * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool):
- Use it.
- * config/locale/gnu/time_members.h: Use it.
- * config/locale/gnu/messages_members.h: Use it.
- * config/linker-map.gnu: Add locale::facets details.
- * include/Makefile.am (target_headers_extra): Add time_members.h.
- * include/Makefile.in: Regenerate.
- * acinclude.m4: Export CTIME_H.
- * aclocal.m4: Regenerate.
- * configure: Regnerate.
-
-2003-01-06 Paolo Carlini <pcarlini@unitus.it>
-
- * src/codecvt.cc
- (codecvt<char, char, mbstate_t>::do_in, do_out):
- Tweak parameters to avoid unused parameter warnings.
+ * config/allocator/pool_allocator_base.h: New.
+ * include/ext/pool_allocator.h: Convert to a standard-conforming
+ allocator.
+ * src/allocator.cc: Tweak instantiations.
+ * testsuite/performance/20_util/allocator/insert.cc: Add __pool_alloc.
+ * testsuite/performance/20_util/allocator/insert_insert.cc: Ditto.
+ * testsuite/performance/20_util/allocator/list_sort_search.cc: Ditto.
+ * testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto.
+ * testsuite/performance/20_util/allocator/map_thread.cc: Ditto.
+ * testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto.
+
+2004-04-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14220
+ * include/bits/locale_facets.tcc (num_put<>::_M_insert_float):
+ Don't clip the precision passed down to __convert_from_v:
+ 22.2.2.2.2 nowhere says so.
+ * testsuite/22_locale/num_put/put/char/14220.cc: New.
+ * testsuite/22_locale/num_put/put/wchar_t/14220.c: Likewise.
+
+2004-04-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
+ Clarify assertion, set test variable to false before assert.
+ * testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
+ * testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
+ * testsuite/27_io/ios_base/storage/2.cc: Same.
+
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
+ function returns.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
+ * testsuite/27_io/fpos/14320-3.cc: Same.
+
+ * testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
+ * testsuite/27_io/fpos/1.cc: Same.
+ * testsuite/27_io/basic_stringstream/2.cc: Same.
+ * testsuite/27_io/basic_stringbuf/4.cc: Same.
+ * testsuite/27_io/basic_stringbuf/1.cc: Same.
+ * testsuite/27_io/basic_stringbuf/2.cc: Same.
+ * testsuite/27_io/basic_streambuf/2.cc: Same.
+ * testsuite/27_io/basic_ostringstream/2.cc: Same.
+ * testsuite/27_io/basic_ostream/2.cc: Same.
+ * testsuite/27_io/basic_ofstream/2.cc: Same.
+ * testsuite/27_io/basic_istringstream/2.cc: Same.
+ * testsuite/27_io/basic_istream/2.cc: Same.
+ * testsuite/27_io/basic_iostream/2.cc: Same.
+ * testsuite/27_io/basic_ios/2.cc: Same.
+ * testsuite/27_io/basic_ifstream/2.cc: Same.
+ * testsuite/27_io/basic_fstream/2.cc: Same.
+ * testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.
+
+ * testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
+ unsigned against zero.
+ * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/capacity/char/1.cc: Same.
+
+ * testsuite/18_support/new_delete_placement.cc: Initialize
+ variables before first use.
+ * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
+ * testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
+ * testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
+ * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
+ Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
+ * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
+ Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
+ * testsuite/27_io/types/2.cc: Same.
-2003-01-06 Paolo Carlini <pcarlini@unitus.it>
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
+ file name.
- PR libstdc++/9151
- * include/bits/locale_facets.cc (num_put::_M_convert_float):
- Limit __prec to digits10 + 2, not digits10 + 1, taking into
- account the possibility of %{g,G} conversion specifiers
- inside _S_format_float.
- * testsuite/27_io/ostream_inserter_arith.cc (test06): Add.
+2004-04-29 Benjamin Kosnik <bkoz@redhat.com>
-2003-01-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ Fixups for EDG front end.
+ * include/ext/rope: Instead of non-existent function
+ _Data_allocate, use allocator's allocate. Use this.
+ (namespace _Rope_constants): Move _S_max_rope_depth, and _Tag
+ enumerations from _Rope_RopeRep here.
+ * include/ext/ropeimpl.h: Same.
+ * src/ext-inst.cc (_S_min_len): Fix up definition.
+
+ * config/locale/gnu/ctype_members.cc: Qualify base class members
+ with this.
+ * config/locale/generic/ctype_members.cc: Same.
+ * config/locale/gnu/messages_members.h: Same.
+ * config/locale/generic/messages_members.h: Same.
+ * src/ctype.cc: Same.
+ * include/bits/codecvt.h: Same.
+
+ * include/bits/boost_concept_check.h: Declare.
+ (__error_type_must_be_an_unsigned_integer_type): Remove this.
+ (__error_type_must_be_an_integer_type): Remove this.
+ (__error_type_must_be_a_signed_integer_type): Remove this.
+
+ * config/io/basic_file_stdio.cc (__basic_file::sys_open): Remove cast.
+
+ * libsupc++/eh_alloc.cc (__cxa_free_exception): Add exception
+ specification to definition.
+ (__cxa_allocate_exception): Same.
+ * libsupc++/eh_catch.cc (__cxa_begin_catch): Same.
+ * libsupc++/eh_globals.cc (__cxa_get_globals_fast): Same.
+ (__cxa_get_globals): Same.
+
+ * libsupc++/del_op.cc: Add comment about freestanding.
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init,
- libstdc++-v3-list-sourcefiles): Additionally handle files one
- level deeper in glob patterns.
+2004-04-29 Dhruv Matani <dhruvbird@gmx.net>
- * testsuite/27_io/istream_extractor_arith.cc: Delete, split...
- * testsuite/27_io/istream_extractor_arith/01.cc,
- testsuite/27_io/istream_extractor_arith/02.cc,
- testsuite/27_io/istream_extractor_arith/03.cc,
- testsuite/27_io/istream_extractor_arith/06.cc,
- testsuite/27_io/istream_extractor_arith/07.cc,
- testsuite/27_io/istream_extractor_arith/08.cc,
- testsuite/27_io/istream_extractor_arith/09.cc,
- testsuite/27_io/istream_extractor_arith/10.cc,
- testsuite/27_io/istream_extractor_arith/11.cc,
- testsuite/27_io/istream_extractor_arith/12.cc,
- testsuite/27_io/istream_extractor_arith/13.cc: ... to new files.
- * testsuite/27_io/istream_extractor_arith/12.cc: Add XFAIL for
- sparc*-*-solaris2*.
+ * include/ext/malloc_allocator.h: Fixed the construct function to
+ call global placement new instead of assignment. Added a check
+ after the return from malloc to check whether returned pointer is
+ NULL, and if so, throw std::bad_alloc().
+ * include/ext/debug_allocator.h: Added a check in the deallocate
+ function to check whether the user has passed a NULL pointer or
+ not.
-2003-01-05 Paolo Carlini <pcarlini@unitus.it>
+2004-04-29 Benjamin Kosnik <bkoz@redhat.com>
- PR libstdc++/9168
- * src/codecvt.cc
- (codecvt<char, char, mbstate_t>::do_in, do_out):
- Implement the resolution of DR19 (TC).
- * testsuite/22_locale/codecvt_members_char_char.cc
- (test01): Tweak.
+ * docs/html/20_util/allocator.html: Add bitmap_allocator links.
-2002-12-29 Phil Edwards <pme@gcc.gnu.org>
+2004-04-29 Dhruv Matani <dhruvbird@gmx.net>
+
+ * include/ext/bitmap_allocator.h: (_Bit_scan_forward) -> Made this
+ function call __builtin_ctz instead of the while loop.
+ (allocate) -> If condition has __builtin_expect.
+ (deallocate) -> Ditto.
+ Renamed a few left-over variables and typedefs according to the
+ C++STYLE mentioned in the documentation.
+ Protected calls to __gthread* by __gthread_active_p(), whose value
+ is cached in the local variable __threads_active.
- * include/std/std_bitset.h: Better comments.
+2004-04-29 Felix Yen <fwy@alumni.brown.edu>
-2002-12-29 Phil Edwards <pme@gcc.gnu.org>
+ * testsuite/performance/20_util/allocator/producer_consumer.cc:
+ Use linear algorithm for producer.
- * include/std/std_bitset.h (_Base_bitset::_M_do_left_shift,
- _Base_bitset::_M_do_right_shift): Expect a non-zero shift.
- (bitset::operator<<=, bitset::operator>>=): When shifting more bits
- than are in the bitset, zero memory rather than segfault.
- (operator>>(basic_istream,bitset): Only call setstate once, after
- all work has been done.
+2004-04-29 Paolo Carlini <pcarlini@suse.de>
- * testsuite/23_containers/bitset_members.cc (test03): New test.
- * testsuite/23_containers/bitset_shift.cc (test02): New test.
+ PR libstdc++/14975
+ * include/bits/fstream.tcc (basic_filebuf::imbue): Zero _M_codecvt
+ in case of error.
+ * testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: New.
-2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
+2004-04-26 Paolo Carlini <pcarlini@suse.de>
- * docs/html/17_intro/porting.texi: Use @copying.
- * docs/html/17_intro/porting.html: Regenerate.
+ * include/bits/istream.tcc: Fix comment.
-2002-12-23 Danny Smith <dannysmith@users.sourceforge.net>
+2004-04-26 Paolo Carlini <pcarlini@suse.de>
- * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode):
- Don't use O_NONBLOCK if it is not defined.
- (__basic_file::open): Don't use fcntl either.
+ * src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
+ avoid constructing unnecessarily this->name().
-2002-12-19 Paolo Carlini <pcarlini@unitus.it>
+2004-04-24 Loren J. Rittle <ljrittle@acm.org>
- PR libstdc++/8949
- * include/std/std_limits.h
- (struct numeric_limits<short>,
- struct numeric_limits<unsigned short>,
- struct numeric_limits<int>,
- struct numeric_limits<unsigned int>,
- struct numeric_limits<long>,
- struct numeric_limits<unsigned long>,
- struct numeric_limits<long long>,
- struct numeric_limits<unsigned long long>): According
- to 18.2.1.2,53 and 18.2.1.5,1 is_iec559 shall be false.
- * testsuite/18_support/numeric_limits.cc: Add test04.
+ * testsuite/thread/pthread7-rope.cc: Update comment to reflect test.
-2002-12-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+2004-04-24 Paolo Carlini <pcarlini@suse.de>
- * testsuite/23_containers/vector_capacity.cc (test03): Move ...
- * testsuite/23_containers/vector_resize.cc: ...here as a new file.
- Pass in -lmalloc for irix6.
- * testsuite/27_io/ios_base_storage.cc: Pass in -lmalloc for irix6.
+ * testsuite/thread/pthread7-rope.cc: Fix, unpredictably, depending
+ on allocator behavior, the memory pointed by data2 may well be not
+ trashed.
-2002-12-11 Paolo Carlini <pcarlini@unitus.it>
+2004-04-24 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/8887
* config/locale/generic/time_members.cc
- (__timepunct<char>::_M_initialize_timepunct): Fix typos
- in _M_date_format and _M_date_era_format string literals.
-
-2002-12-10 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/cxxabi.h (__cxa_bad_cast): Declare it.
- (__cxa_bad_typeid): Likewise.
- (__cxa_atexit): Likewise.
- (__cxa_finalize): Likewise.
-
-2002-12-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * include/bits/slice_array.h (slice_array<>::operator=): Fix typo.
-
-2002-12-09 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/cxxabi.h (__cxa_pure_virtual): Declare it.
-
-2002-12-05 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/abi_check.cc: Add GLIBCPP_3.2.2.
-
-2002-12-02 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/basic_string.h (compare(const basic_string&)):
- Fully qualify min() with std::.
-
-2002-12-02 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (libtool_VERSION): Update to 5:2:0.
- * configure: Regenerate.
-
-2002-12-02 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/basic_string.tcc
- (basic_string::append(const basic_string&, size_type,
- size_type), basic_string::compare(size_type, size_type,
- const basic_string&), basic_string::compare(size_type,
- size_type, const basic_string&, size_type, size_type),
- basic_string::compare(const _CharT*), basic_string::
- compare(size_type, size_type, const _CharT*),
- basic_string::compare(size_type, size_type, const _CharT*,
- size_type), _S_string_copy(const basic_string&, _CharT*,
- typename _Alloc::size_type)): Fully qualify min() with std::.
-
-2002-12-02 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/basic_string.tcc
- (basic_string::_S_construct(_InIter, _InIter, const _Alloc&,
- forward_iterator_tag)): Delay the declaration of __dnew,
- fully qualify distance() with std::.
- (basic_string::_M_replace_safe): Fully qualify distance()
- with std::.
-
-2002-11-28 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/8716
- * testsuite/21_strings/ctor_copy_dtor.cc (test05): Also test
- the NULL-pointer, zero-size case.
-
-2002-11-28 Jonathan Wakely <redi@gcc.gnu.org>
-
- * docs/html/faq/index.html: Add tip about a namespace for extensions.
-
-2002-11-28 Paolo Carlini <pcarlini@unitus.it>
- Nathan Myers <ncm@cantrip.org>
-
- * src/localename.cc
- (locale::_Impl::_Impl(const char*, size_t)):
- Improve previous fix for the strtok vs MT issue.
-
-2002-11-28 Paolo Carlini <pcarlini@unitus.it>
-
- * config/locale/gnu/c_locale.cc (locale::_S_categories):
- Reorder the categories to match that of glibc's setlocale(LC_ALL, ""))
- * config/locale/generic/c_locale.cc (locale::_S_categories): Ditto.
- * testsuite/22_locale/ctor_copy_dtor.cc (test04): Tweak.
-
-2002-11-25 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/abi_check.cc: Add CXXABI_1.2.1 as compatible.
- * config/linker-map.gnu: Version __cxa_guard_acquire,
- __cxa_guard_release, __cxa_guard_abort in CXXABI_1.2.1.
-
-2002-11-25 Paolo Carlini <pcarlini@unitus.it>
- Nathan Myers <ncm@cantrip.org>
-
- * src/localename.cc
- (locale::_Impl::_Impl(const char*, size_t)):
- Avoid strtok for thread safety.
-
-2002-11-25 Stephen M. Webb <stephen@bregmasoft.com>
-
- * testsuite/testsuite_allocator.h: New file.
- * testsuite/testsuite_allocator.cc: New file.
- * testsuite/Makefile.am: Added testsuite_allocator to test library.
- * testsuite/testsuite_hooks.h: Added more detailed tracker objects
- gnu_copy_constructor, gnu_assignment_operator, and gnu_destructor.
- * testsuite/testsuite_hooks.cc: Added new static objects definitions.
- * testsuite/23_containers/vector_capacity.cc: Added reserve() tests.
- * testsuite/23_containers/vector_ctor.cc: Added a plethora of tests.
- * testsuite/23_containers/deque_ctor.cc: Added a slew of new tests.
-
-2002-11-25 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/Makefile.am (sources): Add guard.cc.
- * libsupc++/Makefile.in: Regenerated.
- * libsupc++/cxxabi.h (__cxa_guard_acquire): New function.
- (__cxa_guard_release): Likewise.
- (__cxa_guard_abort): Likewise.
- * libsupc++/guard.cc: New file.
-
-2002-11-25 Wolfgang Bangerth <bangerth@ticam.utexas.edu>
-
- * include/std/std_complex.h
- (operator<<(basic_ostream&, const complex&)): Prefer 'x'
- to "x" for efficiency sake.
- * src/locale.cc (locale::locale(const char*)): Ditto.
-
-2002-11-24 Paolo Carlini <pcarlini@unitus.it>
-
- * src/locale.cc (locale::locale(const char*)):
- Trivial cosmetic tweaks.
-
-2002-11-22 Laszlo Ersek <erseklaszlo@chello.hu>
- Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/8645
- * include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase):
- Don't check that __w->_M_left != 0 and __w->_M_right != 0
- when they can't be otherwise.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/documentation.html: Fix broken/thinko'd URL.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/run_doxygen: Tighter search expression for sed.
- * docs/doxygen/stdheader.cc: Handle the case of good headers.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * acinclude.m4: Uniform formatting.
- * configure.in: Warn when generic atomicity.h is used.
- * configure.target: Fix comment.
- * aclocal.m4, configure: Regenerate.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/streambuf.tcc (basic_streambuf::sputbackc): Prefix
- "this->" to call to pbackfail.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/style.css: Update.
- * docs/doxygen/user.cfg.in: Update.
- * docs/html/documentation.html: Regenerate.
- * docs/html/17_intro/howto.html: Tweak I/O sentry entry.
- * docs/html/27_io/howto.html: New section on headers.
- * docs/html/faq/index.html: Add i386 threading entry.
- * docs/html/faq/index.txt: Regenerate.
-
- * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
- Import R23.
-
-2002-11-21 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/TODO: Note change in clause 27 docs.
- * include/bits/basic_ios.h, include/bits/fpos.h,
- include/bits/ios_base.h, include/bits/stl_deque.h,
- include/bits/stl_iterator_base_types.h, include/std/std_fstream.h,
- include/std/std_iomanip.h, include/std/std_iosfwd.h,
- include/std/std_iostream.h, include/std/std_istream.h,
- include/std/std_ostream.h, include/std/std_sstream.h,
- include/std/std_streambuf.h: Doxygenate all I/O entities.
-
-2002-11-20 Benjamin Kosnik <bkoz@redhat.com>
- Jonathan Lennox <lennox@cs.columbia.edu>
-
- * include/bits/streambuf.tcc (__copy_streambufs):
- Revert previous fix for the interactive half of
- libstdc++/6745, use _M_buf_size_opt to set dynamically
- the correct buffer size.
-
-2002-11-20 Jonathan Wakely <redi@gcc.gnu.org>
-
- * docs/html/21_strings/howto.html: Fix example code, cite Gaby's
- explanation of "<unknown type>" error with toupper/tolower.
- * docs/html/22_locale/howto.html: Be more consistent with
- example in 21_strings.
-
-2002-11-19 John Gustafsson <forgoil@rsn.bth.se>
-
- * docs/html/20_util/howto.html: Fix typo.
-
-2002-11-18 Jonathan Lennox <lennox@cs.columbia.edu>
-
- * include/bits/streambuf.tcc (__copy_streambufs): verify
- __sbin->gptr() + __bufsize < __sbin->egptr() before using.
- * testsuite/27_io/ostream_inserter_other.cc (test_buffer_4): Add.
- (test05): Use test_buffer_4. Delete unused ostringstream
- variables.
-
-2002-11-18 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/6745 (continued)
- * include/bits/streambuf.tcc (__copy_streambufs):
- Deal with interactive input by using isatty as in the
- fix for libstdc++/8399.
-
-2002-11-17 Jakub Jelinek <jakub@redhat.com>
-
- * config/linker-map.gnu: Export _S_construct even if size_t is
- unsigned long. Collapse std::codecvt<char>::codecvt(size_t)
- and std::codecvt<wchar_t>::codecvt(size_t) into one export pattern.
-
-2002-11-15 Benjamin Kosnik <bkoz@redhat.com>
- Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- PR libstdc++/8230
- * include/bits/stl_alloc.h: Use builtin_expect for the most
- obvious limit checks.
- (__default_alloc_template::allocate): Check for null, throw
- bad_alloc.
- * include/bits/vector.tcc: Formatting tweaks.
- * include/bits/stl_vector.h: Same.
- * testsuite/20_util/allocator_members.cc (test02): Add.
- * testsuite/23_containers/vector_capacity.cc (test03): Add.
-
-2002-11-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h.
-
-2002-11-15 Paolo Carlini <pcarlini@unitus.it>
- Loren J. Rittle <ljrittle@acm.org>
-
- PR libstdc++/8399
- * acinclude.m4
- (GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): New macro to
- check for unistd.h functions.
- (GLIBCPP_CHECK_UNISTD_SUPPORT): New macro, check for isatty
- in unistd.h.
- * configure.in: Call here.
- * src/ios.cc (ios_base::Init::_S_ios_create(bool)):
- Use _GLIBCPP_HAVE_ISATTY: ifdef, in case of interactive
- input __in_size = 1 even when sync_with_stdio is false;
- otherwise fall back to __in_size = 1.
- * aclocal.m4: Regenerate.
- * config.h.in: Regenerate.
- * configure: Regenerate.
-
-2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
-
- * acconfig.h (HAVE_DRAND48): Add.
- (HAVE_GETPAGESIZE): Add.
- (HAVE_SETENV): Add.
- (HAVE_SIGSETJMP): Add.
- * config.h.in: Regenerate.
- * configure: Regenerate.
-
-2002-11-13 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define
- on hppa when there is no weak support.
-
-2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8230
- * include/bits/vector.tcc (vector::reserve): Throw length_error if
- requested size is bigger than max_size().
- * include/bits/stl_bvector.h (vector<bool>::reserve): Same.
- * testsuite/23_containers/vector_capacity.cc (test02): Add.
-
-2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
+ (__timepunct<char>::_M_initialize_timepunct,
+ __timepunct<wchar_t>::_M_initialize_timepunct): The correct
+ _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
+ * config/locale/gnu/time_members.cc
+ (__timepunct<char>::_M_initialize_timepunct,
+ __timepunct<wchar_t>::_M_initialize_timepunct): Ditto.
+ * testsuite/22_locale/time_get/get_monthname/char/4.cc: New.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New.
- * config/linker-map.gnu: Export all _S_construct.
+2004-04-24 Paolo Carlini <pcarlini@suse.de>
+ Petur Runolfsson <peturr02@ru.is>
-2002-11-13 Loren J. Rittle <ljrittle@acm.org>
+ * testsuite/performance/27_io/filebuf_sputn_unbuf.cc: New,
+ adapted from libstdc++/11378.
- PR libstdc++/7445
- * src/locale.cc (std::locale::classic()): Weaken locking protocol.
+2004-04-24 Paolo Carlini <pcarlini@suse.de>
+ Andrew Pinski <pinskia@physics.uc.edu>
-2002-11-13 Jonathan Wakely <redi@gcc.gnu.org>
+ * include/bits/basic_string.tcc (_M_mutate): Don't compute
+ __src unnecessarily.
- * docs/html/install.html, docs/html/22_locale/locale.html: HTML fix.
+2004-04-24 Paolo Carlini <pcarlini@suse.de>
-2002-11-11 Benjamin Kosnik <bkoz@redhat.com>
+ PR libstdc++/15002 (partial)
+ * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
+ Special case __n2 == 1, not calling traits_type::assign/copy.
- PR libstdc++/6746
- * include/bits/fstream.tcc (filebuf::open): Set input pointers.
- * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Set
- __p_mode as well.
- (__basic_file::open): Set to non-block for input.
- * testsuite/27_io/istream_unformatted.cc (test12): Add.
- (test13): Same.
+2004-04-24 Matthias Klose <doko@debian.org>
-2002-11-11 Jonathan Wakely <redi@gcc.gnu.org>
+ Jonathan Wakely <cow@compsoc.man.ac.uk>
+ * docs/html/configopts.html: Fix reference to allocator config option.
- * docs/html/17_intro/howto.html: Make "chapter 22 notes" a link.
- * docs/html/faq/index.html: Mention that GCC ships with a newer
- version of the library than the last snapshot. Make "see below" a
- link. Add missing <html> tag.
- * docs/html/faq/index.txt: Regenerate.
- * docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
- docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
- docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
- docs/html/27_io/howto.html, docs/html/ext/howto.html,
- docs/html/ext/sgiexts.html: Add missing <html> tag.
+2004-04-23 Daniel Jacobowitz <drow@mvista.com>
-2002-11-07 Phil Edwards <pme@gcc.gnu.org>
- Richard Earnshaw <rearnsha@arm.com>
+ PR libstdc++/15047, libstdc++/11610
+ * testsuite/lib/libstdc++.exp (v3-copy-files): Use remote_download.
+ (libstdc++_init): Don't pass outdir to v3-copy-files.
- * config/cpu/generic/atomicity.h: Provide atomic __exchange_and_add
- and __atomic_add.
-
-2002-11-08 Paolo Carlini <pcarlini@unitus.it>
+2004-04-23 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
- (moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
- const char*),
- moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
- const char*)): Tweak parameters for glibc2.3 systems, thus
- avoiding unused parameter warnings.
-
-2002-11-05 Jonathan Wakely <cow@compsoc.man.ac.uk>
-
- * include/std/std_sstream.h
- (basic_stringbuf::str(const __string_type&)):
- Prefer data() to c_str(), thus avoiding assigning the
- unnecessary NULL-terminator.
-
-2002-11-05 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8258
- * include/bits/istream.tcc (istream::readsome): Don't set eofbit
- for null buffer.
- (istream::operator>>(_CharT*)): Use traits_type.
- (istream::ws): Same.
- (istream::operator>>(string)): Same.
- * testsuite/27_io/istream_unformatted.cc (test11): Add.
-
-2002-11-05 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/8466
- * include/std/std_sstream.h
- (basic_stringbuf::str(const __string_type&)):
- Cannot use simple assignment since the COW-nature of v3
- basic_string is not taken into account in basic_stringbuf.
- * testsuite/27_io/stringstream_members.cc: Add test04 from PR.
-
-2002-11-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * configure.target (hppa*): Define cpu_include_dir.
- * config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define.
- * src/misc-inst.cc: Instantiate atomicity lock when
- _GLIBCPP_INST_ATOMICITY_LOCK is defined.
- * config/cpu/hppa/atomicity.h: New file.
-
-2002-11-05 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8463
- * include/bits/ios_base.h (~ios_base): Make virtual.
-
-2002-11-04 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu: Export string operator+.
- Export __default_alloc_template::_S_force_new.
- * testsuite/abi_check.cc: Output tweaks.
-
-2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8172
- * src/string-inst.cc: Add instantiation.
-
-2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7926
- * configure.target: Simplify.
- * config/cpu/i386/atomicity.h: Remove.
- * config/cpu/i386: Remove.
- * config/cpu/arm/atomicity.h: Remove.
- * config/cpu/arm: Remove.
- * config/cpu/x86-64/atomicity.h: Remove.
- * config/cpu/x86-64: Remove.
-
-2002-11-01 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
-
- PR libstdc++/8197
- * config/link-map.gnu: Export math stubbs.
-
-2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/8318
- * include/std/std_iostream.h: Tweak.
- * include/std/std_iosfwd.h: Add _GLIBCPP_USE_WCHAR_T.
- * include/std/std_iomanip.h: Same.
- * include/bits/stringfwd.h: Same.
- * include/bits/basic_string.tcc: Same.
- * include/bits/sstream.tcc: Same.
- * include/bits/fstream.tcc: Same.
- * include/bits/basic_ios.tcc: Same.
- * include/bits/streambuf.tcc: Same.
- * include/bits/locale_facets.tcc: Same.
-
-2002-11-01 John Carter <john.carter@tait.co.nz>
-
- PR libstdc++/7961
- * include/bits/basic_string.tcc
- (compare(const _CharT* __s)): Don't access __s past its length.
+ (moneypunct<wchar_t>::_M_initialize_moneypunct): Prefer
+ _NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC,
+ and __MON_GROUPING to _NL_NUMERIC_DECIMAL_POINT_WC,
+ _NL_NUMERIC_THOUSANDS_SEP_WC, and GROUPING.
+ * config/locale/gnu/numeric_members.cc
+ (numpunct<char>::_M_initialize_numpunct): Prefer DECIMAL_POINT
+ and THOUSANDS_SEP to the deprecated RADIXCHAR and THOUSEP.
-2002-10-31 Benjamin Kosnik <bkoz@redhat.com>
+2004-04-21 Chavdar Botev <cbotev@yahoo.com>
- PR libstdc++/8348
- * include/bits/istream.tcc (istream::tellg): Remove sentry bits.
- (istream::seekg): Same.
- * testsuite/27_io/istream_seeks.cc (test06): New.
-
-2002-10-28 Jason Thorpe <thorpej@wasabisystems.com>
-
- * testsuite/thread/pthread5.cc: Include <unistd.h>
- if _GLIBCPP_HAVE_UNISTD_H is defined.
- (main): Only use pthread_attr_setscope if
- _POSIX_THREAD_PRIORITY_SCHEDULING is defined.
-
-2002-10-28 Jason Thorpe <thorpej@wasabisystems.com>
-
- * testsuite/thread/pthread1.cc: Enable on *-*-netbsd*.
- * testsuite/thread/pthread2.cc: Likewise.
- * testsuite/thread/pthread3.cc: Likewise.
- * testsuite/thread/pthread4.cc: Likewise.
- * testsuite/thread/pthread5.cc: Likewise.
- * testsuite/thread/pthread6.cc: Likewise.
-
-2002-10-27 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/8347
+ PR libstdc++/14245
* include/bits/basic_string.tcc
- (string::_S_construct(_InIter, _InIter, const _Alloc&,
- forward_iterator_tag)): Do not throw logic error if
- __beg == NULL && __end == __beg.
- (string::string(const _CharT*, const _Alloc&)): Tweak.
- * testsuite/21_strings/ctor_copy_dtor.cc: Add test05 from PR.
-
-2002-10-24 Hans-Peter Nilsson <hp@bitrange.com>
-
- PR other/3337
- PR bootstrap/6763
- PR bootstrap/8122
- * testsuite/testsuite_hooks.cc (__set_testsuite_memlimit): Use
- __typeof__ (r.rlim_cur), not rlim_t in declaration of limit.
-
-2002-10-23 Jakub Jelinek <jakub@redhat.com>
-
- * testsuite/22_locale/num_put_members_char.cc (test01): Swap size
- and decimal_point arguments of find.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test01): Likewise.
-
-2002-10-22 Jakub Jelinek <jakub@redhat.com>
-
- * Makefile.am (check-abi, new-abi-baseline): Use @glibcpp_srcdir@
- instead of ${top_srcdir}.
- * Makefile.in: Rebuilt.
-
-2002-10-22 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
- Remove specialization for FreeBSD systems.
-
-2002-10-18 Loren J. Rittle <ljrittle@acm.org>
-
- * configure.target (freebsd*): Use abi_baseline_triplet.
- * config/abi/i386-unknown-freebsd4/baseline_symbols.txt: New file.
- * config/abi/i386-unknown-freebsd4.7/baseline_symbols.txt: Remove.
-
- * testsuite/thread/pthread1.cc: Remove needless workaround
- for FreeBSD 5.
-
-2002-10-18 Loren J. Rittle <ljrittle@acm.org>
- Brad Spencer <spencer@infointeractive.com>
- (provided alternate patch and improvements)
-
- * docs/html/23_containers/howto.html (GLIBCPP_FORCE_NEW): Document
- new environment variable which replaces all uses of __USE_MALLOC
- macro.
- * docs/html/ext/howto.html (GLIBCPP_FORCE_NEW): Likewise.
- (__mem_interface): Remove all references to old internal typedef.
- * include/backward/alloc.h (__USE_MALLOC): Remove it and all
- guarded code.
- * include/bits/c++config (__USE_MALLOC): Update related error
- message and comment.
- * include/bits/stl_alloc.h (__USE_MALLOC): Remove it and all
- guarded code. Update all related comments.
- (__mem_interface): Unconditionally replace it with __new_alloc.
- However, leave the typedef around in case anyone used it.
- (__default_alloc_template<>::_S_force_new): New class static.
- (__default_alloc_template<>::allocate, deallocate): Add
- run-time controlled feature similar to what __USE_MALLOC code
- path had provided.
- * src/stl-inst.cc (__USE_MALLOC): Remove it and all
- guarded code.
- * testsuite/21_strings/capacity.cc: Remove reference to __USE_MALLOC.
- Add documentation on GLIBCPP_FORCE_NEW environment variable.
- * testsuite/ext/allocators.cc: Likewise.
-
-2002-10-18 Phil Edwards <pme@gcc.gnu.org>
-
- * configure.in: Use target, not target_alias, when matching triplet
- patterns.
- * configure: Regenerate.
-
-2002-10-17 Momchil Velikov <velco@fadata.bg>
- Loren J. Rittle <ljrittle@acm.org>
-
- * configure.in: Add *-freebsd* to cross list.
- * configure: Rebuilt.
-
-2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h (__timepunct::__timepunct): Allocate
- _M_name_timepunct.
- (__timepunct::~__timepunct): Deallocate, remove specialization
- declarations.
- (messages::messages): Allocate _M_name_messages.
- (messages::~messages): Deallocate.
- (messages_byname): Same.
- * config/locale/gnu/time_members.cc (__timepunct::~__timepunct):
- Remove.
- * config/locale/generic/time_members.cc (__timepunct::~__timepunct):
- Remove.
-
- * docs/html/install.html: Add es_MX, en_PH to required locales list.
-
-2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu: Add exports for codecvt constructors
- where size_t == unsigned long.
-
-2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/globals.cc (__gnu_cxx::c_locale_impl_compat): Add, alias to
- c_locale_impl.
- * testsuite/abi_check.cc (line_to_symbol_info): Collect size info.
- * docs/html/abi.txt: Update.
-
-2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/static_members.cc (test02): Less provincial.
-
-2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/static_members.cc (test02): Disable for
- systems without named locale support.
- * testsuite/22_locale/ctor_copy_dtor.cc (test04): Don't assume
- running the testsuites in "C" environment.
- Add new tests.
- * docs/html/22_locale/locale.html: Update.
-
-2002-10-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/bits/stl_threads.h (_GLIBCPP_mutex,
- _GLIBCPP_mutex_init,_GLIBCPP_mutex_address,
- _GLIBCPP_mutex_address_init, _GLIBCPP_once):
- Declare in namespace __gnu_cxx.
- (_STL_mutex_lock::_M_initialize): Qualify __gnu_cxx
- names.
- Adjust copyright.
-
-2002-10-12 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/abi_check.cc (hash<string>): Specialize.
- Simplify. Check compatible symbol versions.
- * config/linker-map.gnu: Clarify, explicitly export
- std::codecvt::c* symbols.
-
- * testsuite/22_locale/static_members.cc (test02): Avoid null strings.
-
-2002-10-12 Jonathan Wakely <jw@kayari.org>
- Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * docs/html/21_strings/howto.html#5: Correct nasting of XHTML
- elements. Correct allocator-related text.
-
-2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/static_members.cc (test02): Fix.
-
-2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * acconfig.h (_GLIBCPP_SYMVER): Add.
- (_GLIBCPP_ASM_SYMVER): Add.
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Define _GLIBCPP_SYMVER.
- * aclocal.m4: Regenerate.
- * config.h.in: Regenerate.
- * configure: Regenerate.
- * include/bits/c++config (_GLIBCPP_AT_AT): Define, as an expedient
- hack around m4 issues with quoting '@'.
- * src/locale.cc: Use _GLIBCPP_ASM_SYMVER.
- * src/globals.cc: Same.
-
- * testsuite/22_locale/ctor_copy_dtor.cc (test04): Fix for
- non-glibc systems.
-
-2002-10-10 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu (GLIBCPP_3.2.1): Add.
- (GLIBCPP_3.2): Don't export locale::_S_*.
- * src/ios.cc: Move globals into __gnu_cxx. Make old exported
- symbols match.
- * src/locale.cc: Same.
- * src/localename.cc: Same.
- * src/globals.cc: Same.
-
-2002-10-10 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/21_strings/howto.html: Write #5, char_traits.
- * docs/html/17_intro/porting.texi: Expand on os_include_dir.
- * docs/html/17_intro/porting.html: Regenerate.
-
-2002-10-09 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/locale.cc: Fix comments, move ctors together.
- * testsuite/22_locale/static_members.cc (test03): Add.
-
-2002-10-08 Jonathan Lennox <lennox@cs.columbia.edu>
-
- PR libstdc++/8071, libstdc++/8127, libstdc++/6745
- * streambuf.tcc (__copy_streambufs): Handle cases where
- __sbin->in_avail() returns 0, or where __sbin doesn't set gptr().
- * testsuite/27_io/ostream_inserter_other.cc (test05): Add.
-
-2002-10-08 Paolo Carlini <pcarlini@unitus.it>
- Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/localefwd.h (class locale): Add static member
- _S_num_extra_categories, encoding the number of additional
- categories.
- Change _S_num_categories to _S_categories_size.
- (class locale::_Impl): Add _M_c_cats.
- (class locale::_Impl::_M_names): Change to array of chars.
- (class locale::_Impl::_M_check_same_name): Use
- _S_extra_categories_size, tweak.
- (locale::locale(const locale&, _Facet*)): Ditto.
- * src/locale.cc (locale::locale(const char* )): Rewrite to deal
- with the environment in a POSIX-compliant way while being thread
- safe.
- (locale::name()): Update to output POSIX environment strings.
- * src/localename.cc
- (locale::_Impl::_Impl(const _Impl&, size_t): Use
- _S_categories_size_*, tweak.
- (locale::_Impl::_Impl(facet**, size_t, bool)): Ditto.
- (locale::_Impl::_Impl(const char*, size_t)): Name each category
- individually.
- (locale::_Impl::_M_replace_categories): Use strcpy.
-
- * include/bits/locale_facets.h (numpunct::_M_initialize_numpunct):
- Change default argument to NULL from _S_c_locale.
- (timepunct::_M_initialize_timepunct): Same.
- _S_c_locale cleanups.
- * src/codecvt.c: _S_c_locale simplification.
- * src/ctype.c: Same.
- * src/globals.cc: Add fake_name.
- * src/locale-inst.cc: Remove extra includes.
- * src/locale.cc: Remove extra includes.
- Add _S_extra_categories_size definition.
- Correct "C" initialization.
- (locale::facet::facet): Don't initialize _S_c_locale.
- (locale::facet::_M_remove_reference): Adjust.
- * src/localename: Use facet_vec, facet_name.
- (locale::_Impl::_Impl(facet** __f, size_t __refs, bool)): Set
- facet ref counts to one. Initialize _S_c_locale.
- (locale::_Impl::_M_install_facet(id*, facet*)): Adjust facet ref
- counts when installing unilaterally.
-
- * config/locale/generic/c_locale.cc: Add _S_categories definition.
- * config/locale/generic/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
- * config/locale/generic/time_members.cc: _S_c_locale cleanup.
-
- * config/locale/gnu/c_locale.cc: Add _S_categories definition.
- (_S_destroy_c_locale): Move checks against _S_c_locale here.
- * config/locale/gnu/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
- * config/locale/gnu/ctype_members.cc: Simplify _S_destroy_c_locale
- calls, _S_c_locale usage.
- * config/locale/gnu/monetary_members.cc: Same, tweaks.
- * config/locale/gnu/monetary_members.cc: Same.
- * config/locale/gnu/time_members.cc: Same.
- * config/os/gnu-linux/ctype_noninline.h: Use locale::classic().
-
- * docs/html/22_locale/locale.html: Add bits about global locales
- and "C" setlocale.
-
- * testsuite/22_locale/facet.cc (test02): Add.
- * testsuite/22_locale/static_members.cc (test02): Add.
- * testsuite/22_locale/ctor_copy_dtor.cc (test04): Add.
-
-2002-10-07 Jonathan Wakely <jw@kayari.org>
-
- * docs/html/configopts.html, docs/html/documentation.html,
- docs/html/explanations.html, docs/html/install.html,
- docs/html/17_intro/contribute.html, docs/html/17_intro/howto.html,
- docs/html/17_intro/license.html, docs/html/18_support/howto.html,
- docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
- docs/html/21_strings/howto.html, docs/html/22_locale/codecvt.html,
- docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
- docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
- docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
- docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
- docs/html/27_io/howto.html, docs/html/ext/howto.html,
- docs/html/ext/sgiexts.html, docs/html/faq/index.html: Add DOCTYPEs.
-
-2002-10-03 Richard Earnshaw <rearnsha@arm.com>
-
- PR libstdc++/3584
- * config/cpu/arm/atomicity.h (__exchange_and_add): Don't try to use
- ASM sequences that don't give us atomic addition operations. Instead
- just add a comment explaining why it doesn't work.
- (__atomic_add): Just use __exchange_and_add.
- (__test_and_set, __always_swap): Delete.
-
-2002-10-02 Andreas Jaeger <aj@suse.de>
-
- * config/abi/x86_64-unknown-linux-gnu/baseline_symbols.txt:
- New file.
-
-2002-10-01 Phil Edwards <pme@gcc.gnu.org>
-
- * Makefile.am (check-abi): Add @ to rule.
- * Makefile.in: Regenerated.
-
-2002-09-27 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/locale_facets.tcc (num_put::_M_widen_int):
- Deal correctly with grouped, showbased (oct or hex) zero.
- * testsuite/22_locale/num_put_members_char.cc: Add test05.
- * testsuite/22_locale/num_put_members_wchar_t.cc: Ditto.
-
-2002-09-27 Richard Henderson <rth@redhat.com>
-
- * config/os/hpux/cpu_limits.h: Remove.
-
- * include/std/std_limits.h (numeric_limits<T>::is_iec559): False
- if denormals are not supported.
-
-2002-09-25 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am (target_headers): Remove cpu_limits.h.
- * include/Makefile.in: Regenerate.
- * configure.in (CPU_LIMITS_INC_SRCDIR): Remove
- * configure: Regenerate.
- * configure.target (CPULIMITS): Remove.
-
- * include/std/std_limits.h: Remove cpu_limits.h include.
-
- * config/os/solaris/solaris2.7/os_defines.h (__glibcpp_long_bits):
- Remove.
- * config/os/irix/irix6.5/os_defines.h
- (__glibcpp_long_double_bits): Remove.
- (__glibcpp_wchar_t_bits): Remove.
- (__glibcpp_long_bits): Remove.
- * config/os/irix/irix5.2/os_defines.h
- (__glibcpp_long_double_bits): Remove.
- (__glibcpp_long_bits): Remove.
- * config/os/hpux/os_defines.h (__glibcpp_wchar_t_is_signed): Remove.
- * config/os/bsd/freebsd/os_defines.h:
- (__glibcpp_long_double_bits): Remove.
- * config/os/aix/os_defines.h (__glibcpp_wchar_t_bits): Remove.
- (__glibcpp_wchar_t_is_signed): Remove.
- (__glibcpp_long_bits): Remove.
- * config/os/gnu-linux/os_defines.h (__glibcpp_long_bits): Remove.
- (__glibcpp_long_double_bits): Remove.
-
- * config/os/osf/osf5.0/cpu_limits.h: Remove.
- * config/cpu/alpha/cpu_limits.h: Remove.
- * config/cpu/arm/cpu_limits.h: Remove.
- * config/cpu/cris/cpu_limits.h: Remove.
- * config/cpu/generic/cpu_limits.h: Remove.
- * config/cpu/generic/limits.h: Remove.
- * config/cpu/ia64/cpu_limits.h: Remove.
- * config/cpu/m68k/cpu_limits.h: Remove.
- * config/cpu/mmix/cpu_limits.h: Remove.
- * config/cpu/powerpc/cpu_limits.h: Remove.
- * config/cpu/S390/cpu_limits.h: Remove.
-
-2002-09-25 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * testsuite/18_support/numeric_limits.cc: Check the maximum and
- minimum values of the wchar_t type.
-
-2002-09-25 Mark Mitchell <mark@codesourcery.com>
-
- * include/std/std_limits.h (numeric_limits<unsigned char>::digits):
- Fix typo.
-
-2002-09-23 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_plain_char_is_signed,
- __glibcpp_wchar_t_is_signed, __glibcpp_s8_max, __glibcpp_s8_min,
- __glibcpp_s8_digits, __glibcpp_s8_digits10, __glibcpp_u8_min,
- __glibcpp_u8_max, __glibcpp_u8_digits, __glibcpp_u8_digits10,
- __glibcpp_s16_max, __glibcpp_s16_min, __glibcpp_s16_digits,
- __glibcpp_s16_digits10, __glibcpp_u16_min, __glibcpp_u16_max,
- __glibcpp_u16_digits, __glibcpp_u16_digits10, __glibcpp_s32_max,
- __glibcpp_s32_min, __glibcpp_s32_digits, __glibcpp_s32_digits10,
- __glibcpp_u32_min, __glibcpp_u32_max, __glibcpp_u32_digits,
- __glibcpp_u32_digits10, __glibcpp_s64_max, __glibcpp_s64_min,
- __glibcpp_s64_digits, __glibcpp_s64_digits10, __glibcpp_u64_min,
- __glibcpp_u64_max, __glibcpp_u64_digits, __glibcpp_u64_digits10,
- __glibcpp_bool_digits, __glibcpp_signed_char_min,
- __glibcpp_signed_char_max, __glibcpp_signed_char_digits,
- __glibcpp_signed_char_digits10, __glibcpp_unsigned_char_min,
- __glibcpp_unsigned_char_max, __glibcpp_unsigned_char_digits,
- __glibcpp_unsigned_char_digits10, __glibcpp_char_min,
- __glibcpp_char_max, __glibcpp_char_digits, __glibcpp_char_digits10,
- __glibcpp_signed_short_min, __glibcpp_signed_short_max,
- __glibcpp_signed_short_digits, __glibcpp_signed_short_digits10,
- __glibcpp_unsigned_short_min, __glibcpp_unsigned_short_max,
- __glibcpp_unsigned_short_digits, __glibcpp_unsigned_short_digits10,
- __glibcpp_signed_int_min, __glibcpp_signed_int_max,
- __glibcpp_signed_int_digits, __glibcpp_signed_int_digits10,
- __glibcpp_unsigned_int_min, __glibcpp_unsigned_int_max,
- __glibcpp_unsigned_int_digits, __glibcpp_unsigned_int_digits10,
- __glibcpp_signed_long_min, __glibcpp_signed_long_max,
- __glibcpp_unsigned_long_digits, __glibcpp_unsigned_long_digits10,
- __glibcpp_signed_long_long_min, __glibcpp_signed_long_long_max,
- __glibcpp_signed_long_long_digits, __glibcpp_signed_long_long_digits10,
- __glibcpp_wchar_t_min, __glibcpp_wchar_t_max, __glibcpp_wchar_t_digits,
- __glibcpp_wchar_t_digits10): Remove.
- (__glibcpp_byte, __glibcpp_word_bits, __glibcpp_word): Remove.
- (__float_storage, __double_storage, __long_double_storage): Remove.
- (__glibcpp_signed, __glibcpp_min, __glibcpp_max): New.
- (__glibcpp_digits, __glibcpp_digits10): New.
- (numeric_limits<T>::min): Use __glibcpp_min or limits.h builtins.
- (numeric_limits<T>::max): Use __glibcpp_max or limits.h builtins.
- (numeric_limits<T>::is_signed, T=char,wchar_t): Use __glibcpp_signed.
- (numeric_limits<T>::digits): Use __glibcpp_digits.
- (numeric_limits<T>::digits10): Use __glibcpp_digits10.
- * testsuite/18_support/numeric_limits.cc (test03): Don't use
- __glibcpp_s8_digits10 et al; check vs the installed versions
- of digits10 for particular sizes.
-
- * include/std/std_limits.h (__glibcpp_float_is_modulo,
- __glibcpp_double_is_modulo, __glibcpp_long_double_is_modulo): Kill.
- (numeric_limits<T>::is_modulo, T floating): Use false.
-
-2002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * Makefile.am (all-multi): Fix multilib parallel build.
-
-2002-09-22 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_f32_round_error,
- __glibcpp_f64_round_error, __glibcpp_f80_round_error,
- __glibcpp_f96_round_error, __glibcpp_f128_round_error,
- __glibcpp_float_round_error, __glibcpp_double_round_error,
- __glibcpp_long_double_round_error, __glibcpp_float_round_style,
- __glibcpp_double_round_style, __glibcpp_long_double_round_style): Kill.
- (numeric_limits<char>::epsilon, round_error): Use constant 0.
- (numeric_limits<float>::round_error): Use constant 0.5.
- (numeric_limits<float>::round_style): Use round_to_nearest.
- (numeric_limits<double>, numeric_limits<long double>): Similarly.
-
- * include/std/std_limits.h (__glibcpp_f32_is_iec559,
- __glibcpp_f64_is_iec559, __glibcpp_f80_is_iec559,
- __glibcpp_f96_is_iec559, __glibcpp_f128_is_iec559,
- __glibcpp_float_is_iec559, __glibcpp_double_is_iec559,
- __glibcpp_long_double_is_iec559): Remove.
- (numeric_limits<float>::is_iec559): Use has_infinity & has_quiet_NaN.
- (numeric_limits<double>, numeric_limits<long double>): Similarly.
-
- * include/std/std_limits.h (__glibcpp_integral_traps): New.
- (__glibcpp_char_traps, __glibcpp_short_traps, __glibcpp_int_traps,
- __glibcpp_long_traps, __glibcpp_wchar_t_traps,
- __glibcpp_long_long_traps, __glibcpp_plain_char_traps,
- __glibcpp_signed_char_traps, __glibcpp_unsigned_char_traps,
- __glibcpp_signed_short_traps, __glibcpp_unsigned_short_traps,
- __glibcpp_signed_int_traps, __glibcpp_unsigned_int_traps,
- __glibcpp_signed_long_traps, __glibcpp_unsigned_long_traps,
- __glibcpp_signed_long_long_traps, __glibcpp_unsigned_long_long_traps,
- __glibcpp_char_is_modulo, __glibcpp_signed_char_is_modulo,
- __glibcpp_signed_short_is_modulo, __glibcpp_signed_int_is_modulo,
- __glibcpp_signed_long_is_modulo, __glibcpp_signed_long_long_is_modulo,
- __glibcpp_wchar_t_is_modulo, __glibcpp_float_is_bounded,
- __glibcpp_double_is_bounded, __glibcpp_long_double_is_bounded): Kill.
- (numeric_limits<T>::traps, T integral): Use __glibcpp_integral_traps.
- (numeric_limits<T>::is_modulo, T integral): Use true.
- (numeric_limits<T>::is_bounded, T floating): Use true.
-
-2002-09-18 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/18_support/numeric_limits.cc (test_epsilon): New.
-
-2002-09-18 Richard Henderson <rth@redhat.com>
-
- * testsuite/18_support/numeric_limits.cc: Add -mieee for alpha.
-
-2002-09-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/c_shadow: Remove.
- * include/bits/generic_shadow.h: Remove.
- * include/Makefile.am: Remove generic_shadow.h.
- * acinclude.m4: Remove c_shadow references.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * mkcshadow: Remove.
- * mkinclosure: Remove.
-
-2002-09-16 Loren J. Rittle <ljrittle@acm.org>
-
- libstdc++/7922
- * include/ext/stl_rope.h (rope<>): Qualify dependent names
- with `typename'.
-
-2002-09-16 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
- __glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
- __glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
- __glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
- __glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
- __glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
- __glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
- __glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
- __glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
- __glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
- __glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
- __glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
- __glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
- __glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
- __glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
- __glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
- __glibcpp_long_double_has_SNaN): Remove.
- (__glibcpp_f128_is_iec559): True if IEEE.
- (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
- (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
- (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
- (std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
- (std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
- (std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
- (std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
- (std::numeric_limits<double>): Similarly.
- (std::numeric_limits<long double>): Similarly.
- * src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
- (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
- (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
-
- * testsuite/18_support/numeric_limits.cc (test_infinity): New.
- (test_denorm_min, test_qnan, test_is_iec559): New.
-
-2002-09-16 Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite/abi_check.cc: Pull shell fragments out into...
- * config/abi/extract_symvers: ...here. New file.
- * Makefile.am (check_abi): Change to match.
- (new-abi-baseline): New target.
- * Makefile.in: Regenerated.
-
-2002-09-16 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_f32_denorm_min_bytes,
- __glibcpp_f32_has_denorm, __glibcpp_f64_denorm_min_bytes,
- __glibcpp_f64_has_denorm, __glibcpp_f80_denorm_min_bytes,
- __glibcpp_f80_has_denorm, __glibcpp_f96_denorm_min_bytes,
- __glibcpp_f96_has_denorm, __glibcpp_f128_denorm_min_bytes,
- __glibcpp_f128_has_denorm, __glibcpp_float_denorm_min_bytes,
- __glibcpp_float_has_denorm, __glibcpp_double_denorm_min_bytes,
- __glibcpp_double_has_denorm, __glibcpp_long_double_denorm_min_bytes,
- __glibcpp_long_double_has_denorm): Remove.
- (__glibcpp_float_denorm_min, __glibcpp_double_denorm_min,
- __glibcpp_long_double_denorm_min): Remove.
- (std::numeric_limits<float>::has_denorm): Use __FLT_DENORM_MIN__.
- (std::numeric_limits<float>::denorm_min): Likewise.
- (std::numeric_limits<double>): Similarly.
- (std::numeric_limits<long double>): Similarly.
- * src/limits.cc (__glibcpp_float_denorm_min,
- __glibcpp_double_denorm_min, __glibcpp_long_double_denorm_min): Remove.
-
-2002-09-13 Andy Felt <afelt@uwsp.edu>
-
- * docs/html/17_intro/howto.html: Update link.
-
-2002-09-13 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/run_doxygen: Massage man page for Iterator_types.3.
- * docs/html/faq/index.html: Whitespace fixes.
-
-2002-09-12 Benjamin Kosnik <bkoz@redhat.com>
-
- * libmath/Makefile.am (LIBTOOL): Use --tag CC always for this
- directory.
- * libmath/Makefile.in: Regenerate.
- * src/Makefile.am: Tweak comment.
- * src/Makefile.in: Regenerate.
+ (basic_string::basic_string(const basic_string&)): Pass to
+ _Rep::_M_grab the actual allocator of the string being constructed
+ not the default constructed one.
- * config/locale/gnu/c_locale.h: Remove warnings.
- Inject __uselocale into __gnu_cxx.
- * config/locale/generic/c_locale.h: Match.
-
-2002-09-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (__convert_from_v): Remove.
- * config/locale/gnu/c_locale.h (__convert_from_v): Add.
- * config/locale/generic/c_locale.h (__convert_from_v): Add.
+2004-04-21 Paolo Carlini <pcarlini@suse.de>
+ Petur Runolfsson <peturr02@ru.is>
-2002-09-11 Paolo Carlini <pcarlini@unitus.it>
+ PR libstdc++/12077
+ * include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's
+ no way to find out the conversion used by the underlying FILE*.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New.
+ * testsuite/27_io/objects/char/9.cc: Tweak.
- * include/bits/locale_facets.tcc (__convert_from_v):
- Use __uselocale instead of setlocale for glibc 2.3+.
+2004-04-18 Release Manager
-2002-09-10 Benjamin Kosnik <bkoz@redhat.com>
+ * GCC 3.4.0 released.
- * src/Makefile.am (sources): Edit.
- (target_sources): New.
- (target_sources_extra): New.
+2004-04-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_bvector.h: Use _M_impl._M_start.
+
+2004-04-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config (_GLIBCXX_STD): New.
+ * src/list.cc: Use it.
+ * include/std/std_bitset.h: Same.
+ * include/bits/vector.tcc: Same.
+ * include/bits/stl_set.h: Same.
+ * include/bits/stl_multiset.h: Same.
+ * include/bits/stl_multimap.h: Same.
+ * include/bits/stl_map.h: Same.
+ * include/bits/stl_list.h: Same.
+ * include/bits/stl_vector.h: Same.
+ * include/bits/stl_bvector.h: Same.
+ * include/bits/stl_deque.h: Same.
+ * include/bits/deque.tcc: Same.
+ * include/bits/list.tcc: Same.
+ * include/debug/vector: Same.
+ * include/debug/set.h: Same.
+ * include/debug/multiset.h: Same.
+ * include/debug/multimap.h: Same.
+ * include/debug/map.h: Same.
+ * include/debug/list: Same.
+ * include/debug/deque: Same.
+ * include/debug/bitset: Same.
+ * include/debug/formatter.h (__gnu_debug): Remove using directive.
+ Add using declaration for std::type_info.
+ * include/debug/safe_iterator.h: Add using declaration for
+ std::iterator_traits and std::pair.
+ * src/debug_list.cc: New.
+ * src/Makefile.am: Add debug_list.cc.
* src/Makefile.in: Regenerate.
- * acinclude.m4: Set CCODECVT_CC.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * src/locale.cc: Move ctype definitions...
- * src/ctype.cc: ...here. New file.
- * src/locale.cc: Move codecvt definitions...
- * src/codecvt.cc: ...here.
- * config/generic/codecvt_members.cc: ...and here.
- * config/gnu/codecvt_members.cc: ...and here.
- * include/bits/codecvt.h: Tweak.
- * include/bits/locale_facets: Tweak.
-
- * src/bitset.cc: Correct license text.
- * src/concept-inst.cc: Same.
- * src/strstream.cc: Same.
- * src/vterminate.cc: Same.
-
-2002-09-10 Gabriel Dos Reis <gdr@soliton.integrable-solutions.net>
-
- * include/bits/stl_vector.h (vector<>): Don't use a name with
- different meanings before and after re-evaluation in the completed
- scope.
- * include/bits/basic_string.h (basic_string<>): Likewise.
- * include/bits/stl_bvector.h (vector<bool>): Likewise.
- * include/bits/stl_deque.h (std): Likewise.
- * include/bits/stl_list.h (list<>): Likewise.
- * include/bits/stl_tree.h (_Rb_tree<>): Likewise.
-
-2002-09-10 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/codecvt.h (class __codecvt_abstract_base):
- Add __c_locale type _M_c_locale_codecvt member.
- (class codecvt<char, char, mbstate_t>,
- class codecvt<wchar_t, char, mbstate_t>): Add new
- codecvt(__c_locale, size_t) constructor.
- (codecvt_byname::codecvt_byname): Update.
- * src/codecvt.cc (class codecvt<char, char, mbstate_t>,
- class codecvt<wchar_t, char, mbstate_t>): Update codecvt(size_t)
- constructor and ~codecvt() destructor; define
- codecvt(__c_locale, size_t) constructor.
- (codecvt::do_out): Switch to _M_c_locale_codecvt around wcsrtombs call.
- (codecvt::do_in): Ditto for mbsrtowcs call.
- * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
- Tweak construction of codecvt facets.
-
-2002-09-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/bits/locale_facets.tcc (__convert_from_v):
- Replace strdup with ISO malloc and strcpy.
-
-2002-09-09 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/html/configopts.html: Change grouping. Note ABI impacts.
- Update information for locale model defaults.
- * docs/html/install.html: Update include directory
- information.
- Update testing information.
- Update linux issues for named locales.
- * docs/html/abi.txt: Fix typos.
- Add more info.
-
- * src/misc-inst.cc: Add missing instantiations.
-
- * testsuite/abi_check.cc: Make output results more verbose.
-
- * config/os/gnu-linux/ctype_base.h: Remove shadow headers injections.
-
-2002-09-07 Jakub Jelinek <jakub@redhat.com>
-
- * config/locale/generic/messages_members.cc: Add specialization for
- messages<wchar_t>.
- * config/locale/ieee_1003.1-20021/messages_members.cc: Likewise.
-
-2002-09-06 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/localefwd.h: Tweak formatting.
- * docs/html/abi.txt: Add.
-
-2002-09-06 Jakub Jelinek <jakub@redhat.com>
-
- * configure.target: Use cpu_include_dir="config/cpu/sparc" for all
- sparc targets.
- * config/cpu/sparc/atomicity.h: New file.
- * config/cpu/sparc/sparc32/atomicity.h: Removed.
- * config/cpu/sparc/sparc64/atomicity.h: Removed.
-
-2002-09-06 Jakub Jelinek <jakub@redhat.com>
-
- * config/os/gnu-linux/ctype_noninline.h
- [_GLIBCPP_USE_SHADOW_HEADERS]: Remove using _C_legacy::__ctype_*.
- (ctype<char>::classic_table): If _GLIBCPP_C_LOCALE_GNU, return
- _S_c_locale->__ctype_b, otherwise temporarily switch to "C" locale
- and return __ctype_b.
- (ctype<char>::ctype(__c_locale, const mask*, bool, size_t)): If not
- _GLIBCPP_C_LOCALE_GNU, temporarily switch to "C" locale and
- initialize using __ctype_{b,tolower,toupper}.
- (ctype<char>::ctype(const mask*, bool, size_t)): If
- _GLIBCPP_C_LOCALE_GNU, initialize using
- _S_c_locale->__ctype_{b,tolower,toupper}, otherwise temporarily
- switch to "C" locale and initialize using __ctype_{b,tolower,toupper}.
-
-2002-09-05 Paolo Carlini <pcarlini@unitus.it>
- Roland McGrath <roland@redhat.com>
-
- PR libstdc++/7811
- * src/locale.cc (locale::locale(__s)): Use getenv instead
- of setenv for the environment locale.
- * testsuite/22_locale/ctor_copy_dtor.cc (test03): New.
-
-2002-09-05 Jakub Jelinek <jakub@redhat.com>
-
- * config/abi/ia64-unknown-linux-gnu: Add.
- * config/abi/ia64-unknown-linux-gnu/baseline_symbols.txt: New file.
- * config/abi/alphaev67-unknown-linux-gnu: Add.
- * config/abi/alphaev67-unknown-linux-gnu/baseline_symbols.txt: New file.
-
-2002-09-05 Jonathan Wakely <jw@kayari.org>
-
- * docs/html/Makefile: Use more portable shell wildcard.
- * docs/html/makedoc.awk: Nest elements correctly for XHTML conversion.
- * docs/html/configopts.html, docs/html/documentation.html,
- docs/html/explanations.html, docs/html/install.html,
- docs/html/17_intro/contribute.html, docs/html/17_intro/howto.html,
- docs/html/17_intro/license.html, docs/html/18_support/howto.html,
- docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
- docs/html/21_strings/howto.html, docs/html/22_locale/codecvt.html,
- docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
- docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
- docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
- docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
- docs/html/27_io/howto.html, docs/html/ext/howto.html,
- docs/html/ext/sgiexts.html, docs/html/faq/index.html: Convert
- to XHTML.
- * docs/html/faq/index.txt: Regenerate.
-
-2002-09-05 Jakub Jelinek <jakub@redhat.com>
-
- * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_widen(char)):
- Switch to _M_c_locale_ctype around btowc call.
- (ctype<wchar_t>::do_widen(const char*, const char *, wchar_t*)):
- Switch to _M_c_locale_ctype around mbsrtowcs call.
- (ctype<wchar_t>::do_narrow(char)): Switch to _M_c_locale_ctype around
- wctob call.
- (ctype<wchar_t>::do_narrow(const char*, const char *, wchar_t*)):
- Switch to _M_c_locale_ctype around wcsrtombs call.
-
-2002-09-05 Jakub Jelinek <jakub@redhat.com>
-
- * config/locale/gnu/monetary_members.cc
- (moneypunct<wchar_t, true>::_M_initialize_moneypunct,
- moneypunct<wchar_t, false>::_M_initialize_moneypunct): Use
- __uselocale instead of setlocale for glibc 2.3.
-
-2002-09-05 Jakub Jelinek <jakub@redhat.com>
-
- * config/locale/generic/c++locale_internal.h: New header.
- * config/locale/gnu/c++locale_internal.h: New header.
- * config/locale/gnu/c_locale.cc: Include it.
- * config/locale/gnu/collate_members.cc: Include it.
- * config/locale/gnu/ctype_members.cc: Include it.
- * config/locale/gnu/messages_members.cc: Include it.
- * config/locale/gnu/monetary_members.cc: Include it.
- * config/locale/gnu/numeric_members.cc: Include it.
- * config/locale/gnu/time_members.cc: Include it.
- (_M_put): Reorder __strftime_l and __wcsftime_l arguments to match
- glibc.
- (_M_initialize_timepunct): Initialize _M_c_locale_timepunct for
- C locale.
- * acinclude.m4: Include string.h when testing strcoll_l.
- For glibc 2.3 provide __-prefixed prototypes.
- (CLOCALE_INTERNAL_H): Set, add AC_LINK_FILES line.
- * aclocal.m4, configure: Rebuilt.
-
-2002-09-05 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h: Add declaration of specialization
- here.
- * config/locale/gnu/messages_members.cc: Add specialization for
- messages<wchar_t>.
- * config/locale/gnu/messages_members.h: Remove generic definition
- of do_get.
-
-2002-09-04 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
- __glibcpp_f32_has_infinity, __glibcpp_f64_infinity_bytes,
- __glibcpp_f64_has_infinity, __glibcpp_f80_infinity_bytes,
- __glibcpp_f80_has_infinity, __glibcpp_f96_infinity_bytes,
- __glibcpp_f96_has_infinity, __glibcpp_f128_infinity_bytes,
- __glibcpp_f128_has_infinity, __glibcpp_float_infinity_bytes,
- __glibcpp_float_has_infinity, __glibcpp_double_infinity_bytes,
- __glibcpp_double_has_infinity, __glibcpp_long_double_infinity_bytes,
- __glibcpp_long_double_has_infinity): Remove.
- (std::numeric_limits<float>, std::numeric_limits<double>,
- std::numeric_limits<long double>): Use __builtin_huge_val
- to implement has_infinity and infinity().
- * src/limits.cc (__glibcpp_float_infinity, __glibcpp_double_infinity,
- __glibcpp_long_double_infinity): Remove.
-
-2002-09-03 Richard Henderson <rth@redhat.com>
-
- * include/std/std_limits.h (__glibcpp_f32_min, __glibcpp_f32_max,
- __glibcpp_f32_digits, __glibcpp_f32_digits10, __glibcpp_f32_radix,
- __glibcpp_f32_epsilon, __glibcpp_f32_min_exponent,
- __glibcpp_f32_min_exponent10, __glibcpp_f32_max_exponent,
- __glibcpp_f32_max_exponent10, __glibcpp_f64_min, __glibcpp_f64_max,
- __glibcpp_f64_digits, __glibcpp_f64_digits10, __glibcpp_f64_radix,
- __glibcpp_f64_min_exponent, __glibcpp_f64_min_exponent10,
- __glibcpp_f64_max_exponent, __glibcpp_f64_max_exponent10,
- __glibcpp_f80_min, __glibcpp_f80_max, __glibcpp_f80_digits,
- __glibcpp_f80_digits10, __glibcpp_f80_radix, __glibcpp_f80_epsilon,
- __glibcpp_f80_min_exponent, __glibcpp_f80_min_exponent10,
- __glibcpp_f80_max_exponent, __glibcpp_f80_max_exponent10,
- __glibcpp_f96_min, __glibcpp_f96_max, __glibcpp_f96_digits,
- __glibcpp_f96_digits10, __glibcpp_f96_radix, __glibcpp_f96_epsilon,
- __glibcpp_f96_min_exponent, __glibcpp_f96_min_exponent10,
- __glibcpp_f96_max_exponent, __glibcpp_f96_max_exponent10,
- __glibcpp_f128_min, __glibcpp_f128_max, __glibcpp_f128_digits,
- __glibcpp_f128_digits10, __glibcpp_f128_radix, __glibcpp_f128_epsilon,
- __glibcpp_f128_min_exponent, __glibcpp_f128_min_exponent10,
- __glibcpp_f128_max_exponent, __glibcpp_f128_max_exponent10,
- __glibcpp_float_min, __glibcpp_float_max, __glibcpp_float_digits,
- __glibcpp_float_digits10, __glibcpp_float_radix,
- __glibcpp_float_epsilon, __glibcpp_float_min_exponent,
- __glibcpp_float_min_exponent10, __glibcpp_float_max_exponent,
- __glibcpp_float_max_exponent10, __glibcpp_double_min,
- __glibcpp_double_max, __glibcpp_double_digits,
- __glibcpp_double_digits10, __glibcpp_double_radix,
- __glibcpp_double_epsilon, __glibcpp_double_min_exponent,
- __glibcpp_double_min_exponent10, __glibcpp_double_max_exponent,
- __glibcpp_double_max_exponent10, __glibcpp_long_double_min,
- __glibcpp_long_double_max, __glibcpp_long_double_digits,
- __glibcpp_long_double_digits10, __glibcpp_long_double_radix,
- __glibcpp_long_double_epsilon, __glibcpp_long_double_min_exponent,
- __glibcpp_long_double_min_exponent10,
- __glibcpp_long_double_max_exponent,
- __glibcpp_long_double_max_exponent10): Remove macros.
- (std::numeric_limits<float>, std::numeric_limits<double>,
- std::numeric_limits<long double>): Use protected float.h macros.
-
-2002-09-01 Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite/Makefile.am: Use LD_RUN_PATH when linking abi_check.
- Fix spelling in comment.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/abi_check.cc: Use string literals to build 'cmd' rather
- than 'quote' and 'bslash'.
-
-2002-08-31 Phil Edwards <pme@gcc.gnu.org>
-
- * acinclude.m4: Minor comment tweaks.
-
- * docs/html/makedoc.awk: New file...
- * docs/html/Makefile: ...called from here...
- * docs/html/documentation.html: ...to help generate this.
-
- * docs/html/21_strings/howto.html: Prepare for new entry.
- * include/bits/basic_string.h: Initial basic_stirng hook for
- doxygen. Remove trailing whitespace.
- * include/bits/char_traits.h: Point to onlinedocs for new entry.
- * include/bits/stringfwd.h: Add doxygen hooks for string and
- wstring typedefs.
-
-2002-08-29 Richard Earnshaw <rearnshaw@arm.com>
-
- * config/cpu/arm/cpu_limits.h: New file.
- * configure.target: Use config/cpu/arm for XScale and StrongARM
- configurations.
-
-2002-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * include/std/std_limits.h (__glibcpp_char_bits,
- __glibcpp_short_bits, __glibcpp_int_bits, __glibcpp_long_bits,
- __glibcpp_long_long_bits, __glibcpp_float_bits,
- __glibcpp_double_bits, __glibcpp_long_double_bits): Remove. Use
- compiler predifined macros.
- (__glibcpp_wchar_t_is_signed): Define based on compiler predefined
- __WCHAR_UNSIGNED__.
-
-2002-08-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
- __glibcpp_f32_has_infinity, __glibcpp_f32_QNaN_bytes,
- __glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
- __glibcpp_f32_has_SNaN, __glibcpp_f32_denorm_min_bytes,
- __glibcpp_f32_has_denorm, __glibcpp_f32_is_iec559,
- __glibcpp_f64_infinity_bytes,
- __glibcpp_f64_has_infinity, __glibcpp_f64_QNaN_bytes,
- __glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
- __glibcpp_f64_has_SNaN, __glibcpp_f64_denorm_min_bytes,
- __glibcpp_f64_has_denorm, __glibcpp_f64_is_iec559,
- __glibcpp_f80_infinity_bytes,
- __glibcpp_f80_has_infinity, __glibcpp_f80_QNaN_bytes,
- __glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
- __glibcpp_f80_has_SNaN, __glibcpp_f80_denorm_min_bytes,
- __glibcpp_f80_has_denorm, __glibcpp_f80_is_iec559,
- __glibcpp_f96_infinity_bytes,
- __glibcpp_f96_has_infinity, __glibcpp_f96_QNaN_bytes,
- __glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
- __glibcpp_f96_has_SNaN, __glibcpp_f96_denorm_min_bytes,
- __glibcpp_f96_has_denorm, __glibcpp_f96_is_iec559,
- __glibcpp_f128_infinity_bytes,
- __glibcpp_f128_has_infinity, __glibcpp_f128_QNaN_bytes,
- __glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
- __glibcpp_f128_has_SNaN, __glibcpp_f128_denorm_min_bytes,
- __glibcpp_f128_has_denorm, __glibcpp_f128_is_iec559,
- __glibcpp_float_infinity_bytes,
- __glibcpp_float_has_infinity, __glibcpp_float_QNaN_bytes,
- __glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
- __glibcpp_float_has_SNaN, __glibcpp_float_denorm_min_bytes,
- __glibcpp_float_has_denorm, __glibcpp_float_is_iec559,
- __glibcpp_double_infinity_bytes,
- __glibcpp_double_has_infinity, __glibcpp_double_QNaN_bytes,
- __glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
- __glibcpp_double_has_SNaN, __glibcpp_double_denorm_min_bytes,
- __glibcpp_double_has_denorm, __glibcpp_double_is_iec559,
- __glibcpp_long_double_infinity_bytes,
- __glibcpp_long_double_has_infinity, __glibcpp_long_double_QNaN_bytes,
- __glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
- __glibcpp_long_double_has_SNaN, __glibcpp_long_double_denorm_min_bytes,
- __glibcpp_long_double_has_denorm, __glibcpp_long_double_is_iec559:
- New macros.
- (__glibcpp_word_bits, __glibcpp_word): Likewise.
- (__glibcpp_byte): New typedef.
- (__float_storage, __double_storage, __long_double_storage): New types.
- (__glibcpp_float_infinity, __glibcpp_float_QNaN,
- __glibcpp_float_SNaN, __glibcpp_float_denorm_min): Now
- objects. Declare.
- (__glibcpp_double_infinity, __glibcpp_double_QNaN,
- __glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
- (__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
- __glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
- Likewise.
-
- * src/limits.cc (__glibcpp_float_infinity, __glibcpp_float_QNaN,
- __glibcpp_float_SNaN, __glibcpp_float_denorm_min): Define.
- (__glibcpp_double_infinity, __glibcpp_double_QNaN,
- __glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
- (__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
- __glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
- Likewise.
+ * config/linker-map.gnu: Add _List_node_base exports for std and
+ __gnu_norm.
-2002-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * include/std/std_limits.h: Indent conditional macro definitions.
-
-2002-08-23 Phil Edwards <pme@gcc.gnu.org>
-
- * Makefile.am (check-abi): Specify current directory.
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Fix shell syntax, use
- abi_baseline_triplet in baseline_file.
- * Makefile.in, aclocal.m4, configure: Regenerate.
- * configure.target: Add abi_baseline_triplet with default.
- * testsuite/abi_check.cc: More error checking.
-
-2002-08-23 Phil Edwards <pme@gcc.gnu.org>
-
- * config/linker-map.gnu: Verbose comments, clean up spacing.
- * include/bits/stl_alloc.h: Fix indentation of 'if' bodies, return
- statements.
- __allocator: Change class declaration to struct.
- * docs/html/17_intro/C++STYLE: Fix typo.
- * include/bits/stl_deque.h, include/bits/stl_list.h,
- include/bits/stl_map.h, include/bits/stl_multimap.h,
- include/bits/stl_vector.h: Fix fallout from typo.
-
-2002-08-22 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/stl_bvector.h (_Bvector_base): Use _Bvector_impl
+ idiom that other containers use.
+ * testsuite/23_containers/vector/bool/clear_allocator.cc: New.
+
+2004-04-14 Zack Weinberg <zack@codesourcery.com>
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Set
- GLIBCPP_BUILD_ABI_CHECK based on cross compiling, build, host
- variables.
- * aclocal.m4: Regenerate.
- * testsuite/Makefile.am (noinst_PROGRAMS): Make conditional on
- native compiling.
+ * testsuite/Makefile.am: Add definition of AM_CXXFLAGS.
+ Change definition of CXX to use $(shell) instead of backticks.
* testsuite/Makefile.in: Regenerate.
-2002-08-22 Loren J. Rittle <ljrittle@acm.org>
-
- * testsuite/abi_check.cc: Enhance shell portability.
- Support older binutils/readelf.
- * config/abi/i386-unknown-freebsd4.6: Add.
- * config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file.
+2004-04-09 Andreas Schwab <schwab@suse.de>
-2002-08-22 Paolo Carlini <pcarlini@unitus.it>
+ * testsuite/lib/prune.exp (prune_g++_output): Ignore errata
+ warning from IA64 assembler.
- * docs/html/faq/index.html: Add Loren James Rittle and
- Paolo Carlini to the list of v3 maintainers.
- * docs/html/faq/index.txt: Ditto.
- * docs/html/17_intro/RELEASE-NOTES: Ditto.
+2004-03-30 Benjamin Kosnik <bkoz@redhat.com>
-2002-08-22 Benjamin Kosnik <bkoz@redhat.com>
- Phil Edwards <pme@gcc.gnu.org>
- Ulrich Drepper <drepper@redhat.com>
-
- * Makefile.am (check-abi): New rule.
- * Makefile.in: Regenerate.
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Export baseline_file.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * testsuite/Makefile.am (noinst_PROGRAMS): Add abi_check.
- (abi_check_SOURCES): Add.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/abi_check.cc: New file.
- * config/abi: Add.
- * config/abi/i686-pc-linux-gnu: Add.
- * config/abi/i686-pc-linux-gnu/baseline_symbols.txt: New file.
+ PR libstdc++/14783
+ * include/bits/stl_tree.h: Adjust initialization list order.
-2002-08-19 Benjamin Kosnik <bkoz@redhat.com>
+2004-03-26 Benjamin Kosnik <bkoz@redhat.com>
- * configure.in (libtool_VERSION): Update to 5:1:0.
+ libstdc++ PR/13598
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h
+ (__enc_traits::_M_destroy): New.
+ (__enc_traits::~__enc_traits): Use it.
+ (__enc_traits::operator=): Use _M_destroy, _M_init.
+ (__enc_traits::__enc_traits): Same.
+
+2004-03-26 Petur Runolfsson <peturr02@ru.is>
+
+ * testsuite/ext/enc_filebuf/char/13598.cc: New.
+
+2004-03-25 Gawain Bolton <gp.bolton@computer.org>
+
+ * include/bits/stl_tree.h (_Rb_tree_impl): Add _Node_allocator
+ default argument in constructors.
+ (_Rb_tree::_M_empty_initialize): Remove.
+
+2004-03-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers.
+ * testsuite/23_containers/set/operators/1_neg.cc: Same.
+
+2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
+
+ * include/bits/cpp_type_traits.h: Changed __is_pod
+ completely. Now, it does not use any of the previous type_traits
+ to detect the pod types, and it also detects function pointers as
+ POD types.
+
+ * include/bits/stl_tree.h: Introduced a new class _Rb_tree_impl,
+ which encapsulates the internal implementation of an rb_tree. Made
+ the allocator a base class of this class instead of the rb_tree,
+ which was not conforming. This _Rb_tree_impl class is also
+ specialized on whether the _Compare parameter is a POD type or
+ not. If so, then it maintains the comparison function as a data
+ member, otherwise it makes the _Compare parameter a base class of
+ itself. Also, _M_key_compare is now a function instead of a data
+ member, so that the above trick can work properly. Delegated the
+ initialization of the other data members to this newly created
+ class. Also, now other member functions of rb_tree must refer to
+ _M_key_compare as _M_impl._M_key_compare(). The other data members
+ (*) can be referenced to as _M_impl.(*), where
+ (*) includes _M_header, and _M_node_count.
+
+2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
+
+ * include/bits/stl_list.h: Created a _List_impl class and made it
+ derive from the allocator, instead of the list deriving from the
+ allocator class, which was not conformant. Changed all references
+ from this->_M_node to this->_M_impl._M_node * bits/list.tcc: Same
+ as above (changed all references to the concerned variables).
+
+2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
+
+ * include/bits/stl_deque.h: Created a _Deque_impl class and made
+ it derive from the allocator, instead of the deque deriving from
+ the allocator class, which was not conformant. Changed all
+ references to the _M_start, _M_finish, _M_map, and _M_map_size to
+ _M_impl.*.
+ (_Deque_base<_Tp,_Alloc>::~_Deque_base()): Added this->
+ qualification in 2 places where it was missing.
+ (_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t)): Same as
+ above.
+ * include/bits/deque.tcc: Same as above (changed all references to
+ the concerned variables).
+
+2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
+
+ * include/bits/stl_vector.h: Created a _Vector_impl class and made
+ it derive from the allocator, instead of the _Vector_base class,
+ deriving from the allocator which was not conformant. Changed all
+ references to the _M_start, _M_finish, and _M_end_of_storage to
+ _M_impl.*.
+ * include/bits/vector.tcc: Same as above (changed all references
+ to the concerned variables).
+
+2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
+
+ * testsuite/23_containers/deque/cons/clear_allocator.cc: New.
+ * testsuite/23_containers/list/cons/clear_allocator.cc: New.
+ * testsuite/23_containers/vector/cons/clear_allocator.cc: New.
+
+2004-03-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h: Tweaks for 80 column.
+ (__numpunct_cache::_M_cache): Move to locale_facets.tcc.
+ (__moneypunct_cache::_M_cache): Same.
+ (num_get): Don't inherit from __num_base.
+ (num_put): Same.
+ (money_get): Don't inherit from money_base.
+ (money_put): Same.
+ (__timepunct::_M_am_pm_format): New.
+ (time_get::_M_extract_num): Return iterator, use ios_base as argument.
+ (time_get::_M_extract_name): Same.
+ (time_get::_M_extract_via_format): Same.
+ * include/bits/locale_facets.tcc: Tweaks for 80 column.
+ Use _M_getloc instead of getloc.
+ * testsuite/22_locale/money_put/put/char/9780-3.cc: New.
+ * testsuite/22_locale/num_put/put/char/9780-2.cc: New.
+ * testsuite/22_locale/time_put/put/char/9780-1.cc: New.
+
+2004-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/14676
+ * config/cpu/cris/atomicity.h (__atomic_add): Remove "static
+ inline" and attribute-unused. Qualify parameter __mem with
+ "volatile".
+ (__exchange_and_add): Ditto. Add back memory clobber to asm.
+
+2004-03-19 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ PR libstdc++/14647
+ * include/backward/bvector.h (bit_vector): Allocator is in std
+ namespace.
+
+2004-03-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/std_valarray.h: Document DR389 [Ready].
+ * docs/html/ext/howto.html: Add an entry for DR389.
+
+2004-03-19 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14648
+ * include/ext/ropeimpl.h (rope<>::_S_apply_to_pieces): Fix
+ memory allocation/deallocation calls.
+ * testsuite/ext/14648.cc: New.
+
+2004-03-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revert.
+ * configure.ac (AC_PREREQ): Use 2.57.
+ (AM_INIT_AUTOMAKE): Remove -Wno-override.
+
+2004-03-17 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ PR bootstrap/14207
+ Revert patch of 2004-02-17, as it breaks mips-sgi-irix6.5 -o32
+ (Almost certainly a target issue)
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
+ num_get<>::_M_extract_int, money_get<>::do_get): Simplify
+ grouping fidelity conditional.
+
+2004-03-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revert dg-require-iconv changes.
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc: Revert.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Same.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Same.
+ * testsuite/22_locale/collate/hash/wchar_t/2.cc: Same.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Same.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Same.
+ * testsuite/22_locale/collate/transform/wchar_t/2.cc: Same.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Same.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
+
+2004-03-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * Merge from mainline.
+
+2004-03-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Default setting is
+ new_allocator for all hosts.
* configure: Regenerate.
-2002-08-19 Jonathan Wakely <jw@kayari.org>
-
- * docs/html/configopts.html, docs/html/documentation.html,
- docs/html/install.html, docs/html/22_locale/codecvt.html,
- docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
- docs/html/22_locale/locale.html,
- docs/html/22_locale/messages.html: Conform to HTML 4.01 standard.
-
-2002-08-15 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/ext/stdio_filebuf.h (stdio_filebuf): Explicitly set
- _M_buf_size_opt to zero when unbuffering.
- * include/bits/fstream.tcc (filebuf::showmanyc): Simplify.
- Consistency checks for _M_buf_size_opt.
-
- Revert PR libstdc++/7445
- * src/locale.cc (locale::classic): Revert.
-
- * docs/html/17_intro/TODO: Add.
+2004-03-16 Paolo Carlini <pcarlini@suse.de>
-2002-08-15 Phil Edwards <pme@gcc.gnu.org>
+ * testsuite/22_locale/num_put/put/char/4.cc: Fix for 64-bit pointers.
+ * testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise.
- * docs/html/documentation.html: Update doxygen links for 3.2.
+2004-03-15 Paolo Carlini <pcarlini@suse.de>
-2002-08-15 Steve Ellcey <sje@cup.hp.com>
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Adjust the logic underlying the parsing of symbol to deal
+ correctly with an optional sign component (i.e., when either
+ negative_sign or positive_sign is empty)
+ * testsuite/22_locale/money_get/get/char/19.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/19.cc: New.
- * libsupc++/unwind-cxx.h (__cxa_exception): Change catchTemp
- type from void* to _Unwind_Ptr.
- * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
- Do not cast landing_pad or base_of_encoded_value to (void *).
- * libsupc++/eh_throw.cc (__gxx_exception_cleanup):
- Accept _URC_NO_REASON as a valid reason code.
+2004-03-15 Paolo Carlini <pcarlini@suse.de>
-2002-08-14 Jonathan Wakely <jw@kayari.org>
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Do not accept an incomplete currency symbol.
+ * testsuite/22_locale/money_get/get/char/18.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/18.cc: New.
- * docs/html/22_locale/messages.html: Use HTML entities for
- punctuation.
+2004-03-13 Benjamin Kosnik <bkoz@redhat.com>
-2002-08-13 Jonathan Wakely <jw@kayari.org>
- Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/documentation.html: Use HTML entities for punctuation.
-
-2002-08-09 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/deque.tcc, include/bits/list.tcc,
- include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
- include/bits/stl_list.h, include/bits/stl_map.h,
- include/bits/stl_multimap.h, include/bits/stl_queue.h,
- include/bits/stl_stack.h, include/bits/stl_vector.h,
- include/bits/vector.tcc: Re-indent contents of namespace std,
- re-wrap comment lines as necessary.
-
-2002-08-08 Danny Smith <dannysmith@users.sourceforge.net>
- Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/istream.tcc (basic_istream::ignore): Use sbumpc,
- not snextc.
- * testsuite/27_io/narrow_stream_objects.cc (test10): Add.
+ * config/allocator: New.
+ * config/allocator/bitmap_allocator_base.h: New.
+ * config/allocator/malloc_allocator_base.h: New.
+ * config/allocator/mt_allocator_base.h: New.
+ * config/allocator/new_allocator_base.h: New.
+ * include/bits/allocator.h: Include c++allocator.h.
+ * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): New.
+ * aclocal.m4: Regenerate.
+ * configure.ac: Use GLIBCXX_ENABLE_ALLOCATOR.
+ * configure: Regenerate.
+ * include/Makefile.am (host_headers_extra): Add c++allocator.h.
+ * include/Makefile.in: Regenerate.
+ * docs/html/configopts.html: Add enable-libstdcxx-allocator.
-2002-08-07 John David Anglin <dave@hiauly1.hia.nrc.ca>
+2004-03-12 Benjamin Kosnik <bkoz@redhat.com>
- * libsupc++/Makefile.am (LTCOMPILE): Add LIBSUPCXX_PICFLAGS.
- * libsupc++/Makefile.in: Regenerate.
+ * include/bits/allocator.h: Revert.
-2002-08-05 Gabriel Dos Reis <gdr@nerim.net>
+2004-03-12 Paolo Carlini <pcarlini@suse.de>
- PR/7491
- * include/bits/slice_array.h(_DEFINE_VALARRAY_OPERATOR):
- Instantiate with new function objects.
- * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise.
- Reformat. Uglify.
- * include/bits/gslice_array.h: Likewise.
+ * docs/html/ext/howto.html: Add entry for DR 253 [Ready].
+ * include/bits/gslice_array.h: Add comment about DR 253.
* include/bits/indirect_array.h: Likewise.
+ * include/bits/mask_array.h: Likewise.
+ * include/bits/slice_array.h: Likewise.
-2002-08-03 Gabriel Dos Reis <gdr@nerim.net>
-
- * testsuite/26_numerics/valarray_name_lookup.cc: Rename from
- testsuite/26_numerics/valarray_name_lookup.C
-
- * include/bits/valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our
- object function surrogates.
- * include/bits/valarray_meta.h (__shift_left): Fix typo.
- (_BinFunClos<>): Remove.
- (_BinFunBase<>): Likewise.
- (_BinFunBase1<>):Likewise.
- (_BinFunBase2<>): Likewise.
- (_DEFINE_EXPR_RELATIONAL_OPERATOR): Likewise.
- (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
- (_DEFINE_EXPR_BINARY_OPERATOR): Likewise.
- (_DEFINE_EXPR_BINARY_FUNCTION): Likewise.
- * include/std/std_valarray.h: Dont #include <functional> anymore.
- (_Bitwise_or<>, _Bitwise_and<>, _Bitwise_xor<>, _Shift_left<>,
- _Shift_right<>): Remove.
- (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT): Adjust instantiation.
- (_DEFINE_BINARY_OPERATOR): Tweak definition.
- (_DEFINE_LOGICAL_OPERATOR): Remove.
- * testsuite/26_numerics/valarray_name_lookup.C (main): Add more tests.
-
-2002-08-02 Gabriel Dos Reis <gdr@nerim.net>
-
- * include/bits/valarray_meta.h (_UnFunBase<>): Remove.
- (_UnFunClos<>): Same.
- (_UnBase<>): Reformat. Make first template-parameter non
- template.
- (_UnClos<>): Likewise.
- (_Expr<>): Reformate. Adjust unary member operator return types.
- (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
- (_DEFINE_EXPR_UNARY_FUNCTION): Likewise.
- * include/std/std_valarray.h (_UnClos<>): Adjust declaration.
- (valarray<>::_UnaryOp<>): New nested traits. Adjust unary member
- operator return types. Reformat.
- (_Bitwise_not): Remove.
- (_DEFINE_VALARRAY_UNARY_OPERATOR): Adjust definition.
- * testsuite/26_numerics/valarray_name_lookup.C: New test.
-
-2002-08-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
- (scan_is): Use this->is.
- (scan_not): Likewise.
-
-2002-08-02 Benjamin Kosnik <bkoz@redhat.com>
-
- Revert PR libstdc++/6594
- * src/strstream.cc (strstreambuf): Revert.
- (strstreambuf::overflow): Same.
- (strstreambuf::~strstreambuf): Same.
- * testsuite/backward/strstream_members.cc (test02): Add.
-
- * docs/html/abi.txt: Update. Spell check.
-
- * testsuite/19_diagnostics/stdexceptions.cc (test04): Add bool test.
-
- * testsuite/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/testsuite_hooks.h: Use __throw_exception_again,
- include functexcept.h so that -fno-exceptions will build.
-
-2002-08-02 Gabriel Dos Reis <gdr@nerim.net>
-
- * include/bits/valarray_meta.h (__unary_plus, __negate,
- __bitwise_not, __plus, __minus, __multiplies, __divides,
- __modulus, __bitwise_xor, __bitwise_or, __bitwise_and,
- __shift_left, __shift_right, __logical_and, __logical_or,
- __logical_not, __equal_to, __not_equal_to, __less, __less_equal,
- __greater_equal, __greater, __atan2, __pow): New function object
- classes.
- (__fun<>): New function traits class.
-
-2002-08-01 Rick Danos <rdanos@hotmail.com>
+2004-03-12 Benjamin Kosnik <bkoz@redhat.com>
- PR libstdc++/7461
- * config/os/newlib/ctype_noninline.h (classic_table): Add offset.
- * config/os/newlib/ctype_inline.h (is): Use static_cast.
+ * testsuite/20_util/allocator/14176.cc: New.
+ * include/ext/mt_allocator.h: Formatting fixes.
-2002-08-01 Neil Booth <neil@daikokuya.co.uk>
+2004-03-11 Dhruv Matani <dhruvbird@HotPOP.com>
- * libsupc++/Makefile.am (LT_COMPILE): Remove C++ flags.
- * libsupc++/Makefile.in: Regenerate.
-
-2002-08-01 Benjamin Kosnik <bkoz@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- * config/linker-map.gnu: Change CXXABI_1 to CXXABI_1.2,
- GLIBCPP_3.1 to GLIBCPP_3.2.
-
-2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
- Mark Mitchell <mark@codesourcery.com>
-
- PR libstdc++/7442
- * libsupc++/cxxabi.h (class __base_class_type_info::hwm_bit):
- Change to __hwm_bit.
- (__class_type_info): And here.
-
-2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7442
- * libsupc++/cxxabi.h
- (__base_class_info): Change to __base_class_type_info. 2.9.5p6c
- (__base_class_info::__base): Change to __base_type. 2.9.5p6c
- (__base_class_info::offset_shift): Change to __offset_shift. 2.9.5p6c
- (__vmi_class_type_info::__base_info): Don't make const, of type
- __base_class_type_info, as per 2.9.5p6c
- (__pbase_type_info::__qualifier_flags): Change to __flags, as per
- 2.9.5p7.
- (__pbase_type_info::__qualifier_masks): Change to __masks, as per
- 2.9.5p7.
- (__pointer_to_member_type_info::__context_class): Change member to
- __context, as per 2.9.5p9.
- * libsupc++/tinfo2.cc (__pointer_catch): Change __context_class to
- __context.
- * libsupc++/tinfo2.cc (__do_catch): Change __qualifier_flags to
- __flags.
- * libsupc++/tinfo.cc (__do_find_public_src): Change __base to
- __base_type.
- * libsupc++/tinfo.cc (__do_dyncast): Same.
- * libsupc++/tinfo.cc (__do_upcast): Same.
-
-2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/fstream.cc: Add _GLIBCPP_USE_WCHAR_T guards.
-
-2002-07-31 Simon Whomsley <whomsley@avacadcam.com>
-
- * docs/html/22_locale/howto.html: Fix.
-
-2002-07-31 Alex Kompel <shurik@sequoiap.com>
-
- PR libstdc++/7445
- * src/locale.cc (locale::classic): Move locks inside !_S_classic
- block.
-
-2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/html/abi.txt: Update.
-
-2002-07-30 Benjamin Kosnik <bkoz@redhat.com>
- Gabriel Dos Reis <gdr@nerim.net>
-
- * include/bits/char_traits.h: Remove generic definitions.
- * include/bits/streambuf_iterator.h (istreambuf_iterator): Use
- eof, not -2.
- * include/bits/istream.tcc (istream::readsome): Don't check
- against eof, instead use constants.
- (istream::sync): Same.
- (istream::sentry::sentry): Use eq_int_type.
- (istream::get): Same.
- * include/bits/ostream.tcc: Change __pad to
- __pad<_CharT, _Traits>::_S_pad.
- * include/bits/locale_facets.h: Add __pad_traits generic and
- ostreambuf_iterator specialization.
- * include/bits/locale_facets.tcc: Change __pad into struct __pad
- with a _CharT and _Traits template parameter and _S_pad static
- member function.
- * src/locale-inst.cc: Update __pad instantiations.
-
- * include/std/std_fstream.h: Declare _M_underflow_common
- specializations.
- * src/fstream.cc: New. Add _M_underflow_common specializations.
- * include/bits/fstream.tcc (filebuf::close): Use traits_type.
- (filebuf::_M_underflow_common(bool)): Remove generic version, as
- sys_ungetc and custom int_types don't get along.
- * include/std/std_streambuf.h: Add _M_pos.
- * src/Makefile.am (sources): Add fstream.cc.
- * src/Makefile.in: Regenerate.
-
- * testsuite/21_strings/capacity.cc: Add char_traits specializations.
- * testsuite/22_locale/codecvt_members_unicode_char.cc: Same.
- * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc: Same.
- * testsuite/22_locale/ctor_copy_dtor.cc: Same.
- * testsuite/27_io/filebuf_virtuals.cc (test07): Move to...
- * testsuite/27_io/filebuf.cc: ...here.
- * testsuite/testsuite_hooks.h: Add gnu_char, gnu_int, char_traits
- specialization for both.
- * testsuite/27_io/streambuf.cc: Add instantiation test,
- testsuite_hooks include.
- * testsuite/27_io/istream.cc: Same.
- * testsuite/27_io/ostream.cc: Same.
- * testsuite/27_io/fstream.cc: Same.
- * testsuite/27_io/stringstream.cc: Same.
- * testsuite/27_io/filebuf.cc: Same.
- * testsuite/27_io/stringbuf.cc: Same.
-
-2002-07-29 Alan Modra <amodra@bigpond.net.au>
-
- * config/cpu/powerpc/cpu_limits.h (__glibcpp_long_bits): Define.
- * configure.target (cpu_include_dir): Use cpu/powerpc for powerpc64.
- * config/cpu/powerpc/atomicity.h (__always_swap): Remove.
- (__test_and_set): Remove.
- (_STWCX): Define and use.
-
-2002-07-26 Phil Edwards <pme@gcc.gnu.org>
-
- * libsupc++/new (placement delete): Remove unused parameter names.
-
-2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7216
- * include/std/std_istream.h (basic_iostream): Add typedefs for
- char_type, int_type, pos_type, off_type, and traits_type.
- * testsuite/27_io/iostream.cc (test01): Add typedef tests.
- * testsuite/27_io/istream.cc: Same.
- * testsuite/27_io/ostream.cc: Same.
- * testsuite/27_io/filebuf.cc: Same.
- * testsuite/27_io/stringbuf.cc: Replace content, move to...
- * testsuite/27_io/stringbuf_members.cc: ...here.
- * testsuite/27_io/streambuf.cc: Replace content, move to...
- * testsuite/27_io/streambuf_members.cc: ...here.
- * testsuite/27_io/stringstream.cc: Replace content, move to...
- * testsuite/27_io/stringstream_members.cc: ...here.
- * testsuite/27_io/ios.cc: New file.
- * testsuite/27_io/fstream.cc: New file.
- * testsuite/27_io/ifstream.cc: New file.
- * testsuite/27_io/ofstream.cc: New file.
- * testsuite/27_io/istringstream.cc: New file.
- * testsuite/27_io/ostringstream.cc: New file.
-
-2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7220
- * include/bits/istream.tcc (istream::ignore): Don't extract on
- zero.
- * testsuite/27_io/istream_unformatted.cc (test10): Add.
-
-2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/27_io/ios_base_type.cc: Move to...
- * testsuite/27_io/ios_base_types.cc: ...here.
-
-2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7222
- * src/locale.cc (locale::locale(const char*)): Use setlocale NULL.
- * testsuite/22_locale/ctor_copy_dtor.cc (test02): New.
-
-2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7230
- * config/linker-map.gnu: Revert strstream patch from 2002-07-01.
- * include/Makefile.am (backward_headers): Use strstream, not
- strstream.h.
+ * include/Makefile.am (ext_headers): Add
+ ${ext_srcdir}/bitmap_allocator.h .
* include/Makefile.in: Regenerate.
- * include/backward/strstream: Revert.
- * include/backward/strstream.h: Remove.
- * src/strstream.cc: Revert.
- * testsuite/backward/strstream_members.cc: Change include.
-
-2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7219
- * include/bits/ios_base.h (ios_base::streampos): Add.
- (ios_base::streamoff): Add.
- * testsuite/27_io/ios_base_type.cc: New.
-
-2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
+ * docs/html/ext/ballocator_doc.txt: New file.
+ * include/ext/bitmap_allocator.h: New file.
+ * testsuite/performance/20_util/allocator/list_sort_search.cc: Add
+ test.
+ * testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.
+ * testsuite/performance/20_util/allocator/producer_consumer.cc: Add
+ test for the bitmap_allocator<>.
+ * testsuite/performance/20_util/allocator/insert.cc: Likewise.
+ * testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
+ * testsuite/performance/20_util/allocator/map_thread.cc: Likewise.
- PR libstdc++/7286
- * libsupc++/new: Add placement delete.
- * testsuite/18_support/new_delete_placement.cc: New.
+2004-03-11 Paolo Carlini <pcarlini@suse.de>
- * docs/html/abi.txt: Fix typos.
+ * include/std/std_complex.h (pow(const complex&, const _Tp&),
+ pow(const _Tp&, const complex&), pow(const complex&,
+ const complex&)): Fully qualify with std:: a few calls.
+ * testsuite/26_numerics/complex/13450.cc: Minor tweak.
-2002-07-23 Benjamin Kosnik <bkoz@redhat.com>
+2004-03-11 Steven Bosscher <stevenb@suse.de>
- * docs/html/documentation.html: Remove libstdc++-v3.0.86 links,
- confusing usage of "latest."
- De-tangle contributor information from introductory notes.
- Move abi.txt link placement, activate.
- Re-organize.
- Move chapter info into old FAQ format.
- * docs/html/organization.html: Removed, obsoleted by doxygen work.
- * docs/html/abi.txt: Add notes on testing ABI changes.
-
-2002-07-20 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/abi.txt: New file.
- * docs/html/23_containers/howto.html: Tweak vector-overhead text.
- * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
- Import from upstream, R22.
+ PR libstdc++/11706
+ * include/c_std/cmath.tcc (__cmath_power): Define inline.
- * include/bits/char_traits.h, include/bits/stl_iterator.h,
- include/bits/stl_iterator_base_types.h, libsupc++/exception,
- libsupc++/new, libsupc++/typeinfo: Use @brief markup.
+2004-03-10 Kelley Cook <kcook@gcc.gnu.org>
- * include/bits/deque.tcc, include/bits/stl_alloc.h,
- include/bits/stl_deque.h, include/bits/stl_list.h: Postpone removal
- of deprecated functions until 3.4. (Same timeframe, different text.)
- * include/bits/stl_vector.h: Ditto. Also do the same cleanups that
- the other sequence classes received.
+ * configure.ac: Bump AC_PREREQ to 2.59.
-2002-07-18 Brendan Kehoe <brendan@zen.org>
+2004-03-10 Paolo Carlini <pcarlini@suse.de>
- * bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR): Fix typo of
- _Nname to _Name.
+ * testsuite/26_numerics/valarray_subset_assignment.cc: Fix typos.
-2002-07-19 Gabriel Dos Reis <gdr@nerim.net>
+2004-03-10 Paul Kienzle <pkienzle@nist.gov>
+ Paolo Carlini <pcarlini@suse.de>
- DR/123
- * include/bits/slice_array.h
- (slice_array<T>::operator=(const T&)): Constify.
- * include/bits/gslice_array.h
- (gslice_array<T>::operator=(const T&)): Likewise.
- * include/bits/mask_array.h
- (mask_array<T>::operator=(const T&)): Likewise.
- * include/bits/indirect_array.h
- (indirect_array<T>::operator=(const T&): Likewise.
+ PR libstdc++/13450
+ * include/std/std_complex.h (pow(const complex&, const _Tp&),
+ pow(const _Tp&, const complex&)): Use cmath pow only when safe.
+ * testsuite/26_numerics/complex/13450.cc: New.
-2002-07-17 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/run_doxygen: Remove template parameter names from
- "Compound List" summary page. Reformat.
- * docs/html/documentation.html: XHTML fixes.
-
-2002-07-16 Andreas Schwab <schwab@suse.de>
-
- * libsupc++/new (set_new_handler): Declare to not throw any
- exceptions.
- * libsupc++/new_handler.cc (set_new_handler): Likewise.
-
-2002-07-16 Gabriel Dos Reis <gdr@nerim.net>
-
- * include/Makefile.am (bits_headers): Remove slice.h
- * include/Makefile.in: Regenerate.
- * include/bits/slice.h (slice): move to include/bits/slice_array.h
- * include/bits/slice.h Remove.
- * include/std/std_valarray.h: Don't #include bits/slice.h anymore.
- * include/bits/slice_array.h: Comply to official coding styles.
- * testsuite/26_numerics/slice.cc: New test.
+ * testsuite/26_numerics/cmath/overloads.C: Rename to overloads.cc.
+ * testsuite/26_numerics/complex/pow.C: Rename to pow.cc and fix.
-2002-07-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+2004-03-10 Jerry Quinn <jlquinn@optonline.net>
- * config/os/solaris/solaris2.5/ctype_base.h (ctype_base): Fix
- print to match vendor <ctype.h>.
+ PR libstdc++/3247
+ * include/bits/gslice_array.h (gslice_array()): Make public.
+ (operator=(gslice_array)): Make public. Implement.
+ * include/bits/indirect_array.h (indirect_array()): Make public.
+ * include/bits/mask_array.h (mask_array()): Make public.
+ (operator=(mask_array)): Make public. Implement.
+ * include/bits/valarray_array.tcc (__valarray_copy):
+ Comment. Add versions for gslice_array and mask_array.
+ * testsuite/26_numerics/valarray_subset_assignment.cc: New test.
-2002-07-15 Phil Edwards <pme@gcc.gnu.org>
+2004-03-09 Benjamin Kosnik <bkoz@redhat.com>
- * docs/html/faq/index.html: Fix download links.
- * docs/html/faq/index.txt: Regenerate.
- * docs/html/17_intro/porting.html: Regenerate from earlier changes.
+ * testsuite/23_containers/deque/modifiers/swap.cc: Add in bits for
+ non-weak systems.
+ * testsuite/23_containers/vector/modifiers/swap.cc: Same.
+ * testsuite/23_containers/set/modifiers/swap.cc: Same.
+ * testsuite/23_containers/multiset/modifiers/swap.cc: Same.
+ * testsuite/23_containers/multimap/modifiers/swap.cc: Same.
+ * testsuite/23_containers/map/modifiers/swap.cc: Same.
+ * testsuite/23_containers/list/modifiers/swap.cc: Same.
-2002-07-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ * testsuite/22_locale/locale/cons/12658_thread.cc: Catch exceptions.
- * configure.target (target_os switch): Allow for irix6*o32
- configurations.
+2004-03-08 Benjamin Kosnik <bkoz@redhat.com>
-2002-07-10 Gabriel Dos Reis <gdr@nerim.net>
+ PR c++/13658
+ * testsuite/23_containers/deque/modifiers/swap.cc: New.
+ * testsuite/23_containers/list/modifiers/swap.cc: New.
+ * testsuite/23_containers/map/modifiers/swap.cc: New.
+ * testsuite/23_containers/multimap/modifiers/swap.cc: New.
+ * testsuite/23_containers/multiset/modifiers/swap.cc: New.
+ * testsuite/23_containers/set/modifiers/swap.cc: New.
+ * testsuite/23_containers/vector/modifiers/swap.cc: New.
- * include/bits/valarray_meta.h (_UnFunBase): Take a second
- template parameter. Remove _M_func data member.
- (_UnFunClos): Take a third template parameter.
- (__abs, __cos, __acos, __cosh, __sin, __asin, __sinh, __tan,
- __atan, __tanh, __exp, __log, __log10, __sqrt): New classes.
- (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
+2004-03-08 Petur Runolfsson <peturr02@ru.is>
-2002-07-08 Eric Christopher <echristo@redhat.com>
+ PR libstdc++/12658
+ * testsuite/22_locale/locale/cons/12658_thread.cc: New.
- * configure.target: Fix comment for mips atomicity. Add
- mips*-*-linux* target, enable atomic operations there.
- * config/cpu/mips/atomicity.h: Fix comments, remove
- #ifndef/#endif. Add push/pop mips2.
+2004-03-08 Paolo Carlini <pcarlini@suse.de>
-2002-07-08 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+ * docs/html/ext/howto.html: Add entry for DR 103 [WP].
+ * include/bits/stl_multiset.h: Add comment about DR 103.
+ * include/bits/stl_set.h: Likewise.
- * include/bits/stl_deque.h (_Deque_alloc_base): Change order of
- member declarations to avoid compiler warnings and restore 3.1 ABI.
+2004-03-08 Paolo Carlini <pcarlini@suse.de>
-2002-07-08 Phil Edwards <pme@gcc.gnu.org>
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ The value _space_ indicates that at least one space is required
+ at that position.
+ * testsuite/22_locale/money_get/get/char/17.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/17.cc: New.
- * docs/html/23_containers/howto.html: Link to dk_std::vector paper
- and homepage.
+ * testsuite/22_locale/money_get/get/char/7.cc: Minor tweaks.
+ * testsuite/22_locale/money_get/get/wchar_t/7.cc: Likewise.
-2002-07-07 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/locale_facets.tcc (money_get<>::do_get(long_double&)):
+ Remove redundant conditional on __str.size().
- PR libstdc++/7186
- * include/bits/stl_deque.h (_Deque_iterator::operator-):
- Make non-member, as already happens for the comparison
- operators in accord with DR179 (Ready).
- * testsuite/23_containers/deque_operators.cc: Add test02.
+2004-03-08 Benjamin Kosnik <bkoz@redhat.com>
-2002-07-04 Benjamin Kosnik <bkoz@redhat.com>
- Jack Reeves <jackw_reeves@hotmail.com>
+ * include/bits/allocator.h: Switch defaults to mt_alloc.
- * include/std/std_streambuf.h (basic_streambuf::_M_buf): Change to
- size_t, from int_type.
- (basic_streambuf::_M_buf_size_opt): Same.
- (basic_streambuf::_S_pback_sizex): Same.
- * include/bits/streambuf.tcc: Same.
- * include/std/std_streambuf.h (basic_streambuf::snextc): Use
- eq_int_type.
- (basic_streambuf::uflow): Same.
- * include/bits/sstream.tcc (basic_stringbuf::overflow): Use
- to_char_type.
- * include/bits/basic_ios.tcc (basic_ios::init): Use _CharT().
- * include/bits/streambuf.tcc (basic_streambuf::xsgetn): Use
- eq_int_type.
- (basic_streambuf::xsputn): Same.
- (__copy_streambufs): Same.
+2004-03-06 Benjamin Kosnik <bkoz@redhat.com>
-2002-07-03 Benjamin Kosnik <bkoz@redhat.com>
+ * include/ext/mt_allocator.h (_S_initialize): If
+ !__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.
- * include/std/std_memory.h: Fix formatting.
- * testsuite/20_util/auto_ptr_neg.cc: New.
- * testsuite/20_util/auto_ptr.cc: Tweaks.
- * testsuite/23_containers/map_operators.cc (test01): Split into..
- * testsuite/23_containers/map_operators_neg.cc (test01): ...this. New.
- * testsuite/23_containers/set_operators.cc: Move to...
- * testsuite/23_containers/set_operators_neg.cc: ...here.
- * testsuite/README: Add some more naming rules.
+2004-03-06 Benjamin Kosnik <bkoz@redhat.com>
-2002-07-03 Steev Wilcox <steev@paradigmds.com>
+ PR libstdc++/12658
+ * src/locale_init.cc (locale::locale): Lock critical regions with
+ external mutexes.
+ (locale::global): Same.
+ * include/bits/concurrence.h (__glibcxx_mutex_define_initialized):
+ Add in once bits for cases without __GTHREAD_MUTEX_INIT.
+ (__glibcxx_mutex_lock): Same.
- PR libstdc++/7057
- * include/ext/stl_hashtable.h: Fix.
- * testsuite/ext/hash_map.cc: New.
+ * config/cpu/generic/atomicity.h: Remove
+ _GLIBCXX_NEED_GENERIC_MUTEX, use concurrence.h.
+ * src/misc-inst.cc: Move all locking bits out of this file.
-2002-07-03 Jack Reeves <jackw_reeves@hotmail.com>
- Kenny Simpson <theonetruekenny@yahoo.com>
- Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/3946
- * testsuite/20_util/auto_ptr.cc (test08): New test.
- * include/std/std_memory.h (auto_ref_ptr): Make constructor explicit.
- (auto_ptr::operator auto_ptr_ref): Fix typo.
- General reformatting and doxygenating of the whole file.
-
-2002-07-03 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/7097
- * include/c/std_cwchar.h: Fix.
-
-2002-07-02 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6410
- * include/bits/locale_facets.h (moneypunct::moneypunct): Add const
- char* name parameter.
- * config/locale/gnu/monetary_members.cc: Use it.
- * config/locale/generic/monetary_members.cc: Same.
- * src/localename.cc (_Impl::_Impl(const char*, size_t)): Use it.
-
- * include/backward/strstream.h: Update date.
-
-2002-07-02 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/6642
- * include/bits/stl_iterator.h
- (__normal_iterator::operator-(const __normal_iterator&)):
- Make non-member, as already happens for the comparison
- operators in accord with DR179 (Ready).
- * testsuite/24_iterators/iterator.cc: Add test from the PR.
-
-2002-07-02 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/7173
- * acinclude.m4: Simplify determination of gcc_version, and move
- up to GLIBCPP_CONFIGURE.
- * configure.in (release_VERSION): Really remove.
- (AM_INIT_AUTOMAKE, AM_CONFIG_HEADER): Move after GLIBCPP_CONFIGURE.
- * aclocal.m4, configure: Regenerate.
-
-2002-07-02 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/configopts.html, docs/html/install.html: Tweaks.
- * include/ext/algorithm, include/ext/hash_map, include/ext/hash_set,
- include/ext/iterator, include/ext/numeric, include/ext/rb_tree,
- include/ext/slist, include/ext/stl_rope.h: Add doxygen hooks.
-
-2002-07-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/backward/strstream: Remove namespace std. Transfer to...
- * include/backward/strstream.h: ...here. Qualify std names.
- * src/strstream.cc: Remove namespace std.
- * include/Makefile.am (backward_headers): Remove strstream.h.
- * include/Makefile.in: Regenerate.
- * config/linker-map.gnu: Export strstream bits.
-
- * src/fstream-inst.cc: Tweak.
- * src/io-inst.cc: Same.
- * src/istream-inst.cc: Same.
+ * config/os/hpux/os_defines.h: Remove _GLIBCXX_INST_ATOMICITY_LOCK.
* src/misc-inst.cc: Same.
- * src/ostream-inst.cc: Same.
- * src/sstream-inst.cc: Same.
- * src/valarray-inst.cc: Same.
- * src/misc-inst.cc: Remove unused instantiations.
-
-2002-07-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (libtool_VERSION): Bump to 5:0:0.
- * configure: Regenerate.
-
-2002-06-28 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/7157, PR libstdc++/7158, PR libstdc++/7161
- * include/std/std_queue.h: Include deque.tcc, vector.tcc.
- * include/std/std_stack.h: Include deque.tcc.
- * testsuite/23_containers/adaptors.cc: New file.
-
-2002-06-27 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_alloc.h: Deprecate all 'reallocate' memfns.
- * docs/html/ext/howto.html: Update allocator notes.
-
-2002-06-26 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (INTERFACE): Remove.
- (release_VERSION): Remove.
- * acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Change include placement.
- (libstdcxx_interface): Change. Use gcc methods to determine version.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
-
-2002-06-25 DJ Delorie <dj@redhat.com>
-
- * acinclude.m4 (GLIBCPP_CONFIGURE): Split out
- GLIBCPP_TOPREL_CONFIGURE.
- * aclocal.m4: Likewise.
- * configure.in: Call it before AC_CANONICAL_SYSTEM.
- * configure: Regenerate.
-
-2002-06-25 Jessica Han <jessica@cup.hp.com>
-
- * config/os/hpux/os_defines.h Define _GLIBCPP_VTABLE_PADDING
- * libsupc++/tinfo.cc Handle the 8 byte aligned vtable entries when
- _GLIBCPP_VTABLE_PADDING is defined.
-
-2002-06-25 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/stl_alloc.h: Additional formatting.
-
-2002-06-24 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_alloc.h: Reformat as per C++STYLE.
-
-2002-06-24 Phil Edwards <pme@gcc.gnu.org>
-
- * config/cpu/*/bits/*: Move header files up a level. Remove bits.
- * config/os/*/bits/*: Likewise.
- * configure.in: Update.
- * configure: Regenerate.
- * configure.target: Update.
- * docs/html/17_intro/porting.texi: Update.
-
-2002-06-21 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_map.h, include/bits/stl_multimap.h,
- include/bits/stl_queue.h, include/bits/stl_stack.h: Reformat and
- complete doxygenation.
- * include/bits/boost_concept_check.h: Minor comment.
-
-2002-06-21 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/c_compatibility: New.
- * include/c_compatibility/assert.h: New.
- * include/c_compatibility/ctype.h: New.
- * include/c_compatibility/errno.h: New.
- * include/c_compatibility/float.h: New.
- * include/c_compatibility/iso646.h: New.
- * include/c_compatibility/limits.h: New.
- * include/c_compatibility/locale.h: New.
- * include/c_compatibility/math.h: New.
- * include/c_compatibility/setjmp.h: New.
- * include/c_compatibility/signal.h: New.
- * include/c_compatibility/stdarg.h: New.
- * include/c_compatibility/stddef.h: New.
- * include/c_compatibility/stdio.h: New.
- * include/c_compatibility/stdlib.h: New.
- * include/c_compatibility/string.h: New.
- * include/c_compatibility/time.h: New.
- * include/c_compatibility/wchar.h: New.
- * include/c_compatibility/wctype.h: New.
-
- * include/c/std_cerrno.h: Get out of the way... define errno.
- * include/c/std_cmath.h: Add abs, modf overloads.
- Undefine C99 isms. Still not sure how to deal with this sanely.
- * include/c/std_csetjmp.h: Tweak.
- * include/c/std_cwchar.h: Include cstddef for size_t.
-
- * include/c_std/std_cmath.h: Remove extra function.
-
- Pendantic std usage in testsuites.
- * testsuite/17_intro/header_cstdlib.cc (test01): Qualify ldiv_t
- with std.
- * testsuite/17_intro/header_cwchar.cc: Tweak.
- * testsuite/22_locale/codecvt_members_char_char.cc (test03): Use
- std::setlocale.
- * testsuite/22_locale/ctype_to_wchar_t.cc (test05): Same.
- * testsuite/22_locale/ctype_to_char.cc (test05): Same.
- * testsuite/22_locale/ctype_is_wchar_t.cc (test05): Same.
- * testsuite/22_locale/ctype_is_char.cc (test05): Same.
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Same.
- * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Same.
- * testsuite/22_locale/time_get_members_char.cc (test08): Same.
- * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Same.
- * testsuite/22_locale/time_put_members_char.cc (test04): Same.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Same.
- * testsuite/22_locale/num_put_members_char.cc (test04): Same.
- * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Same.
- * testsuite/22_locale/numpunct_members_char.cc (test03): Same.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Same.
- * testsuite/22_locale/num_get_members_char.cc: Same.
- * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Same.
- * testsuite/22_locale/money_put_members_char.cc (test07): Same.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Same.
- * testsuite/22_locale/moneypunct_members_char.cc (test03): Same.
- * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Same.
- * testsuite/22_locale/money_get_members_char.cc (test08): Same.
- * testsuite/22_locale/messages_members_char.cc (test03): Same.
- * testsuite/22_locale/collate_members_wchar_t.cc (test04): Same.
- * testsuite/22_locale/collate_members_char.cc (test04): Same.
- * testsuite/26_numerics/fabs_inline.cc: Use std::printf.
- * testsuite/27_io/istream_seeks.cc (test02): Qualify abort.
- * testsuite/27_io/istream_extractor_arith.cc (test11): Qualify strtol.
-
-2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
-
- * libsupc++/Makefile.am (libsupc__convenience_la_SOURCES): Add
- c_sources.
-
-2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/ext-inst.cc (__gnu_cxx): Use instead of std:: for extensions.
- Use size_type instead of unsigned long.
-
-2002-06-20 Steve Ellcey <sje@cup.hp.com>
-
- * src/ext-inst.cc (_S_fetch): Add explicit templates for char and
- wchar types.
- (_S_min_len): Ditto.
-
-2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am: Add rules.
- * include/Makefile.in: Regenerate.
-
- * acinclude.m4: Define GLIBCPP_C_HEADERS_COMPATIBILITY.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * configure.target (c_model, c_compatibility): Add.
-
- * libsupc++/Makefile.am (c_sources): New.
- (libsupc___la_SOURCES): Add c_sources.
- (LTCOMPILE): Remove INCLUDES.
- (GCC_INCLUDES): New.
- (C_COMPILE): New, like COMPILE but without INCLUDES.
- (cxa_demangle.o): Use C_COMPILE.
- (dyn-string.o): Use C_COMPILE.
-
- * include/c/std_cstdarg.h: Define __need___va_list.
- * include/c/std_cstddef.h: Define need_size_t, need_ptrdiff_t,
- need_NULL, need_offsetof.
-
-2002-06-19 Steve Ellcey <sje@cup.hp.com>
-
- * configure.in (HAVE_FINITE*, HAVE_ISINF*, HAVE_ISNAN*): Remove
- definitions in hpux11 cross-build because these functions do
- not exist on hpux11 (but some exist on hpux10); move defaults out
- into existing sections.
- * configure: Regenerate.
-
-2002-06-18 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/c/std_cwchar.h: Guard. Add mbstate_t bits.
- * include/c/std_cwctype.h: Guard.
-
- * libsupc++/eh_alloc.cc: Tweak include order.
- * libsupc++/pure.cc: Use cstdio.
- * libsupc++/new_op.cc: Remove malloc forward declaration, as
- cstdlib brings it in. Use std::malloc.
-
- * src/Makefile.am (sources): Remove cmath.cc.
- * src/Makefile.in: Regenerate.
- * src/cmath.cc: Remove.
+ * config/cpu/hppa/atomicity.h: Same.
-2002-06-18 Phil Edwards <pme@gcc.gnu.org>
+ * config/linker-map.gnu: Remove types in the signature of atomic
+ exports, as they may vary.
- * configure.target: Force mips to use the generic cpu routines.
+2004-03-06 Paolo Carlini <pcarlini@suse.de>
-2002-06-18 Phil Edwards <pme@gcc.gnu.org>
+ * include/bits/locale_facets.tcc: Tweak the comment preceding
+ has_facet: doesn't throw.
- * configure.host: Delete file.
- * configure.target: More documentation. Factor out common parts of
- script into "intelligent" settings about defaults. Remove redundancy.
+2004-03-06 Paolo Carlini <pcarlini@suse.de>
- * acinclude.m4: Update comments. Do not call configure.host.
- (GLIBCPP_ENABLE_SYMVERS): If disabled, do not bother checking for
- libgcc_s.
- * configure.in: Slight reformatting, more comments. Factor out
- "config/" from all the directories.
- * docs/html/17_intro/porting.texi: Update and expand.
- * testsuite/Makefile.am (AM_RUNTESTFLAGS): Move empty setting
- from configure.host.
+ * testsuite/22_locale/money_get/get/char/1.cc: Clean up.
+ * testsuite/22_locale/money_get/get/char/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/4.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.
- * aclocal.m4, configure, docs/html/17_intro/porting.html,
- testsuite/Makefile.in: Regenerate.
+2004-03-06 Paolo Carlini <pcarlini@suse.de>
-2002-06-16 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/TODO: Update.
- * docs/doxygen/tables.html: Uncomment magical middle column.
- * docs/doxygen/user.cfg.in: Kludge to ignore function-like macros.
- * include/bits/stl_queue.h: Doxygenate and reformat.
- * include/bits/ios_base.h, include/std/std_streambuf.h: Add comment
- for deprecated names required by the standard.
-
-2002-06-14 J.T. Conklin <jtc@acorntoolworks.com>
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
+ num_get<>::_M_extract_int, num_get<>::do_get(bool&),
+ __pad<>::_S_pad): Prefer plain operator== to traits::eq().
+ * testsuite/testsuite_character.h (struct __gnu_test::character):
+ Provide operator==.
+ * testsuite/testsuite_hooks.h (struct __gnu_test::pod_char):
+ Likewise.
- * configure.in (target_alias): Fix.
- * configure: Regenerate.
+2004-03-05 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/fpos/14320-2.cc: Remove xfail.
+
+2004-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/23_containers/multiset/insert/1.cc: Test result string.
+
+ * testsuite/23_containers/bitset/invalidation/1.cc: Main always
+ returns 0.
+ * testsuite/23_containers/deque/invalidation/4.cc: Same.
+ * testsuite/23_containers/list/invalidation/1.cc: Same.
+ * testsuite/23_containers/list/invalidation/2.cc: Same.
+ * testsuite/23_containers/list/invalidation/3.cc: Same.
+ * testsuite/23_containers/list/invalidation/4.cc: Same.
+ * testsuite/23_containers/map/invalidation/2.cc: Same.
+ * testsuite/23_containers/multimap/invalidation/1.cc: Same.
+ * testsuite/23_containers/multimap/invalidation/2.cc: Same.
+ * testsuite/23_containers/multiset/invalidation/1.cc: Same.
+ * testsuite/23_containers/multiset/invalidation/2.cc: Same.
+ * testsuite/23_containers/set/invalidation/1.cc: Same.
+ * testsuite/23_containers/set/invalidation/2.cc: Same.
+ * testsuite/23_containers/vector/invalidation/1.cc: Same.
+ * testsuite/23_containers/vector/invalidation/2.cc: Same.
+ * testsuite/23_containers/vector/invalidation/3.cc: Same.
+ * testsuite/23_containers/vector/invalidation/4.cc: Same.
+
+2004-03-04 Paolo Carlini <pcarlini@suse.de>
+
+ * scripts/testsuite_flags.in: Add "-D_GLIBCXX_ASSERT" to
+ CXXFLAGS_save.
+ * testsuite/lib/libstdc++.exp: Don't add it conditionally to
+ DEFAULT_CXXFLAGS.
+ * testsuite/18_support/numeric_limits.cc: Remove "-D_GLIBCXX_ASSERT"
+ from the dg-options.
+ * testsuite/23_containers/vector/invalidation/1.cc: Likewise.
+ * testsuite/23_containers/vector/invalidation/2.cc: Likewise.
+ * testsuite/23_containers/vector/invalidation/3.cc: Likewise.
+ * testsuite/23_containers/vector/invalidation/4.cc: Likewise.
+ * testsuite/23_containers/vector/resize/1.cc: Likewise.
+ * testsuite/26_numerics/complex_value.cc: Likewise.
+ * testsuite/27_io/ios_base/storage/1.cc: Likewise.
+ * testsuite/27_io/ios_base/storage/2.cc: Likewise.
+ * testsuite/27_io/ios_base/storage/3.cc: Likewise.
+ * testsuite/27_io/manipulators/standard/char/2.cc: Likewise.
+ * testsuite/27_io/objects/char/5.cc: Likewise.
+ * testsuite/27_io/objects/wchar_t/5.cc: Likewise.
+ * testsuite/backward/11460.cc: Likewise.
+ * testsuite/thread/pthread7-rope.cc: Likewise.
+
+ * testsuite/21_strings/basic_string/compare/char/1.cc: Add
+ missing test variable.
+ * testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Add
+ missing test variable.
+
+2004-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/20_util/allocator/1.cc: Provide explicit
+ instantiations for non-weak systems.
+ * testsuite/20_util/binders.cc: Same.
+ * testsuite/20_util/allocator/8230.cc: Same.
+ * testsuite/20_util/allocator/10378.cc: Same.
+ * testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
+ * testsuite/22_locale/ctype/is/char/2.cc: Same.
+ * testsuite/thread/pthread7-rope.cc: Same.
+ * testsuite/thread/pthread6.cc: Same.
+ * testsuite/thread/pthread5.cc: Same.
+ * testsuite/thread/pthread4.cc: Same.
+ * testsuite/thread/pthread1.cc: Same.
+ * testsuite/ext/rope.cc: Same.
+ * testsuite/ext/hash_set.cc: Same.
+ * testsuite/ext/hash_map.cc: Same.
+ * testsuite/ext/concept_checks.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: Same.
+ * testsuite/25_algorithms/unique/2.cc: Same.
+ * testsuite/25_algorithms/unique/1.cc: Same.
+ * testsuite/25_algorithms/rotate.cc: Same.
+ * testsuite/25_algorithms/min_max.cc: Same.
+ * testsuite/25_algorithms/equal.cc: Same.
+ * testsuite/24_iterators/rel_ops.cc: Same.
+ * testsuite/24_iterators/iterator.cc: Same.
+ * testsuite/24_iterators/insert_iterator.cc: Same.
+ * testsuite/24_iterators/front_insert_iterator.cc: Same.
+ * testsuite/24_iterators/back_insert_iterator.cc: Same.
+ * testsuite/23_containers/vector/resize/1.cc: Same.
+ * testsuite/23_containers/vector/modifiers/2.cc: Same.
+ * testsuite/23_containers/vector/modifiers/1.cc: Same.
+ * testsuite/23_containers/vector/invalidation/4.cc: Same.
+ * testsuite/23_containers/vector/invalidation/3.cc: Same.
+ * testsuite/23_containers/vector/invalidation/2.cc: Same.
+ * testsuite/23_containers/vector/invalidation/1.cc: Same.
+ * testsuite/23_containers/vector/element_access/1.cc: Same.
+ * testsuite/23_containers/vector/cons/6513.cc: Same.
+ * testsuite/23_containers/vector/cons/3.cc: Same.
+ * testsuite/23_containers/vector/cons/2.cc: Same.
+ * testsuite/23_containers/vector/cons/1.cc: Same.
+ * testsuite/23_containers/vector/capacity/8230.cc: Same.
+ * testsuite/23_containers/vector/capacity/1.cc: Same.
+ * testsuite/23_containers/vector/bool/6886.cc: Same.
+ * testsuite/23_containers/stack/members/7158.cc: Same.
+ * testsuite/23_containers/set/invalidation/2.cc: Same.
+ * testsuite/23_containers/set/invalidation/1.cc: Same.
+ * testsuite/23_containers/queue/members/7157.cc: Same.
+ * testsuite/23_containers/priority_queue/members/7161.cc: Same.
+ * testsuite/23_containers/multiset/invalidation/2.cc: Same.
+ * testsuite/23_containers/multiset/invalidation/2.cc: Same.
+ * testsuite/23_containers/multiset/insert/1.cc: Same.
+ * testsuite/23_containers/multimap/invalidation/2.cc: Same.
+ * testsuite/23_containers/multimap/invalidation/2.cc: Same.
+ * testsuite/23_containers/map/operators/1.cc: Same.
+ * testsuite/23_containers/map/invalidation/2.cc: Same.
+ * testsuite/23_containers/map/invalidation/1.cc: Same.
+ * testsuite/23_containers/map/insert/1.cc: Same.
+ * testsuite/23_containers/list/operators/4.cc: Same.
+ * testsuite/23_containers/list/operators/3.cc: Same.
+ * testsuite/23_containers/list/operators/2.cc: Same.
+ * testsuite/23_containers/list/operators/1.cc: Same.
+ * testsuite/23_containers/list/modifiers/3.cc: Same.
+ * testsuite/23_containers/list/modifiers/2.cc: Same.
+ * testsuite/23_containers/list/modifiers/1.cc: Same.
+ * testsuite/23_containers/list/invalidation/4.cc: Same.
+ * testsuite/23_containers/list/invalidation/3.cc: Same.
+ * testsuite/23_containers/list/invalidation/2.cc: Same.
+ * testsuite/23_containers/list/invalidation/1.cc: Same.
+ * testsuite/23_containers/list/cons/9.cc: Same.
+ * testsuite/23_containers/list/cons/8.cc: Same.
+ * testsuite/23_containers/list/cons/7.cc: Same.
+ * testsuite/23_containers/list/cons/6.cc: Same.
+ * testsuite/23_containers/list/cons/5.cc: Same.
+ * testsuite/23_containers/list/cons/4.cc: Same.
+ * testsuite/23_containers/list/cons/3.cc: Same.
+ * testsuite/23_containers/list/cons/2.cc: Same.
+ * testsuite/23_containers/list/cons/1.cc: Same.
+ * testsuite/23_containers/list/capacity/1.cc: Same.
+ * testsuite/23_containers/deque/operators/1.cc: Same.
+ * testsuite/23_containers/deque/invalidation/4.cc: Same.
+ * testsuite/23_containers/deque/invalidation/3.cc: Same.
+ * testsuite/23_containers/deque/invalidation/2.cc: Same.
+ * testsuite/23_containers/deque/invalidation/1.cc: Same.
+ * testsuite/23_containers/deque/cons/2.cc: Same.
+ * testsuite/23_containers/deque/cons/1.cc: Same.
+
+ * src/allocator.cc: Add char, wchar_t instantiations
+ to match extern template declarations in memory.h.
+
+2004-03-03 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_put<>::_M_insert):
+ Fix warning regression.
+
+2004-03-03 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_put<>::_M_insert):
+ Deal properly with empty __digits and negative frac_digits,
+ clean-up a bit.
+
+2004-03-03 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/documentation.html: Regenerate.
+
+2004-03-02 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14320
+ * include/bits/postypes.h (class streamoff): Remove, now
+ streamoff is just typedef a 64 bit signed integer type.
+ (class fpos): Tweak consistently.
+ * testsuite/27_io/fpos/14320-1.cc: New.
+ * testsuite/27_io/fpos/14320-2.cc: New.
+ * testsuite/27_io/fpos/14320-3.cc: New.
+ * testsuite/27_io/fpos/14320-4.cc: New.
+ * testsuite/27_io/fpos/14320-5.cc: New.
+ * testsuite/27_io/fpos/mbstate_t/4_neg.cc: xfail for now.
+
+2004-03-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Reorganize a bit the main parsing loop, thus early detecting
+ an empty value component.
+ * testsuite/22_locale/money_get/get/char/16.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/16.cc: New.
+
+2004-03-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ Support automake 1.8.2
+ * configure.ac (AM_INIT_AUTOMAKE): Add -Wno-override.
+ * po/Makefile.am (EXTRA_DIST): New.
+ * po/Makefile.in: Regenerate.
+ * Makefile.in: Same.
+ * include/Makefile.in: Same.
+ * libmath/Makefile.in: Same.
+ * libsupc++/Makefile.in: Same.
+ * src/Makefile.in: Same.
+ * testsuite/Makefile.in: Same.
+
+ * include/Makefile.am (${host_builddir}/gthr-posix.h): Use
+ __GXX_WEAK__ instead of SUPPORTS_WEAK.
+ (${host_builddir}/gthr-default.h): Same.
+ (${host_builddir}/gthr.h): Same.
+ * acinclude.m4 (GLIBCXX_ENABLE_THREAD): Remove
+ _GLIBCXX_SUPPORTS_WEAK, as this behavior can be modified via
+ -fno-weak.
* aclocal.m4: Regenerate.
+ * acconfig.h: Remove _GLIBCXX_SUPPORTS_WEAK.
+ * config.h.in: Regenerate.
+ * configure: Same.
-2002-06-12 Phil Edwards <pme@gcc.gnu.org>
-
- * include/Makefile.am: Add new files.
- * include/Makefile.in: Regenerate.
-
- * include/bits/stl_deque.h, include/bits/stl_list.h,
- include/bits/stl_vector.h: Clean up, reformat. Move definitions...
- * include/bits/deque.tcc, include/bits/list.tcc,
- include/bits/vector.tcc: ...to here. New files.
-
- * include/ext/stl_hashtable.h: Inclide correct full headers.
- * include/std/std_deque.h: Include .tcc files for now.
- * include/std/std_list.h: Likewise.
- * include/std/std_vector.h: Likewise.
-
-2002-06-12 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.am: Add FLAGS_TO_PASS.
- * Makefile.in: Regenerated.
-
-2002-06-11 J.T. Conklin <jtc@acorntoolworks.com>
- Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.target: Set os_include_dir to config/os/qnx/qnx6.1
- under *-qnx6.[12]*.
- * configure.in: Add support for *-qnx6.[12]*.
- * configure: Regenerate.
-
- * config/os/qnx, config/os/qnx/qnx6.1, config/os/qnx/qnx6.1/bits:
- New directories.
- * config/os/qnx/qnx6.1/bits/ctype_base.h, ctype_inline.h,
- ctype_noninline.h, os_defines.h: New files.
-
-2002-06-10 Loren J. Rittle <ljrittle@acm.org>
+2004-03-01 Benjamin Kosnik <bkoz@redhat.com>
- * acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT_ancilliary): Reorder and
- include all required headers for test against older POSIX standard.
- (GLIBCPP_CHECK_SETRLIMIT): Likewise.
- (ac_setrlimit): Likewise.
+ Support autoconf 2.59
+ * acinclude.m4: Quote correctly.
* aclocal.m4: Regenerate.
- * configure: Regenerate.
- * testsuite/testsuite_hooks.cc: Reorder and include all
- required headers for use against older POSIX standard.
+ * linkage.m4: Same.
-2002-06-08 Paolo Carlini <pcarlini@unitus.it>
+2004-03-01 Benjamin Kosnik <bkoz@redhat.com>
- * testsuite/backwards/strstream_members.cc: New.
+ * docs/html/test.html: Add multilib RUNTESTFLAGS example.
-2002-06-08 Benjamin Kosnik <bkoz@redhat.com>
+ * docs/html/18_support/howto.html: Add bit about writing to
+ stderr, mostly by Zack.
- * include/backwards/strstream: Format.
- * src/strstream.cc: Format.
+2004-03-01 Paolo Carlini <pcarlini@suse.de>
-2002-06-08 Andreas Schwab <schwab@suse.de>
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract,
+ money_get<>::do_get(string_type&)): ... and two more.
- * src/strstream.cc (strstreambuf::overflow): Set _M_buf,
- _M_buf_size and _M_buf_size_opt to the new buffer and size.
+2004-03-01 Paolo Carlini <pcarlini@suse.de>
-2002-06-08 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Fix thinkos in the switch from string_type& to string& as last
+ argument.
- * config/os/generic/bits/ctype_noninline.h: Tweak format.
+2004-03-01 Paolo Carlini <pcarlini@suse.de>
-2002-06-07 Steve Ellcey <sje@cup.hp.com>
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
+ Also when parsing exponent sign, first look for thousands_sep
+ and decimal_point; tweak a bit.
+ * testsuite/22_locale/num_get/get/char/15.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/15.cc: New.
- * src/locale-inst.cc (__codecvt_abstract_base):
- Put inside _GLIBCPP_USE_WCHAR_T ifdef.
- * include/bits/istream.tcc (basic_istream): Ditto.
- (ws) Ditto.
- (operator>>) Ditto.
- * include/bits/ostream.tcc (basic_ostream): Ditto.
- (endl): Ditto.
- (ends): Ditto.
- (flush): Ditto.
- (operator<<): Ditto.
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
+ num_get<>::_M_extract_int): Reorder some conditionals.
-2002-06-07 Phil Edwards <pme@gcc.gnu.org>
+2004-03-01 Paolo Carlini <pcarlini@suse.de>
- * mkcheck.in: Link against local testsuite library.
- * testsuite/testsuite_hooks.h (__set_testsuite_memlimit): Move null
- implementation out...
- * testsuite/testsuite_hooks.cc: ...to here.
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Consistently with numpunct, enforce the requirements in
+ 22.2.6.3, p3 for the thousands separators; tweak a bit.
+ * testsuite/22_locale/money_get/get/char/15.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/15.cc: New.
-2002-06-06 Loren J. Rittle <ljrittle@acm.org>
-
- * src/Makefile.am (AUTOMAKE_OPTIONS): Use cygnus-style generation.
- * include/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
- * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
- * src/Makefile.in: Regenerate (explicitly with --cygnus option).
- * testsuite/Makefile.in: Likewise.
-
-2002-06-05 David Edelsohn <edelsohn@gnu.org>
-
- * config/os/aix/bits/ctype_noninline.h (do_toupper,do_tolower):
- Call external symbol.
-
-2002-06-04 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
- Search correct multilib testsuite dir for libv3test.
-
-2002-06-04 Paolo Carlini <pcarlini@unitus.it>
- Gaby Dos Reis <gdr@codesourcery.com>
-
- * include/bits/basic_string.tcc
- (basic_string::_S_construct(forward_iterator_tag):
- Fix typo in null pointer check.
- * testsuite/21_strings/ctor_copy_dtor.cc: Add test04.
-
-2002-06-04 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/money_get_members_char.cc
- (test02): Add decimal point to long double constants.
- * testsuite/22_locale/money_get_members_wchar_t.cc
- (test02): Likewise.
- * testsuite/22_locale/money_put_members_char.cc
- (test02, test03, test06): Likewise.
- * testsuite/22_locale/money_put_members_wchar_t.cc:
- (test02, test03, test06): Likewise.
- * testsuite/22_locale/num_get_members_char.cc:
- (test02, test01): Likewise; suffix long long constants with LL.
- * testsuite/22_locale/num_get_members_wchar_t.cc:
- (test02, test01): Likewise.
- * testsuite/22_locale/num_put_members_char.cc:
- (test02, test01): Likewise.
- * testsuite/22_locale/num_put_members_wchar_t.cc:
- (test02, test01): Likewise.
-
-2002-06-03 Marc Espie <espie@openbsd.org>
-
- * config/cpu/m68k/bits/atomicity.h(__exchange_and_add): Fix inline
- assembly for old assemblers.
-
-2002-06-03 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)):
- Move/rename...
- (vector<bool>::swap(reference,reference)): ...to this.
-
-2002-06-03 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/TODO: Update.
- * docs/doxygen/user.cfg.in (SORT_MEMBER_DOCS): Set to off, now that
- some class members are in 14882 order.
- * docs/html/ext/howto.html: 3.1 is in the past now, not the future.
-
- * include/std/std_bitset.h: Update comment.
- * src/bitset.cc: Update comments, clean up spacing.
-
- * src/Makefile.am (sources): Alphabetize for convenience.
- * src/Makefile.in: Regenerate.
-
-2002-06-03 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_deque.h, include/bits/stl_list.h,
- include/bits/stl_vector.h: Reformat to (mostly) match C++STYLE.
- Reorder to match 14882. Doxygen blocks for all public members.
-
-2002-05-31 Marcus Meissner <meissner@suse.de>
-
- PR libstdc++/6886
- * include/bits/stl_bvector.h: Use UL suffix for unsigned longs.
- * testsuite/23_containers/vector_bool.cc (test02): New test.
-
-2002-05-30 Marc Espie <espie@openbsd.org>
-
- * configure.in: Always check for sys/types.h
- * configure: Regenerate.
+2004-03-01 David Billinghurst <David.Billinghurst@riotinto.com>
-2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+ * testsuite/lib/libstdc++.exp (v3-list-tests): Use
+ testsuite_files from correct multilib blddir when running
+ testsuite.
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):
- Rebuild the wrapper file every time this proc is called.
+2004-02-29 Phil Edwards <phil@codesourcery.com>
-2002-05-28 Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite/Makefile.am (noinst_LIBRARIES): New target. Pull in
- CXX/INCLUDES.
+ * testsuite/Makefile.am (check-abi, check-abi-verbose): Copy
+ the summary file to the logfile.
* testsuite/Makefile.in: Regenerate.
- * testsuite/testsuite_hooks.h (gnu_copy_tracker): Move from
- list_modifiers.cc and rename from 'T'. Move code bodies...
- * testsuite/testsuite_hooks.cc: ...to here. New file.
- * testsuite/23_containers/list_modifiers.cc: Move 'T' class out.
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
- Add libv3test.a to link options.
-
-2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/misc-inst.cc: Define unnecessary algorithm
- instantiations. Break apart instantiations into groupings below.
- * src/fstream-inst.cc: New.
- * src/io-inst.cc: New.
- * src/istream-inst.cc: New.
- * src/ostream-inst.cc: New.
- * src/streambuf-inst.cc: New.
- * src/sstream-inst.cc: New.
- * src/Makefile.am (sources): Add files.
- * src/Makefile.in: Regenerate.
-
- * acinclude.m4: Work around automake 1.4-p5 bug, change
- AM_GNU_GETTEXT in comments to AM-GNU-GETTEXT.
-
-2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6795.
- * config/os/solaris/solaris2.6/bits/ctype_noninline.h
- (classic_table): Fix.
- * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
-
-2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/ctype_is_wchar_t.cc: Guard with
- _GLIBCPP_USE_WCHAR_T.
- * testsuite/22_locale/ctype_narrow_wchar_t.cc: Same.
- * testsuite/22_locale/ctype_to_wchar_t.cc: Same.
- * testsuite/22_locale/ctype_widen_wchar_t.cc: Same.
-
-2002-05-26 Carlo Wood <carlo@alinoe.com>
- Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/6811
- * config/locale/ieee_1003.1-2001/codecvt_specializations.h
- (__enc_traits::operator=): add missing return statement.
-
-2002-05-24 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/6282
- * include/std/std_bitset.h (_Base_biteset<0>): New specialization.
- (operator>>): If nothing was extracted, don't fail in the
- zero-length case.
- * testsuite/23_containers/bitset_ctor.cc (test02): New test.
-
-2002-05-24 Benjamin Kosnik <bkoz@redhat.com>
- PR libstdc++/6701
- * testsuite/22_locale/ctype_narrow_char.cc: New.
- * testsuite/22_locale/ctype_narrow_wchar_t.cc: New.
- * testsuite/22_locale/ctype_widen_char.cc: New.
- * testsuite/22_locale/ctype_widen_wchar_t.cc: New.
- * testsuite/22_locale/ctype_members_char.cc: Move some bits into...
- * testsuite/22_locale/ctype_is_char.cc: ...this.
- * testsuite/22_locale/ctype_to_char.cc: ...and this.
- * testsuite/22_locale/ctype_members_wchar_t.cc: Move some bits into...
- * testsuite/22_locale/ctype_is_wchar_t.cc: ...this.
- * testsuite/22_locale/ctype_to_wchar_t.cc: ...and this.
-
- * testsuite/22_locale/ctype_scan_wchar_t.cc: Should pass.
-
-2002-05-24 Dale Peakall <dale@peakall.net>
-
- PR libstdc++/6701
- * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_narrow): Fix.
- * config/locale/generic/ctype_members.cc: Same.
-
-2002-05-24 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6750
- * include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
- for empty string literal.
- (ostream::operator<<(const _CharT*)): Same.
- (ostream<char>::operator<<(const char*)): Same.
- (ostream<char>::operator<<(streambuf*)): Same.
- * testsuite/27_io/ostream_inserter_char.cc (test08): Add tests.
- * testsuite/27_io/ostream_inserter_other.cc (test02): Modify.
-
-2002-05-23 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.in (release_VERSION): Update to 3.1.1.
- (libtool_VERSION): Update to 4:1:0.
+2004-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * config/cpu/hppa/atomicity.h (__atomic_add): Make first argument
+ volatile.
+ * config/os/hpux/os_defines.h (_GLIBCXX_INST_ATOMICITY_LOCK): Use
+ __GXX_WEAK__ instead of _GLIBCXX_SUPPORTS_WEAK.
+
+2004-02-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
+ According to 22.2.3.1, p2, 'units' may be followed by 'e' with
+ no 'decimal-point' in the middle: in this case too we must fix
+ up __found_grouping; slightly tweak.
+ * testsuite/22_locale/num_get/get/char/14.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/14.cc: New.
+
+2004-02-27 Eric Christopher <echristo@redhat.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc,
+ testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc,
+ testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc,
+ testsuite/22_locale/collate/hash/wchar_t/2.cc,
+ testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc,
+ testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc,
+ testsuite/22_locale/collate/transform/wchar_t/2.cc,
+ testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc,
+ testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
+ Use dg-require-iconv.
+ * testsuite/lib/libstdc++.exp: Load target-supports.exp.
+
+2004-02-27 Phil Edwards <phil@codesourcery.com>
+ Eric Christopher <echristo@redhat.com>
+
+ * testsuite/config/default.exp: Update with comments.
+ (${tool}_target_compile): New wrapper routine.
+ * testsuite/lib/dg-options.exp: New file, with dg-require-iconv.
+ * testsuite/lib/libstdc++.exp: Update with comments and cosmetic
+ fixes.
+ (load_gcc_lib, v3track): New routines.
+ (v3-init): Rename to libstdc++_init.
+ * testsuite/libstdc++-dg/normal.exp: No longer call v3-init.
+ Move DEFAULT_CXXFLAGS handling into libstdc++_init.
+
+2004-02-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/cpu/hppa/atomicity.h: Include c++config.h to get defines.
+
+ * src/misc-inst.cc (_S_atomicity_lock): Move to __gnu_cxx.
+
+ * config/os/irix/irix5.2/atomicity.h: Merge..
+ * config/os/irix/irix6.5/atomicity.h: Merge..
+ * config/os/irix/atomicity.h: ...into this.
+ * config/os/irix/atomic_word.h: New.
+ * configure.host: Set atomic_word_dir for irix.
+
+ * hppa/atomicity.h: Change __Atomicity_lock to _Atomicity_lock.
+ * i386/atomicity.h: Same.
+ * m68k/atomicity.h: Same.
+ * sparc/atomicity.h: Same.
+
+2004-02-27 David Edelsohn <edelsohn@gnu.org>
+
+ * config/os/aix/atomicity.h: Use __gnu_cxx namespace. Remove
+ static, and inline keywords.
+
+2004-02-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
+ num_get<>::_M_extract_int, money_get<>::_M_extract): If appropriate,
+ call reserve on the __tmp_gruping string.
+ (num_get<>::_M_extract_float): Don't append unnecessarily a
+ char() to the returned string.
+ * include/bits/locale_facets.tcc: Trivial reformattings.
+
+2004-02-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (money_get<>::_M_extract):
+ Change signature: now takes a plain string&.
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Update consistently the definition; use the moneypunct cache
+ to parse the value; use swap to change __units.
+ (money_get<>::do_get(long double&)): Update call of _M_extract,
+ avoid ctype::narrow, not correct wrt the standard.
+ (money_get<>::do_get(string_type&)): Likewise, update call
+ of _M_extract, use ctype::widen.
+ * src/locale-inst.cc: Tweak instantiations of _M_extract.
+
+2004-02-26 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * testsuite/demangle/abi_examples/01.cc: Expect error -2.
+ * testsuite/demangle/abi_examples/02.cc: Likewise.
+ * testsuite/demangle/regression/cw-11.cc: Likewise.
+ * testsuite/demangle/regression/cw-16.cc: Change two expected
+ results to match libiberty demangler output.
+
+2004-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/10246
+ * libsupc++/Makefile.am: Use libiberty demangler.
+ (c_sources): Add cp-demangle.c.
+ * libsupc++/Makefile.in: Regenerate.
+ * src/Makefile.am (sources): Remove demangle.cc.
+ * src/Makefile.in: Regenerate.
+ * include/Makefile.am (bits_headers): Move demangle.h.
+ (ext_headers): ...here.
+ * include/Makefile.in: Regenerate.
+ * include/bits/demangle.h: Move...
+ * include/ext/demangle.h: ...here.
+ * src/demangle.cc: Remove.
+
+2004-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/demangle.h: Add type template parameter to all
+ templates with just an Allocator template parameter.
+
+2004-02-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/atomicity.h: New, forward declarations for __atomic_add
+ and __exchange_and_add.
+ * config/cpu/generic/atomic_word.h: New, typdef for atomic word.
+ * config/cpu/cris/atomic_word.h: Same.
+ * config/cpu/sparc/atomic_word.h: Same.
+ * include/bits/ios_base.h (_Callback_list::_M_remove_reference):
+ Qualifiy with __gnu_cxx.
+ (_Callback_list::_M_add_reference): Same.
+ * include/bits/locale_classes.h (locale::facet::_M_add_reference): Add.
+ (locale::facet::_M_remove_reference): Same.
+ (locale::_Impl::_M_add_reference): Add.
+ (locale::_Impl::_M_remove_reference): Same.
+ * include/bits/basic_string.h (basic_string::_Rep::_M_refcopy): Same.
+ (basic_string::_Rep::_M_dispose): Same.
+ * src/ios.cc (ios_base::xalloc): Same.
+ * src/ios_init.cc (ios_base::Init::Init): Same.
+ (ios_base::Init::~Init): Same.
+ * src/locale.cc (locale::id::_M_id): Same.
+ * config/cpu/i486/atomicity.h: Use __gnu_cxx namespace. Remove
+ static, and inline keywords.
+ * config/cpu/alpha/atomicity.h: Same.
+ * config/cpu/cris/atomicity.h: Same.
+ * config/cpu/generic/atomicity.h: Same.
+ * config/cpu/hppa/atomicity.h: Same.
+ * config/cpu/i386/atomicity.h: Same.
+ * config/cpu/ia64/atomicity.h: Same.
+ * config/cpu/m68k/atomicity.h: Same.
+ * config/cpu/mips/atomicity.h: Same.
+ * config/cpu/powerpc/atomicity.h: Same.
+ * config/cpu/s390/atomicity.h: Same.
+ * config/cpu/sparc/atomicity.h: Same.
+
+ * src/Makefile.am (host_sources): Add atomicity.cc.
+ (atomicity.cc): New rule.
+ * src/Makefile.in: Regenerate.
+ * include/Makefile.am (host_headers): Remove host atomicity.h.
+ (host_headers): Add atomic_word.h.
+ (bits_headers): Add bits atomicity.h.
+ Change ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
+ * include/Makefile.in: Regenerate.
+ * configure.host (atomic_word_dir): Add.
+ * configure.ac: Substitute ATOMIC_WORD_SRCDIR. Change
+ ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
* configure: Regenerate.
+ * config/linker-map.gnu: Export __exchange_and_add, and __atomic_add.
-2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
- * include/bits/stl_pair.h: Tweak comment markup.
+2004-02-25 Jonathan Wakely <redi@gcc.gnu.org>
-2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+ * docs/html/20_util/howto.html, docs/html/20_util/allocator.html,
+ docs/html/ext/howto.html, docs/html/ext/mt_allocator.html:
+ Fix markup, more <link> tags.
- * include/ext/stdio_filebuf.h: Add header guards. Doxygenate.
+2004-02-25 Carlo Wood <carlo@alinoe.com>
-2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+ * bits/demangle.h
+ namespace __gnu_cxx::demangler
+ (session<Allocator>::qualifier_list_Allocator): Add
+ (session<Allocator>::M_qualifier_list_alloc): Add
+ (session<Allocator>::decode_type_with_postfix):
+ Use M_qualifier_list_alloc instead of calling operator new/delete.
- * docs/doxygen/user.cfg.in (EXCLUDE): Add 'CVS'.
+2004-02-24 Paolo Carlini <pcarlini@suse.de>
-2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+ PR libstdc++/14252
+ * include/bits/postypes.h (class streamoff): Add operator++(),
+ operator++(int), operator--() and operator--(int).
+ * testsuite/27_io/fpos/14252.cc: New.
- * include/bits/stl_vector.h: Reformat to follow C++STYLE.
- Doxygenate all public members. Reorder to follow 14882.
- (vector::push_back(void)): Remove previously-deprecated fn.
- (vector::insert(iterator), vector::_M_insert_aux(iterator)):
- Deprecate for removal in 3.3.
+2004-02-24 Richard Sandiford <rsandifo@redhat.com>
-2002-05-20 Phil Edwards <pme@gcc.gnu.org>
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds
+ error in handling of hex constants.
- * docs/html/faq/index.html (5.4): Recommend against -I options for
- finding the ext headers.
- * docs/html/faq/index.txt: Regenerate.
+2004-02-24 Paolo Carlini <pcarlini@suse.de>
-2002-05-19 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/locale_facets.tcc (money_put<>::_M_insert):
+ Prefer basic_string::append to operator+= and a temporary.
- * testsuite/23_containers/deque_operators.cc (test01):
- Fix minor typo in last commit.
+2004-02-23 Benjamin Kosnik <bkoz@redhat.com>
-2002-05-18 Paolo Carlini <pcarlini@unitus.it>
+ * libsupc++/vterminate.cc (__gnu_cxx::__verbose_terminate_handler):
+ Only use fputs, not write.
- PR libstdc++/6503
- * include/bits/stl_deque.h (_Deque_iterator::operator==,
- operator!=, operator<, operator>, operator>=, operator<=):
- Make non-member functions, to allow comparing const and
- non-const iterators in any order.
- * testsuite/23_containers/deque_operators.cc: New testfile.
+2004-02-23 Benjamin Kosnik <bkoz@redhat.com>
-2002-05-16 Phil Edwards <pme@gcc.gnu.org>
+ * include/ext/malloc_allocator.h: Add operators ==, !=.
+ * include/ext/new_allocator.h: Add operators ==, !=.
+ * include/ext/mt_allocator.h (__mt_alloc::tune): New.
+ (__mt_alloc::_S_get_options): New.
+ (__mt_alloc::_S_set_options): New.
+ (__mt_alloc::_S_thread_key_destr): To _S_destroy_thread_key.
+ (__mt_alloc::_S_no_of_bins): To _S_bin_size.
+ Move functions out of line, simplify, format.
+ * src/allocator.cc: Simplify explicit instantiations.
+ * include/bits/allocator.h: Tweak.
- * docs/html/faq/index.html: Update not-a-bug list with basic_file.h.
- * docs/html/faq/index.txt: Regenerate.
+2004-02-22 Paolo Carlini <pcarlini@suse.de>
-2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ * include/bits/locale_facets.tcc (money_put<>::_M_insert):
+ Restructure formatting of value component, first dealing with
+ the non-decimal digits; use reserve.
- * Makefile.am: Allow for PWDCMD to override hardcoded pwd.
- * acinclude.m4: Likewise.
- * docs/html/Makefile: Likewise.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * Makefile.in: Regenerate.
+2004-02-22 Paolo Carlini <pcarlini@suse.de>
-2002-05-15 Loren J. Rittle <ljrittle@acm.org>
+ * include/bits/locale_facets.h (class money_get): Inherit
+ from money_base too; tweak declaration of _M_extract, now
+ parameterized on _Intl too.
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract):
+ Update definition to use the cache; call reserve on __res to
+ avoid multiple reallocations; fix parsing of sign component
+ according to 22.2.6.1.2, p3.
+ (money_get<>::do_get(long double&),
+ money_get<>::do_get(string_type&)): Update calls of _M_extract.
+ * src/locale-inst.cc: Add instantiations of
+ money_get::_M_extract<false> and money_get::_M_extract<true>.
+ * testsuite/22_locale/money_get/get/char/14.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/14.cc: Ditto.
- libstdc++/6641
- * include/bits/c++config (__USE_MALLOC): Report case where
- the user improperly defined it on the command line.
+2004-02-21 Mark Mitchell <mark@codesourcery.com>
-2002-05-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ * libsupc++/vterminate.cc
+ (__gnu_cxx::__verbose_terminate_handler): Guard against recursive
+ calls to terminate.
+ * src/demangle.cc (__cxa_demangle): Wrap in try-catch block.
- * testsuite/testsuite_hooks.h (__set_testsuite_memlimit):
- Retrieve current limits before setting.
+ * testsuite/testsuite_hooks.cc (__gnu_test::set_memory_limits): Do
+ not set RLIMIT_AS on HP-UX.
-2002-05-15 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-21 Mark Mitchell <mark@codesourcery.com>
- PR libstdc++/6518
- * include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
- for null case.
- (ostream::operator<<(const _CharT*)): Same.
- (ostream<char>::operator<<(const char*)): Same.
- * testsuite/27_io/ostream_inserter_char.cc (test07): Add test.
+ * testsuite/testsuite_hooks.cc (__gnu_test::set_memory_limits): Do
+ not set RLIMIT_AS on HP-UX.
-2002-05-15 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-21 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/6594
- * src/strstream.cc (strstreambuf): Fix leak.
+ * include/bits/locale_facets.h (class money_base): Add { _S_minus,
+ _S_zero, _S_end } enum, _S_atoms.
+ (struct __moneypunct_cache<>): Parameterize on _Intl too; add
+ _M_grouping_size, _M_curr_symbol_size, _M_positive_sign_size,
+ _M_negative_sign_size, _M_atoms; tweak constructor consistently.
+ (__moneypunct_cache<>::~__moneypunct_cache): Update.
+ (__moneypunct_cache<>::_M_cache): Fill the cache.
+ (class moneypunct): Tweak __cache_type typedef.
+ (class money_put): Inherit from money_base too; tweak declaration
+ of _M_insert, now parameterized on _Intl.
+ * include/bits/locale_facets.tcc
+ (struct __use_cache<__moneypunct_cache<_CharT, _Intl> >): New.
+ (money_put<>::_M_insert): Update definition to use the cache;
+ call reserve on __res to avoid multiple reallocations.
+ (money_put<>::do_put(long double),
+ money_put<>::do_put(const string_type&): Update calls of _M_insert.
+ * config/locale/generic/monetary_members.cc
+ (moneypunct<char, true>::_M_initialize_moneypunct,
+ moneypunct<char, false>::_M_initialize_moneypunct,
+ moneypunct<wchar_t, true>::_M_initialize_moneypunct,
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct): Update.
+ * config/locale/gnu/monetary_members.cc: Likewise.
+ * config/locale/gnu/monetary_members.cc
+ (moneypunct<wchar_t, true>::~moneypunct(),
+ moneypunct<wchar_t, false>::~moneypunct()): Likewise.
+ * src/globals_locale.cc: Tweak fake_money_cache_c.
+ * src/locale-inst.cc: Add instantiations for
+ money_put::_M_insert<false> and money_put::_M_insert<true> and
+ __moneypunct_cache<C, false>, __moneypunct_cache<C, true>.
+ * src/locale_facets.cc: Define money_base::_S_atoms.
+ * src/locale_init.cc: Update placement new of
+ __moneypunct_cache<char, false>, __moneypunct_cache<char, true>,
+ __moneypunct_cache<wchar_t, false>, __moneypunct_cache<wchar_T, true>.
+
+ * config/locale/generic/numeric_members.cc: Clean up.
+ * config/locale/gnu/numeric_members.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/1.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/2.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/3.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
+
+2004-02-20 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Open
+ FIFO for writing with ios_base::in|ios_base::out.
+ * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
+ * testsuite/27_io/objects/char/7.cc: Likewise.
+ * testsuite/27_io/objects/char/9661-1.cc: Open FIFO for writing
+ with "r+".
+
+2004-02-19 David Edelsohn <edelsohn@gnu.org>
+
+ * 22_locale/collate/compare/wchar_t/2.cc: Change input-charset
+ from iso-8859-1 to ISO8859-1.
+ * 22_locale/collate/compare/wchar_t/wrapped_env.cc: Same.
+ * 22_locale/collate/compare/wchar_t/wrapped_locale.cc: Same.
+ * 22_locale/collate/hash/wchar_t/2.cc: Same.
+ * 22_locale/collate/hash/wchar_t/wrapped_env.cc: Same.
+ * 22_locale/collate/hash/wchar_t/wrapped_locale.cc: Same.
+ * 22_locale/collate/transform/wchar_t/2.cc: Same.
+ * 22_locale/collate/transform/wchar_t/wrapped_env.cc: Same.
+ * 22_locale/collate/transform/wchar_t/wrapped_locale.cc: Same.
+
+2004-02-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (money_get<>::_M_extract):
+ New, helper for do_get.
+ (money_put<>::_M_insert): Likewise, for do_put.
+ * include/bits/locale_facets.tcc (money_get<>::_M_extract,
+ money_put<>::_M_insert): Define.
+ (money_get<>::do_get(long double&), money_get<>::do_get(
+ string_type&), money_put::do_put(long double),
+ money_put::do_put(const string_type&)): Use the helpers.
+
+2004-02-18 Paolo Carlini <pcarlini@suse.de>
+
+ * config/io/basic_file_stdio.cc (__gnu_internal::xwritev):
+ Rewrite, avoiding recursion.
+ (__gnu_internal::xwrite): Minor tweaks.
+
+2004-02-17 Stefan Olsson <stefan@xapa.se>
+
+ * include/ext/mt_allocator.h: Removed the last
+ pointer. Deallocated blocks are now added to the front of
+ freelists as proposed by Felix Yen. This gives roughly 10%
+ performance boost and saves some memory.
+ * docs/html/ext/mt_allocator.html: Change due to that deallocated
+ blocks now are added to the front of freelists. The reason to this
+ approach is also explained.
+
+2004-02-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
+ num_get<>::_M_extract_int, money_get<>::do_get): Simplify
+ grouping fidelity conditional.
+
+2004-02-16 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/overflow/char/13858.cc:
+ Qualify exception with std::.
+ * testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.
+
+2004-02-16 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/ext/enc_filebuf/char/13189.cc: Don't check
+ for now that the catch block is not reached.
+ * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Likewise.
+
+2004-02-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
+ Fix parsing of the remaining sign characters.
+ * 22_locale/money_get/get/char/2.cc: Tweak: now, correctly,
+ the input is scanned 'til eof.
+ * 22_locale/money_get/get/char/4.cc: Likewise.
+ * 22_locale/money_get/get/wchar_t/2.cc: Likewise.
+ * 22_locale/money_get/get/wchar_t/4.cc: Likewise.
+ * 22_locale/money_get/get/char/8.cc: Tweak: override do_neg_format,
+ not do_pos_format: the former is the only one that matters during
+ input.
+ * 22_locale/money_get/get/wchar_t/8.cc: Likewise.
+
+ * 22_locale/money_get/get/char/6.cc: Minor tweak.
+ * 22_locale/money_get/get/wchar_t/6.cc: Likewise.
+
+2004-02-15 David Asher <david.asher@cavium.com>
+
+ PR libstdc++/11352
+ * include/bits/locale_facets.tcc (__pad<>::_S_pad): Don't
+ access __olds beyond __oldlen.
+
+2004-02-14 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Make
+ sure the exception is actually thrown.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.
+
+2004-02-14 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13858
+ * include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external):
+ In case of conversion errors, throw ios_failure; simplify.
+ * testsuite/27_io/basic_filebuf/overflow/char/13858.cc: New.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Tweak,
+ previously we didn't throw in case of conversion errors, instead
+ just returned eof().
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.
+
+ * include/bits/fstream.tcc (basic_filebuf<>::overflow):
+ Trivial simplification of a conditional.
+
+2004-02-12 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13731 (final part: writev)
+ * config/io/basic_file_stdio.cc (__gnu_internal::xwritev):
+ New, a wrapper around writev() handling partial writes.
+ (__basic_file<char>::xwrite): Move to __gnu_internal and make
+ static.
+ (__basic_file<char>::xsputn): Update call.
+ (__basic_file<char>::xsputn_2): Likewise.
+ * config/io/basic_file_stdio.h (__basic_file<char>::xwrite):
+ Don't declare, now static.
-2002-05-15 Paolo Carlini <pcarlini@unitus.it>
+2004-02-11 Stefan Olsson <stefan@xapa.se>
- PR libstdc++/6648
- * include/bits/istream.tcc (istream::getline, ignore):
- Upon __idelim (__delim) call sbumpc() not snextc().
- * testsuite/27_io/narrow_stream_objects.cc:
- Add test08 and test09.
+ * docs/html/ext/mt_allocator.html: New.
-2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-11 Benjamin Kosnik <bkoz@redhat.com>
- * testsuite/22_locale/ctype_scan_char.cc: Tweak.
- * testsuite/22_locale/ctype_scan_wchar_t.cc: New.
+ * docs/html/20_util/allocator.html: New file, consolidate
+ allocator information here. Revamp.
+ * docs/html/documentation.html: Change links.
+ * docs/html/20_util/howto.html: Same.
+ * docs/html/ext/howto.html: Same.
- * docs/html/install.html: Fix.
+2004-02-11 Paolo Carlini <pcarlini@suse.de>
-2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
+ PR libstdc++/13731 (first part: write)
+ * config/io/basic_file_stdio.h (__basic_file<char>::xwrite):
+ New, declare.
+ * config/io/basic_file_stdio.cc (__basic_file<char>::xwrite):
+ Define it: a wrapper around write() handling partial write.
+ (__basic_file<char>::xsputn): Use it.
+ (__basic_file<char>::xsputn_2): Likewise.
- * include/bits/fstream.tcc
- (basic_filebuf::_M_allocate_internal_buffer): Remove extraneous
- try/catch blocks.
- * src/localename.cc (locale::_Impl::_M_install_facet): Same.
+2004-02-11 Paolo Carlini <pcarlini@suse.de>
+ Petur Runolfsson <peturr02@ru.is>
- * docs/html/install.html: Tweak, add bits about required locales
- for the 22_locale tests when using the gnu model.
+ PR libstdc++/14078
+ * include/std/std_istream.h (operator>>(__istream_type& (*)
+ (__istream_type&)), operator>>(__ios_type& (*)(__ios_type&)),
+ operator>>(ios_base& (*)(ios_base&))): Declare inline.
+ * include/std/std_ostream.h (operator<<(__ostream_type& (*)
+ (__ostream_type&)), operator<<(__ios_type& (*)(__ios_type&)),
+ operator<<(ios_base& (*) (ios_base&))): Likewise.
+ * testsuite/performance/27_io/fmtflags_manipulators.cc: New.
- * testsuite/27_io/istream_sentry.cc: Tweak.
+2004-02-10 Loren J. Rittle <ljrittle@acm.org>
-2002-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ PR libstdc++/14098
+ * config/linker-map.gnu: Add typeinfo and typeinfo name for
+ __gnu_cxx::stdio_sync_filebuf<char, std::char_traits<char> >.
- * config/os/irix/irix5.2/bits/ctype_inline.h (scan_is, scan_not):
- Fix typo, use this->is() rather than manually (and perhaps
- incorrectly) inlining it.
- * config/os/irix/irix6.5/bits/ctype_inline.h (scan_is, scan_not):
- Likewise.
- * testsuite/22_locale/ctype_scan_char.cc: New file.
-
-2002-05-13 Paolo Carlini <pcarlini@unitus.it>
- Jakub Jelinek <jakub@redhat.com>
-
- * testsuite/22_locale/money_get_members_char.cc
- (test01, test02, test04): Use the de_DE@euro named locale
- instead of de_DE to allow for an uniform behaviour with
- both old and Euro-era localedata; tweak some tests.
- * testsuite/22_locale/money_get_members_wchar_t.cc
- (test01, test02, test04): Likewise.
- * testsuite/22_locale/money_put_members_char.cc
- (test01, test02, test04): Likewise.
- * testsuite/22_locale/money_put_members_wchar_t.cc
- (test01, test02, test04): Likewise.
-
-2002-05-13 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/codecvt_members_char_char.cc
- (test03): Robustify wrt localedata.
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Likewise.
- * testsuite/22_locale/collate_members_char.cc (test04): Likewise.
- * testsuite/22_locale/collate_members_wchar_t.cc (test04): Likewise.
- * testsuite/22_locale/ctype_members_char.cc (test05): Likewise.
- * testsuite/22_locale/ctype_members_wchar_t.cc (test04): Likewise.
- * testsuite/22_locale/messages_members_char.cc (test03): Likewise.
- * testsuite/22_locale/money_get_members_char.cc (test08): Likewise.
- * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Likewise.
- * testsuite/22_locale/money_put_members_char.cc (test07): Likewise.
- * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Likewise.
- * testsuite/22_locale/moneypunct_members_char.cc (test03): Likewise.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Likewise.
- * testsuite/22_locale/num_get_members_char.cc (test06): Likewise.
- * testsuite/22_locale/num_get_members_wchar_t.cc (test06): Likewise.
- * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
- * testsuite/22_locale/numpunct_members_char.cc (test03): Likewise.
- * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Likewise.
- * testsuite/22_locale/time_get_members_char.cc (test08): Likewise.
- * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Likewise.
- * testsuite/22_locale/time_put_members_char.cc (test04): Likewise.
- * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Likewise.
-
-2002-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * config/os/irix/irix5.2/bits/os_defines.h: Revert 2002-05-06
- change.
-
-2002-05-11 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * config/os/gnu-linux/bits/os_defines.h (__glibcpp_long_bits): Define
- to 64 for hppa 64-bit port.
- (__glibcpp_long_double_bits): Define to 64 for all hppa ports.
-
-2002-05-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * acinclude.m4 (enable_symvers): Quote $LD.
- * aclocal.m4: Regenerate.
- * configure: Likewise.
+ PR libstdc++/14097
+ * config/linker-map.gnu: Add typeinfo and typeinfo name for
+ __gnu_cxx::stdio_filebuf<char, std::char_traits<char> >.
-2002-05-09 Jakub Jelinek <jakub@redhat.com>
+2004-02-09 Loren J. Rittle <ljrittle@acm.org>
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Append all
- multilib dirs containing libgcc_s*.so.1 below gcc object dir to
- LD_LIBRARY_PATH.
+ * include/ext/pool_allocator.h: Include c++config.h.
-2002-05-08 Alexandre Oliva <aoliva@redhat.com>
+2004-02-09 Stefan Olsson <stefan@xapa.se>
- * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
- script entry, and set LD to it when configuring multilibs.
- * configure: Rebuilt.
+ * include/ext/mt_allocator.h: thread_id is unused in non threaded
+ applications and now has a ifdef to remove it completely on
+ compilers without thread support. Include stdlib.h due to a
+ compiler warning on getenv().
-2002-05-07 Mark Mitchell <mark@codesourcery.com>
+2004-02-09 Paul Brook <paul@codesourcery.com>
- * configure.in: Add support for WindISS.
- * configure: Regenerated.
- * configure.target: Add support for WindISS.
- * config/os/windiss/bits/ctype_base.h: New file.
- * config/os/windiss/bits/ctype_inline.h: Likewise.
- * config/os/windiss/bits/ctype_noninline.h: Likewise.
- * config/os/windiss/bits/os_defines.h: Likewise.
-
-2002-05-06 Paolo Carlini <pcarlini@unitus.it>
-
- Test all the facets for the temporary "C" locale switch issue.
- * testsuite/22_locale/codecvt_members_char_char.cc: Add test03.
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
- * testsuite/22_locale/collate_members_char.cc: Add test04.
- * testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/ctype_members_char.cc: Add test05.
- * testsuite/22_locale/ctype_members_wchar_t.cc: Add test04.
- * testsuite/22_locale/messages_members_char.cc: Add test03.
- * testsuite/22_locale/money_get_members_char.cc: Add test08.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/money_put_members_char.cc: Add test07.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/moneypunct_members_char.cc: Add test03.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/num_get_members_char.cc: Add test06.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/numpunct_members_char.cc: Add test03.
- * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/time_get_members_char.cc: Add test08.
- * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/time_put_members_char.cc: Add test04.
- * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.
-
- * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
-
-2002-05-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * config/os/irix/irix5.2/bits/os_defines.h (_SGI_SOURCE,
- __EXTENSIONS__): Ensure they are always defined.
-
-2002-05-06 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/documentation.html: Fix broken link.
-
-2002-05-04 Benjamin Kosnik <bkoz@redhat.com>
- Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/num_put_members_char.cc: Add test04(),
- testing for the locale_facets.tcc entry of the previous commit.
- * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.
-
-2002-05-04 Takeshi Kobayakawa <tskoba@mte.biglobe.ne.jp>
-
- * config/locale/generic/c_locale.cc
- (__convert_to_v(float, double, long double)):
- Fix the temporary switch to the "C" locale, saving and
- restoring in the proper way the current locale.
- * config/locale/generic/time_members.cc
- (__timepunct<char, wchar_t>::_M_put): Likewise.
- * config/locale/gnu/messages_members.cc
- (messages<char>::do_get): Likewise.
- * config/locale/gnu/messages_members.h
- (messages<_CharT>::do_get): Likewise.
- * config/locale/gnu/time_members.cc
- (__timepunct<char, wchar_t>::_M_put): Likewise.
- * include/bits/locale_facets.tcc (__convert_from_v): Likewise.
+ * libstdc++-v3/configure.host: Explicitly check for atomicity.h file.
-2002-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+2004-02-09 Paolo Carlini <pcarlini@suse.de>
- * configure.in (AC_CHECK_HEADERS): Check for string.h & stdlib.h.
- * libsupc++/Makefile.am (LTCOMPILE): Add $(DEFS).
+ PR libstdc++/14071
+ * src/locale_init.cc (locale::global(const locale&)): Use
+ locale::name() in order to decide whether calling setlocale.
+ * testsuite/22_locale/locale/global_locale_objects/14071.cc: New.
- * Makefile.in, config.h.in, configure: Regenerate.
+ * include/bits/locale_classes.h (locale::_Impl::_M_check_same_name()):
+ Avoid computing &= unnecessarily.
-2002-05-03 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-09 James E Wilson <wilson@specifixinc.com>
- PR libstdc++/6549.
- * include/bits/fstream.tcc (filebuf::_M_underflow_common): Revert.
- * testsuite/27_io/narrow_stream_objects.cc (test07): Add.
+ PR libstdc++/5625
+ * libsuspc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
+ __builtin_extend_pointer.
-2002-05-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+2004-02-09 Paolo Carlini <pcarlini@suse.de>
- * config/os/irix/irix5.2/bits/ctype_noninline.h (classic_table):
- Return __ctype + 1.
- (ctype:_M_table): Initialize to classic_table(), not __ctype.
+ PR libstdc++/14072
+ * include/bits/basic_ios.tcc (basic_ios<>::_M_cache_locale):
+ Don't leave dangling pointers.
+ * testsuite/27_io/basic_ios/imbue/14072.cc: New.
+ * testsuite/22_locale/numpunct/members/pod/2.cc: Tweak, the num_put
+ facet is needed in the final test.
-2002-05-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+2004-02-09 Bernardo Innocenti <bernie@develer.com>
- * configure.in: Update local install.html, configopts.html paths.
+ * crossconfig.m4: Don't enable _GLIBCXX_USE_LFS on *-uclinux*.
* configure: Regenerate.
-2002-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * config/os/irix/irix5.2/bits/os_defines.h
- (__glibcpp_long_double_bits, __glibcpp_long_bits): Define.
-
- * config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
- char.
-
-2002-05-02 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/faq/index.html: Update list in #4.1.
- * docs/html/faq/index.txt: Regenerated.
-
-2002-05-02 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/html/17_intro/RELEASE-NOTES (New): Update.
-
-2002-05-01 Phil Edwards <pme@gcc.gnu.org>
-
- * include/std/std_bitset.h: Fix doxygen comments.
- * docs/html/documentation.html: Minor tweaks for 3.1.
- * docs/html/27_io/howto.html: Likewise.
- * docs/html/ext/howto.html: Likewise, mention stdio_filebuf.
- * docs/html/faq/index.html: Likewise.
- * docs/html/faq/index.txt: Regenerated.
-
-2002-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6533
- * include/bits/streambuf_iterator.h (istreambuf_iterator::_M_get): New.
- (istreambuf_iterator::equal): Use it.
- (istreambuf_iterator::operator*): Use it.
-
-2002-05-01 Paolo Carlini <pcarlini@unitus.it>
-
- PR libstdc++/6513
- * include/bits/stl_uninitialized.h
- (uninitialized_copy(_InputIter, _InputIter, _ForwardIter)):
- Fix typo in 2001-07-17 commit: typedef _ValueType to
- iterator_traits<_ForwardIter> not <_InputIter>.
- * testsuite/23_containers/vector_ctor.cc: Add test04.
-
-2002-04-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- PR libstdc++/6501
- * include/c_std/std_cctype.h: Include bits/c++config.h.
- * config/os/hpux/bits/os_defines.h (_SB_CTYPE_MACROS): Define.
-
-2002-04-30 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/ext/stdio_filebuf.h: New file.
- * include/ext/enc_filebuf.h: New file.
- * config/io/basic_file_stdio.h (__basic_file::sys_open): Add fd ctor.
- * config/io/basic_file_stdio.cc: Same.
- * include/bits/fstream.tcc (filebuf::_M_allocate_internal_buffer):
- Remove _M_unbuf hacks.
- (filebuf::_M_destroy_internal_buffer): Same.
- (filebuf::filebuf(cfile, openmode, int_type): Remove definition.
- (filebuf::fd): Remove.
- * include/std/std_fstream.h (filebuf::_M_unbuf): Remove.
- (filebuf::filebuf(__c_file*, openmode, int_type)): Remove.
- (filebuf::fd): Remove.
- * src/ios.cc (ios_base::_S_ios_create): Change to use specialized
- filebufs.
- (ios_base::_S_ios_destroy): Same.
- * src/misc-inst.cc (file_filebuf<char>): Add instantiation.
- * include/Makefile.am (ext_headers): Add ext_filebuf.h,
- stdio_filebuf.h. * include/Makefile.in: Regenerate.
-
-2002-04-30 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6511
- * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Fix typo.
-
-2002-04-29 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/5820
- * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common):
- Check for eof.
- * include/bits/streambuf_iterator.h: Match stream_iterator.h.
- (istreambuf_iterator::operator++): Invalidate on eof.
- (istreambuf_iterator::operator++(int)): Same.
- (istreambuf_iterator::operator*): Same.
-
-2002-04-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set all
- of LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
- LD_LIBRARY64_PATH.
-
-2002-04-28 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/5820
- * config/io/basic_file_stdio.h (__basic_file::sys_getc): Return int.
- (__basic_file::sys_ungetc): Take int.
- * config/io/basic_file_stdio.cc (__basic_file::sys_ungetc): Same.
- * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common):
- Use sys_getc for unbuffered input.
- * testsuite/27_io/narrow_stream_objects.cc (test06): New.
-
- * src/ios.cc (_M_grow_words): Adjust error checking.
- * testsuite/27_io/ios_base_storage.cc: Same.
-
-2002-04-28 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * include/ext/stl_hashtable.h: Import __iterator_category
-
-2002-04-28 Paolo Carlini <pcarlini@unitus.it>
- Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * testsuite/ext/hash_set.cc: New testfile.
-
-2002-04-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/os/solaris/solaris2.5/bits/os_defines.h: Remove
- _G_USING_THUNKS.
- * config/os/solaris/solaris2.6/bits/os_defines.h: Same.
- * config/os/solaris/solaris2.7/bits/os_defines.h: Same.
-
-2002-04-26 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/basic_string.h (replace(__pos, __n1, __s, __n2):
- Fix and tighten __throw_length_error check.
- * testsuite/21_strings/replace.cc (test05): New.
- * testsuite/21_strings/replace.cc (test02, test03, test04): Tweak.
-
-2002-04-23 Loren J. Rittle <ljrittle@acm.org>
-
- * include/std/std_fstream.h (basic_filebuf::sync): Hoist
- unconditional flush on lower-layer handle to here...
- * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow):
- ...from here. Optimize remaining _M_file.sync() call pattern.
- * testsuite/27_io/narrow_stream_objects.cc (test04): New test.
- (test05): Likewise.
-
-2002-04-23 Jason Merrill <jason@redhat.com>
-
- * include/bits/fstream.tcc (basic_filebuf::seekoff): Fix for
- output-only filebufs.
- * include/std/std_fstream.h (basic_filebuf::_M_set_indeterminate):
+2004-02-08 Richard Henderson <rth@redhat.com>
+
+ PR libstdc++/14026
+ * libsupc++/eh_catch.cc (__cxa_begin_catch): Don't adjust
+ uncaughtExceptions during nested catch rethrow.
+ * testsuite/18_support/14026.cc: New.
+
+2004-02-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
+ When working in place remember to set the state to sharable
+ (otherwise, _M_mutate does it).
+
+2004-02-08 Bernardo Innocenti <bernie@develer.com>
+
+ * include/bits/allocator.h, include/bits/basic_ios.h,
+ include/bits/basic_ios.tcc, include/bits/basic_string.h,
+ include/bits/basic_string.tcc, include/bits/boost_concept_check.h,
+ include/bits/char_traits.h, include/bits/codecvt.h,
+ include/bits/concurrence.h, include/bits/cpp_type_traits.h,
+ include/bits/demangle.h, include/bits/deque.tcc,
+ include/bits/fstream.tcc, include/bits/functexcept.h,
+ include/bits/gslice.h, include/bits/gslice_array.h,
+ include/bits/indirect_array.h, include/bits/ios_base.h,
+ include/bits/istream.tcc, include/bits/list.tcc,
+ include/bits/locale_classes.h, include/bits/locale_facets.h,
+ include/bits/locale_facets.tcc, include/bits/localefwd.h,
+ include/bits/mask_array.h, include/bits/ostream.tcc,
+ include/bits/postypes.h, include/bits/slice_array.h,
+ include/bits/sstream.tcc, include/bits/stl_algo.h,
+ include/bits/stl_algobase.h, include/bits/stl_bvector.h,
+ include/bits/stl_construct.h, include/bits/stl_deque.h,
+ include/bits/stl_function.h, include/bits/stl_heap.h,
+ include/bits/stl_iterator.h, include/bits/stl_iterator_base_funcs.h,
+ include/bits/stl_list.h, include/bits/stl_map.h,
+ include/bits/stl_multimap.h, include/bits/stl_multiset.h,
+ include/bits/stl_numeric.h, include/bits/stl_pair.h,
+ include/bits/stl_queue.h, include/bits/stl_raw_storage_iter.h,
+ include/bits/stl_relops.h, include/bits/stl_set.h,
+ include/bits/stl_stack.h, include/bits/stl_tempbuf.h,
+ include/bits/stl_threads.h, include/bits/stl_tree.h,
+ include/bits/stl_uninitialized.h, include/bits/stl_vector.h,
+ include/bits/stream_iterator.h, include/bits/streambuf.tcc,
+ include/bits/streambuf_iterator.h,include/bits/stringfwd.h,
+ include/bits/type_traits.h, include/bits/valarray_after.h,
+ include/bits/valarray_array.h, include/bits/valarray_array.tcc,
+ include/bits/valarray_before.h, include/bits/vector.tcc: Remove
+ trailing whitespace.
+
+2004-02-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h: Fix comment.
+
+2004-02-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_construct.h: Wrap overlong lines, reformat
+ according to the coding standards.
+ * include/bits/stl_pair.h: Likewise.
+ * include/bits/stl_raw_storage_iter.h: Likewise.
+ * include/bits/stl_stack.h: Likewise.
+ * include/bits/stl_uninitialized.h: Likewise.
+ * include/bits/stream_iterator.h: Likewise.
+ * include/bits/streambuf_iterator.h: Likewise.
+ * include/bits/type_traits.h: Likewise.
+
+2004-02-06 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/open/char/9507.cc:
+ Adjust timings.
+
+2004-02-05 Loren J. Rittle <ljrittle@acm.org>
+
+ * scripts/check_performance: Support PCH.
+
+ * scripts/check_performance (CXX): Add -DNOTHREAD.
+ * testsuite/performance/20_util/allocator/insert.cc: Integrate
+ threaded tests from insert_insert.cc. Tweak iterations,
+ remove special cases.
+ * testsuite/performance/20_util/allocator/insert_insert.cc:
+ Make all tests single-threaded. Tweak iterations.
+ * testsuite/performance/20_util/allocator/map_thread.cc:
+ Tweak iterations.
+ * testsuite/performance/20_util/allocator/producer_consumer.cc:
Likewise.
- (basic_filebuf::_M_set_determinate): Likewise.
-
- PR libstdc++/6414
- * include/bits/fstream.tcc (basic_filebuf::seekoff): Adjust return
- value properly in the trivial case.
- * testsuite/27_io/istream_seeks.cc (test04): Make sure that
- tellg() returns the right value after a read.
-
-2002-04-23 Hans-Peter Nilsson <hp@bitrange.com>
-
- * config/cpu/mmix/bits/cpu_limits.h: New file.
- * configure.target (CPULIMITSH): Use it.
-
-2002-04-22 Loren J. Rittle <ljrittle@acm.org>
-
- * docs/html/17_intro/porting.texi (_GLIBCPP_AVOID_FSEEK): Remove.
- * docs/html/17_intro/porting.html: Rebuilt.
-
-2002-04-20 Jason Merrill <jason@redhat.com>
-
- PR libstdc++/4150
- * include/std/std_streambuf.h (basic_streambuf::_M_set_indeterminate):
- Move to filebuf.
- (basic_streambuf::_M_set_determinate): Likewise.
- (basic_streambuf::_M_is_indeterminate): Likewise.
- * include/bits/std_fstream.h (basic_filebuf::_M_filepos): New
- non-static data member.
- (basic_filebuf::_M_underflow_common): New non-static member function.
- (basic_filebuf::_M_underflow, _M_uflow): Call it.
- (basic_filebuf::sync): Avoid useless seeking.
- (basic_filebuf::_M_set_indeterminate): Move here from streambuf.
- Set _M_filepos.
- (basic_filebuf::_M_set_determinate): Likewise.
- (basic_filebuf::_M_is_indeterminate): Likewise.
- * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow): Seek
- back to _M_out_beg if necessary.
- (basic_filebuf::seekoff): Likewise.
- (basic_filebuf::_M_underflow_common): Generalization of old
- underflow(). Don't seek back to _M_in_beg.
- * src/ios.cc: Lose _GLIBCPP_AVOID_FSEEK stuff.
- * config/os/solaris/solaris2.?/bits/os_defines.h: Likewise.
- * config/os/bsd/freebsd/bits/os_defines.h: Likewise.
- * config/os/mingw32/bits/os_defines.h: Likewise.
- * testsuite/27_io/filebuf_virtuals.cc (test05): Don't overspecify
- ungetc test.
-
-2002-04-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/istream.tcc (istream::read): Fix.
- * testsuite/27_io/istream_unformatted.cc (main): Add.
-
-2002-04-20 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/6360
- * include/bits/istream.tcc (istream::ignore): Streamline, use
- delimiter as is.
- * include/bits/streambuf.tcc: Use this->gptr.
- * testsuite/27_io/istream_unformatted.cc (test08): Add test.
-
-2002-04-18 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/localefwd.h (locale::id::_M_id): Do this correctly,
- as type safety is important, especially on solaris.
- * include/bits/istream.tcc (istream::read): Clean.
- (istream::readsome): Same.
- * locale.cc: Wrap lines.
-
- * testsuite/21_strings/inserters_extractors.cc: Tweaks.
- * testsuite/27_io/instantiations.cc (test): Add bool variable...
- * testsuite/21_strings/capacity.cc: Clean.
-
-2002-04-17 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/doxygroups.cc: New group on binary searching.
- * include/bits/stl_algo.h: Document binary searches and merges.
- * include/bits/stl_deque.h: The 'map' member is not the 'map' class.
-
-2002-04-17 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/mainpage.html: Doxygen logo is now a PNG file.
- * docs/doxygen/run_doxygen: Bump required version.
- * docs/doxygen/user.cfg.in: Revert accidental change.
- * docs/html/faq/index.html: Reindent a block of links.
- (4.4): New note on using dlsym.
- * docs/html/faq/index.txt: Regenerated.
-
-2002-04-17 Phil Edwards <pme@gcc.gnu.org>
-
- * testsuite_flags.in (cxxflags): Also pass @EXTRA_CXX_FLAGS@.
-
-2002-04-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu (__malloc_alloc_template): Add.
- (__default_alloc_template): Same.
- * include/bits/stl_alloc.h (__malloc_alloc_template): Add extern
- template.
- (__default_alloc_template): Same.
-
-2002-04-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/27_io/filebuf_virtuals.cc: Add _S_pback_size instantiation.
-
-2002-04-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/concept-inst.cc (vector<locale::facet*>): Remove instantiations.
- * src/stl-inst.cc (vector::_M_insert_aux): Remove instantiation.
- (__malloc_alloc_template): Conditionalize.
-
- * include/bits/istream.tcc: Remove sputbackc calls.
-
- * testsuite/19_diagnostics/stdexceptions.cc: Fix comment.
-
-2002-04-16 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/24_iterators/rel_ops.cc: New test.
-
-2002-04-16 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
-
- * include/bits/type_traits.h (__normal_iterator): Declare in
- __gnu_cxx. Adjust use at global namespace.
- * include/bits/stl_iterator.h (__normal_iterator): Move definition
- into __gnu_cxx::. Add more operator overloads. Tidy existing ones.
- * include/bits/basic_string.h (basic_string): Adjust use of
- __normal_iterator.
- * include/bits/stl_vector.h (_Alloc>): Likewise.
- * src/concept-inst.cc (__gnu_cxx): __normal_iterator<> is now here.
- * src/string-inst.cc (operator==): Instantiate in __gnu_cxx.
-
-2002-04-15 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/4164
- Valgrind fixes.
- * config/io/basic_file_stdio.cc (__basic_file::~__basic_file):
- Call close.
- (__basic_file::close): Call fflush. Correct return if fclose ok.
- (__basic_file::is_open): Make const.
- Change __c_file_type to __c_file.
- * config/io/basic_file_stdio.h: Change __c_file_type to __c_file.
- (__basic_file::is_open): Make const.
- * config/io/c_io_stdio.h: Change __c_file_type to __c_file.
- * include/std/std_fstream.h (filebuf::_M_allocate_file): Remove.
- (filebuf::_M_unbuf): Add.
- (filebuf::_M_file): Change to non-pointer.
- (filebuf::_M_allocate_pback_buffer): Remove.
- * include/bits/fstream.tcc (filebuf::_M_allocate_file): Remove.
- (filebuf::_M_allocate_internal_buffer): Use _M_unbuf.
- Change initialization list for _M_file change.
- (filebuf::_M_allocate_pback_buffer): Remove.
- Change _M_file usage to reflect non-pointer data member.
-
- * config/locale/generic/c_locale.cc
- (locale::facet::_S_create_c_locale): Add parameter.
- * config/locale/generic/collate_members.cc: Change
- _M_compare_helper to _M_compare.
- Change _M_transform_helper to _M_transform.
- * config/locale/generic/monetary_members.cc: Changeup data types.
- Add dtors.
- * config/locale/generic/numeric_members.cc: Add dtors.
- * config/locale/generic/time_members.cc: Add dtors.
- * config/locale/gnu/c_locale.cc: Add parameter.
- * config/locale/gnu/collate_members.cc:Change
- _M_compare_helper to _M_compare.
- Change _M_transform_helper to _M_transform.
- * config/locale/gnu/ctype_members.cc: Better error checking.
- * config/os/gnu-linux/bits/ctype_noninline.h: Better error checking.
- * config/locale/gnu/messages_members.cc: Tweak comment.
- * config/locale/gnu/monetary_members.cc: Change data types.
- Add dtors.
- * config/locale/gnu/numeric_members.cc: Add dtors, better error
- checking.
- * config/locale/gnu/time_members.cc: Same.
- * config/locale/ieee_1003.1-2001/c_locale.cc
- (locale::facet::_S_create_c_locale): Add parameter.
- * config/locale/ieee_1003.1-2001/c_locale.h: Correct typedef.
- * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Remove
- bogus ctor.
-
- * include/bits/locale_facets.h (moneypunct): Use string literals.
- Don't define dtor.
- (numpunct): Same.
- (__timepunct): Same.
- (locale::_Impl::_M_facets): Change from vector to array.
- (locale::_Impl::_M_names): Change from array of strings to array
- of string literals.
- (locale::facet::_S_create_c_locale): Add parameter.
- (locale::locale::_S_num_facets): Move to...
- (locale::_Impl::_M_facets_size): Here.
- * include/bits/locale_facets.tcc: Fixups for _M_facets, _M_name
- changes.
- * include/bits/localefwd.h: (locale::id::_M_id): Add member function.
- (locale::_Impl::_Impl(facet**, size_t, bool)): Add.
- (locale::_Impl::_Impl(string, size_t)): Change to
- (locale::_Impl::_Impl(const char*, size_t)): This.
-
- * include/bits/streambuf.tcc (streambuf::_S_pback_size): Define.
- * include/std/std_streambuf.h (streambuf::_M_pback_size): Change to
- (streambuf::_S_pback_size): This.
-
- * src/globals.cc: Add pre-allocations for "C" facets.
- * src/locale-inst.cc: Remove vector instantiations.
- * src/locale.cc: Remove vector include. Fixups for _M_names,
- _M_facets changes.
- * src/localename.cc: Same.
-
- * include/bits/stl_vector.h: Fix odd formatting.
-
- * include/bits/basic_string.tcc: Tweak comment.
-
- * libsupc++/new: Make sure parameters are uglified.
- * libsupc++/typeinfo: Same.
-
- * testsuite/22_locale/num_get_members_char.cc: Fixup.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Same.
- * testsuite/27_io/filebuf_members.cc: Same.
-
-2002-04-12 Steve Ellcey <sje@cup.hp.com>
-
- * gcc/libstdc++-v3/config/os/hpux/bits/os_defines.h
- (strtoll, strtoull): In 64 bit mode HP-UX (IA64 and HPPA)
- does not define strtoll or strtoull, but does define strtol
- and strtoul which are the same since in 64 bit mode
- sizeof(long) == sizeof(long long).
-
-2002-04-12 Phil Edwards <pme@gcc.gnu.org>
-
- * include/std/std_bitset.h: Doxygenate std::bitset<>. Clean up
- trailing spaces, indentation, and macro names. Make exception
- messages more informative.
-
-2002-04-11 Richard Henderson <rth@redhat.com>
-
- * include/bits/fstream.tcc (basic_filebuf<>::open): Fix & ordering.
- * include/bits/ostream.tcc (basic_ostream<>::operator<<(long)): Same.
- (basic_ostream<>::operator<<(long long)): Same.
-
-2002-04-11 Richard Henderson <rth@redhat.com>
-
- * config/linker-map.gnu: Add __gxx_personality_sj0.
-
-2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/1072
- * include/bits/localefwd.h (locale::_Impl::_M_facets): Change from
- pointer to vector.
- Remove forward declaration of vector.
- Include vector.
- * include/bits/locale_facets.tcc: Remove vector include.
- (use_locale): Adjust.
- (has_locale): Adjust.
- * src/locale.cc: Adjust.
- * src/localename.cc: Same.
-
-2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
- Richard Henderson <rth@redhat.com>
-
- * include/bits/sstream.tcc: Clean up bit ops.
- * include/bits/fstream.tcc: Same.
-
-2002-04-09 Jakub Jelinek <jakub@redhat.com>
-
- * include/bits/locale_facets.h (__num_base::_S_scale_hex): Remove.
- (__num_base::_S_scale_oct): Remove.
- * src/locale.cc (__num_base::_S_scale_hex): Remove.
- (__num_base::_S_scale_oct): Remove.
-
-2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/6124
- * testsuite/23_containers/bitset_members.cc: New test.
- * include/std/std_bitset.h (_Bit_count::_S_bit_count): Move..
- (_S_bit_count): Here.
- (_First_one::_S_first_one): Move...
- (_S_first_one): Here.
- Format.
- * src/bitset.cc: Adjust.
- * config/linker-map.gnu: Export.
-
-2002-04-08 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/5180
- * include/bits/fstream.tcc (filebuf::seekpos): Fix.
- * include/std/std_fstream.h: Clean.
- * include/bits/ostream.tcc: Remove extraneous variables.
- * include/bits/sstream.tcc (stringbuf::seekoff): Be strict about
- open modes and which modes.
- (stringbuf::seekpos): Same.
- * testsuite/27_io/stringbuf_virtuals.cc: New tests.
-
-2002-04-05 Jonathan Wakely <jw@kayari.org>
-
- * include/bits/stl_algo.h (unique_copy, __gcd, rotate, rotate_copy,
- random_shuffle, partition, stable_partition, sort, stable_sort,
- partial_sort, partial_sort_copy, nth_element): Doxygenate.
-
-2002-04-05 David S. Miller <davem@redhat.com>
-
- * config/os/gnu-linux/bits/os_defines.h
- (__glibcpp_long_double_bits): Set to 64 on 32-bit Sparc.
-2002-04-04 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-05 Geoffrey Keating <geoffk@apple.com>
- libstdc++/3457
- via gawrilow@math.tu-berlin.de
- * acinclude.m4 (version_specific_libs): Fix combo usage with
- --with-gxx-include-dir.
- * aclocal.m4: Regenerate.
- * configure: Same.
-
-2002-04-03 Benjamin Kosnik <bkoz@redhat.com>
-
- As per DR 184, libstdc++/3139
- * include/std/std_limits.h (__glibcpp_bool_digits): Change to 1.
- (numeric_limits<bool>::is_iec559): False.
- (numeric_limits<bool>::is_modulo): False.
-
- * testsuite/27_io/ios_init.cc: Add instantiations.
-
-2002-04-02 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/5268
- * src/ios.cc: (ios_base::Init::_S_ios_destroy): Remove flush calls.
- * testsuite/27_io/ios_init.cc (tests04): Add test.
-
- libstdc++/3983
- * include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
- (basic_ios::_M_ios_fctype): Consistently name to _M_fctype.
- * include/bits/basic_ios.tcc: Same. Remove outdated comments.
- * include/bits/istream.tcc: Use _M_fctype, make consistent with
- ostream.
- * testsuite/27_io/ios_init.cc (tests03): Add test.
-
-2002-04-02 Phil Edwards <pme@gcc.gnu.org>
-
- * include/Makefile.am (install-data-local): Use mkinstalldirs.
- * include/Makefile.in: Regenerate.
-
-2002-04-02 Paolo Carlini <pcarlini@unitus.it>
- Nathan Myers <ncm@cantrip.org>
- Philip Martin <philip@codematters.co.uk>
-
- * include/bits/basic_string.h
- (replace(i1, i2, _CharT* k1, _CharT* k2),
- replace(i2, i2, const _CharT* k1, const _CharT* k2),
- replace(i1, i2, iterator k1, iterator k2,
- replace(i1, i2, const_iterator k1, const_iterator k2):
- New specializations to optimize for the common cases of
- pointers and iterators.
- (replace(pos, n1, s, n2)): Tweak.
- * include/bits/basic_string.tcc: Tweak comments.
- * testsuite/21_strings/replace.cc (test04): New tests.
-
-2002-04-01 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/5542
- * acinclude: More extensive checks for msgfmt, --enable-nls.
+ PR 12179
+ * .cvsignore: New.
+ * acinclude.m4 (GLIBCXX_EXPORT_INSTALL_INFO): Use 'gcc', not
+ 'gcc-lib'. Add comment about poorly-named variables.
* aclocal.m4: Regenerate.
* configure: Regenerate.
-2002-04-01 Phil Edwards <pme@gcc.gnu.org>
+2004-02-05 Paolo Carlini <pcarlini@suse.de>
- * libsupc++/exception (__verbose_terminate_handler): Point to docs.
- * docs/doxygen/doxygroups.cc: Doxygen hooks for abi::__cxa_demangle.
- * docs/html/18_support/howto.html: Document the demangler.
- * docs/html/17_intro/howto.html: And link to it.
+ * include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
+ Thousands-sep are always optional; thousands-sep are not allowed
+ after the decimal_point.
+ * testsuite/22_locale/money_get/get/char/12.cc: New.
+ * testsuite/22_locale/money_get/get/char/13.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/12.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/13.cc: New.
- * docs/doxygen/mainpage.html: Describe user-vs-maintainer docs.
- * docs/doxygen/run_doxygen: Print user-vs-maintainer.
+ * testsuite/22_locale/money_get/get/char/1.cc: Clean-up.
+ * testsuite/22_locale/money_get/get/char/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/4.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.
-2002-04-01 Phil Edwards <pme@gcc.gnu.org>
+ * testsuite/22_locale/money_get/get/char/9.cc: Fix citation from
+ the standard.
+ * testsuite/22_locale/money_get/get/wchar_t/9.cc: Likewise.
- * config/linker-map.gnu: Export __verbose_terminate_handler.
- * libsupc++/Makefile.am (sources): Add cxa_demangle.c, dyn-string.c.
- Make new LTCOMPILE variable, use it in new special build rules.
- * libsupc++/Makefile.in: Rebuild.
- * src/vterminate.cc (__verbose_terminate_handler): Enable use of
- runtime __cxa_demangle.
+2004-02-05 Richard Sandiford <rsandifo@redhat.com>
- * docs/html/install.html: Update prereqs and instructions.
- * docs/html/19_diagnostics/howto.html: Bring naming for
- verbose_terminate_handler into line with reality.
+ * config/os/irix/irix6.5/os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T):
+ Define.
+ * config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc): Use
+ it to decide whether FIONREAD should take an off_t or int argument.
-2002-04-01 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-05 Paolo Carlini <pcarlini@suse.de>
- libstdc++/3129
- * include/bits/basic_ios.h (basic_ios::_M_exception): Move.
- (basic_ios::_M_streambuf_state): Move.
- * include/bits/ios_base (ios_base): To here.
- * include/bits/ios_base.h (ios_base::_S_local_words): To
- _S_local_word_size.
- (ios_base::_M_word_array): To _M_local_word.
- (ios_base::_M_words_limit): To _M_word_size.
- (ios_base::_M_words): To _M_word.
- Comment.
- * include/bits/basic_ios.tcc: Adjust.
- * src/ios.cc (ios_base::_M_grow_words): Tweak.
- * testsuite/27_io/ios_base_storage.cc: Add tests.
+ * include/bits/stl_function.h: Minor formatting changes.
- libstdc++/5207
- Kenny Simpson <theonetruekenny@yahoo.com>
- * include/bits/ios_base.h: Fix.
+2004-02-04 Zack Weinberg <zack@codesourcery.com>
- Richard Henderson <rth@redhat.com>
- * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Correct
- last change.
+ Revert previous change to config/abi/*/baseline_symbols.txt.
- * include/bits/basic_string.h: Tweak formatting.
+2004-02-04 Benjamin Kosnik <bkoz@redhat.com>
+ Zack Weinberg <zack@codesourcery.com>
-2002-04-01 Paolo Carlini <pcarlini@unitus.it>
+ * config/io/basic_file_stdio.cc (__gnu_internal::fopen_mode):
+ New function.
+ (__basic_file<char>::sys_open, __basic_file<char>::open): Use it.
+ (__basic_file<char>::_M_open_mode): Delete.
+ * config/io/basic_file_stdio.cc: Delete declaration of _M_open_mode.
- * config/locale/ieee_1003.1-2001/codecvt_specializations.h
- (codecvt::do_out, codecvt::do_unshift, codecvt::do_in):
- By definition, sizeof(char) == 1.
- * include/bits/locale_facets.tcc (money_get::do_get,
- money_put::do_put): Ditto.
- * testsuite/21_strings/inserters_extractors.cc
- (test04): Ditto.
+ * testsuite/27_io/basic_filebuf/close/char/9964.cc
+ * testsuite/27_io/basic_filebuf/open/char/9507.cc:
+ Correct flags to filebuf::open calls.
-2002-03-30 Richard Henderson <rth@redhat.com>
+ * config/abi/alpha-freebsd5/baseline_symbols.txt
+ * config/abi/alpha-linux-gnu/baseline_symbols.txt
+ * config/abi/hppa-linux-gnu/baseline_symbols.txt
+ * config/abi/i386-freebsd4/baseline_symbols.txt
+ * config/abi/i386-freebsd5/baseline_symbols.txt
+ * config/abi/i486-linux-gnu/baseline_symbols.txt
+ * config/abi/ia64-linux-gnu/baseline_symbols.txt
+ * config/abi/mips-linux-gnu/baseline_symbols.txt
+ * config/abi/sparc-freebsd5/baseline_symbols.txt
+ * config/abi/sparc-linux-gnu/baseline_symbols.txt
+ * config/abi/x86_64-linux-gnu/baseline_symbols.txt:
+ Remove entry for __basic_file<char>::_M_open_mode.
- PR c++/3719
- * libsupc++/eh_personality.cc (__cxa_call_unexpected): Copy handler
- data out of the exception struct before calling unexpectedHandler.
+2004-02-04 Loren J. Rittle <ljrittle@acm.org>
-2002-03-28 Roger Sayle <roger@eyesopen.com>
+ * testsuite/performance/20_util/allocator/insert.cc (main): Tweak.
- * include/c_std/std_cmath.h: To prevent problems overloading
- g++ builtins, use the double variants from the global namespace
- before defining float and long double variants in std::.
+2004-02-04 Felix Yen <fwy@alumni.brown.edu>
-2002-03-28 Loren J. Rittle <ljrittle@acm.org>
+ * testsuite/performance/20_util/producer_consumer.cc: New.
+ * testsuite/performance/20_util/allocator/insert_insert.cc: Two loops.
- * testsuite/18_support/numeric_limits.cc (test_extrema): Fix typo.
+2004-02-04 Benjamin Kosnik <bkoz@redhat.com>
-2002-03-28 Paolo Carlini <pcarlini@unitus.it>
+ * testsuite/performance/20_util/allocator.cc: Move to..
+ * testsuite/performance/20_util/allocator/insert.cc: ...here.
+ * testsuite/performance/20_util/allocator_thread.cc: Move to...
+ * testsuite/performance/20_util/allocator/insert_insert.cc: ...here.
+ * testsuite/performance/20_util/allocator_map_thread.cc: Move to...
+ * testsuite/performance/20_util/allocator/map_thread.cc: ...here.
- * testsuite/24_iterators/istream_iterator.cc
- (test02): New tests.
+2004-02-04 Jonathan Wakely <redi@gcc.gnu.org>
-2002-03-28 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
- Paolo Carlini <pcarlini@unitus.it>
+ * docs/html/faq/index.html: Recommend using LD_LIBRARY_PATH.
+ * docs/html/faq/index.txt: Regenerate.
- * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc
- (test01): Protect the test with _GLIBCPP_USE_WCHAR_T;
- fix i_lit_base e_lit_base arrays, making them independent
- from the endianness of the platform; tweak UCS4 to UCS-4BE.
+2004-02-04 Dhruv Matani <dhruvbird@gmx.net>
-2002-03-27 Benjamin Kosnik <bkoz@redhat.com>
+ * include/ext/debug_allocator.h: _M_extra now stands for the
+ number of extra objects instead of the number of extra bytes.
+ (debug_allocator::allocate): Adjust.
+ (debug_allocator::deallocate): Adjust.
- * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Always
- allocate at least a byte.
+ * include/ext/pool_allocator.h: Fix typo.
- * testsuite/18_support/numeric_limits.cc (test_extrema): Make
- debugger-friendly.
- * testsuite/27_io/streambuf.cc (test07): Fix.
- (test06): Enable.
+2004-02-03 Felix Yen <fwy@alumni.brown.edu>
+ Benjamin Kosnik <bkoz@redhat.com>
-2002-03-27 Phil Edwards <pme@gcc.gnu.org>
+ * testsuite/performance/20_util/allocator.cc: Add map,
+ deque, set tests.
+ * testsuite/performance/20_util/allocator_thread.cc: Same.
- * docs/doxygen/Intro.3: Date tweak.
- * docs/doxygen/TODO: Update.
- * docs/doxygen/doxygroups.cc: Point to tables.html.
- * docs/doxygen/mainpage.html: Date tweak.
- * docs/doxygen/run_doxygen: Version tweak. Copy tables.html over.
- * docs/doxygen/tables.html: Fill in the blanks.
+2004-02-03 Paolo Carlini <pcarlini@suse.de>
- * docs/doxygen/user.cfg.in (ALIASES): Remove maint and endmaint.
- * include/bits/stl_algo.h: Likewise; use expanded form.
- * include/bits/stl_alloc.h: Likewise.
- * include/bits/stl_construct.h: Likewise.
- * include/bits/stl_deque.h: Likewise.
- * include/bits/stl_iterator_base_types.h: Likewise.
- * include/bits/stl_list.h: Likewise.
- * include/bits/stl_relops.h: Likewise.
- * include/bits/stl_tempbuf.h: Likewise.
- * include/bits/stl_vector.h: Likewise.
- * include/std/std_memory.h: Likewise.
+ * include/bits/basic_string.h (insert(iterator)): Remove,
+ non-standard and already scheduled for removal.
- * include/bits/stl_deque.h: Point into tables.html and add @ingroup.
- * include/bits/stl_list.h: Likewise.
- * include/bits/stl_vector.h: Likewise.
+2004-02-03 Paolo Carlini <pcarlini@suse.de>
-2002-03-26 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/stl_iterator_base_funcs.h: Minor formatting
+ and indentation tweaks.
+ * include/bits/stl_iterator_base_types.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_tempbuf.h: Likewise.
- * include/c/: Guard with _CPP_.
- * include/c_std/: Same.
- * include/Makefile.am: Fixup install, link routines for null
- c_base_headers_extra scenarios.
- * include/Makefile.in: Regerate.
+2004-02-02 Jerry Quinn <jlquinn@optonline.net>
-2002-03-25 Paolo Carlini <pcarlini@unitus.it>
- Richard Henderson <rth@redhat.com>
+ * include/bits/gslice.h, include/bits/gslice_array.h,
+ include/bits/indirect_array.h, include/bits/mask_array.h,
+ include/bits/slice_array.h, include/bits/stl_numeric.h,
+ include/std/std_valarray.h: Update copyright years.
- * testsuite/22_locale/codecvt_members_unicode_char.cc
- (test01, test02): make sure that the i_lit_base array
- is sufficiently aligned.
+2004-02-02 Jerry Quinn <jlquinn@optonline.net>
-2002-03-25 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/gslice.h (gslice): Document.
+ * include/bits/gslice_array.h (gslice_array): Document.
+ * include/bits/indirect_array (indirect_array): Document.
+ * include/bits/mask_array (mask_array): Document.
+ * include/bits/slice_array.h (slice,slice_array): Document.
+ * include/bits/stl_numeric.h (accumulate, inner_product, partial_sum,
+ adjacent_difference): Document
+ * include/std/std_valarray.h (valarray): Document.
- * config/os/newlib/bits/ctype_noninline.h (ctype::classic): Set to
- _ctype_.
+2004-02-02 Benjamin Kosnik <bkoz@redhat.com>
-2002-03-25 Paolo Carlini <pcarlini@unitus.it>
+ * docs/html/19_diagnostics/howto.html: Move verbose terminate
+ documentation...
+ * docs/html/18_support/howto.html: Here.
+ * docs/html/documentation.html: Add reference here.
- * testsuite/22_locale/collate_byname.cc
- (test01): compare the result of collate::compare with
- that of collate::transform + string::compare, not with
- that of collate::transform + collate::compare; values
- returned by collate::compare are normalized, therefore
- test against +-1.
+2004-02-02 Paolo Carlini <pcarlini@suse.de>
-2002-03-25 Benjamin Kosnik <bkoz@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
+ * config/locale/gnu/c++locale_internal.h: Remove prototypes
+ of no longer used GLIBC thread locale functions.
- * config/locale/gnu/messages_members.h: Correct conditional.
- * config/locale/gnu/messages_members.cc: Same.
- * config/locale/gnu/time_members.cc: Same.
+2004-02-02 Eric Christopher <echristo@redhat.com>
+ Zack Weinberg <zack@codesourcery.com>
-2002-03-25 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
- Paolo Carlini <pcarlini@unitus.it>
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use
+ -finput-charset.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto
+ * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto.
+ * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
+ Ditto.
- * testsuite/22_locale/codecvt_members_unicode_char.cc
- (test01, test02): Fix i_lit_base arrays, making them
- independent from the endianness of the platform.
+2004-02-02 Paolo Carlini <pcarlini@suse.de>
-2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/stl_function.h: Additional minor tweaks.
+ * include/bits/stl_multiset.h: Likewise.
- * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPP): Just test for
- signbit and __signbit directly.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * config.h.in: Regenerate.
- * libmath/Makefile.am: Simplify.
- * libmath/Makefile.in: Regenerate.
- * include/c_std/std_cmath.h: Update paths for include of cmath.tcc.
+ * include/bits/stl_queue.h: Minor tweaks.
- * include/Makefile.am: Clean up handling of extra "C" header files.
- Add hooks for "C" compatibility headers.
- * include/Makefile.in: Regenerate.
+2004-02-02 Paolo Carlini <pcarlini@suse.de>
- * include/c/*: Formatting tweaks, cleanups.
- * include/c_std/*: Same.
+ PR libstdc++/13976 (continued)
+ * include/ext/malloc_allocator.h (malloc_allocator::deallocate):
+ Make the second parameter unnamed, to void unused parameter
+ warnings.
+ * include/ext/new_allocator.h (new_allocator::deallocate): Ditto.
-2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-02 Paolo Carlini <pcarlini@suse.de>
- * config/locale/gnu/messages_members.h: Add __uselocale bits.
- * config/locale/gnu/messages_members.cc: Same.
- * config/locale/gnu/time_members.cc: Same.
+ PR libstdc++/13976
+ * include/ext/malloc_allocator.h (malloc_allocator::allocate):
+ Make the second parameter unnamed, to void unused parameter
+ warnings.
+ * include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
+ * include/ext/new_allocator.h (new_allocator::allocate): Ditto.
-2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-01 Paolo Carlini <pcarlini@suse.de>
- * src/vterminate.cc: Format, -fno-exceptions cleanup.
+ * include/bits/stl_algo.h: Additional minor tweaks.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
-2002-03-21 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+2004-02-01 Paolo Carlini <pcarlini@suse.de>
- * acinclude.m4 (GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3): New.
- (GLIBCPP_CONFIGURE_TESTSUITE): Use it to check for setenv.
- * aclocal.m4: Regenerate.
- * configure: Likewise.
+ * include/bits/vector.tcc (vector::_M_insert_aux(iterator)):
+ Remove, unused.
-2002-03-19 Paolo Carlini <pcarlini@unitus.it>
- Ulrich Drepper <drepper@redhat.com>
+2004-02-01 Paolo Carlini <pcarlini@suse.de>
- * src/locale-inst.cc (__convert_from_v): Add an additional
- __size parameter in the declarations.
- * include/bits/locale_facets.tcc
- (__convert_from_v): When available (that is,
- _GLIBCPP_USE_C99 defined) use snprintf instead of sprintf.
- (num_put::_M_convert_float): Depending on _GLIBCPP_USE_C99
- being defined or not, call and use __convert_from_v in the
- appropriate way.
- (num_put::_M_convert_int): Same here.
- (money_put::do_put(long double)): Same here.
-
-2002-03-19 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/faq/index.html (#3.6): Rewrap and close <a href> tags.
- * docs/html/faq/index.txt: Regenerate.
-
-2002-03-19 Steve Ellcey <sje@cup.hp.com>
-
- * acinclude.m4 (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Define
- GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS to set LIBUNWIND_FLAG if
- --enable-libunwind-exceptions is set.
- * configure.in (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Call new
- macro to check for libunwind.
- * configure: Regenerate.
- * src/Makefile.am (libstdc___la_LDFLAGS): Add
- LIBUNWIND_FLAG to libstdc link line.
- * src/Makefile.in: Regenerate.
+ * include/bits/stl_function.h: Additional minor tweaks.
-2002-03-19 Benjamin Kosnik <bkoz@redhat.com>
+2004-02-01 Paolo Carlini <pcarlini@suse.de>
- * docs/html/faq/index.html: Add OS X workaround.
- * docs/html/17_intro/TODO: Update.
+ * include/bits/deque.tcc: Wrap overlong lines, constify
+ a few variables, reformat according to the coding standards.
+ * include/bits/list.tcc: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_function.h: Likewise.
+ * include/bits/stl_iterator.h: Likewise.
+ * include/bits/stl_iterator_base_funcs.h: Likewise.
+ * include/bits/stl_iterator_base_types.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_relops.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
-2002-03-18 Paolo Carlini <pcarlini@unitus.it>
+2004-02-01 Paolo Carlini <pcarlini@suse.de>
- * include/bits/locale_facets.tcc
- (money_put::do_put(long double)): Fix dimensioning of
- temporary buffers to avoid risk of overruns.
- (money_put::do_put(string)): Same for the buffer used to
- add the grouping chars.
- * testsuite/22_locale/money_put_members_char.cc: Add test06.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.
+ * include/bits/stl_bvector.h: Wrap overlong lines, constify
+ a few variables, reformat according to the coding standards.
+ * include/bits/stl_tree.h: Likewise.
- * include/bits/locale_facets.tcc
- (collate::do_transform): Simplify.
-
-2002-03-18 Phil Edwards <pme@gcc.gnu.org>
-
- * acinclude.m4 (GLIBCPP_CONFIGURE): Make indentation/spacing uniform.
- * configure.in: Add comments pointing the way for autoconf 2.5x.
- * aclocal.m4, config.h.in, configure: Regenerate.
-
-2002-03-18 Philipp Thomas <pthomas@suse.de>
-
- * include/backward/hash_map.h: hash, hashtable, hash_map and
- hash_multimap are in namespace __gnu_cxx.
- include/backward/hash_set.h: hash, hashtable, hash_set and
- hash_multiset are in namespace __gnu_cxx.
- include/backward/hashtable.h: hash and hashtable are in
- namespace __gnu_cxx.
- include/backward/rope.h: char_producer, sequence_buffer,
- rope, crope and wrope are in namespace __gnu_cxx.
- include/backward/slist.h: slist is in namespace __gnu_cxx.
- * testsuite/backward/header_hash_map_h.cc
- testsuite/backward/header_hash_set_h.cc
- testsuite/backward/header_hashtable_h.cc
- testsuite/backward/header_rope_h.cc
- testsuite/backward/header_slist_h.cc
- testsuite/backward/header_tempbuf_h.cc: New tests for
- checking that we're using the correct namespace.
-
-2002-03-17 Jason Merrill <jason@redhat.com>
-
- PR c++/4381
- * libsupc++/eh_personality.cc (get_adjusted_ptr): New static fn.
- (check_exception_spec): Call it. Take the thrown pointer.
- (__cxa_call_unexpected): Pass it.
- (PERSONALITY_FUNCTION): Likewise. Use get_adjusted_ptr.
-
-2002-03-15 Anthony Green <green@redhat.com>
-
- * configure.in: Remove useless is_mingw32.
- * configure: Rebuilt.
+2004-01-31 Paolo Carlini <pcarlini@suse.de>
-2002-03-15 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/stl_algo.h: Minor additional reformat, add
+ copyright year.
+ * include/bits/stl_algobase.h: Add copyright year.
- * testsuite/22_locale/collate_members_char.cc
- (test01): compare the result of collate::compare with
- that of collate::transform + string::compare, not with
- that of collate::transform + collate::compare.
- (test01): values returned by collate::compare are
- normalized, therefore test against +-1.
- * testsuite/22_locale/collate_members_wchar_t.cc: Ditto.
+2004-01-31 Paolo Carlini <pcarlini@suse.de>
-2002-03-12 Loren Rittle <ljrittle@acm.org>
+ * include/bits/stl_algo.h: Wrap overlong lines, constify
+ a few variables, reformat according to the coding standards.
+ * include/bits/stl_algobase.h: Likewise.
+ * include/bits/stl_heap.h: Likewise.
- reported by Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
- * testsuite/thread/pthread4.cc: Lower nominal iteration counter.
+2004-01-31 Paolo Carlini <pcarlini@suse.de>
-2002-03-12 Benjamin Kosnik <bkoz@redhat.com>
- Per Liboriussen <liborius@stofanet.dk>
+ * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
- * config/os/gnu-linux/bits/ctype_noninline.h: Cast to
- unsigned char.
- * config/os/gnu-linux/bits/ctype_inline.h: Same.
+ * include/bits/basic_string.h: Fix two comments.
- * config/os/irix/irix6.5/bits/ctype_inline.h: Same.
+2004-01-31 Per Bothner <per@bothner.com>
- * config/os/solaris/solaris2.5/bits/ctype_inline.h: Same.
- * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+ * include/ext/mt_allocator.h
+ (__mt_alloc::_S_thread_freelist_mutex): Guard with
+ __GTHREAD_MUTEX_INIT.
- * config/os/solaris/solaris2.6/bits/ctype_inline.h: Same.
- * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
+2004-01-31 Paolo Carlini <pcarlini@suse.de>
- * config/os/solaris/solaris2.7/bits/ctype_inline.h: Same.
- * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
+ * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
- * testsuite/22_locale/ctype_members_char.cc (main): Add tests.
+2004-01-30 Paolo Carlini <pcarlini@suse.de>
-2002-03-12 Benjamin Kosnik <bkoz@redhat.com>
+ * testsuite/21_strings/basic_string/cons/char/6.cc: New.
+ * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
+ * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
- * include/bits/basic_string.tcc (string::_S_construct(_InIter,
- _InIter, const _Alloc&, forward_iterator_tag): Check for null.
- (string::basic_string(const _CharT* __s, const _Alloc& __a)): Same.
- * testsuite/21_strings/ctor_copy_dtor.cc (test01): Re-enable, now
- that memory limits are in place.
- (test03): Add tests.
+2004-01-30 Felix Yen <fwy@alumni.brown.edu>
-2002-03-11 Benjamin Kosnik <bkoz@redhat.com>
+ * testsuite/performance/20_util/allocator_thread.cc (do_loop):
+ Don't use clear, but instead assign. Use insert.
- * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for wctype.h.
- * aclocal.m4: Regenerate.
- * config.h.in: Regenerate.
- * configure: Regenerate.
- * include/c_std/std_cwctype.h: Guard.
+2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
-2002-03-11 Chris Demetriou <cgd@broadcom.com>
+ * src/demangle.cc: Add instantiations.
+ * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
+ * src/Makefile.in: Regenerate.
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Enhance check for
- whether GLIBCPP_CHECK_LINKER_FEATURES has been used.
- * aclocal.m4: Regenerate.
+2004-01-30 David Edelsohn <edelsohn@gnu.org>
+
+ * src/allocator.cc: Protect _S_get_thread_id() and
+ _S_thread_key_destr() with #ifdef __GTHREADS.
+
+2004-01-30 Paolo Carlini <pcarlini@suse.de>
+
+ Reshuffle performance testsuite.
+ * testsuite/performance/allocator.cc, allocator_map_thread.cc,
+ allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
+ cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
+ fstream_seek_write.cc, ifstream_extract_float.cc,
+ ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
+ list_create_fill_sort.cc, map_create_fill.cc,
+ narrow_widen_char.cc, narrow_widen_wchar_t.cc,
+ ofstream_insert_float.cc, ofstream_insert_int.cc,
+ string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
+ wchar_t_out.cc: Split into...
+ * testsuite/performance/20_util/allocator.cc: New.
+ * testsuite/performance/20_util/allocator_map_thread.cc: New.
+ * testsuite/performance/20_util/allocator_thread.cc: New.
+ * testsuite/performance/21_strings/string_append: New.
+ * testsuite/performance/22_locale/is_wchar_t.cc: New.
+ * testsuite/performance/22_locale/narrow_widen_char.cc: New.
+ * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
+ * testsuite/performance/22_locale/wchar_t_in.cc: New.
+ * testsuite/performance/22_locale/wchar_t_length.cc: New.
+ * testsuite/performance/22_locale/wchar_t_out.cc: New.
+ * testsuite/performance/23_containers/container_benchmark.cc: New.
+ * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
+ * testsuite/performance/23_containers/map_create_fill.cc: New.
+ * testsuite/performance/26_numerics/complex_norm.cc: New.
+ * testsuite/performance/27_io/cout_insert_int.cc: New.
+ * testsuite/performance/27_io/filebuf_copy.cc: New.
+ * testsuite/performance/27_io/filebuf_sputc.cc: New.
+ * testsuite/performance/27_io/fstream_seek_write.cc: New.
+ * testsuite/performance/27_io/ifstream_extract_float.cc: New.
+ * testsuite/performance/27_io/ifstream_extract_int.cc: New.
+ * testsuite/performance/27_io/ifstream_getline.cc: New.
+ * testsuite/performance/27_io/ofstream_insert_float.cc: New.
+ * testsuite/performance/27_io/ofstream_insert_int.cc: New.
+
+2004-01-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (_Rep::_S_create):
+ Never allocate a string bigger than max_size(); always keep
+ __capacity and __size in sync to avoid memory leaks at
+ deallocation time.
+
+2004-01-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (_S_construct(_InIterator,
+ _InIterator, const _Alloc&, input_iterator_tag)): Simplify
+ the double loop, streamline.
+
+ * include/bits/basic_string.tcc: Very minor tweaks.
+
+2004-01-30 Loren J. Rittle <ljrittle@acm.org>
+
+ * scripts/check_performance: Only compile with $THREAD_FLAG
+ when test is marked to require it. Allow multiple
+ compilations/executions of marked tests.
+ * testsuite/testsuite_performance.h (report_performance):
+ Report dynamic thread support status.
+ (report_header): Likewise.
+ * testsuite/performance/allocator.cc: Stabilize iteration
+ count. Support more allocators. Mark each allocator test to
+ run and report independently.
+ * testsuite/performance/allocator_map_thread.cc: Likewise.
+ * testsuite/performance/allocator_thread.cc: Likewise.
+
+2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
+
+ * config/local/generic/c_locale.h: Change ::malloc() to new char[].
+ * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
+ * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
+ std::get_temporary_buffer() instead of duplicating its code.
+ Update to C++STYLE conventions.
+ * include/std/std_memory.h (get_temporary_buffer): Use ::operator
+ new() instead of std::malloc().
+ (return_temporary_buffer): Use ::operator delete() instead of
+ std::free().
+
+2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/allocator.h: Temporary switch to new_allocator as
+ the default to unjam bootstraps.
+
+2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (bits_headers): Remove allocator_traits.h.
+ * include/Makefile.in: Regenerate.
+ * include/bits/allocator_traits.h: Remove.
+ * include/bits/allocator.h: Remove allocator_traits.h include, and
+ relevant comments.
+ (allocator): Empty base class, inherit from the underlying allocator.
+ * src/allocator-inst.cc: Move __pool_alloc instantiation to...
+ * src/allocator.cc: ...here. New. For the underlying allocators.
+ Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
+ * config/linker-map.gnu: Remove __pool_alloc bits.
+ * src/Makefile.am (sources): Add allocator.cc.
+ * src/Makefile.in: Regenerate.
+ * testsuite/20_util/allocator/1.cc: Split second test into...
+ * testsuite/20_util/allocator/8230.cc: ...this.
+ * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
+ typedef to use std::allocatore. Format.
+ * include/ext/pool_allocator.h: Remove allocator_traits.h include,
+ _Alloc_traits.
+ * include/ext/mt_allocator.h (__gnu_cxx): Qualify
+ __throw_bad_alloc calls. Don't include <memory>.
+ * include/ext/malloc_allocator.h: Remove <memory> include.
+ * include/ext/new_allocator.h (new_allocator): Same.
+ * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
+ declaration. Switch __alloc to _Alloc.
+ * include/ext/hashtable.h: Remove __alloc.
+ * include/backward/alloc.h: Only inject allocator, not
+ implementation details.
+
+ * include/ext/mt_allocator.h: Replace free with delete.
+
+2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/globals_io.cc: Change to __gnu_internal namespace.
+ * src/globals_locale.cc: Same.
+ * src/locale_init.cc: Same.
+ * src/ios_init.cc: Same.
+
+2004-01-28 Stefan Olsson <stefan@snon.net>
+
+ * include/ext/mt_allocator.h: Replaced all malloc() calls with
+ operator new(). Added support for the env variable
+ GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
+ one in allocate() as well). Fix typos.
+
+2004-01-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (_S_create(size_t,
+ const _Alloc&): Change signature to take two size_type
+ arguments.
+ * include/bits/basic_string.tcc (_S_construct(_InIterator,
+ _InIterator, const _Alloc&, input_iterator_tag)): Update
+ call, tweak a bit.
+ (_S_construct(_InIterator, _InIterator, const _Alloc&,
+ forward_iterator_tag)): Likewise.
+ (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
+ (_M_mutate(size_type, size_type, size_type)): Don't
+ implement the exponential growth policy, demand it to
+ _S_create, update call and simplify.
+ (_M_clone(const _Alloc&, size_type)): Likewise.
+ (_S_create(size_type, size_type, const _Alloc&)): Implement
+ the growth policy, simplify otherwise.
+
+ * include/bits/basic_string.h (_Rep::operator[]): Tweak
+ signature to take a size_type, consistently with the other
+ members.
+
+2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
+ delete declarations, add include and test variable.
+
+2003-01-27 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/codecvt.h, include/bits/locale_facets.h,
+ include/bits/postypes.h, include/bits/stl_bvector.h,
+ include/bits/stl_multiset.h, include/bits/stl_set.h,
+ include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
+ include/std/std_complex.h: Document.
+
+2004-01-27 Jerry Quinn <jlquinn@optonline.net>
+
+ PR libstdc++/11584
+ * include/bits/ios_base.h (ios_base::_M_grow_words): Add
+ iword/pword selector.
+ (ios_base::iword, ios_base::pword): Use it.
+ * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
+ iword or pword member on alloc failure.
+ * testsuite/27_io/ios_base/storage/11584.cc: New test.
+
+2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
+ PJ Darcy <darcypj@us.ibm.com>
+
+ * configure.host: Add support for *-tpf.
+ * crossconfig.m4: Likewise.
* configure: Regenerate.
+ * config/os/tpf: New directory.
+ * config/os/tpf/os_defines.h: New file.
+ * config/os/tpf/ctype_base.h: Likewise.
+ * config/os/tpf/ctype_inline.h: Likewise.
+ * config/os/tpf/ctype_noninline.h: Likewise.
-2002-03-11 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-27 Paolo Carlini <pcarlini@suse.de>
- * include/bits/stl_bvector.h: Fix warning.
+ PR libstdc++/13884
+ * include/bits/sstream.tcc: Guard use of extern template.
-2002-03-11 Richard Henderson <rth@redhat.com>
+2004-01-27 Paolo Carlini <pcarlini@suse.de>
- * include/bits/stl_bvector.h (_Bit_type): New. Use throughout.
+ * include/bits/basic_string.tcc
+ (basic_string(const basic_string&, size_type, size_type),
+ basic_string(const basic_string&, size_type, size_type,
+ const _Alloc&)): Avoid unnecessarily constructing iterators.
-2002-03-11 Phil Edwards <pme@gcc.gnu.org>
+2004-01-26 Paolo Carlini <pcarlini@suse.de>
- * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-list-sourcefiles):
- New function. Build the list of tests to run in testsuite_files.
- * testsuite/libstdc++-v3.dg/dg.exp: Use it.
+ * config/locale/generic/c_locale.cc: Fix throw messages
+ to use the __N marker.
+ * config/locale/gnu/c_locale.cc: Likewise.
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
+ Likewise.
+ * docs/html/17_intro/C++STYLE: Likewise.
+ * include/bits/basic_ios.tcc: Likewise.
+ * include/bits/fstream.tcc: Likewise.
+ * include/bits/vector.tcc: Likewise.
+ * include/ext/ropeimpl.h: Likewise.
+ * include/std/std_bitset.h: Likewise.
+ * src/ios.cc: Likewise.
+ * src/locale.cc: Likewise.
+ * src/localename.cc: Likewise.
-2002-03-11 Phil Edwards <pme@gcc.gnu.org>
+2004-01-26 Paolo Carlini <pcarlini@suse.de>
- * testsuite/21_strings/capacity.cc: Only explicitly instantiate on
- platforms with no weak support.
- * testsuite/27_io/ios_init.cc: Likewise.
+ * include/bits/basic_string.h (_M_replace_aux): Use the
+ __N marker in throw message.
+ * include/bits/basic_string.tcc (assign(const _CharT*,
+ size_type), insert(size_type, const _CharT*, size_type),
+ replace(size_type, size_type, const _CharT*, size_type),
+ reserve, _Rep::_S_create, resize, _M_replace_dispatch):
+ Likewise.
-2002-03-10 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/basic_string.h, include/bits/basic_string.tcc:
+ Fold overlong lines, minor formatting changes.
- * include/bits/locale_facets.tcc (time_put::do_put):
- Consider sizeof(char_type) in allocating the buffer.
+2004-01-26 Paolo Carlini <pcarlini@suse.de>
- * include/bits/locale_facets.tcc (collate::do_tranform):
- Remove redundant variable.
+ * include/bits/basic_string.h (replace(iterator, iterator,
+ const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
+ (replace(iterator, iterator, const _CharT*)): Ditto.
+ (replace(iterator, iterator, const _CharT*, size_type)):
+ Add missing _GLIBCXX_DEBUG_PEDASSERT.
-2002-03-10 Ulrich Drepper <drepper@redhat.com>
- Paolo Carlini <pcarlini@unitus.it>
+2004-01-26 Paolo Carlini <pcarlini@suse.de>
- * config/locale/generic/collate_members.cc
- (collate<char,wchar_t>::_M_compare_helper): normalize
- values returned by strcoll and wcscoll.
- * config/locale/gnu/collate_members.cc
- (collate<char,wchar_t>::_M_compare_helper): ditto
- for __strcoll_l and __wcscoll_l.
+ * include/bits/basic_string.tcc (replace(size_type,
+ size_type, const _CharT*, size_type)): Implement optimized
+ in-place algorithm for non-overlapping ranges.
+ * testsuite/21_strings/basic_string/replace/char/6.cc: New.
+ * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
-2002-03-10 Anthony Green <green@redhat.com>
+ * include/bits/basic_string.tcc (insert(size_type,
+ const _CharT*, size_type)): Tweak slightly.
- * configure.in: Support cross builds to mingw32 target.
- * configure: Rebuilt.
+2004-01-26 Andreas Schwab <schwab@suse.de>
+
+ * config/locale/gnu/monetary_members.cc: Restore locale before
+ rethrowing exception.
+
+2004-01-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
+ Define inline here.
+ * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
+ Move inline.
-2002-03-09 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/locale_facets.tcc (collate::do_transform):
- Rewrite to fix problems with long transformed strings.
-
-2002-03-08 Benjamin Kosnik <bkoz@redhat.com>
-
- * c_locale_generic.cc: Move to...
- * generic/c_locale.cc
- * c_locale_generic.h: Move to...
- * generic/c_locale.h
- * codecvt_specializations_generic.h: Move to...
- * generic/codecvt_specializations.h
- * collate_members_generic.cc: Move to...
- * generic/collate_members.cc
- * ctype_members_generic.cc: Move to...
- * generic/ctype_members.cc
- * messages_members_generic.cc: Move to...
- * generic/messages_members.cc
- * messages_members_generic.h: Move to...
- * generic/messages_members.h
- * moneypunct_members_generic.cc: Move to...
- * generic/monetary_members.cc
- * numpunct_members_generic.cc: Move to...
- * generic/numeric_members.cc
- * time_members_generic.cc: Move to...
- * generic/time_members.cc
- * c_locale_gnu.cc: Move to...
- * gnu/c_locale.cc
- * c_locale_gnu.h: Move to...
- * gnu/c_locale.h
- * collate_members_gnu.cc: Move to...
- * gnu/collate_members.cc
- * ctype_members_gnu.cc: Move to...
- * gnu/ctype_members.cc
- * messages_members_gnu.cc: Move to...
- * gnu/messages_members.cc
- * messages_members_gnu.h: Move to...
- * gnu/messages_members.h
- * moneypunct_members_gnu.cc: Move to...
- * gnu/monetary_members.cc
- * numpunct_members_gnu.cc: Move to...
- * gnu/numeric_members.cc
- * time_members_gnu.cc: Move to...
- * gnu/time_members.cc
- * c_locale_ieee_1003.1-200x.cc: Move to...
- * ieee_1003.1-2001/c_locale.cc
- * c_locale_ieee_1003.1-200x.h: Move to...
- * ieee_1003.1-2001/c_locale.h
- * codecvt_specializations_ieee_1003.1-200x.h: Move to...
- * ieee_1003.1-2001/codecvt_specializations.h
- * messages_members_ieee_1003.1-200x.cc: Move to...
- * ieee_1003.1-2001/messages_members.cc
- * messages_members_ieee_1003.1-200x.h: Move to...
- * ieee_1003.1-2001/messages_members.h
-
- * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Make consistent.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * src/Makefile.am (sources): Change to monetary and numeric.
- * src/Makefile.in: Regenerate.
- * docs/html/configopts.html: Update to ieee_1003.1-2001.
+ * include/bits/basic_string.tcc: Very minor tweaks.
-2002-03-08 scott snyder <snyder@fnal.gov>
+2004-01-25 Paolo Carlini <pcarlini@suse.de>
- libstdc++/5875
- * include/bits/locale_facets.tcc (num_put::_M_convert_float):
- Allow one more digit of precision.
- * testsuite/27_io/ostream_inserter_arith.cc: Test that we can
- write a double and read back in the same value.
+ * testsuite/performance/string_append.cc: Increase number
+ of iterations.
-2002-03-08 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-25 Paolo Carlini <pcarlini@suse.de>
- * include/std/std_limits.h: Move static const data members out of
- generic template, into base class __numeric_limits_base.
- * src/limits.cc: Add definitions.
- * config/linker-map.gnu: Add __numeric_limits_base.
- * testsuite/18_support/numeric_limits.cc: Declare test in scope.
+ * include/bits/basic_string.h (erase(size_type, size_type),
+ erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
+ instead, thus avoiding redundant check for length_error.
-2002-03-07 Benjamin Kosnik <bkoz@redhat.com>
+ * include/bits/basic_string.h: Tweak some comments.
- * include/bits/stl_alloc.h: Add extern implicit allocator
- instantiations.
- * include/bits/basic_string.tcc: Tweak.
- * include/bits/locale_facets.tcc: Remove default args. Add
- has_facet, use_facet extern instantiations.
- * src/stl-inst.cc: Add explicit instantiation.
- * src/locale-inst.cc: Clean. Remove locale member template
- instantiations.
+2004-01-24 Paolo Carlini <pcarlini@suse.de>
- * testsuite/22_locale/operators.cc (test02): Enable.
+ * include/bits/basic_string.tcc (operator+(const _CharT*,
+ const basic_string&)): No need to go through the append
+ taking two iterators.
-2002-03-06 Benjamin Kosnik <bkoz@redhat.com>
- Stephen M. Webb <stephen.webb@bregmasoft.com>
+2004-01-24 Paolo Carlini <pcarlini@suse.de>
- * include/bits/stl_tree.h (_S_rb_tree_red): Make enum.
- (_S_rb_tree_black): Make enum.
- Clean. Format.
- * include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum.
- * include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum.
- (__stl_threshold): _M_threshold, enum.
- * src/stl-inst.cc: Same.
- * config/linker-map.gnu: Remove.
+ * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
+ Revert last change to use std::min: machine language is worse.
+ (find_last_of(const _CharT*, size_type, size_type)): Ditto.
+ (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
+ (find_last_not_of(_CharT, size_type)): Ditto.
- * testsuite/23_containers/vector_bool.cc: New.
+ * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
+ size_type)): Discard the value returned by _M_check.
+ (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
+ (append(const basic_string&, size_type, size_type)): Ditto.
+ (copy(_CharT*, size_type, size_type)): Ditto.
+ (compare(size_type, size_type, const basic_string&)): Ditto.
+ (compare(size_type, size_type, const basic_string&,
+ size_type, size_type)): Ditto.
+ (compare(size_type, size_type, const _CharT*)): Ditto.
+ (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
-2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+2004-01-24 Paolo Carlini <pcarlini@suse.de>
- * docs/doxygen/user.cfg.in: Also document deprecated entries.
- * docs/html/Makefile: Example rule to rebuild porting-howto.html.
- * docs/html/17_intro/howto.html: "gcc"->"GCC" changes, when
- referring to the collection as a whole. New section on which macros
- can be redefined by the user.
- * docs/html/19_diagnostics/howto.html: Update note for concepts.
- * docs/html/20_util/howto.html: Update link to SGI.
- * docs/html/faq/index.html: Update snapshot versions. New entry
- on why g++ (but not gcc) must currently predefine certain macros.
- * docs/html/faq/index.txt: Regenerated.
+ * include/bits/basic_string.h (insert(size_type,
+ const basic_string&, size_type, size_type)): Define inline here.
+ * include/bits/basic_string.tcc (insert(size_type,
+ const basic_string&, size_type, size_type)): Move inline.
- * include/bits/basic_string.h (basic_string::_S_construct): Fix
- names in declaration.
- (basic_string::compare): These are no longer optional.
- * include/bits/ostream.tcc: Tweak closing brace placement.
- * include/bits/stl_algo.h: Lots of initial doxygen comment hooks.
- * include/std/std_sstream.h: Fix typo in comment.
- * include/bits/locale_facets.tcc: Remove unneeded header inclusion.
- * src/locale.cc: Likewise.
+2004-01-24 Paolo Carlini <pcarlini@suse.de>
-2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+ * include/bits/basic_string.h (assign(const basic_string&,
+ size_type, size_type)): Define inline here.
+ (replace(size_type, size_type, const basic_string&,
+ size_type, size_type)): Ditto.
+ (_M_replace_dispatch(iterator, iterator, _InputIterator,
+ _InputIterator, __false_type)): Only declare.
+ (_M_replace(iterator, iterator, _InputIterator,
+ _InputIterator)): Remove.
+ * include/bits/basic_string.tcc (assign(const basic_string&,
+ size_type, size_type)): Move inline.
+ (replace(size_type, size_type, const basic_string&,
+ size_type, size_type)): Ditto.
+ (_M_replace_dispatch(iterator, iterator, _InputIterator,
+ _InputIterator, __false_type)): Define, now does also what
+ _M_replace did before.
+ * src/string-inst.cc (_M_replace): Don't instantiate.
- PR libstdc++/5734
- * include/bits/stl_vector.h (vector::push_back()): Guard with
- _GLIBCPP_DEPRECATED.
-
-2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+ * include/bits/basic_string.tcc (find(const _CharT*,
+ size_type, size_type)): Tidy.
+ (rfind(_CharT, size_type)): Ditto.
+ (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
+ (find_first_not_of(_CharT, size_type)): Ditto.
+ (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
+ (find_last_not_of(_CharT, size_type)): Ditto.
+
+2004-01-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13838
+ * include/debug/bitset (operator|=): Fix typo.
+ * testsuite/23_containers/bitset/operations/13838.cc: New.
+
+2004-01-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (insert(size_type,
+ const _CharT*, size_type __n)): Fix length_error check.
+ (replace(size_type, size_type, const _CharT*, size_type):
+ Ditto; call _M_replace_safe.
+ (_M_replace_aux(size_type, size_type, size_type, _CharT):
+ Fix length_error check.
+ (_M_replace(iterator, iterator, _InputIterator,
+ _InputIterator)): Ditto, tweak.
+ (_M_replace_safe(size_type, size_type, const _CharT*,
+ size_type)): Remove length_error check.
+
+ * include/bits/basic_string.tcc (append(const basic_string&),
+ append(const basic_string&, size_type, size_type)): Tweak
+ comment.
+
+ * include/bits/basic_string.tcc (copy(_CharT*, size_type,
+ size_type)): If __n == 0 don't call traits::copy.
+
+2004-01-23 Stefan Olsson <stefan@snon.net>
+
+ * include/ext/mt_allocator.h: Reduce lock contention.
+
+2004-01-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13831
+ * include/bits/fstream.tcc (underflow): Remove unused
+ variable.
+ * include/bits/streambuf_iterator.h (equal): Ditto.
+ * include/bits/locale_facets.h (_M_convert_from_char):
+ Ditto.
- * include/bits/c++config: Fix misplaced leading blanks on first line.
+2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-2002-03-05 Benjamin Kosnik <bkoz@redhat.com>
+ PR c/13814
+ * config/linker-map.gnu (nan): Delete.
+ * libmath/mathconf.h (NAN, nan): Delete.
+ * linkage.m4 (nan): Don't check for it.
+ * libmath/nan.c: Delete file.
- * docs/html/17_intro/RELEASE-NOTES: Fix usage.
- * README (libmath): Make clear.
+ * config.h.in, configure: Regenerate.
-2002-03-05 Jakub Jelinek <jakub@redhat.com>
+2004-01-23 Paolo Carlini <pcarlini@suse.de>
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version
- script globbing in ld.
- * aclocal.m4: Rebuilt.
- * configure: Rebuilt.
+ * include/bits/basic_string.h (push_back(_CharT)):
+ Call _M_replace_aux.
+ (insert(size_type, const basic_string&)): Trivial tweak.
+ (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
+ (insert(iterator, _CharT)): Ditto.
+ (erase(size_type, size_type)): Ditto.
+ (erase(iterator)): Ditto.
+ (erase(iterator, iterator)): Ditto.
+ (replace(size_type, size_type, size_type, _CharT)): Ditto.
-2002-03-05 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-23 Loren J. Rittle <ljrittle@acm.org>
- * docs/html/17_intro/RELEASE-NOTES: Update.
- * README: Format subdirectories.
+ libstdc++/13823
+ * testsuite/performance/allocator_map_thread.cc: New test.
-2002-03-05 Paolo Carlini <pcarlini@unitus.it>
+2004-01-22 Paolo Carlini <pcarlini@suse.de>
- libstdc++/5816
* include/bits/locale_facets.tcc
- (num_get::_M_extract_float): Fix the parsing of __dec, since
- the standard prescribes that if no grouping characters are
- seen, no grouping check is applied.
- * testsuite/22_locale/num_get_members_char.cc: Add test05
- distilled from the PR.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.
-
-2002-03-04 Craig Rodrigues <rodrigc@gcc.gnu.org>
-
- * docs/html/17_intro/porting-howto.xml: Refer to
- http://www.oasis-open.org for docbookx.dtd.
- * docs/html/17_intro/porting-howto.html: Regenerated.
-
-2002-03-03 Phil Edwards <pme@gcc.gnu.org>
-
- PR libstdc++/3955
- * include/std/std_sstream.h: Remove trailing spaces.
- (basic_stringbuf::_M_stringbuf_init): Also check for ios_base::app.
- * testsuite/27_io/stringbuf.cc (test05, test06): New tests.
-
-2002-03-02 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/num_get_members_char.cc (test04):
- Use a named locale expecting grouping (de_DE).
- * testsuite/22_locale/num_get_members_wchar_t.cc (test04):
+ (money_put::do_put(..., long double)): Use the basic_string
+ constructor for char arrays, not that for C-strings, to pass
+ __digits to do_put(..., const string_type&): __ws isn't
+ null-terminated.
+
+2004-01-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (_M_replace_safe): Change
+ signatures to take size_types and const _CharT*.
+ (_M_replace_aux): Likewise, takes size_types instead of
+ iterators.
+ (append(size_type, _CharT)): Update call.
+ (assign(size_type, _CharT)): Ditto.
+ (replace(iterator, iterator, size_type, _CharT)): Ditto.
+ (_M_replace_dispatch(iterator, iterator, _Integer,
+ _Integer, __true_type)): Ditto.
+ * include/bits/basic_string.tcc (assign(const _CharT*,
+ size_type)): Ditto.
+ (insert(size_type, const _CharT*, size_type)): Ditto.
+ (replace(size_type, size_type, const _CharT*,
+ size_type)): Ditto.
+ (_M_replace(iterator, iterator, _InputIterator,
+ _InputIterator)): Ditto.
+ (append(const basic_string&)): Ditto.
+ (append(const basic_string&, size_type, size_type): Ditto.
+ (append(const _CharT*, size_type): Ditto.
+ (_M_replace_safe, _M_replace_safe): Change definitions
+ accordingly, simplify.
+ * string-inst.cc (_M_replace_safe): Don't instantiate.
+
+2004-01-21 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (append(const basic_string&)):
+ Revert previous change.
+ (append(const basic_string&, size_type, size_type)): Revert
+ previous change, use _M_check and _M_limit.
+
+2004-01-21 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (_M_check): Change to return
+ a checked __pos and take an additional const char* argument.
+ (_M_fold): Rename to _M_limit, change to return a size_type,
+ corresponding to the __off limited to the actual length.
+ (insert(size_type, size_type, _CharT)): Update call, call
+ replace.
+ (insert(iterator, _CharT)): Call replace(iterator, iterator,
+ size_type, _CharT) instead.
+ (erase(size_type, size_type)): Update calls.
+ (replace(size_type, size_type, size_type, _CharT)): Ditto.
+ (substr(size_type, size_type)): Use _M_check.
+ * include/bits/basic_string.tcc (basic_string(const basic_string&,
+ size_type, size_type)): Update calls.
+ (basic_string(const basic_string&, size_type, size_type,
+ const _Alloc&)): Ditto.
+ (assign(const basic_string&, size_type, size_type)): Use the
+ new _M_check and _M_limit.
+ (insert(size_type, const basic_string&, size_type, size_type):
Ditto.
- * testsuite/27_io/ios_manip_basefield.cc (test01):
- Extend coverage, uniform treatment of hexs and octs.
-
-2002-02-28 Richard Henderson <rth@redhat.com>
-
- * config/linker-map.gnu: Export operator new with unsigned long,
- and with std::nothrow_t. Likewise operator delete.
-
-2002-02-28 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/locale_facets.tcc (num_get::_M_extract_int):
- Admit grouping for octals and hexadecimals too.
- * testsuite/22_locale/num_get_members_char.cc: Add test04.
- (test01): Tweak "." -> "," in void* test.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.
-
- * testsuite/27_io/ios_manip_basefield.cc: Remove static keyword.
- * testsuite/27_io/ios_manip_fmtflags.cc: Remove two of them.
-
-2002-02-27 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/ios_manip_basefield.cc (test01):
- Fix for 64 bit machines.
-
-2002-02-26 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/3983
- * include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero.
- Adjust comment.
- * include/bits/basic_ios.h (basic_ios::_M_fill): Make mutable.
- (basic_ios::_M_fill_init): New.
- (basic_ios::fill()): Delay dealing with _M_fill.
- Adjust comment.
- * ios.cc (ios_base::ios_base()): Initialize _M_callbacks, _M_words.
- (ios_base::_M_call_callbacks): Adjust.
- * testsuite/27_io/ios_init.cc (test02): Adjust testcase.
-
-2002-02-26 Loren Rittle <ljrittle@acm.org>
-
- * include/Makefile.am (thread_target_headers): Unconditionally
- stage and install gthr-posix.h.
- (${target_builddir}/gthr-posix.h): New rule cloned off
- ${target_builddir}/gthr-default.h.
- (${target_builddir}/gthr-default.h): Support chained inclusion
- of gthr support headers.
- * include/Makefile.in: Rebuilt.
-
-2002-02-26 Paolo Carlini <pcarlini@unitus.it>
+ (insert(size_type, const _CharT*, size_type)): Ditto.
+ (replace(size_type, size_type, const _CharT*, size_type): Ditto.
+ (replace(size_type, size_type, const basic_string&,
+ size_type, size_type)): Ditto.
+ (append(const basic_string&)): Ditto.
+ (append(const basic_string&, size_type, size_type)): Ditto.
+ (copy(_CharT*, size_type, size_type)): Ditto.
+ (compare(size_type, size_type, const basic_string&)): Ditto.
+ (compare(size_type, size_type, const basic_string&,size_type,
+ size_type)): Ditto.
+ (compare(size_type, size_type, const _CharT*)): Ditto.
+ (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
- * include/bits/locale_facets.tcc (num_put::_M_widen_int):
- Group all the integral types, not only decs.
- * testsuite/27_io/ios_manip_basefield.cc (test01): Tweak existing
- tests, add a few more.
+2004-01-19 Stefan Olsson <stefan@snon.net>
-2002-02-25 Benjamin Kosnik <bkoz@redhat.com>
+ * include/ext/mt_allocator.h: If a thread, when it dies, still has
+ memory on it's freelist this memory is not returned to global
+ list. Simplification of deallocate so that memory is always
+ returned to the calling thread id's freelist instead of to
+ global. Fix typos. Add volatile where appropriate.
- * src/ios.cc (ios_base::~ios_base): Tweak.
- (ios_base::_M_call_callbacks): Deal with null __p.
- (ios_base::ios_base): Set _M_callbacks.
- * include/bits/basic_ios.tcc (basic_ios::init): Adjust comment.
- * testsuite/27_io/ios_init.cc (test02): Fix.
+2004-01-19 Loren J. Rittle <ljrittle@acm.org>
- * mkcheck.in (static_fail): Failed links go to output file.
+ * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
+ * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
+ use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
-2002-02-25 Phil Edwards <pme@gcc.gnu.org>
+2004-01-19 Paolo Carlini <pcarlini@suse.de>
- * docs/html/faq/index.html: Update.
- * docs/html/faq/index.txt: Regenerate.
+ * src/debug.cc: Make sure all the names are prefixed with
+ double (or single) underscore.
-2002-02-22 Phil Edwards <pme@gcc.gnu.org>
+2004-01-19 Paolo Carlini <pcarlini@suse.de>
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Fix comment.
- * aclocal.m4: Regenerate.
- * docs/html/configopts.html: Document --enable-symvers.
- * config/linker-map.gnu: Break libsupc++ symbols out to their own tag.
+ * src/debug.cc: Trivial formatting change.
-2002-02-22 Philipp Thomas <pthomas@suse.de>
+2004-01-19 Paolo Carlini <pcarlini@suse.de>
- * include/backward/tempbuf.h: get_temporary_buffer and
- return_temporary_buffer are in namespace std, not in __gnu_cxx.
+ * include/bits/basic_string.tcc (_S_construct(size_type,
+ _CharT, const _Alloc&)): Remove redundant try/catch.
+ (_M_mutate(size_type, size_type, size_type)): Ditto.
+ (_M_clone(const _Alloc&, size_type)): Ditto.
-2002-02-21 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-18 Paolo Carlini <pcarlini@suse.de>
- * configure.in (target_alias): Default to yes.
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Add check for shared
- libgcc to default case.
-
-2002-02-20 Phil Edwards <pme@gcc.gnu.org>
-
- * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Also check version.
- (GLIBCPP_ENABLE_SYMVERS): Redo logic, use linker version.
- * configure.in (GLIBCPP_ENABLE_SYMVERS): Move later in the script.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * config/linker-map.dummy: New file. Contains nothing useful.
-
-2002-02-20 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/money_put_members_char.cc: Fix.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Fix.
-
- * testsuite/27_io/standard_manipulators.cc: New file.
-
- * testsuite/27_io/ios_manip_basefield.cc: Check results, now failing.
- * testsuite/27_io/ios_manip_fmtflags.cc: Use locale::classic().
-
-2002-02-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * config/os/mingw32/bits/ctype_noninline.h
- (ctype<char>::ctype): Remove default args from parm list.
- * config/os/djgpp/bits/ctype_noninline.h: Same.
-
-2002-02-19 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/std/std_iomanip.h: Inline, tweaks.
- * config/linker-map.gnu: Remove hacks.
-
- * testsuite/21_strings/capacity.cc: Add explicit instantiations.
- * testsuite/27_io/ios_init.cc: Same.
- * testsuite/22_locale/money_get_members_char.cc (test07): Fix.
- * testsuite/22_locale/money_get_members_wchar_t.cc (test07): Same.
-
-2002-02-19 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu: Export global vtable, typeinfo, guard
- variable, and thunk info as per CXXABI docs.
-
-2002-02-19 Loren Rittle <ljrittle@acm.org>
-
- * include/Makefile.am: Use CONFIG_HEADER instead of ad hoc names.
- * include/Makefile.in: Rebuilt.
-
-2002-02-18 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * testsuite/22_locale/collate_byname.cc (test01): Replace size4
- with size3 for the string collations of str5.
-
-2002-02-18 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/basic_string.h (c_str()): Simplify, due to
+ 21.3.4 the internal representation is always kept null-terminated.
+ * include/bits/basic_string.tcc (_M_clone): Null-terminate.
+ * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
+ * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
+ Ditto.
- libstdc++/5708
- * include/bits/locale_facets.tcc (money_put::do_put):
- For the space field use __fill instead of ' ', uniformly.
- * testsuite/22_locale/money_put_members_char.cc:
- Add test05 distilled from PR.
- (test01-02-03): Trim some '*' to ' '.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.
+2004-01-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (append(size_type, _CharT)):
+ Moved inline, just call _M_replace_aux, no source iterators at
+ risk of being clobbered.
+ (assign(size_type, _CharT)): Call directly _M_replace_aux.
+ (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
+ input_iterator_tag)): Remove fifth unused argument.
+ (_M_replace_dispatch(iterator, iterator, _InputIterator,
+ _InputIterator, __false_type)): Update call.
+ * include/bits/basic_string.tcc (replace(size_type, size_type,
+ const _CharT*, size_type)): Update call.
+ (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
+ throw string literal.
+ (_M_replace_safe(iterator, iterator, _ForwardIterator,
+ _ForwardIterator)): Likewise.
+ (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
+ input_iterator_tag)): Remove fifth unused argument.
+ (append(size_type __n, _CharT __c)): Move inline.
+ * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
+ const C*, const C*, input_iterator_tag)): Remove fifth unused
+ argument.
+
+2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
+ * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
+
+2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
+ mkfifo for mingw32.
+
+2004-01-15 Stefan Olsson <stefan@snon.net>
+
+ * include/ext/mt_allocator.h: Reuse thread id's as soon as
+ possible by changing the behaviour of thread_freelist to do
+ push_front when threads die instead of push_back.
+
+2004-01-14 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (struct __numpunct_cache):
+ Add member _M_grouping_size, caching the length of _M_grouping.
+ (__numpunct_cache<>::_M_cache): Assign the latter.
+ (__verify_grouping): Move declaration...
+ * include/bits/locale_facets.tcc (__verify_grouping):
+ ... here, change signature to take a const char* and a size_t
+ for the grouping; not a template anymore.
+ (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
+ Likewise change signature and tweak consistently.
+ (num_get::_M_extract_float, num_get::_M_extract_int,
+ num_put::_M_insert_int, num_put::_M_insert_float,
+ money_get::do_get(string_type&), money_get::do_put(string_type)):
+ Update callers.
+ * config/locale/generic/numeric_members.cc
+ (numpunct<>::_M_initialize_numpunct): Assign the new member.
+ * config/locale/gnu/numeric_members.cc
+ (numpunct<>::_M_initialize_numpunct): Likewise.
+ * src/locale-inst.cc (__add_grouping): Tweak signature.
+ (__verify_grouping): Don't instantiate, not a template anymore.
+
+ * include/bits/locale_facets.h: Rename _M_truename_len ->
+ _M_truename_size, _M_falsename_len -> _M_falsename_size.
+ * include/bits/locale_facets.tcc: Likewise.
+ * config/locale/generic/numeric_members.cc: Likewise.
+ * config/locale/gnu/numeric_members.cc: Likewise.
+
+2004-01-14 Stefan Olsson <stefan@snon.net>
+
+ * include/ext/mt_allocator.h: Fixups.
+ * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
+ * testsuite/performance/allocator_thread.cc: Same.
+
+2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/performance/ifstream_extract_float.cc: Add higher
+ precision tests.
+ * testsuite/performance/ofstream_insert_float.cc: Same.
+
+2004-01-13 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale-misc-inst.cc (__convert_from_v(long),
+ __convert_from_v(unsigned long), __convert_from_v(long long),
+ __convert_from_v(unsigned long long)): Remove, unused.
+
+2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/performance/ifstream_extract_float.cc: New.
+ * testsuite/performance/ofstream_insert_float.cc: Float generation
+ matches above.
+
+ * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
+ * 20_util/auto_ptr/1.cc: ...this.
+ * 20_util/auto_ptr/2.cc: Same.
+ * 20_util/auto_ptr/3.cc: Same.
+ * 20_util/auto_ptr/3946.cc: Same.
+ * 20_util/auto_ptr/4.cc: Same.
+ * 20_util/auto_ptr/5.cc: Same.
+ * 20_util/auto_ptr/6.cc: Same.
+ * 20_util/auto_ptr/7.cc: Same.
+ * 20_util/auto_ptr/assign_neg.cc
+ * 20_util/pairs.cc: Break into...
+ * 20_util/pair/1.cc: ...this.
+ * 20_util/pair/2.cc: Same.
+ * 20_util/pair/3.cc: Same.
+ * 20_util/pair/4.cc: Same.
+
+2004-01-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
+ Set correctly just basefield, the only group that matters.
+
+2004-01-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
+ (_Rope_rep_base): Inherit directly from the rope allocator;
+ use rebinding instead of _Alloc_traits; pick up data member
+ from _Rope_rep_alloc_base.
+ (_Rope_alloc_base): Eliminate.
+ (_Rope_base): Inherit directly from the rope allocator; use
+ rebinding instead of _Alloc_traits; pick up data member from
+ _Rope_alloc_base.
+ (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
+ rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
+
+2004-01-13 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13650
+ * include/bits/basic_string.tcc (compare(size_type, size_type,
+ const _CharT*, size_type)): Implement correctly the resolution
+ of DR 5: basically, s is a char array, -not- a C string.
+ * include/bits/basic_string.h: Tweak some comments.
+ * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
+ * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
+
+2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
+ Solaris.
+
+2004-01-12 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
+ Use try_mkfifo.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
+ Likewise.
-2002-02-18 Loren Rittle <ljrittle@acm.org>
+2004-01-12 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (struct __numpunct_cache):
+ Add members _M_truename_len and _M_falsename_len, caching
+ the lengths of _M_truename and _M_falsename.
+ (__numpunct_cache<>::_M_cache): Assign the latter.
+ * include/bits/locale_facets.tcc (num_get::do_get(bool&),
+ num_put::do_put(bool)): Use the new members, thus avoiding
+ computing string lengths again and again.
+ * config/locale/generic/numeric_members.cc
+ (numpunct<>::_M_initialize_numpunct): Assign the new members.
+ * config/locale/gnu/numeric_members.cc
+ (numpunct<>::_M_initialize_numpunct): Likewise.
+
+2004-01-12 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
+ * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
+ it.
+ * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
+ and remove Cygwin XFAIL.
+ * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
+ Likewise.
+ * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
+ * testsuite/27_io/objects/char/7.cc: Likewise.
+ * testsuite/27_io/objects/char/9661-1.cc: Likewise.
+ * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
+ * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
+
+2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * include/std/std_complex.h (std::complex<>::real): Return a
+ reference. Add non-const overload.
+ (std::complex<>::real): Likewise.
+ (std::real): Likewise.
+ (std::imag): Likewise.
+ (std::operator+): Tidy.
+ (std::operator-): Likewise.
+ (std::operator*): Likewise.
+ (std::operator/): Likewise.
+ (std::operator>>): Likewise.
+
+2004-01-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13582
+ * include/bits/fstream.tcc (imbue): Exploit the external
+ buffer to imbue 'on the fly' a new locale and convert its
+ remainder with the new codecvt facet.
+ (underflow): Tweak slightly to deal with this special case.
+ * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
+ * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
+ * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
+
+2004-01-10 Paolo Carlini <pcarlini@suse.de>
- libstdc++/5697
- * include/Makefile.am (thread_builddir): Remove (map all
- existing uses to target_builddir).
- (thread_headers): Rename to...
- (thread_target_headers): ...this.
- (stamp-thread): Remove.
- (stamp-target): Correctly state the position as built.
- Update all dependencies to match the new reality. Remove all
- dependency calculations on directories.
- * include/Makefile.in: Rebuilt.
+ * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
+ Import Revision 28.
-2002-02-16 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-10 Paolo Carlini <pcarlini@suse.de>
- * include/bits/locale_facets.tcc: Add pragma GCC system_header.
- * include/bits/fstream.tcc: Same.
- * include/bits/sstream.tcc: Same.
- * include/bits/ostream.tcc: Same.
- * include/bits/istream.tcc: Same.
- * include/bits/streambuf.tcc: Same.
- * include/bits/basic_ios.tcc: Same.
- * include/bits/basic_string.tcc: Same.
+ PR libstdc++/13630
+ * include/bits/locale_classes.h (class locale): Fix category
+ typedef.
+ * testsuite/22_locale/locale/13630.cc: Add.
-2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
- * include/std/std_iosfwd.h: Don't guard typedefs with
- _GLIBCPP_USE_WCHAR_T
- * include/bits/stringfwd.h: Same.
+ * include/bits/locale_facets.h: Make a name really dependent. This
+ will be needed when Core Issue 224 is implemented.
-2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/locale.cc (moneypunct_byname): Remove definitions.
- * include/std/std_streambuf.h (streambuf::operator=): Return.
-
-2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
-
- Tune for size.
- * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant
- explicit instantiation.
- (string::_Rep::_S_max_size): Same.
- * include/bits/basic_string.tcc: Add extern explicit
- instantiations for string, wstring.
- * include/bits/basic_ios.tcc: Add extern explicit instantiations
- for ios, wios.
- * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf.
- * include/bits/istream.tcc: Same, for istream, wistream.
- * include/bits/ostream.tcc: Same for ostream, wostream, iostream,
- wiostream.
- * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf,
- istringstream, wistringstream, ostringstream, wostringstream,
- stringstream, wstringstream.
- * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream,
- wifstream, ofstream, wofstream, fstream, wfstream.
- * src/misc-inst.cc: Correct comments.
- Add iomanip instantiations for wide streams.
- * include/std/std_iomanip.h: Same.
- * include/bits/locale_facets.tcc: Same.
-
- * include/std/std_streambuf.h: Correct
- _GLIBCPP_FULLY_COMPLIANT_HEADERS guard.
- * include/std/std_sstream.h: Same.
- * include/std/std_ostream.h: Same.
- * include/std/std_istream.h: Same.
- * include/std/std_fstream.h: Same.
-
- * include/std/std_streambuf.h: Add definitions for private copy
- ctor and assignment operator.
- * include/std/std_istream.h: Remove declared but undefined copy
- ctor and assignment operator. This is taken care of in ios_base,
- so adding it in the derived class as well is superfluous.
- * include/std/std_ostream.h: Same.
-
- * include/bits/basic_ios.h (basic_ios::clear): Don't inline.
- * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here.
-
-2002-02-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1.
- Add typeinfo bits. Smooth.
- * aclocal.m4: Regenerate.
- * configure: Same.
- * src/Makefile.in: Same.
+2004-01-09 Paolo Carlini <pcarlini@suse.de>
-2001-02-14 Joel Sherrill <joel@OARcorp.com>
+ * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
+ * testsuite/performance/allocator_thread.cc: Likewise.
- * config/cpu/m68k/bits/atomicity.h: Corrected for RTEMS targets
- which do not have a CAS instruction.
+2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
-2002-02-14 Phil Edwards <pme@gcc.gnu.org>
-
- * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision.
- * configure.in: Call it.
- * config/linker-map.gnu: New file, initial incomplete revision.
- * src/Makefile.am: Optionally pass version script to the linker.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
- * src/Makefile.in: Regenerate.
-
-2002-02-13 Benjamin Kosnik <bkoz@redhat.com>
-
- * src/localename.cc: Remove stdexcept include.
- * src/locale-inst.cc: Same.
- * src/locale.cc: Same.
- * src/functexcept.cc: Remove string includes.
- * include/std/std_bitset.h: Remove stdexcept include.
- * testsuite/23_containers/bitset_members.cc: Add stdexcept.
- * testsuite/23_containers/bitset_ctor.cc: Same.
-
-2002-02-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/stl_algo (__stl_threshold): Declare external.
- (__stl_chunk_size): Same.
- * include/bits/stl_bvector.h (__WORD_BIT): Same.
- * include/bits/stl_tree.h (_S_rb_tree_red): Same.
- (_S_rb_tree_black): Same.
- * src/stl-inst.cc (__stl_threshold): Define.
- (__stl_chunk_size): Same.
- (__WORD_BIT): Same.
- (_S_rb_tree_red): Same.
- (_S_rb_tree_black): Same.
-
- * config/io/basic_file_libio.h (__basic_file): Add declarations.
- * include/bits/basic_file.h: Remove.
- * config/io/c_io_stdio.h: Remove _GLIBCPP_BASIC_FILE_ENCAPSULATION
- Declare generic types, specialization.
- * config/io/basic_file_stdio.cc: Definitions.
- * config/io/c_io_libio.h: Remove _GLIBCPP_BASIC_FILE_INHERITANCE.
- Declare generic types.
- * include/Makefile.am (bits_headers): Remove basic_file.h.
- (extra_target_headers): Change basic_file_model.h to basic_file.h.
- (stamp-target): Same.
-
- * include/bits/stl_alloc.h: Tweaks.
- * include/bits/localefwd.h: Same.
-
-2002-02-11 Aaron W LaFramboise <AWLaFramboise@aol.com>
-
- * include/bits/locale_facets.tcc (collate::do_hash): Fix.
- * testsuite/22_locale/collate_members_char.cc (test03): New test.
- * testsuite/22_locale/collate_members_wchar_t.cc (test03): Same.
-
-2002-02-10 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_algo.h (transform (both signatures), generate_n):
- Use __typeof__ in concept checks.
-
-2002-02-10 Jonathan Wakely <cow@compsoc.man.ac.uk>
-
- * include/bits/stl_algo.h (__median, for_each, find, find_if,
- adjacent_find, count, count_if, search, search_n, swap_ranges,
- transform, replace, replace_if, replace_copy, replace_copy_if,
- generate, generate_n, remove_copy, remove_copy_if, remove, remove_if,
- unique, unique_copy, reverse, reverse_copy): Doxygenate.
-
-2002-02-08 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h
- (numpunct<_CharT>::_M_initialize_numpunct): Remove definition.
- (__timepunct<_CharT>::_M_initialize_timepunct): Same.
- (__timepunct<_CharT>::_M_put_helper): Same.
- (moneypunct<_CharT, _Intl>::_M_initialize_moneypunct): Same.
-
- * include/bits/fstream.tcc (filebuf::underflow): Remove
- __codecvt_type typedef.
- (filebuf::_M_convert_to_external): Same.
-
-2002-02-08 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/TODO: Update.
- * docs/doxygen/doxygroups.cc: Tweak __gnu_cxx description.
- * docs/doxygen/mainpage.html: Add TODO list link.
- * docs/doxygen/user.cfg.in: Add @doctodo hook.
- * docs/doxygen/tables.html: New file, emoty structure only.
-
- * include/bits/stl_iterator.h: Doxygenate just about everything.
- * include/bits/stl_iterator_base_funcs.h: Ditto, clean up spaces.
- * include/bits/stl_iterator_base_types.h: Add notes.
-
-2002-02-07 Stephan Buys <sbproxy@icon.co.za>
-
- * include/bits/stl_map.h: Tweak doxygen markup.
- * include/bits/stl_multimap.h: Doxygenate and remove extra spaces.
- * include/bits/stl_vector.h: Likewise.
-
-2002-02-07 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/5286
- libstdc++/3860
- * include/std/std_fstream.h (filebuf::__file_type): Change to
- __basic_file<char>.
- (filebuf::_M_convert_to_external): Declare.
- * include/bits/fstream.tcc (filebuf::_M_convert_to_external): Define
- codecvt bits for wide streams.
- (filebuf::_M_really_overflow): Use it.
- (filebuf::underflow): Use codecvt.
- * config/locale/codecvt_specializations_ieee_1003.1-200x.h:
- (codecvt<__enc_traits>::do_out): Deal with partial.
- (codecvt<__enc_traits>::do_encoding): Return something useful.
- * src/codecvt.cc (codecvt<wchar_t>::do_encoding): Return sizeof
- wchar_t.
- * testsuite/22_locale/codecvt_members_unicode_char.cc (test01):
- Change expected encoding output.
- (test02): Same.
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test01): Same.
- (test02): Same.
-
-2002-02-07 Benjamin Kosnik <bkoz@redhat.com>
- Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>
-
- * include/bits/basic_ios.tcc (basic_ios::narrow): Add default value.
- (basic_ios::widen): Same.
-
-2002-02-07 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/money_get_members_char.cc:
- Add comment, tidy up.
- (test01): more "en_HK" tests (without showbase).
- * testsuite/22_locale/money_get_members_wchar_t.cc: Ditto.
-
-2002-02-06 Loren Rittle <ljrittle@acm.org>
-
- * config/locale/c_locale_generic.cc: Do not trust
- _GLIBCPP_HAVE_STRTOF or _GLIBCPP_HAVE_STRTOLD as
- set by configure.
-
-2002-02-06 Loren Rittle <ljrittle@acm.org>
-
- * acinclude.m4: Add C++ linkage check for strtof.
- * aclocal.m4: Rebuilt.
- * config.h.in: Rebuilt.
- * configure: Rebuilt.
- * config/locale/c_locale_generic.cc: Conditionally include
- <ieeefp.h>. Improve handling and error checking of float
- and long double input for non-C99 configurations.
-
-2002-02-06 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/locale_facets.tcc (money_get::do_get(string)):
- In case money_base::symbol deal properly with multi-char sign
- for patterns {X,Y,Z,symbol} and {X,Y,symbol,none}.
- * testsuite/22_locale/money_get_members_char.cc: Add test07.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Add test07.
-
-2002-02-05 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/locale_facets.tcc (money_get::do_get(string)):
- First construct a tentative returned string, then, only if the
- parsing succeeds, copy it into the string passed by reference.
- * testsuite/22_locale/money_get_members_char.cc: Add test06.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Add test06.
-
-2002-02-04 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/doxygen/TODO: Impl-defined behavior now documented...
- * docs/html/17_intro/howto.html: ...here.
- * docs/doxygen/mainpage.doxy: Remove, rename...
- * docs/doxygen/mainpage.html: ...to this. Tweak HTML, add license.
- * docs/doxygen/style.css: Add small text.
- * docs/doxygen/run_doxygen: Adjust for new mainpage.
- * docs/doxygen/user.cfg.in: Likewise.
-
-2002-02-04 Stephan Buys <sbproxy@icon.co.za>
-
- * include/bits/stl_map.h: Initial doxygen markup.
- * include/std/std_fstream.h: Initial doxygen markup.
-
-2002-02-04 Paolo Carlini <pcarlini@unitus.it>
-
- libstdc++/5579
- * include/bits/locale_facets.tcc (money_get::do_get(string)):
- Deal correctly with !(__io.flags() & ios_base::showbase)
- for case money_base::symbol.
- * testsuite/22_locale/money_get_members_char.cc: Add test05.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Add test05.
-
-2002-02-02 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/22_locale/operators.cc
- (gnu_collate::do_compare()): Add return statement to
- suppress "no return statement" warning.
-
-2002-02-01 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/ostream_manip.cc: Enable test02.
-
-2002-02-01 Phil Edwards <pme@gcc.gnu.org>
-
- * docs/html/documentation.html: Update for 3.0.96.
- * docs/html/faq/index.html: Update for 3.0.96.
- * docs/html/faq/index.txt: Regenerated.
- * docs/doxygen/TODO: Update notes.
- * docs/html/17_intro/howto.html: Initial impl-specific listing.
-
-2002-01-31 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/locale/codecvt_specializations_ieee_1003.1-200x.h:
- Initialize all data members in copy ctor. Make ctors explicit.
- (__enc_traits::__enc_traits()): Default ctor does nothing.
- (__enc_traits::_M_init): Guard against multiple iconv_opens.
- * include/std/std_sstream.h (basic_stringbuf): Make data members
- protected.
- * include/std/std_fstream.h (basic_filebuf): Same.
- * include/std/std_streambuf.h: Tweak.
- * include/bits/streambuf.tcc: Same.
- * include/bits/sstream.tcc: Same.
- * include/bits/fstream.tcc: Same.
-
-2002-01-31 Loren Rittle <ljrittle@acm.org>
-
- * testsuite/22_locale/codecvt_members_char_char.cc: Do not
- allow NULL argument to be passed to setenv().
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
- * testsuite/22_locale/collate_members_char.cc: Likewise.
- * testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/ctype_members_char.cc: Likewise.
- * testsuite/22_locale/ctype_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/messages_members_char.cc: Likewise.
- * testsuite/22_locale/money_get_members_char.cc: Likewise.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/money_put_members_char.cc: Likewise.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/moneypunct_members_char.cc: Likewise.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/num_get_members_char.cc: Likewise.
- * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/num_put_members_char.cc: Likewise.
- * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/numpunct_members_char.cc: Likewise.
- * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/time_get_members_char.cc: Likewise.
- * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
- * testsuite/22_locale/time_put_members_char.cc: Likewise.
- * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.
-
-2002-01-30 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/locale/c_locale_gnu.cc: Same errno fixes as generic.
-
- * ChangeLog-2001: Fix spelling errors...
- * docs/html/17_intro/RELEASE-NOTES: Update.
- * docs/html/17_intro/TODO: Update.
- * README (file): Update.
-
-2002-01-30 Loren Rittle <ljrittle@acm.org>
-
- * config/locale/c_locale_generic.cc: Check errno for ERANGE
- instead of non-zero to aid portability.
-
-2002-01-30 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * docs/html/22_locale/messages.html: Fix example code.
-
-2002-01-30 Richard Henderson <rth@redhat.com>
-
- * testsuite/27_io/ostream_inserter_arith.cc (test03_check): Break
- out from test03 and templatize.
- (test03): Use it.
-
-2002-01-30 Paolo Carlini <pcarlini@unitus.it>
-
- * config/locale/numpunct_members_gnu.cc
- (numpunct<char, wchar_t>::_M_initialize_numpunct()):
- Fix initialization of _M_grouping for locales which have
- _M_thousands_sep == '\0'(L'\0', respectively).
- * testsuite/22_locale/numpunct_byname.cc (test02): Add test.
-
-2002-01-30 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/ostream_inserter_arith.cc (test03):
- Better fix for 32/64 bit architectures, avoiding the
- implicit assumption that CHAR_BIT == 8.
-
-2002-01-28 Phil Edwards <pme@gcc.gnu.org>
-
- * Makefile.am (doxygen, doxygen-maint, doxygen-man): Tweak targets.
- * Makefile.in: Regenerate.
-
- * docs/doxygen/run_doxygen: Update, mostly for man pages.
- * docs/doxygen/Intro.3: Update.
- * docs/doxygen/TODO: Update.
- * docs/doxygen/doxygroups.cc: Add namespace hook for __gnu_cxx.
- * docs/doxygen/mainpage.doxy: Update.
- * docs/doxygen/user.cfg.in: Update for header rename. Also
- regenerate comments and variables with 1.2.12.
- * docs/doxygen/maint.cfg.in: Remove file.
-
- * include/bits/stl_relops.h: Doxygenate.
- * include/bits/stl_tempbuf.h (std::_Temporary_buffer): Likewise.
-
- * include/c_std/std_cassert.h, include/c_std/std_cctype.h,
- include/c_std/std_cerrno.h, include/c_std/std_cfloat.h,
- include/c_std/std_ciso646.h, include/c_std/std_climits.h,
- include/c_std/std_clocale.h, include/c_std/std_cmath.h,
- include/c_std/std_csetjmp.h, include/c_std/std_csignal.h,
- include/c_std/std_cstdarg.h, include/c_std/std_cstddef.h,
- include/c_std/std_cstdio.h, include/c_std/std_cstdlib.h,
- include/c_std/std_cstring.h, include/c_std/std_ctime.h,
- include/c_std/std_cwchar.h, include/c_std/std_cwctype.h,
- include/ext/algorithm, include/ext/functional, include/ext/hash_map,
- include/ext/hash_set, include/ext/iterator, include/ext/memory,
- include/ext/numeric, include/ext/rb_tree, include/ext/rope,
- include/ext/ropeimpl.h, include/ext/slist, include/ext/stl_hash_fun.h,
- include/ext/stl_hashtable.h, include/ext/stl_rope.h,
- include/std/std_algorithm.h, include/std/std_bitset.h,
- include/std/std_complex.h, include/std/std_deque.h,
- include/std/std_fstream.h, include/std/std_functional.h,
- include/std/std_iomanip.h, include/std/std_ios.h,
- include/std/std_iosfwd.h, include/std/std_iostream.h,
- include/std/std_istream.h, include/std/std_iterator.h,
- include/std/std_limits.h, include/std/std_list.h,
- include/std/std_locale.h, include/std/std_map.h,
- include/std/std_memory.h, include/std/std_numeric.h,
- include/std/std_ostream.h, include/std/std_queue.h,
- include/std/std_set.h, include/std/std_sstream.h,
- include/std/std_stack.h, include/std/std_stdexcept.h,
- include/std/std_streambuf.h, include/std/std_string.h,
- include/std/std_utility.h, include/std/std_valarray.h,
- include/std/std_vector.h: Add/correct @file doxygen hook.
-
- * include/ext/memory: Doxygenate most of rest of file.
- * libsupc++/exception: Doxygen output formatting.
- * libsupc++/new: Say which header it is.
-
- * testsuite/lib/libstdc++-v3-dg.exp: Fix spacing.
- * docs/html/19_diagnostics/howto.html: Describe concept-checks switch.
- * docs/html/23_containers/howto.html: Describe O(n) list::size().
- * docs/html/27_io/howto.html: Also link to Langer and Kreft text.
-
-2002-01-28 Paolo Carlini <pcarlini@unitus.it>
- Charles Leggett <CGLeggett@lbl.gov>
-
- * testsuite/27_io/filebuf_members.cc (test_05): Add test.
-
-2002-01-28 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/ostream_inserter_arith.cc (test03):
- Fix to deal correctly with both 32 bit and 64 bit architectures
-
-2002-01-25 Loren Rittle <ljrittle@acm.org>
-
- * testsuite/thread/pthread1.cc: Use one condition variable
- per predicate instead of tricky use of one condition variable.
-
-2002-01-25 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/fstream.tcc (filebuf::close()): Fix close for input
- streams.
- (filebuf::_M_really_overflow): Match indeterminate and sync calls.
- * testsuite/27_io/filebuf.cc: Compile only.
- * testsuite/27_io/filebuf_members.cc: Move tests to here.
- * testsuite/27_io/filebuf_virtuals.cc: And here.
- Revert sungetc, sync changes for expected values.
- * testsuite/27_io/filebuf-*: Move to...
- * testsuite/27_io/filebuf_virtuals-*: ...here.
- * testsuite/27_io/istream.cc: Compile only, activate.
- * testsuite/27_io/ostream.cc: Same.
- * testsuite/27_io/iostream.cc: New.
- * testsuite/27_io/iostream_members.cc: New.
-
-2002-01-25 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * testsuite/thread/pthread1.cc: Enable on cygwin.
- * testsuite/thread/pthread2.cc: Likewise.
- * testsuite/thread/pthread3.cc: Likewise.
- * testsuite/thread/pthread4.cc: Likewise.
- * testsuite/thread/pthread5.cc: Likewise.
- * testsuite/thread/pthread6.cc: Likewise.
-
-2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/27_io/ostream_inserter_char.cc (test07): New.
-
-2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/basic_ios.h (basic_ios::_M_check_facet): Make
- const, tweak.
- (basic_ios::fill(char_type)): Use fill().
- * include/bits/basic_ios.tcc (basic_ios::widen): Use _M_check_facet.
- (basic_ios::narrow): Same.
- (basic_ios::_M_cache_facets): Explicitly set cached facets to zero
- if they are invalid.
- (basic_ios::init): Comment.
- * testsuite/27_io/ios_init.cc (test02): New.
-
-2002-01-24 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_tempbuf.h (_Temporary_buffer): Add doxygen hook.
- * include/bits/stl_algo.h: Include stl_tempbuf.h.
- * include/ext/memory: Do not include stl_tempbuf.h.
- (temporary_buffer): Add doxygen hook.
- (__get_temporary_buffer, get_temporary_buffer,
- return_temporary_buffer): Move back to std:: header...
- * include/std/std_memory.h: ...here. Do not include stl_tempbuf.h.
- * include/ext/rope: Do not include stl_tempbuf.h.
- * include/ext/stl_hashtable.h: Likewise.
- * include/std/std_algorithm.h: Likewise.
- * testsuite/20_util/temporary_buffer.cc: New file.
-
-2002-01-24 andrew@andypo.net
- (tweaks, test and commit by Loren J. Rittle <ljrittle@acm.org>)
-
- libstdc++/5432
- * include/bits/ios_base.h: Use _Atomic_word for reference counts.
- * include/bits/localefwd.h: Likewise.
- Also use for std::locale::id::_S_highwater.
- * src/ios.cc (ios_base::xalloc): Use _Atomic_word.
- * src/locale.cc: Support new usage of _Atomic_word.
- (std::locale::classic): Guard entire function against reentry.
- * src/localename.cc: Support new usage of _Atomic_word.
-
-2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/num_put_members_wchar_t.cc (test03): Use
- _GLIBCPP_HAVE_SETENV.
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): Same.
- * testsuite/22_locale/collate_members_char.cc (test02): Same.
- * testsuite/22_locale/ctype_members_char.cc (test03): Same.
- * testsuite/22_locale/ctype_members_wchar_t.cc (test03): Same.
- * testsuite/22_locale/messages_members_char.cc (test02): Same.
- * testsuite/22_locale/moneypunct_members_char.cc (test02): Same.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): Same.
- * testsuite/22_locale/money_put_members_char.cc (test04): Same.
- * testsuite/22_locale/money_put_members_wchar_t.cc (test04): Same.
- * testsuite/22_locale/num_get_members_char.cc (test03): Same.
- * testsuite/22_locale/num_get_members_wchar_t.cc (test03): Same.
- * testsuite/22_locale/numpunct_members_char.cc (test02): Same.
- * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): Same.
- * testsuite/22_locale/time_get_members_char.cc (test07): Same.
- * testsuite/22_locale/time_get_members_wchar_t.cc (test07): Same.
- * testsuite/22_locale/time_put_members_char.cc (test03): Same.
- * testsuite/22_locale/time_put_members_wchar_t.cc (test03): Same.
- * testsuite/22_locale/num_put_members_char.cc (test03): Same.
- * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Check for setenv.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
+ * crossconfig.m4: Add LFS, io bits to linux cross config.
+ * acconfig.h: Remove obsolete bits, reorder.
* config.h.in: Regenerate.
+ * aclocal.m4: Same.
+ * configure: Same.
-2002-01-23 Loren Rittle <ljrittle@acm.org>
-
- * testsuite/thread/pthread1.cc: New test.
- * testsuite/thread/pthread2.cc: New test adapted from libstdc++/5347.
- * testsuite/thread/pthread3.cc: Likewise.
- * testsuite/thread/pthread4.cc: New test adapted from
- http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
- * testsuite/thread/pthread5.cc: New test adapted from libstdc++/5464.
- * testsuite/thread/pthread6.cc: New test adapted from libstdc++/5444.
-
-2002-01-23 Richard Henderson <rth@redhat.com>
-
- PR libstdc++/5198
- * config/cpu/m68k/bits/atomicity.h (__exchange_and_add): Only use
- CAS on the cpu variants that support it. Add versions that use
- TAS and that disable interrupts.
- (__atomic_add): Use __exchange_and_add to guarantee atomicity.
-
-2002-01-23 Matt Kraai <kraai@alumni.cmu.edu>
-
- * include/bits/locale_facets.tcc: Remove old comments.
-
-2002-01-23 Andreas Tobler <toa@pop.agri.ch>
-
- * include/bits/locale_facets.tcc (__convert_to_v): Change template
- parameter to _Tv.
- (__convert_from_v): Same.
-
-2002-01-23 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h (num_get::_M_extract_int): Change
- prototype.
- * include/bits/locale_facets.tcc (num_get::_M_extract_int): Remove
- __max_digits checks, adjust arguments.
- (num_get::do_get(*)): Changeup.
-
-2002-01-23 Loren Rittle <ljrittle@acm.org>
-
- * config/locale/c_locale_generic.cc: Fix typename usage.
-
-2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/locale/c_locale_generic.cc: Fix.
-
-2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/html/22_locale/messages.html: Remove angle brackets.
- * docs/html/17_intro/TODO: Add.
-
-2002-01-22 Paolo Carlini <pcarlini@unitus.it>
-
- * testsuite/27_io/ios_manip_basefield.cc: Enable test02.
- * testsuite/27_io/ostream_inserter_arith.cc: Enable test03.
- * testsuite/27_io/ostream_inserter_char.cc: Enable test01.
- * testsuite/27_io/ostream_inserter_other.cc: Enable test04.
-
-2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- Audit for LANG independence.
- * include/bits/localefwd.h: Tweaks.
- * include/bits/locale_facets.tcc (money_get::do_get(long double)):
- Use __convert_to_v.
- (time_get::do_get_year): Same.
- (__convert_from_v): Add.
- (num_put::_M_convert_float): Use.
- (num_put::_M_convert_int): Same.
- (money_put::do_put): Same.
-
- * src/locale-inst.cc: Add instantiations for __convert_from_v.
- * config/locale/time_members_gnu.cc: Cleanup setlocale usage.
- * config/locale/time_members_generic.cc:
- * config/locale/messages_members_gnu.cc: Same.
- * config/locale/messages_members_gnu.h: Same.
-
- * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): New.
- * testsuite/22_locale/codecvt_members_char_char.cc (test02): New.
- * testsuite/22_locale/collate_members_wchar_t.cc (test02): New.
- * testsuite/22_locale/collate_members_char.cc (test02): New.
- * testsuite/22_locale/ctype_members_wchar_t.cc (test03): New.
- * testsuite/22_locale/ctype_members_char.cc (test03): New.
- * testsuite/22_locale/messages_members_char.cc (test02): New.
- * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): New.
- * testsuite/22_locale/moneypunct_members_char.cc (test02): New.
- * testsuite/22_locale/money_get_members_wchar_t.cc (test04): New.
- * testsuite/22_locale/money_get_members_char.cc (test04): New.
- * testsuite/22_locale/money_put_members_wchar_t.cc (test04): New.
- * testsuite/22_locale/money_put_members_char.cc (test04): New.
- * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): New.
- * testsuite/22_locale/numpunct_members_char.cc (test02): New.
- * testsuite/22_locale/time_put_members_wchar_t.cc (test03): New.
- * testsuite/22_locale/time_put_members_char.cc (test03): New.
- * testsuite/22_locale/time_get_members_wchar_t.cc (test07): New.
- * testsuite/22_locale/time_get_members_char.cc (test07): New.
- * testsuite/22_locale/num_get_members_wchar_t.cc (test03): New.
- * testsuite/22_locale/num_get_members_char.cc (test03): New.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test03): New.
- * testsuite/22_locale/num_put_members_char.cc (test03): New.
-
- * testsuite/22_locale/time_get_members_char.cc: Fixups for global
- locale issues.
- * testsuite/22_locale/time_get_members_char.cc: Same.
-
-2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/5280
- * include/bits/localefwd.h: Tweak comments.
- * include/bits/locale_facets.h (__convert_to_v): Add.
- * include/bits/locale_facets.tcc (num_get::do_get(double)): Use it.
- (num_get::do_get(float)): Same.
- (num_get::do_get(long double)): Same.
- (num_get::do_get(bool)): Same.
- (num_get::do_get(long)): Same.
- (num_get::do_get(long long)): Same.
- (num_get::do_get(unsigned int)): Same.
- (num_get::do_get(unsigned short)): Same.
- (num_get::do_get(unsigned long)): Same.
- (num_get::do_get(unsigned long long)): Same.
- * config/locale/c_locale_gnu.cc (__convert_to_v): Specialize.
- * config/locale/c_locale_generic.cc: Same.
-
-2002-01-22 Loren Rittle <ljrittle@acm.org>
-
- * include/Makefile.am (c_base_builddir): Remove redundant slash.
- (std_builddir): Likewise.
- (std_headers_rename): Fix cut-n-paste typo.
- (install-data-local): Concat path per element instead of once to
- first element of list.
- * include/Makefile.in: Rebuilt.
-
-2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * config/os/aix/bits/ctype_noninline.h: Fix formatting.
- * config/os/bsd/netbsd/bits/ctype_noninline.h: Fix typo.
- * config/os/bsd/freebsd/bits/ctype_noninline.h: Fix formatting.
-
-2002-01-20 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h (ctype<char>::classic_table):
- Remove definition.
- (ctype<char>::_S_ctable): Remove.
- * config/os/gnu-linux/bits/ctype_noninline.h
- (ctype<char>::_S_table): Remove definition.
- (ctype<char>::classic_table): Define.
- (ctype<char>::ctype): Replace _S_ctable with classic_table().
- * config/os/aix/bits/ctype_noninline.h: Same.
- * config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
- * config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
- * config/os/djgpp/bits/ctype_noninline.h: Same.
- * config/os/generic/bits/ctype_noninline.h: Same.
- * config/os/gnu-linux/bits/ctype_noninline.h: Same.
- * config/os/hpux/bits/ctype_noninline.h: Same.
- * config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
- * config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
- * config/os/mingw32/bits/ctype_noninline.h: Same.
- * config/os/newlib/bits/ctype_noninline.h: Same.
- * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
- * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
- * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
-
-2002-01-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * config/os/mingw32/bits/ctype_noninline.h: Declare _ctype instead
- of _pctype. Use to define _S_ctable. Add definition for alternate
- ctor. Initialise _M_ctable to _S_ctable in ctors.
- (do_toupper, do_tolower): Use inline code appropriate for C-locale
- rather than ::toupper, ::tolower.
-
-2002-01-18 Loren Rittle <ljrittle@acm.org>
-
- * testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
- Add specialization for FreeBSD systems only to avoid losing test
- only due to extra precision unmentioned in system headers.
-
-2002-01-18 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * config/os/irix/irix6.5/bits/ctype_noninline.h: Fix typo
-
-2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-
- * testsuite/testsuite_hooks.h: Fix comment typo. Memory
- limiting is only attempted if _GLIBCPP_MEM_LIMIT is defined.
-
-2002-01-17 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * testsuite/22_locale/ctor_copy_dtor.cc: Remove check.
-
-2002-01-17 David Edelsohn <edelsohn@gnu.org>
-
- * configure.target: Define OPT_LDFLAGS for AIX case.
-
-2002-01-17 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
-
- * include/std/std_limits.h (__glibcpp_float_has_quiet_NaN,
- __glibcpp_double_has_quiet_NaN): Correct mispelling.
-
-2002-01-17 Andreas Tobler <toa@pop.agri.ch>
-
- * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Fix.
-
-2002-01-16 David Edelsohn <dje@watson.ibm.com>
-
- * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Do not clear
- SECTION_LDFLAGS and OPT_LDFLAGS. Fix ac_sectionLDflags type.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
-
-2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am (c_base_headers_rename): New.
- (c_base_headers_extra): New.
- (stamp-c_base): Modify.
- (install-data-local): Use both.
- * include/Makefile.in: Regenerate.
- * include/c/[cctype ciso646 cmath cstdarg cstdlib cerrno climits
- csetjmp cstddef cstring cwchar cassert cfloat clocale csignal
- cstdio ctime cwctype]: Move to..
- * include/c/std_*: Here.
- * include/c_std/[cctype ciso646 cmath cstdarg cstdlib cerrno climits
- csetjmp cstddef cstring cwchar cassert cfloat clocale csignal
- cstdio ctime cwctype]: Move to..
- * include/c_std/std_*: Here.
-
- Alexandre Oliva <aoliva@redhat.com>
- * include/Makefile.am (.PRECIOUS): Add rule.
- * include/Makefile.in: Regenerate.
-
-2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
- Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
- * include/bits/stl_iterator.h (reverse_iterator::_M_current):
- Deuglify, should be current.
- (back_insert_iterator::_M_container): Deuglify, should be container.
- (front_insert_iterator::_M_container): Same.
- (insert_iterator::_M_container): Same.
- * testsuite/24_iterators/reverse_iterator.cc: Add check.
- * testsuite/24_iterators/back_insert_iterator.cc: Add check.
- * testsuite/24_iterators/front_insert_iterator.cc: Same.
- * testsuite/24_iterators/insert_iterator.cc: Same.
-
-2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.h (ctype<char>::classic_table): Make
- static.
- (ctype<char>::_M_ctable): Make static, change name to _S_ctable.
- * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable.
- * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
- * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
- * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
- * config/os/newlib/bits/ctype_noninline.h: Same.
- * config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
- * config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
- * config/os/hpux/bits/ctype_noninline.h: Same.
- * config/os/djgpp/bits/ctype_noninline.h: Same.
- * config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
- * config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
- * config/os/aix/bits/ctype_noninline.h: Same.
-
- Testcase by Dietmar Kühl via Peter Schmid
- * testsuite/22_locale/ctype_members_char.cc (char>): Add test for
- classic_table().
-
-2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * libmath/signbitl.c: Copyright years as list, not range.
- * libmath/Makefile.am: Same.
- * libmath/Makefie.in: Regenerate.
- * libmath/signbit.c: Same.
- * libmath/nan.c: Same.
- * libmath/copysignf.c: Same.
- * libmath/signbitf.c: Same.
- * testsuite/22_locale/money_get_members_char.cc: Same.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Same.
- * testsuite/22_locale/money_put_members_char.cc: Same.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Same.
- * testsuite/22_locale/time_get_members_char.cc: Same.
- * testsuite/22_locale/time_get_members_wchar_t.cc: Same.
- * testsuite/22_locale/time_put_members_char.cc: Same.
- * testsuite/22_locale/time_put_members_wchar_t.cc: Same.
- * testsuite/21_strings/nonmember.cc: Same.
- * testsuite/21_strings/compare.cc: Same.
- * testsuite/27_io/stringstream.cc: Same.
- * testsuite/27_io/stringbuf.cc: Same.
- * testsuite/27_io/filebuf.cc: Same.
- * testsuite/27_io/ios_manip_basefield.cc: Same.
- * testsuite/27_io/ios_manip_fmtflags.cc: Same.
- * include/bits/cpp_type_traits.h: Same.
- * include/bits/generic_shadow.h: Same.
- * include/bits/gslice_array.h: Same.
- * include/bits/gslice.h: Same.
- * include/bits/indirect_array.h: Same.
- * include/bits/slice_array.h: Same.
- * include/bits/sstream.tcc: Same.
- * include/bits/streambuf_iterator.h: Same.
- * include/bits/valarray_array.tcc: Same.
- * include/bits/valarray_meta.h: Same.
- * include/bits/valarray_array.h: Same.
- * config/os/mingw32/bits/ctype_noninline.h: Same.
- * config/os/mingw32/bits/ctype_base.h: Same.
- * config/os/hpux/bits/ctype_noninline.h: Same.
- * config/os/hpux/bits/ctype_base.h: Same.
- * config/os/gnu-linux/bits/ctype_noninline.h: Same.
- * config/os/gnu-linux/bits/ctype_base.h: Same.
- * config/os/generic/bits/ctype_noninline.h: Same.
- * config/os/generic/bits/ctype_base.h: Same.
-
- * libsupc++/tinfo.h: Tweaks.
-
-2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Same.
- * testsuite/22_locale/num_put_members_char.cc (test01): Tweak.
- * testsuite/22_locale/ctype_members_char.cc: Tweak.
-
-2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (num_put::do_put(bool): Fix.
- (num_put::do_put(void*)): Fix.
- * testsuite/22_locale/num_put_members_char.cc (test02): Add.
- * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Add.
- * testsuite/22_locale/num_get_members_char.cc (test02): Add
- long double, void, bool types.
- * testsuite/22_locale/num_get_members_wchar_t.cc (test02): Add.
-
-2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
- Alexandre Oliva <aoliva@redhat.com>
-
- * libmath/Makefile.am (LINK): Add --tag CC.
- * libmath/Makefile.in: Regenerate.
-
-2002-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * config/os/hpux/bits/ctype_noninline.h: Use __SB_masks for address
- of character to attribute mapping table.
-
-2002-01-15 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * testsuite/26_numerics/c99_classification_macros_c.cc
- Remove dg-error and dg-excess-errors comments.
-
-2002-01-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (time_put::put): Correct output
- iterator positions.
- * testsuite/22_locale/time_put_members_char.cc (test02): Add.
- * testsuite/22_locale/time_put_members_wchar_t.cc (test02): Add.
- * testsuite/22_locale/time_get_members_wchar_t.cc (test06): Add.
- * testsuite/22_locale/time_get_members_char.cc (test06): Add.
-
-2002-01-14 Craig Rodrigues <rodrigc@gcc.gnu.org>
-
- * docs/html/17_intro/porting-howto.xml: Update filebuf section.
-
-2002-01-14 Paolo Carlini <pcarlini@unitus.it>
- Nathan Myers <ncm@cantrip.org>
-
- * include/bits/basic_string.h
- (replace(__pos, __n1, __s, __n2)): Optimize by avoiding
- temporaries (i.e., call _M_replace_safe) when possible.
- (replace(__pos, __n, __str)): Call replace(__pos, __n1, __s, __n2).
- (replace(__pos, __n1, __s)): Call replace(__pos, __n1, __s , __n2).
- (replace(__i1, __i2, __str)): Call replace(__i1, __i2, __s, __n).
- (replace(__i1, __i2, __s)): Call replace(__i1, __i2, __s, __n).
- (replace(__i1, __i2, __s, __n)): Call replace(__pos1, __n1, __s, __n2).
- * include/bits/basic_string.tcc
- (replace(__pos1, __n1, __str, __pos2, __n2)): Call
- replace(__pos, __n1, __s, __n2).
- * testsuite/21_strings/replace.cc (test03): New testcases.
-
- * include/bits/basic_string.h (insert(__pos, __s, __n)):
- Adjust comparison wrt overflow.
-
-2002-01-12 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am (std_headers_rename): New variable.
- (install-data-local): Use it.
- * include/Makefile.in: Regenerate.
-
-2002-01-12 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (money_put::do_put(string):
- Correct output iterator value.
- * testsuite/22_locale/money_put_members_char.cc (test03): Add.
- * testsuite/22_locale/money_put_members_wchar_t.cc: Same.
-
-2002-01-11 Phil Edwards <pme@gcc.gnu.org>
-
- * include/Makefile.am, include/Makefile.in (stamp-std): Fix typo from
- previous commit.
-
-2002-01-11 Phil Edwards <pme@gcc.gnu.org>
-
- * include/Makefile.am (std_headers): Update list with new names.
- (stamp-std): Link to standardized name.
- * include/Makefile.in: Regenerate.
-
- * include/std/algorithm, include/std/bitset, include/std/complex,
- include/std/deque, include/std/fstream, include/std/functional,
- include/std/iomanip, include/std/ios, include/std/iosfwd,
- include/std/iostream, include/std/istream, include/std/iterator,
- include/std/limits, include/std/list, include/std/locale,
- include/std/map, include/std/memory, include/std/numeric,
- include/std/ostream, include/std/queue, include/std/set,
- include/std/sstream, include/std/stack, include/std/stdexcept,
- include/std/streambuf, include/std/string, include/std/utility,
- include/std/valarray, include/std/vector: Rename to...
-
- * include/std/std_algorithm.h, include/std/std_bitset.h,
- include/std/std_complex.h, include/std/std_deque.h,
- include/std/std_fstream.h, include/std/std_functional.h,
- include/std/std_iomanip.h, include/std/std_ios.h,
- include/std/std_iosfwd.h, include/std/std_iostream.h,
- include/std/std_istream.h, include/std/std_iterator.h,
- include/std/std_limits.h, include/std/std_list.h,
- include/std/std_locale.h, include/std/std_map.h,
- include/std/std_memory.h, include/std/std_numeric.h,
- include/std/std_ostream.h, include/std/std_queue.h,
- include/std/std_set.h, include/std/std_sstream.h,
- include/std/std_stack.h, include/std/std_stdexcept.h,
- include/std/std_streambuf.h, include/std/std_string.h,
- include/std/std_utility.h, include/std/std_valarray.h,
- include/std/std_vector.h: ...this.
-
-2002-01-11 Loren Rittle <ljrittle@acm.org>
-
- * include/Makefile.am (extra_target_headers): New list of all
- target files built with ad hoc naming rules.
- (stamp-*): Handle LN_S failure in manner portable across make
- implementations.
- (install-data-local): Install header files from human-maintained
- file lists and directory components instead of non-robust find.
- * include/Makefile.in: Rebuilt.
-
-2002-01-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/locale_facets.tcc (money_get::do_get(string)):
- Check for zero-length negative sign before adding it to output
- string.
- (money_get::do_get(long double)): Return beg.
- * testsuite/22_locale/money_get_members_char.cc (test02): Add
- iterator checks.
- * testsuite/22_locale/money_get_members_wchar_t.cc: Same.
-
-2002-01-10 David Seymour <seymour_dj@yahoo.com>
-
- libstdc++/5331
- * include/bits/locale_facets.h (num_get<>): Return advanced iterator
- for _M_extract_float and _M_extract_int
- * include/bits/locale_facets.tcc (num_get<>::_M_extract_float)
- (num_get<>::_M_extract_int): Likewise, all callers changed
- * testsuite/22_locale/num_get_members_char.cc: Testcase
-
-2002-01-09 Paolo Carlini <pcarlini@unitus.it>
-
- * libsupc++/exception (bad_exception): Add comment.
- * libsupc++/new (bad_alloc): Same.
- * libsupc++/typeinfo (bad_cast, bad_typeid): Same.
-
-2002-01-09 Paolo Carlini <pcarlini@unitus.it>
-
- libstdc++/3150: revert 2001-11-30 commit. DR266 only means
- that the destructors should be removed from the descriptions
- in the standard: writing them explicitly allows the vtable
- heuristic to work. For additional information see:
- http://gcc.gnu.org/ml/libstdc++/2002-01/msg00090.html
- http://gcc.gnu.org/ml/libstdc++/2002-01/msg00110.html
- http://gcc.gnu.org/ml/libstdc++/2002-01/msg00155.html
- * libsupc++/exception (bad_exception::~bad_exception()):
- Reintroduce declaration.
- * libsupc++/new (bad_alloc::~bad_alloc()): Same.
- * libsupc++/typeinfo (bad_cast::~bad_cast()): Same.
- (bad_typeid::~bad_typeid()): Same.
- * libsupc++/eh_exception.cc (bad_exception::~bad_exception()):
- Reintroduce definition.
- * libsupc++/new_handler.cc (bad_alloc::~bad_alloc()): Same.
- * libsupc++/tinfo.cc (bad_cast::~bad_cast()): Same.
- (bad_typeid::~bad_typeid()): Same.
-
-2002-01-09 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/Makefile.am (c_base_srcdir): Remove duplicate '/'.
- * include/Makefile.in: Regenerate.
-
-2002-01-09 Bo Thorsen <bo@suse.co.uk>
-
- * config/cpu/x86-64/bits/cpu_limits.h (__glibcpp_long_bits): Add
- definition.
-
-2002-01-08 Benjamin Kosnik <bkoz@redhat.com>
-
- libstdc++/2913
- libstdc++/4879
- * include/bits/fstream.tcc (filebuf::_M_really_overflow): Test
- return value of _M_file->sync().
- (filebuf::showmanyc): Check for is_open.
- * include/std/fstream (filebuf::sync): Tweak.
- * testsuite/27_io/filebuf.cc: Tweak.
-
-2002-01-08 John Fardo <jfardo@laurelnetworks.com>
- Brad Garcia <garsh@attbi.com>
-
- * testsuite/27_io/filebuf_members.cc: Add test.
-
-2002-01-07 Benjamin Kosnik <bkoz@redhat.com>
- Craig Rodrigues <rodrigc@mediaone.net>
-
- libstdc++/5174
- * po/Makefile.am (mkinstalldirs): Add.
- * po/Makefile.in: Regenerate.
-
-2002-01-07 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * testsuite_flags.in: Add -fmessage-length=0 to CXXFLAGS *
- testsuite/lib/prune.exp: Delete lines ":In function ..." from
- compiler output.
- * testsuite/23_containers/map_operators.cc: Remove
- dg-excess-errors comment.
- * testsuite/23_containers/set_operators.cc: Likewise.
-
-2002-01-06 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/stl_function.h: Remove two lines of comments;
- adjust copyright years.
-
-2002-01-04 Benjamin Kosnik <bkoz@redhat.com>
+2004-01-07 Gawain Bolton <gp.bolton@computer.org>
+
+ * include/bits/stl_list.h:
+ * include/bits/list.tc:
+ * src/list.cc:
+ Performance enhancements for destructor, push_front(),
+ push_back(), pop_front(), pop_back(), sort()
+ Eliminated static_casts where possible.
+ Moved code out of header files into new src/list.cc
+ implementation file for library where possible.
+ Remove inheritance from iterator class and create separate
+ classes for non-constant and constant iterators.
+ * include/bits/stl_tree.h (_Rb_tree class):
+ * src/tree.cc:
+ Only erase contents in destructor.
+ Eliminate unnecessary initialization in assignment operator.
+ Optimize for the nominal case by not checking whether
+ container is empty in clear().
+ Re-order test in _M_insert() to improve performance.
+ Move initialization of new node's left & right pointers to
+ src/tree.cc to where new node's colour is initialized
+ and to reduce the amount of inline code.
+ Use _M_leftmost() and _M_end() to improve readability where
+ appropriate.
+ Create separate classes for non-constant and constant
+ iterators to clarify code, avoid extra template parameters and
+ casting away constness.
+
+2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/Makefile.am (sources): Add list.cc, tree.cc.
+ * src/stl_tree.cc: Move to...
+ * src/tree.cc: ...here.
+ * src/list.cc: Add.
+ * config/linker-map.gnu: Tweaks.
+ * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
+ * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
+
+ * bits/stl_vector.h: Column wrap comments.
+
+2004-01-07 Loren J. Rittle <ljrittle@acm.org>
+
+ (re-open) PR libstdc++/12658
+ * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
+ (locale::global): Likewise.
+
+2004-01-07 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
+ Remove redundant #include.
+ * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
+ * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
+ re-enable normal testing.
+ * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
+ #include.
+ * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
+ More properly, #include <locale>.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
+ Remove redundant #include.
+ * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
+ redundant DejaGnu directive.
+ * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
+ redundant #include.
+
+2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
+ Stefan Olsson <stefan@snon.net>
+
+ * scripts/check_performance: Use -pthread.
+ * testsuite/performance/allocator.cc: Tweaks, add list.
+ * testsuite/performance/allocator_thread.cc: New.
+
+2004-01-06 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.h: Document public classes and
+ functions.
+ * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
+ Add comment.
+
+2004-01-06 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
+ Remove redundant #includes.
+ * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
+ * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
+ * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
+ * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/readsome/char/8258.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
+ * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
+ * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
- * include/Makefile.am (std_headers): Remove cXXX from list.
- (c_base_srcdir): No bits subdirectory.
- (c_base_builddir): Same.
- (c_base_headers): Adjust names, add ciso646.
- (bits_headers): Remove std_xxx.h headers.
- * include/Makefile.in: Regenerate.
+2004-01-04 Paolo Carlini <pcarlini@suse.de>
- * include/ext/iterator: Adjust includes.
- * include/ext/ropeimpl.h: Same.
- * include/ext/stl_hash_fun.h: Same.
- * include/ext/algorithm: Same.
-
- * include/backward/bvector.h: Adjust includes.
- * include/backward/vector.h: Same.
- * include/backward/strstream: Same.
- * include/backward/streambuf.h: Same.
- * include/backward/stack.h: Same.
- * include/backward/set.h: Same.
- * include/backward/queue.h: Same.
- * include/backward/multiset.h: Same.
- * include/backward/multimap.h: Same.
- * include/backward/map.h: Same.
- * include/backward/list.h: Same.
- * include/backward/iterator.h: Same.
- * include/backward/iostream.h: Same.
- * include/backward/iomanip.h: Same.
- * include/backward/fstream.h: Same.
- * include/backward/deque.h: Same.
- * include/backward/complex.h: Same.
-
- * include/bits/std_algorithm.h: Move to...
- * include/std/algorithm: ...here.
- * include/bits/std_iosfwd.h, std_locale.h, std_stack.h,
- std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h,
- std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h,
- std_deque.h, std_istream.h, std_numeric.h, std_string.h,
- std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h,
- std_queue.h, std_valarray.h, std_functional.h, std_limits.h,
- std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h:
- Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
+ Remove redundant #includes.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
+ Likewise.
- * include/c_std/bits/std_cassert.h: Move to...
- * include/c_std/cassert: Here.
- * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h,
- std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
- std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
- std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
- std_cwctype.h: Same.
- * include/c_std/cmath: Adjust cmath.tcc include.
- * include/c_std/cstdlib: Adjust includes.
- * include/c_std/cwchar: Same.
- * include/c_std/ctime: Same.
- * include/c_std/cstring: Same.
- * include/c_std/cstdio: Same.
- * include/c_std/bits: Remove directory.
-
- * include/c/bits/std_cassert.h: Move to...
- * include/c/cassert: Here.
- * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h,
- std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
- std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
- std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
- std_cwctype.h: Same.
- * include/c/bits: Remove directory.
-
- * include/std/cwctype: Remove.
- * include/std/cwchar: Remove.
- * include/std/ctime: Remove.
- * include/std/cstring: Remove.
- * include/std/cstdlib: Remove.
- * include/std/cstdio: Remove.
- * include/std/cstddef: Remove.
- * include/std/cstdarg: Remove.
- * include/std/csignal: Remove.
- * include/std/csetjmp: Remove.
- * include/std/cmath: Remove.
- * include/std/clocale: Remove.
- * include/std/climits: Remove.
- * include/std/ciso646: Remove.
- * include/std/cfloat: Remove.
- * include/std/cerrno: Remove.
- * include/std/cctype: Remove.
- * include/std/cassert: Remove.
-
- * include/bits/fpos.h: Adjust includes, removing <bits/std_xxx.h>
- files and subsituting <xxx>.
- * include/bits/valarray_array.h: Same.
- * include/bits/stl_uninitialized.h: Same.
- * include/bits/stl_alloc.h: Same.
- * include/bits/stl_algobase.h: Same.
- * include/bits/sstream.tcc: Same.
- * include/bits/pthread_allocimpl.h: Same.
- * include/bits/ostream.tcc: Same.
- * include/bits/localefwd.h: Same.
- * include/bits/locale_facets.tcc: Same.
- * include/bits/locale_facets.h: Same.
- * include/bits/istream.tcc: Same.
- * include/bits/char_traits.h: Same.
- * include/bits/boost_concept_check.h: Same.
- * include/bits/basic_file.h: Same.
- * include/std/bitset: Same.
- * include/std/complex: Same.
- * include/std/fstream: Same.
- * include/std/functional: Same.
- * include/std/ios: Same.
- * include/std/iostream: Same.
- * include/std/ostream: Same.
- * include/std/sstream: Same.
- * include/std/streambuf: Same.
- * include/std/string: Same.
- * include/std/iterator: Same.
- * include/std/valarray: Same.
-
- * src/ios.cc: Adjust includes.
- * src/valarray-inst.cc: Same.
- * src/string-inst.cc: Same.
- * src/stl-inst.cc: Same.
- * src/stdexcept.cc: Same.
- * src/misc-inst.cc: Same.
- * src/localename.cc: Same.
- * src/locale-inst.cc: Same.
- * src/locale.cc: Same.
- * src/limits.cc: Same.
- * src/concept-inst.cc: Same.
- * src/complex_io.cc: Same.
- * src/codecvt.cc: Same.
- * src/bitset.cc: Same.
- * src/cmath.cc: Same.
-
-2002-01-04 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/stl_tree.h (rb_tree): Move to...
- * include/ext/rb_tree: ...here, new file.
- * include/Makefile.am (ext_headers): Add new file.
- * include/Makefile.in: Regenerate.
- * include/bits/stl_tempbuf.h (get_temporary_buffer + helper,
- return_temporary_buffer, struct temporary_buffer): Move to...
- * include/ext/memory: ...here.
- * testsuite/ext/headers.cc: Include <ext/rb_tree>.
- * include/backward/tempbuf.h: Include <ext/memory>, tweak.
- * include/backward/tree.h: Include <ext/rb_tree), tweak.
-
-2002-01-03 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/stl_numeric.h (power + helpers, iota): Move to...
- * include/ext/numeric: ...here, new file.
- * include/bits/stl_function.h (identity_element, unary_compose,
- binary_compose, compose1, compose2, identity, select1st,
- select2nd, project1st + helper, project2nd + helper,
- constant_void_fun + helper, constant_unary_fun + helper,
- costant_binary_fun + helper, constant0, constant1, constant2,
- subtractive_rng, mem_fun1, mem_fun1_ref): Move to...
- * include/ext/functional: ...here, new file.
- * include/Makefile.am (ext_headers): Add new files.
- * include/Makefile.in: Regenerate.
- * testsuite/ext/headers.cc: Include <ext/numeric> and
- <ext/functional>.
- * include/backward/algo.h: Include <ext/numeric>, tweak.
- * include/backward/function.h: Include <ext/functional>, tweak.
- * include/ext/ropeimpl.h: Include <ext/numeric>.
-
-2002-01-03 Jeffrey A Law <law@redhat.com>
-
- * config/os/hpux/bits/os_defines.h: Prefix __strtoll and
- __strtoull declarations with __extension__.
-
-2002-01-03 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * testsuite/lib/prune.exp: Correct regular expression for
- -ffunction-sections
-
-2002-01-02 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/stl_algo.h (upper_bound, equal_range, binary_search):
- Change concept checks, as with lower_bound and PR 2054.
- * testsuite/ext/concept_checks.cc: Expand test to include those.
-
-2002-01-02 Phil Edwards <pme@gcc.gnu.org>
-
- * include/bits/boost_concept_check.h: Import some changes from
- upsteam (Boost) version.
-
-2002-01-02 Paolo Carlini <pcarlini@unitus.it>
-
- * include/bits/stl_algobase.h (copy_n + helpers,
- lexicographical_compare_3way + helpers): Move to...
- * include/ext/algorithm: ...here.
- * include/bits/stl_uninitialized.h (uninitialized_copy_n +
- helpers): Move to...
- * include/ext/memory: ...here, new file.
- * include/Makefile.am (ext_headers): Add new file.
- * include/Makefile.in: Regenerate.
- * testsuite/ext/headers.cc: Include <ext/memory>.
- * include/backward/algobase.h: Include <ext/memory> and
- <ext/algorithm>, tweak.
- * include/ext/ropeimpl.h: Include <ext/memory>, tweak.
- * include/ext/stl_rope.h: Include <ext/memory>, tweak.
-
-2002-01-01 Roger Sayle <roger@eyesopen.com>
-
- * libmath/stubs.c (sinf,cosf): Implement stubs to enable the
- equivalent ___builtin__ versions.
-
- * include/c_shadow/bits/std_cmath.h: All __builtin math functions
- are available in libstdc++ as the necessary stub implementations
- are provided by libmath/stubs.c.
-
-2002-01-01 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.in: Add support for NetBSD cross compiles.
- * configure: Regenerate.
+2004-01-04 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12226
+ * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
+ constructor.
+ * testsuite/27_io/basic_fstream/4.cc: Likewise.
+ * testsuite/27_io/basic_ifstream/4.cc: Likewise.
+ * testsuite/27_io/basic_ios/4.cc: Likewise.
+ * testsuite/27_io/basic_iostream/4.cc: Likewise.
+ * testsuite/27_io/basic_istream/4.cc: Likewise.
+ * testsuite/27_io/basic_istingstream/4.cc: Likewise.
+ * testsuite/27_io/basic_ofstream/4.cc: Likewise.
+ * testsuite/27_io/basic_ostream/4.cc: Likewise.
+ * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
+ * testsuite/27_io/basic_stringstream/4.cc: Likewise.
+
+2004-01-04 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
+ Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
+ always use double underscored names.
+ * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
+ Likewise.
+ * include/bits/locale_facets.h (struct __numpunct_cache):
+ Dimension _M_atoms_out and _M_atoms_in one position smaller.
+ (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out
+ and _M_atoms_in.
diff --git a/contrib/libstdc++/ChangeLog-2002 b/contrib/libstdc++/ChangeLog-2002
new file mode 100644
index 0000000..337056e
--- /dev/null
+++ b/contrib/libstdc++/ChangeLog-2002
@@ -0,0 +1,5590 @@
+2002-12-30 Loren J. Rittle <ljrittle@acm.org>
+
+ * src/Makefile.am: Resolve non-portable use of $<.
+ * src/Makefile.in: Rebuilt.
+
+2002-12-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in (GLIBCPP_ENABLE_CXX_FLAGS): Do not pass arguments,
+ let the defaults work.
+ * configure: Regenerate.
+
+2002-12-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Remove trailing whitespace.
+ (GLIBCPP_ENABLE_CXX_FLAGS): Fix.
+ * aclocal.m4, configure: Regenerate.
+
+2002-12-29 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_bitset.h: Better comments.
+
+2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * docs/html/17_intro/porting.texi: Use @copying.
+ * docs/html/17_intro/porting.html: Regenerate.
+
+2002-12-27 Mark Mitchell <mark@codesourcery.com>
+
+ * config/locale/gnu/ctype_members.cc
+ (ctype<wchar_t>::_M_convert_to_wmask): Remove stray semicolon.
+ * config/locale/gnu/monetary_members.cc
+ (moneypunct<wchar_t, true>::_M_initialize_moneypunct): Avoid
+ defining classes in static_cast.
+ (moneypunct<wchar_t, false>::_M_initialize_moneypunct): Likewise.
+ * config/locale/gnu/numeric_members.cc
+ (numpunct<wchar_t, false>::_M_initialize_numpunct): Likewise.
+ * include/bits/stl_deque.h (operator-): Insert typename where
+ required.
+ * include/bits/stl_multiset.h (multiset): Remove stray semicolon.
+ * include/bits/stl_set.h (set): Likewise.
+ * include/bits/valarray_meta.h (bits/slice_array.h): Include it.
+ * include/std/std_fstream.h (basic_fstream::open): Use this-> to
+ avoid Koenig lookup.
+ (basic_fstream::close): Likewise.
+ * libsupc++/new (operator delete): Remove stray semicolon.
+ * libsupc++/new (operator delete[]): Likewise.
+ * libsupc++/tinfo.cc: Likewise.
+ * src/stdexcept.c (logic_error::~logic_error): Likewise.
+ (runtime_error::~runtime_error): Likewise.
+
+2002-12-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * libsupc++/exception: Add comment (mistakenly skipped).
+
+2002-12-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_bitset.h (_Base_bitset::_M_do_left_shift,
+ _Base_bitset::_M_do_right_shift): Expect a non-zero shift.
+ (bitset::operator<<=, bitset::operator>>=): When shifting more bits
+ than are in the bitset, zero memory rather than segfault.
+ (operator>>(basic_istream,bitset): Only call setstate once, after
+ all work has been done.
+
+ * testsuite/23_containers/bitset_members.cc (test03): New test.
+ * testsuite/23_containers/bitset_shift.cc (test02): New test.
+
+2002-12-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * libsupc++/vterminate.cc (writestr): Use __builtin_strlen.
+
+2002-12-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * libsupc++/eh_term_handler.cc: Add comment about embedded systems.
+ * docs/html/debug.html: Cosmetic and HTML changes. Point to
+ verb-term notes.
+ * docs/html/documentation.html: Link to the FAQ.
+ * docs/html/17_intro/howto.html: Mention use of isatty(3).
+ * docs/html/19_diagnostics/howto.html: Update verb-term description.
+
+2002-12-25 Phil Edwards <pme@gcc.gnu.org>
+
+ * src/vterminate.cc: Move to...
+ * libsupc++/vterminate.cc: ...here. New file. Replace fprintf with
+ writestr macro. Slight reword to explanatory text.
+ * libsupc++/eh_terminate.cc (__cxxabiv1::__terminate_handler,
+ __cxxabiv1::__unexpected_handler): Break definitions out to...
+ * libsupc++/eh_unex_handler.cc: ...here (new file), and...
+ * libsupc++/eh_term_handler.cc: ...here (new file). Initialize
+ __terminate_handler with __gnu_cxx::__verbose_terminate_handler
+ instead of std::abort.
+
+ * libsupc++/Makefile.am (sources), src/Makefile.am (sources): Update.
+ * libsupc++/Makefile.in, src/Makefile.in: Regenerate.
+
+2002-12-23 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode):
+ Don't use O_NONBLOCK if it is not defined.
+ (__basic_file::open): Don't use fcntl either.
+
+2002-12-20 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
+
+ * include/bits/stl_deque.h: Fix typo.
+ * include/bits/stl_list.h: Same.
+ * include/bits/stl_map.h: Same.
+ * include/bits/stl_multimap.h: Same.
+ * include/bits/stl_queue.h: Same.
+ * include/bits/stl_stack.h: Same.
+ * include/bits/stl_vector.h: Same.
+
+2002-12-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: Add link for debug.html.
+ * docs/html/debug.html: New.
+
+2002-12-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * testsuite/23_containers/vector_capacity.cc (test03): Move ...
+ * testsuite/23_containers/vector_resize.cc: ...here as a new file.
+ Pass in -lmalloc for irix6.
+ * testsuite/27_io/ios_base_storage.cc: Pass in -lmalloc for irix6.
+
+2002-12-18 Jason Merrill <jason@redhat.com>
+
+ * src/vterminate.cc (__verbose_terminate_handler): Send
+ diagnostics to stderr.
+
+2002-12-18 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * configure.in: Define with_target_subdir and with_build_subdir
+ variables in config-ml.in AC_OUTPUT call.
+ * configure: Regenerate.
+
+2002-12-16 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/8949
+ * include/std/std_limits.h
+ (struct numeric_limits<short>,
+ struct numeric_limits<unsigned short>,
+ struct numeric_limits<int>,
+ struct numeric_limits<unsigned int>,
+ struct numeric_limits<long>,
+ struct numeric_limits<unsigned long>,
+ struct numeric_limits<long long>,
+ struct numeric_limits<unsigned long long>): According
+ to 18.2.1.2,53 and 18.2.1.5,1 is_iec559 shall be false.
+ * testsuite/18_support/numeric_limits.cc: Add test04.
+
+2002-12-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (GLIBCPP_ENABLE_DEBUG): Default to none.
+ Call GLIBCPP_ENABLE_DEBUG_FLAGS.
+ * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): GLIBCPP_BUILD_DEBUG, new
+ conditional if --enable-debug is yes. Rework.
+ (GLIBCPP_ENABLE_DEBUG_FLAGS): New.
+ * aclocal.m4: Regenerate.
+ * libio/Makefile.am: Remove DEBUG_FLAGS.
+ * libio/Makefile.in: Regenerate.
+ * libsupc++/Makefile.am: Remove DEBUG_FLAGS.
+ * libsupc++/Makefile.in: Regenerate.
+ * docs/html/configopts.html: Add docs for --enable-debug,
+ --enable-debug-flags.
+
+2002-12-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ Correct dependency tracking, build warts.
+ * configure.in: Correct repeated AC_OUTPUT thrashing by
+ config-ml.in
+ * configure: Regenerate.
+ * include/Makefile.am (stamp-target): Stamp in top_builddir.
+ * include/Makefile.in: Regenerate.
+ * src/Makefile.am (codecvt_members.cc): New rule.
+ (collate_members.cc): Same.
+ (ctype_members.cc): Same.
+ (messages_members.cc): Same.
+ (monetary_members.cc): Same.
+ (numeric_members.cc): Same.
+ (time_members.cc): Same.
+ (c++locale.cc): Same.
+ (basic_file.cc): Same.
+ * src/Makefile.in: Regenerate.
+ * acinclude.m4 (CCTYPE_CHAR_CC): Remove.
+ (CCCODECVT_CC): Don't link, AC_SUBST.
+ (CCOLLATE_CC): Same.
+ (CCTYPE_CC): Same.
+ (CMESSAGES_CC): Same.
+ (CMONEY_CC): Same.
+ (CNUMERIC_CC): Same.
+ (CTIME_CC): Same.
+ (CLOCALE_CC): Same.
+ * aclocal.m4: Regenerate.
+
+ * src/Makefile.am (libstdc___la_LIBADD): Use top_builddir
+ for convenience libraries.
+ (version_arg): Rename linker.map to libstdc++.ver.
+ (libstdc___la_DEPENDENCIES): Remove linker.map, add
+ libstdc++-symbol.ver as a dependency.
+ (libstdc++-symbol.ver): Add rule.
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Change LINKER_MAP to
+ SYMVER_MAP. Don't link, AC_SUBST.
+
+ * include/Makefile.am (target_headers_noinst): New.
+ (stamp-target): Add CLOCALE_INTERNAL_H.
+ * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't link
+ CLOCALE_INTERNAL_H, AC_SUBST.
+ * config/locale/gnu/c_locale.cc: Modify c++locale_internal.h
+ include.
+ * config/locale/gnu/time_members.cc: Same.
+ * config/locale/gnu/numeric_members.cc: Same.
+ * config/locale/gnu/monetary_members.cc: Same.
+ * config/locale/gnu/messages_members.cc: Same.
+ * config/locale/gnu/ctype_members.cc: Same.
+ * config/locale/gnu/collate_members.cc: Same.
+ * config/locale/gnu/codecvt_members.cc: Same.
+ * config/locale/generic/codecvt_members.cc: Remove.
+
+2002-12-11 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/8887
+ * config/locale/generic/time_members.cc
+ (__timepunct<char>::_M_initialize_timepunct): Fix typos
+ in _M_date_format and _M_date_era_format string literals.
+
+2002-12-10 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/cxxabi.h (__cxa_bad_cast): Declare it.
+ (__cxa_bad_typeid): Likewise.
+ (__cxa_atexit): Likewise.
+ (__cxa_finalize): Likewise.
+
+2002-12-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * include/bits/slice_array.h (slice_array<>::operator=): Fix typo.
+
+2002-12-09 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/cxxabi.h (__cxa_pure_virtual): Declare it.
+
+2002-12-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/abi_check.cc: Add GLIBCPP_3.2.2.
+
+2002-12-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/generic/codecvt_members.cc (codecvt::do_out
+ (state_type&, const intern_type*, const intern_type*,
+ const intern_type*&, extern_type*, extern_type*, extern_type*&),
+ codecvt::do_in(state_type&, const extern_type*, const extern_type*,
+ const extern_type*&, intern_type*, intern_type*, intern_type*&)):
+ Fully qualify min() with std::.
+ * config/locale/gnu/codecvt_members.cc: Ditto.
+ * locale/ieee_1003.1-2001/codecvt_specializations.h
+ (codecvt::do_length(const state_type&, const extern_type*,
+ const extern_type*, size_t): Ditto.
+ * include/bits/deque.tcc
+ (_M_range_initialize(_ForwardIterator, _ForwardIterator,
+ forward_iterator_tag), deque::_M_range_insert_aux(iterator,
+ _ForwardIterator, _ForwardIterator, forward_iterator_tag),
+ deque::_M_reallocate_map(size_type, bool)): Fully qualify
+ distance() and max() with std::.
+ * include/bits/fstream.tcc (basic_filebuf::seekoff(off_type,
+ ios_base::seekdir, ios_base::openmode)): Fully qualify max()
+ with std::.
+ * include/bits/istream.tcc (basic_istream::ignore(streamsize,
+ int_type), basic_istream::readsome(char_type*, streamsize)):
+ Fully qualify min() with std::.
+ * include/bits/locale_facets.tcc (time_get::_M_extract_name
+ (iter_type&, iter_type&, int&, const _CharT**, size_t,
+ ios_base::iostate&)): Ditto.
+ * include/bits/sstream.tcc (basic_stringbuf::overflow(int_type)):
+ Fully qualify max() with std::.
+ * include/bits/stl_algo.h (__inplace_stable_partition(_ForwardIter
+ __first, _ForwardIter, _Predicate, _Distance),
+ __stable_partition_adaptive(_ForwardIter, _ForwardIter, _Predicate,
+ _Distance, _Pointer, _Distance), __merge_sort_loop(_RandomAccessIter1,
+ _RandomAccessIter1, _RandomAccessIter2, _Distance),
+ __merge_sort_loop(_RandomAccessIter1, _RandomAccessIter1,
+ _RandomAccessIter2, _Distance, _Compare), lower_bound(_ForwardIter,
+ _ForwardIter, const _Tp&), lower_bound(_ForwardIter, _ForwardIter,
+ const _Tp&, _Compare), upper_bound(_ForwardIter, _ForwardIter,
+ const _Tp&), upper_bound(_ForwardIter, _ForwardIter, const _Tp&,
+ _Compare), equal_range(_ForwardIter, _ForwardIter, const _Tp&),
+ equal_range(_ForwardIter, _ForwardIter, const _Tp&, _Compare),
+ __merge_without_buffer(_BidirectionalIter, _BidirectionalIter,
+ _BidirectionalIter, _Distance, _Distance), __merge_without_buffer
+ (_BidirectionalIter, _BidirectionalIter, _BidirectionalIter,
+ _Distance, _Distance, _Compare), __rotate_adaptive(_BidirectionalIter1,
+ _BidirectionalIter1, _BidirectionalIter1, _Distance, _Distance,
+ _BidirectionalIter2, _Distance), __merge_adaptive(_BidirectionalIter,
+ _BidirectionalIter, _BidirectionalIter, _Distance, _Distance,
+ _Pointer, _Distance), __merge_adaptive(_BidirectionalIter,
+ _BidirectionalIter, _BidirectionalIter, _Distance, _Distance,
+ _Pointer, _Distance, _Compare), inplace_merge(_BidirectionalIter,
+ _BidirectionalIter, _BidirectionalIter), inplace_merge
+ (_BidirectionalIter, _BidirectionalIter, _BidirectionalIter,
+ _Compare), __find_end(_BidirectionalIter1, _BidirectionalIter1,
+ _BidirectionalIter2, _BidirectionalIter2, bidirectional_iterator_tag,
+ bidirectional_iterator_tag), __find_end(_BidirectionalIter1,
+ _BidirectionalIter1, _BidirectionalIter2, _BidirectionalIter2,
+ bidirectional_iterator_tag, bidirectional_iterator_tag,
+ _BinaryPredicate)): Fully qualify distance() and min() with std::.
+ * include/bits/stl_algobase.h (lexicographical_compare
+ (const unsigned char*, const unsigned char*, const unsigned char*,
+ const unsigned char*)): Fully qualify min() with std::.
+ * include/bits/stl_bvector.h (_M_insert_range(iterator,
+ _ForwardIterator, _ForwardIterator, forward_iterator_tag),
+ _M_assign_aux(_ForwardIterator, _ForwardIterator,
+ forward_iterator_tag),
+ _M_initialize_range(_ForwardIterator, _ForwardIterator,
+ forward_iterator_tag), _M_fill_insert(iterator, size_type, bool)):
+ Fully qualify distance() and max() with std::.
+ * include/bits/stl_deque.h
+ (_Deque_base::_M_initialize_map(size_t),
+ _M_assign_aux(_ForwardIterator, _ForwardIterator,
+ forward_iterator_tag)):
+ Ditto. * include/bits/stl_list.h (size()): Fully qualify
+ distance() with std::.
+ * include/bits/stl_tempbuf.h (_Temporary_buffer::_Temporary_buffer
+ (_ForwardIterator, _ForwardIterator)): Ditto.
+ * include/bits/stl_tree.h (_Rb_tree::erase(const _Key&),
+ _Rb_tree::count(const _Key&)): Ditto.
+ * include/bits/stl_vector.h (_M_range_initialize(_ForwardIterator,
+ _ForwardIterator, forward_iterator_tag)): Ditto.
+ * include/bits/streambuf.tcc (basic_streambuf::xsgetn(char_type*,
+ streamsize), basic_streambuf::xsputn(const char_type*, streamsize)):
+ Fully qualify min() with std::.
+ * include/bits/vector.tcc (_M_assign_aux(_ForwardIter, _ForwardIter,
+ forward_iterator_tag), _M_fill_insert(iterator, size_type,
+ const value_type&), _M_range_insert(iterator, _ForwardIterator,
+ _ForwardIterator, forward_iterator_tag)): Fully qualify max() and
+ distance() with std::.
+ * include/std/std_bitset.h (bitset::_M_copy_from_string
+ (const basic_string&, size_t, size_t)): Fully qualify min() with std::.
+ * include/std/std_streambuf.h (_M_pback_create()): Ditto.
+ * include/std/std_complex.h (abs(const complex<_Tp>&)):
+ Fully qualify max() with std::.
+ * include/std/std_sstream.h (str()): Ditto.
+ * src/codecvt.cc (codecvt::do_out(state_type&, const intern_type*,
+ const intern_type*, const intern_type*&, extern_type*, extern_type*,
+ extern_type*&), codecvt::do_in(state_type&, const extern_type*,
+ const extern_type*, const extern_type*&, intern_type*, intern_type*,
+ intern_type*&), codecvt::do_length(const state_type&,
+ const extern_type*, const extern_type*, size_t), do_length
+ (const state_type&, const extern_type*, const extern_type*,
+ size_t)): Fully qualify min() with std::.
+ * src/strstream.cc (strstreambuf::strstreambuf(streamsize),
+ strstreambuf::overflow(int_type)): Fully qualify max() with std::.
+
+2002-12-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.h (compare(const basic_string&)):
+ Fully qualify min() with std::.
+
+2002-12-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (libtool_VERSION): Update to 5:2:0.
+ * configure: Regenerate.
+
+2002-12-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.tcc
+ (basic_string::append(const basic_string&, size_type,
+ size_type), basic_string::compare(size_type, size_type,
+ const basic_string&), basic_string::compare(size_type,
+ size_type, const basic_string&, size_type, size_type),
+ basic_string::compare(const _CharT*), basic_string::
+ compare(size_type, size_type, const _CharT*),
+ basic_string::compare(size_type, size_type, const _CharT*,
+ size_type), _S_string_copy(const basic_string&, _CharT*,
+ typename _Alloc::size_type)): Fully qualify min() with std::.
+
+2002-12-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.tcc
+ (basic_string::_S_construct(_InIter, _InIter, const _Alloc&,
+ forward_iterator_tag)): Delay the declaration of __dnew,
+ fully qualify distance() with std::.
+ (basic_string::_M_replace_safe): Fully qualify distance()
+ with std::.
+
+2002-11-28 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/8716
+ * testsuite/21_strings/ctor_copy_dtor.cc (test05): Also test
+ the NULL-pointer, zero-size case.
+
+2002-11-28 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Add tip about a namespace for extensions.
+
+2002-11-28 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ * src/localename.cc
+ (locale::_Impl::_Impl(const char*, size_t)):
+ Improve previous fix for the strtok vs MT issue.
+
+2002-11-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/gnu/c_locale.cc (locale::_S_categories):
+ Reorder the categories to match that of glibc's setlocale(LC_ALL, ""))
+ * config/locale/generic/c_locale.cc (locale::_S_categories): Ditto.
+ * testsuite/22_locale/ctor_copy_dtor.cc (test04): Tweak.
+
+2002-11-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/abi_check.cc: Add CXXABI_1.2.1 as compatible.
+ * config/linker-map.gnu: Version __cxa_guard_acquire,
+ __cxa_guard_release, __cxa_guard_abort in CXXABI_1.2.1.
+
+2002-11-25 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ * src/localename.cc
+ (locale::_Impl::_Impl(const char*, size_t)):
+ Avoid strtok for thread safety.
+
+2002-11-25 Stephen M. Webb <stephen@bregmasoft.com>
+
+ * testsuite/testsuite_allocator.h: New file.
+ * testsuite/testsuite_allocator.cc: New file.
+ * testsuite/Makefile.am: Added testsuite_allocator to test library.
+ * testsuite/testsuite_hooks.h: Added more detailed tracker objects
+ gnu_copy_constructor, gnu_assignment_operator, and gnu_destructor.
+ * testsuite/testsuite_hooks.cc: Added new static objects definitions.
+ * testsuite/23_containers/vector_capacity.cc: Added reserve() tests.
+ * testsuite/23_containers/vector_ctor.cc: Added a plethora of tests.
+ * testsuite/23_containers/deque_ctor.cc: Added a slew of new tests.
+
+2002-11-25 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/Makefile.am (sources): Add guard.cc.
+ * libsupc++/Makefile.in: Regenerated.
+ * libsupc++/cxxabi.h (__cxa_guard_acquire): New function.
+ (__cxa_guard_release): Likewise.
+ (__cxa_guard_abort): Likewise.
+ * libsupc++/guard.cc: New file.
+
+2002-11-25 Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+ * include/std/std_complex.h
+ (operator<<(basic_ostream&, const complex&)): Prefer 'x'
+ to "x" for efficiency sake.
+ * src/locale.cc (locale::locale(const char*)): Ditto.
+
+2002-11-24 Paolo Carlini <pcarlini@unitus.it>
+
+ * src/locale.cc (locale::locale(const char*)):
+ Trivial cosmetic tweaks.
+
+2002-11-22 Laszlo Ersek <erseklaszlo@chello.hu>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/8645
+ * include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase):
+ Don't check that __w->_M_left != 0 and __w->_M_right != 0
+ when they can't be otherwise.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/documentation.html: Fix broken/thinko'd URL.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/run_doxygen: Tighter search expression for sed.
+ * docs/doxygen/stdheader.cc: Handle the case of good headers.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Uniform formatting.
+ * configure.in: Warn when generic atomicity.h is used.
+ * configure.target: Fix comment.
+ * aclocal.m4, configure: Regenerate.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/streambuf.tcc (basic_streambuf::sputbackc): Prefix
+ "this->" to call to pbackfail.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/style.css: Update.
+ * docs/doxygen/user.cfg.in: Update.
+ * docs/html/documentation.html: Regenerate.
+ * docs/html/17_intro/howto.html: Tweak I/O sentry entry.
+ * docs/html/27_io/howto.html: New section on headers.
+ * docs/html/faq/index.html: Add i386 threading entry.
+ * docs/html/faq/index.txt: Regenerate.
+
+ * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
+ Import R23.
+
+2002-11-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/TODO: Note change in clause 27 docs.
+ * include/bits/basic_ios.h, include/bits/fpos.h,
+ include/bits/ios_base.h, include/bits/stl_deque.h,
+ include/bits/stl_iterator_base_types.h, include/std/std_fstream.h,
+ include/std/std_iomanip.h, include/std/std_iosfwd.h,
+ include/std/std_iostream.h, include/std/std_istream.h,
+ include/std/std_ostream.h, include/std/std_sstream.h,
+ include/std/std_streambuf.h: Doxygenate all I/O entities.
+
+2002-11-20 Benjamin Kosnik <bkoz@redhat.com>
+ Jonathan Lennox <lennox@cs.columbia.edu>
+
+ * include/bits/streambuf.tcc (__copy_streambufs):
+ Revert previous fix for the interactive half of
+ libstdc++/6745, use _M_buf_size_opt to set dynamically
+ the correct buffer size.
+
+2002-11-20 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/21_strings/howto.html: Fix example code, cite Gaby's
+ explanation of "<unknown type>" error with toupper/tolower.
+ * docs/html/22_locale/howto.html: Be more consistent with
+ example in 21_strings.
+
+2002-11-19 John Gustafsson <forgoil@rsn.bth.se>
+
+ * docs/html/20_util/howto.html: Fix typo.
+
+2002-11-18 Jonathan Lennox <lennox@cs.columbia.edu>
+
+ * include/bits/streambuf.tcc (__copy_streambufs): verify
+ __sbin->gptr() + __bufsize < __sbin->egptr() before using.
+ * testsuite/27_io/ostream_inserter_other.cc (test_buffer_4): Add.
+ (test05): Use test_buffer_4. Delete unused ostringstream
+ variables.
+
+2002-11-18 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6745 (continued)
+ * include/bits/streambuf.tcc (__copy_streambufs):
+ Deal with interactive input by using isatty as in the
+ fix for libstdc++/8399.
+
+2002-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ * config/linker-map.gnu: Export _S_construct even if size_t is
+ unsigned long. Collapse std::codecvt<char>::codecvt(size_t)
+ and std::codecvt<wchar_t>::codecvt(size_t) into one export pattern.
+
+2002-11-15 Benjamin Kosnik <bkoz@redhat.com>
+ Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR libstdc++/8230
+ * include/bits/stl_alloc.h: Use builtin_expect for the most
+ obvious limit checks.
+ (__default_alloc_template::allocate): Check for null, throw
+ bad_alloc.
+ * include/bits/vector.tcc: Formatting tweaks.
+ * include/bits/stl_vector.h: Same.
+ * testsuite/20_util/allocator_members.cc (test02): Add.
+ * testsuite/23_containers/vector_capacity.cc (test03): Add.
+
+2002-11-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h.
+
+2002-11-15 Paolo Carlini <pcarlini@unitus.it>
+ Loren J. Rittle <ljrittle@acm.org>
+
+ PR libstdc++/8399
+ * acinclude.m4
+ (GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): New macro to
+ check for unistd.h functions.
+ (GLIBCPP_CHECK_UNISTD_SUPPORT): New macro, check for isatty
+ in unistd.h.
+ * configure.in: Call here.
+ * src/ios.cc (ios_base::Init::_S_ios_create(bool)):
+ Use _GLIBCPP_HAVE_ISATTY: ifdef, in case of interactive
+ input __in_size = 1 even when sync_with_stdio is false;
+ otherwise fall back to __in_size = 1.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+
+2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acconfig.h (HAVE_DRAND48): Add.
+ (HAVE_GETPAGESIZE): Add.
+ (HAVE_SETENV): Add.
+ (HAVE_SIGSETJMP): Add.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+
+2002-11-13 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define
+ on hppa when there is no weak support.
+
+2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8230
+ * include/bits/vector.tcc (vector::reserve): Throw length_error if
+ requested size is bigger than max_size().
+ * include/bits/stl_bvector.h (vector<bool>::reserve): Same.
+ * testsuite/23_containers/vector_capacity.cc (test02): Add.
+
+2002-11-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Export all _S_construct.
+
+2002-11-13 Loren J. Rittle <ljrittle@acm.org>
+
+ PR libstdc++/7445
+ * src/locale.cc (std::locale::classic()): Weaken locking protocol.
+
+2002-11-13 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/install.html, docs/html/22_locale/locale.html: HTML fix.
+
+2002-11-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6746
+ * include/bits/fstream.tcc (filebuf::open): Set input pointers.
+ * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Set
+ __p_mode as well.
+ (__basic_file::open): Set to non-block for input.
+ * testsuite/27_io/istream_unformatted.cc (test12): Add.
+ (test13): Same.
+
+2002-11-11 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/17_intro/howto.html: Make "chapter 22 notes" a link.
+ * docs/html/faq/index.html: Mention that GCC ships with a newer
+ version of the library than the last snapshot. Make "see below" a
+ link. Add missing <html> tag.
+ * docs/html/faq/index.txt: Regenerate.
+ * docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
+ docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
+ docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
+ docs/html/27_io/howto.html, docs/html/ext/howto.html,
+ docs/html/ext/sgiexts.html: Add missing <html> tag.
+
+2002-11-07 Phil Edwards <pme@gcc.gnu.org>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * config/cpu/generic/atomicity.h: Provide atomic __exchange_and_add
+ and __atomic_add.
+
+2002-11-08 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/gnu/monetary_members.cc
+ (moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
+ const char*),
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
+ const char*)): Tweak parameters for glibc2.3 systems, thus
+ avoiding unused parameter warnings.
+
+2002-11-05 Jonathan Wakely <cow@compsoc.man.ac.uk>
+
+ * include/std/std_sstream.h
+ (basic_stringbuf::str(const __string_type&)):
+ Prefer data() to c_str(), thus avoiding assigning the
+ unnecessary NULL-terminator.
+
+2002-11-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8258
+ * include/bits/istream.tcc (istream::readsome): Don't set eofbit
+ for null buffer.
+ (istream::operator>>(_CharT*)): Use traits_type.
+ (istream::ws): Same.
+ (istream::operator>>(string)): Same.
+ * testsuite/27_io/istream_unformatted.cc (test11): Add.
+
+2002-11-05 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/8466
+ * include/std/std_sstream.h
+ (basic_stringbuf::str(const __string_type&)):
+ Cannot use simple assignment since the COW-nature of v3
+ basic_string is not taken into account in basic_stringbuf.
+ * testsuite/27_io/stringstream_members.cc: Add test04 from PR.
+
+2002-11-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * configure.target (hppa*): Define cpu_include_dir.
+ * config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define.
+ * src/misc-inst.cc: Instantiate atomicity lock when
+ _GLIBCPP_INST_ATOMICITY_LOCK is defined.
+ * config/cpu/hppa/atomicity.h: New file.
+
+2002-11-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8463
+ * include/bits/ios_base.h (~ios_base): Make virtual.
+
+2002-11-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Export string operator+.
+ Export __default_alloc_template::_S_force_new.
+ * testsuite/abi_check.cc: Output tweaks.
+
+2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8172
+ * src/string-inst.cc: Add instantiation.
+
+2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7926
+ * configure.target: Simplify.
+ * config/cpu/i386/atomicity.h: Remove.
+ * config/cpu/i386: Remove.
+ * config/cpu/arm/atomicity.h: Remove.
+ * config/cpu/arm: Remove.
+ * config/cpu/x86-64/atomicity.h: Remove.
+ * config/cpu/x86-64: Remove.
+
+2002-11-01 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ PR libstdc++/8197
+ * config/link-map.gnu: Export math stubbs.
+
+2002-11-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8318
+ * include/std/std_iostream.h: Tweak.
+ * include/std/std_iosfwd.h: Add _GLIBCPP_USE_WCHAR_T.
+ * include/std/std_iomanip.h: Same.
+ * include/bits/stringfwd.h: Same.
+ * include/bits/basic_string.tcc: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/fstream.tcc: Same.
+ * include/bits/basic_ios.tcc: Same.
+ * include/bits/streambuf.tcc: Same.
+ * include/bits/locale_facets.tcc: Same.
+
+2002-11-01 John Carter <john.carter@tait.co.nz>
+
+ PR libstdc++/7961
+ * include/bits/basic_string.tcc
+ (compare(const _CharT* __s)): Don't access __s past its length.
+
+2002-10-31 Zack Weinberg <zack@codesourcery.com>
+
+ * libsupc++/eh_globals.cc: Don't call __gthread_key_dtor.
+
+2002-10-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8348
+ * include/bits/istream.tcc (istream::tellg): Remove sentry bits.
+ (istream::seekg): Same.
+ * testsuite/27_io/istream_seeks.cc (test06): New.
+
+2002-10-28 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * testsuite/thread/pthread5.cc: Include <unistd.h>
+ if _GLIBCPP_HAVE_UNISTD_H is defined.
+ (main): Only use pthread_attr_setscope if
+ _POSIX_THREAD_PRIORITY_SCHEDULING is defined.
+
+2002-10-28 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * testsuite/thread/pthread1.cc: Enable on *-*-netbsd*.
+ * testsuite/thread/pthread2.cc: Likewise.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread6.cc: Likewise.
+
+2002-10-27 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/8347
+ * include/bits/basic_string.tcc
+ (string::_S_construct(_InIter, _InIter, const _Alloc&,
+ forward_iterator_tag)): Do not throw logic error if
+ __beg == NULL && __end == __beg.
+ (string::string(const _CharT*, const _Alloc&)): Tweak.
+ * testsuite/21_strings/ctor_copy_dtor.cc: Add test05 from PR.
+
+2002-10-24 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR other/3337
+ PR bootstrap/6763
+ PR bootstrap/8122
+ * testsuite/testsuite_hooks.cc (__set_testsuite_memlimit): Use
+ __typeof__ (r.rlim_cur), not rlim_t in declaration of limit.
+
+2002-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/22_locale/num_put_members_char.cc (test01): Swap size
+ and decimal_point arguments of find.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test01): Likewise.
+
+2002-10-22 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.am (check-abi, new-abi-baseline): Use @glibcpp_srcdir@
+ instead of ${top_srcdir}.
+ * Makefile.in: Rebuilt.
+
+2002-10-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
+ Remove specialization for FreeBSD systems.
+
+2002-10-18 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.target (freebsd*): Use abi_baseline_triplet.
+ * config/abi/i386-unknown-freebsd4/baseline_symbols.txt: New file.
+ * config/abi/i386-unknown-freebsd4.7/baseline_symbols.txt: Remove.
+
+ * testsuite/thread/pthread1.cc: Remove needless workaround
+ for FreeBSD 5.
+
+2002-10-18 Loren J. Rittle <ljrittle@acm.org>
+ Brad Spencer <spencer@infointeractive.com>
+ (provided alternate patch and improvements)
+
+ * docs/html/23_containers/howto.html (GLIBCPP_FORCE_NEW): Document
+ new environment variable which replaces all uses of __USE_MALLOC
+ macro.
+ * docs/html/ext/howto.html (GLIBCPP_FORCE_NEW): Likewise.
+ (__mem_interface): Remove all references to old internal typedef.
+ * include/backward/alloc.h (__USE_MALLOC): Remove it and all
+ guarded code.
+ * include/bits/c++config (__USE_MALLOC): Update related error
+ message and comment.
+ * include/bits/stl_alloc.h (__USE_MALLOC): Remove it and all
+ guarded code. Update all related comments.
+ (__mem_interface): Unconditionally replace it with __new_alloc.
+ However, leave the typedef around in case anyone used it.
+ (__default_alloc_template<>::_S_force_new): New class static.
+ (__default_alloc_template<>::allocate, deallocate): Add
+ run-time controlled feature similar to what __USE_MALLOC code
+ path had provided.
+ * src/stl-inst.cc (__USE_MALLOC): Remove it and all
+ guarded code.
+ * testsuite/21_strings/capacity.cc: Remove reference to __USE_MALLOC.
+ Add documentation on GLIBCPP_FORCE_NEW environment variable.
+ * testsuite/ext/allocators.cc: Likewise.
+
+2002-10-18 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in: Use target, not target_alias, when matching triplet
+ patterns.
+ * configure: Regenerate.
+
+2002-10-17 Momchil Velikov <velco@fadata.bg>
+ Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.in: Add *-freebsd* to cross list.
+ * configure: Rebuilt.
+
+2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (__timepunct::__timepunct): Allocate
+ _M_name_timepunct.
+ (__timepunct::~__timepunct): Deallocate, remove specialization
+ declarations.
+ (messages::messages): Allocate _M_name_messages.
+ (messages::~messages): Deallocate.
+ (messages_byname): Same.
+ * config/locale/gnu/time_members.cc (__timepunct::~__timepunct):
+ Remove.
+ * config/locale/generic/time_members.cc (__timepunct::~__timepunct):
+ Remove.
+
+ * docs/html/install.html: Add es_MX, en_PH to required locales list.
+
+2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Add exports for codecvt constructors
+ where size_t == unsigned long.
+
+2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/globals.cc (__gnu_cxx::c_locale_impl_compat): Add, alias to
+ c_locale_impl.
+ * testsuite/abi_check.cc (line_to_symbol_info): Collect size info.
+ * docs/html/abi.txt: Update.
+
+2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/static_members.cc (test02): Less provincial.
+
+2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/static_members.cc (test02): Disable for
+ systems without named locale support.
+ * testsuite/22_locale/ctor_copy_dtor.cc (test04): Don't assume
+ running the testsuites in "C" environment.
+ Add new tests.
+ * docs/html/22_locale/locale.html: Update.
+
+2002-10-13 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/bits/stl_threads.h (_GLIBCPP_mutex,
+ _GLIBCPP_mutex_init,_GLIBCPP_mutex_address,
+ _GLIBCPP_mutex_address_init, _GLIBCPP_once):
+ Declare in namespace __gnu_cxx.
+ (_STL_mutex_lock::_M_initialize): Qualify __gnu_cxx
+ names.
+ Adjust copyright.
+
+2002-10-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/abi_check.cc (hash<string>): Specialize.
+ Simplify. Check compatible symbol versions.
+ * config/linker-map.gnu: Clarify, explicitly export
+ std::codecvt::c* symbols.
+
+ * testsuite/22_locale/static_members.cc (test02): Avoid null strings.
+
+2002-10-12 Jonathan Wakely <jw@kayari.org>
+ Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * docs/html/21_strings/howto.html#5: Correct nasting of XHTML
+ elements. Correct allocator-related text.
+
+2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/static_members.cc (test02): Fix.
+
+2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acconfig.h (_GLIBCPP_SYMVER): Add.
+ (_GLIBCPP_ASM_SYMVER): Add.
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Define _GLIBCPP_SYMVER.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * include/bits/c++config (_GLIBCPP_AT_AT): Define, as an expedient
+ hack around m4 issues with quoting '@'.
+ * src/locale.cc: Use _GLIBCPP_ASM_SYMVER.
+ * src/globals.cc: Same.
+
+ * testsuite/22_locale/ctor_copy_dtor.cc (test04): Fix for
+ non-glibc systems.
+
+2002-10-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu (GLIBCPP_3.2.1): Add.
+ (GLIBCPP_3.2): Don't export locale::_S_*.
+ * src/ios.cc: Move globals into __gnu_cxx. Make old exported
+ symbols match.
+ * src/locale.cc: Same.
+ * src/localename.cc: Same.
+ * src/globals.cc: Same.
+
+2002-10-10 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/21_strings/howto.html: Write #5, char_traits.
+ * docs/html/17_intro/porting.texi: Expand on os_include_dir.
+ * docs/html/17_intro/porting.html: Regenerate.
+
+2002-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/locale.cc: Fix comments, move ctors together.
+ * testsuite/22_locale/static_members.cc (test03): Add.
+
+2002-10-08 Jonathan Lennox <lennox@cs.columbia.edu>
+
+ PR libstdc++/8071, libstdc++/8127, libstdc++/6745
+ * streambuf.tcc (__copy_streambufs): Handle cases where
+ __sbin->in_avail() returns 0, or where __sbin doesn't set gptr().
+ * testsuite/27_io/ostream_inserter_other.cc (test05): Add.
+
+2002-10-08 Paolo Carlini <pcarlini@unitus.it>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/localefwd.h (class locale): Add static member
+ _S_num_extra_categories, encoding the number of additional
+ categories.
+ Change _S_num_categories to _S_categories_size.
+ (class locale::_Impl): Add _M_c_cats.
+ (class locale::_Impl::_M_names): Change to array of chars.
+ (class locale::_Impl::_M_check_same_name): Use
+ _S_extra_categories_size, tweak.
+ (locale::locale(const locale&, _Facet*)): Ditto.
+ * src/locale.cc (locale::locale(const char* )): Rewrite to deal
+ with the environment in a POSIX-compliant way while being thread
+ safe.
+ (locale::name()): Update to output POSIX environment strings.
+ * src/localename.cc
+ (locale::_Impl::_Impl(const _Impl&, size_t): Use
+ _S_categories_size_*, tweak.
+ (locale::_Impl::_Impl(facet**, size_t, bool)): Ditto.
+ (locale::_Impl::_Impl(const char*, size_t)): Name each category
+ individually.
+ (locale::_Impl::_M_replace_categories): Use strcpy.
+
+ * include/bits/locale_facets.h (numpunct::_M_initialize_numpunct):
+ Change default argument to NULL from _S_c_locale.
+ (timepunct::_M_initialize_timepunct): Same.
+ _S_c_locale cleanups.
+ * src/codecvt.c: _S_c_locale simplification.
+ * src/ctype.c: Same.
+ * src/globals.cc: Add fake_name.
+ * src/locale-inst.cc: Remove extra includes.
+ * src/locale.cc: Remove extra includes.
+ Add _S_extra_categories_size definition.
+ Correct "C" initialization.
+ (locale::facet::facet): Don't initialize _S_c_locale.
+ (locale::facet::_M_remove_reference): Adjust.
+ * src/localename: Use facet_vec, facet_name.
+ (locale::_Impl::_Impl(facet** __f, size_t __refs, bool)): Set
+ facet ref counts to one. Initialize _S_c_locale.
+ (locale::_Impl::_M_install_facet(id*, facet*)): Adjust facet ref
+ counts when installing unilaterally.
+
+ * config/locale/generic/c_locale.cc: Add _S_categories definition.
+ * config/locale/generic/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
+ * config/locale/generic/time_members.cc: _S_c_locale cleanup.
+
+ * config/locale/gnu/c_locale.cc: Add _S_categories definition.
+ (_S_destroy_c_locale): Move checks against _S_c_locale here.
+ * config/locale/gnu/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
+ * config/locale/gnu/ctype_members.cc: Simplify _S_destroy_c_locale
+ calls, _S_c_locale usage.
+ * config/locale/gnu/monetary_members.cc: Same, tweaks.
+ * config/locale/gnu/monetary_members.cc: Same.
+ * config/locale/gnu/time_members.cc: Same.
+ * config/os/gnu-linux/ctype_noninline.h: Use locale::classic().
+
+ * docs/html/22_locale/locale.html: Add bits about global locales
+ and "C" setlocale.
+
+ * testsuite/22_locale/facet.cc (test02): Add.
+ * testsuite/22_locale/static_members.cc (test02): Add.
+ * testsuite/22_locale/ctor_copy_dtor.cc (test04): Add.
+
+2002-10-07 Jonathan Wakely <jw@kayari.org>
+
+ * docs/html/configopts.html, docs/html/documentation.html,
+ docs/html/explanations.html, docs/html/install.html,
+ docs/html/17_intro/contribute.html, docs/html/17_intro/howto.html,
+ docs/html/17_intro/license.html, docs/html/18_support/howto.html,
+ docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
+ docs/html/21_strings/howto.html, docs/html/22_locale/codecvt.html,
+ docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
+ docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
+ docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
+ docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
+ docs/html/27_io/howto.html, docs/html/ext/howto.html,
+ docs/html/ext/sgiexts.html, docs/html/faq/index.html: Add DOCTYPEs.
+
+2002-10-03 Richard Earnshaw <rearnsha@arm.com>
+
+ PR libstdc++/3584
+ * config/cpu/arm/atomicity.h (__exchange_and_add): Don't try to use
+ ASM sequences that don't give us atomic addition operations. Instead
+ just add a comment explaining why it doesn't work.
+ (__atomic_add): Just use __exchange_and_add.
+ (__test_and_set, __always_swap): Delete.
+
+2002-10-02 Andreas Jaeger <aj@suse.de>
+
+ * config/abi/x86_64-unknown-linux-gnu/baseline_symbols.txt:
+ New file.
+
+2002-10-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.am (check-abi): Add @ to rule.
+ * Makefile.in: Regenerated.
+
+2002-09-27 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (num_put::_M_widen_int):
+ Deal correctly with grouped, showbased (oct or hex) zero.
+ * testsuite/22_locale/num_put_members_char.cc: Add test05.
+ * testsuite/22_locale/num_put_members_wchar_t.cc: Ditto.
+
+2002-09-27 Richard Henderson <rth@redhat.com>
+
+ * config/os/hpux/cpu_limits.h: Remove.
+
+ * include/std/std_limits.h (numeric_limits<T>::is_iec559): False
+ if denormals are not supported.
+
+2002-09-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (target_headers): Remove cpu_limits.h.
+ * include/Makefile.in: Regenerate.
+ * configure.in (CPU_LIMITS_INC_SRCDIR): Remove
+ * configure: Regenerate.
+ * configure.target (CPULIMITS): Remove.
+
+ * include/std/std_limits.h: Remove cpu_limits.h include.
+
+ * config/os/solaris/solaris2.7/os_defines.h (__glibcpp_long_bits):
+ Remove.
+ * config/os/irix/irix6.5/os_defines.h
+ (__glibcpp_long_double_bits): Remove.
+ (__glibcpp_wchar_t_bits): Remove.
+ (__glibcpp_long_bits): Remove.
+ * config/os/irix/irix5.2/os_defines.h
+ (__glibcpp_long_double_bits): Remove.
+ (__glibcpp_long_bits): Remove.
+ * config/os/hpux/os_defines.h (__glibcpp_wchar_t_is_signed): Remove.
+ * config/os/bsd/freebsd/os_defines.h:
+ (__glibcpp_long_double_bits): Remove.
+ * config/os/aix/os_defines.h (__glibcpp_wchar_t_bits): Remove.
+ (__glibcpp_wchar_t_is_signed): Remove.
+ (__glibcpp_long_bits): Remove.
+ * config/os/gnu-linux/os_defines.h (__glibcpp_long_bits): Remove.
+ (__glibcpp_long_double_bits): Remove.
+
+ * config/os/osf/osf5.0/cpu_limits.h: Remove.
+ * config/cpu/alpha/cpu_limits.h: Remove.
+ * config/cpu/arm/cpu_limits.h: Remove.
+ * config/cpu/cris/cpu_limits.h: Remove.
+ * config/cpu/generic/cpu_limits.h: Remove.
+ * config/cpu/generic/limits.h: Remove.
+ * config/cpu/ia64/cpu_limits.h: Remove.
+ * config/cpu/m68k/cpu_limits.h: Remove.
+ * config/cpu/mmix/cpu_limits.h: Remove.
+ * config/cpu/powerpc/cpu_limits.h: Remove.
+ * config/cpu/S390/cpu_limits.h: Remove.
+
+2002-09-25 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * testsuite/18_support/numeric_limits.cc: Check the maximum and
+ minimum values of the wchar_t type.
+
+2002-09-25 Mark Mitchell <mark@codesourcery.com>
+
+ * include/std/std_limits.h (numeric_limits<unsigned char>::digits):
+ Fix typo.
+
+2002-09-23 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_plain_char_is_signed,
+ __glibcpp_wchar_t_is_signed, __glibcpp_s8_max, __glibcpp_s8_min,
+ __glibcpp_s8_digits, __glibcpp_s8_digits10, __glibcpp_u8_min,
+ __glibcpp_u8_max, __glibcpp_u8_digits, __glibcpp_u8_digits10,
+ __glibcpp_s16_max, __glibcpp_s16_min, __glibcpp_s16_digits,
+ __glibcpp_s16_digits10, __glibcpp_u16_min, __glibcpp_u16_max,
+ __glibcpp_u16_digits, __glibcpp_u16_digits10, __glibcpp_s32_max,
+ __glibcpp_s32_min, __glibcpp_s32_digits, __glibcpp_s32_digits10,
+ __glibcpp_u32_min, __glibcpp_u32_max, __glibcpp_u32_digits,
+ __glibcpp_u32_digits10, __glibcpp_s64_max, __glibcpp_s64_min,
+ __glibcpp_s64_digits, __glibcpp_s64_digits10, __glibcpp_u64_min,
+ __glibcpp_u64_max, __glibcpp_u64_digits, __glibcpp_u64_digits10,
+ __glibcpp_bool_digits, __glibcpp_signed_char_min,
+ __glibcpp_signed_char_max, __glibcpp_signed_char_digits,
+ __glibcpp_signed_char_digits10, __glibcpp_unsigned_char_min,
+ __glibcpp_unsigned_char_max, __glibcpp_unsigned_char_digits,
+ __glibcpp_unsigned_char_digits10, __glibcpp_char_min,
+ __glibcpp_char_max, __glibcpp_char_digits, __glibcpp_char_digits10,
+ __glibcpp_signed_short_min, __glibcpp_signed_short_max,
+ __glibcpp_signed_short_digits, __glibcpp_signed_short_digits10,
+ __glibcpp_unsigned_short_min, __glibcpp_unsigned_short_max,
+ __glibcpp_unsigned_short_digits, __glibcpp_unsigned_short_digits10,
+ __glibcpp_signed_int_min, __glibcpp_signed_int_max,
+ __glibcpp_signed_int_digits, __glibcpp_signed_int_digits10,
+ __glibcpp_unsigned_int_min, __glibcpp_unsigned_int_max,
+ __glibcpp_unsigned_int_digits, __glibcpp_unsigned_int_digits10,
+ __glibcpp_signed_long_min, __glibcpp_signed_long_max,
+ __glibcpp_unsigned_long_digits, __glibcpp_unsigned_long_digits10,
+ __glibcpp_signed_long_long_min, __glibcpp_signed_long_long_max,
+ __glibcpp_signed_long_long_digits, __glibcpp_signed_long_long_digits10,
+ __glibcpp_wchar_t_min, __glibcpp_wchar_t_max, __glibcpp_wchar_t_digits,
+ __glibcpp_wchar_t_digits10): Remove.
+ (__glibcpp_byte, __glibcpp_word_bits, __glibcpp_word): Remove.
+ (__float_storage, __double_storage, __long_double_storage): Remove.
+ (__glibcpp_signed, __glibcpp_min, __glibcpp_max): New.
+ (__glibcpp_digits, __glibcpp_digits10): New.
+ (numeric_limits<T>::min): Use __glibcpp_min or limits.h builtins.
+ (numeric_limits<T>::max): Use __glibcpp_max or limits.h builtins.
+ (numeric_limits<T>::is_signed, T=char,wchar_t): Use __glibcpp_signed.
+ (numeric_limits<T>::digits): Use __glibcpp_digits.
+ (numeric_limits<T>::digits10): Use __glibcpp_digits10.
+ * testsuite/18_support/numeric_limits.cc (test03): Don't use
+ __glibcpp_s8_digits10 et al; check vs the installed versions
+ of digits10 for particular sizes.
+
+ * include/std/std_limits.h (__glibcpp_float_is_modulo,
+ __glibcpp_double_is_modulo, __glibcpp_long_double_is_modulo): Kill.
+ (numeric_limits<T>::is_modulo, T floating): Use false.
+
+2002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.am (all-multi): Fix multilib parallel build.
+
+2002-09-22 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_f32_round_error,
+ __glibcpp_f64_round_error, __glibcpp_f80_round_error,
+ __glibcpp_f96_round_error, __glibcpp_f128_round_error,
+ __glibcpp_float_round_error, __glibcpp_double_round_error,
+ __glibcpp_long_double_round_error, __glibcpp_float_round_style,
+ __glibcpp_double_round_style, __glibcpp_long_double_round_style): Kill.
+ (numeric_limits<char>::epsilon, round_error): Use constant 0.
+ (numeric_limits<float>::round_error): Use constant 0.5.
+ (numeric_limits<float>::round_style): Use round_to_nearest.
+ (numeric_limits<double>, numeric_limits<long double>): Similarly.
+
+ * include/std/std_limits.h (__glibcpp_f32_is_iec559,
+ __glibcpp_f64_is_iec559, __glibcpp_f80_is_iec559,
+ __glibcpp_f96_is_iec559, __glibcpp_f128_is_iec559,
+ __glibcpp_float_is_iec559, __glibcpp_double_is_iec559,
+ __glibcpp_long_double_is_iec559): Remove.
+ (numeric_limits<float>::is_iec559): Use has_infinity & has_quiet_NaN.
+ (numeric_limits<double>, numeric_limits<long double>): Similarly.
+
+ * include/std/std_limits.h (__glibcpp_integral_traps): New.
+ (__glibcpp_char_traps, __glibcpp_short_traps, __glibcpp_int_traps,
+ __glibcpp_long_traps, __glibcpp_wchar_t_traps,
+ __glibcpp_long_long_traps, __glibcpp_plain_char_traps,
+ __glibcpp_signed_char_traps, __glibcpp_unsigned_char_traps,
+ __glibcpp_signed_short_traps, __glibcpp_unsigned_short_traps,
+ __glibcpp_signed_int_traps, __glibcpp_unsigned_int_traps,
+ __glibcpp_signed_long_traps, __glibcpp_unsigned_long_traps,
+ __glibcpp_signed_long_long_traps, __glibcpp_unsigned_long_long_traps,
+ __glibcpp_char_is_modulo, __glibcpp_signed_char_is_modulo,
+ __glibcpp_signed_short_is_modulo, __glibcpp_signed_int_is_modulo,
+ __glibcpp_signed_long_is_modulo, __glibcpp_signed_long_long_is_modulo,
+ __glibcpp_wchar_t_is_modulo, __glibcpp_float_is_bounded,
+ __glibcpp_double_is_bounded, __glibcpp_long_double_is_bounded): Kill.
+ (numeric_limits<T>::traps, T integral): Use __glibcpp_integral_traps.
+ (numeric_limits<T>::is_modulo, T integral): Use true.
+ (numeric_limits<T>::is_bounded, T floating): Use true.
+
+2002-09-18 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/18_support/numeric_limits.cc (test_epsilon): New.
+
+2002-09-18 Richard Henderson <rth@redhat.com>
+
+ * testsuite/18_support/numeric_limits.cc: Add -mieee for alpha.
+
+2002-09-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c_shadow: Remove.
+ * include/bits/generic_shadow.h: Remove.
+ * include/Makefile.am: Remove generic_shadow.h.
+ * acinclude.m4: Remove c_shadow references.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * mkcshadow: Remove.
+ * mkinclosure: Remove.
+
+2002-09-16 Loren J. Rittle <ljrittle@acm.org>
+
+ libstdc++/7922
+ * include/ext/stl_rope.h (rope<>): Qualify dependent names
+ with `typename'.
+
+2002-09-16 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
+ __glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
+ __glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
+ __glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
+ __glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
+ __glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
+ __glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
+ __glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
+ __glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
+ __glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
+ __glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
+ __glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
+ __glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
+ __glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
+ __glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
+ __glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
+ __glibcpp_long_double_has_SNaN): Remove.
+ (__glibcpp_f128_is_iec559): True if IEEE.
+ (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
+ (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
+ (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
+ (std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
+ (std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
+ (std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
+ (std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
+ (std::numeric_limits<double>): Similarly.
+ (std::numeric_limits<long double>): Similarly.
+ * src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
+ (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
+ (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
+
+ * testsuite/18_support/numeric_limits.cc (test_infinity): New.
+ (test_denorm_min, test_qnan, test_is_iec559): New.
+
+2002-09-16 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/abi_check.cc: Pull shell fragments out into...
+ * config/abi/extract_symvers: ...here. New file.
+ * Makefile.am (check_abi): Change to match.
+ (new-abi-baseline): New target.
+ * Makefile.in: Regenerated.
+
+2002-09-16 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_f32_denorm_min_bytes,
+ __glibcpp_f32_has_denorm, __glibcpp_f64_denorm_min_bytes,
+ __glibcpp_f64_has_denorm, __glibcpp_f80_denorm_min_bytes,
+ __glibcpp_f80_has_denorm, __glibcpp_f96_denorm_min_bytes,
+ __glibcpp_f96_has_denorm, __glibcpp_f128_denorm_min_bytes,
+ __glibcpp_f128_has_denorm, __glibcpp_float_denorm_min_bytes,
+ __glibcpp_float_has_denorm, __glibcpp_double_denorm_min_bytes,
+ __glibcpp_double_has_denorm, __glibcpp_long_double_denorm_min_bytes,
+ __glibcpp_long_double_has_denorm): Remove.
+ (__glibcpp_float_denorm_min, __glibcpp_double_denorm_min,
+ __glibcpp_long_double_denorm_min): Remove.
+ (std::numeric_limits<float>::has_denorm): Use __FLT_DENORM_MIN__.
+ (std::numeric_limits<float>::denorm_min): Likewise.
+ (std::numeric_limits<double>): Similarly.
+ (std::numeric_limits<long double>): Similarly.
+ * src/limits.cc (__glibcpp_float_denorm_min,
+ __glibcpp_double_denorm_min, __glibcpp_long_double_denorm_min): Remove.
+
+2002-09-13 Andy Felt <afelt@uwsp.edu>
+
+ * docs/html/17_intro/howto.html: Update link.
+
+2002-09-13 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/run_doxygen: Massage man page for Iterator_types.3.
+ * docs/html/faq/index.html: Whitespace fixes.
+
+2002-09-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libmath/Makefile.am (LIBTOOL): Use --tag CC always for this
+ directory.
+ * libmath/Makefile.in: Regenerate.
+ * src/Makefile.am: Tweak comment.
+ * src/Makefile.in: Regenerate.
+
+ * config/locale/gnu/c_locale.h: Remove warnings.
+ Inject __uselocale into __gnu_cxx.
+ * config/locale/generic/c_locale.h: Match.
+
+2002-09-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (__convert_from_v): Remove.
+ * config/locale/gnu/c_locale.h (__convert_from_v): Add.
+ * config/locale/generic/c_locale.h (__convert_from_v): Add.
+
+2002-09-11 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (__convert_from_v):
+ Use __uselocale instead of setlocale for glibc 2.3+.
+
+2002-09-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/Makefile.am (sources): Edit.
+ (target_sources): New.
+ (target_sources_extra): New.
+ * src/Makefile.in: Regenerate.
+ * acinclude.m4: Set CCODECVT_CC.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * src/locale.cc: Move ctype definitions...
+ * src/ctype.cc: ...here. New file.
+ * src/locale.cc: Move codecvt definitions...
+ * src/codecvt.cc: ...here.
+ * config/generic/codecvt_members.cc: ...and here.
+ * config/gnu/codecvt_members.cc: ...and here.
+ * include/bits/codecvt.h: Tweak.
+ * include/bits/locale_facets: Tweak.
+
+ * src/bitset.cc: Correct license text.
+ * src/concept-inst.cc: Same.
+ * src/strstream.cc: Same.
+ * src/vterminate.cc: Same.
+
+2002-09-10 Gabriel Dos Reis <gdr@soliton.integrable-solutions.net>
+
+ * include/bits/stl_vector.h (vector<>): Don't use a name with
+ different meanings before and after re-evaluation in the completed
+ scope.
+ * include/bits/basic_string.h (basic_string<>): Likewise.
+ * include/bits/stl_bvector.h (vector<bool>): Likewise.
+ * include/bits/stl_deque.h (std): Likewise.
+ * include/bits/stl_list.h (list<>): Likewise.
+ * include/bits/stl_tree.h (_Rb_tree<>): Likewise.
+
+2002-09-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/codecvt.h (class __codecvt_abstract_base):
+ Add __c_locale type _M_c_locale_codecvt member.
+ (class codecvt<char, char, mbstate_t>,
+ class codecvt<wchar_t, char, mbstate_t>): Add new
+ codecvt(__c_locale, size_t) constructor.
+ (codecvt_byname::codecvt_byname): Update.
+ * src/codecvt.cc (class codecvt<char, char, mbstate_t>,
+ class codecvt<wchar_t, char, mbstate_t>): Update codecvt(size_t)
+ constructor and ~codecvt() destructor; define
+ codecvt(__c_locale, size_t) constructor.
+ (codecvt::do_out): Switch to _M_c_locale_codecvt around wcsrtombs call.
+ (codecvt::do_in): Ditto for mbsrtowcs call.
+ * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
+ Tweak construction of codecvt facets.
+
+2002-09-10 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/bits/locale_facets.tcc (__convert_from_v):
+ Replace strdup with ISO malloc and strcpy.
+
+2002-09-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/configopts.html: Change grouping. Note ABI impacts.
+ Update information for locale model defaults.
+ * docs/html/install.html: Update include directory
+ information.
+ Update testing information.
+ Update linux issues for named locales.
+ * docs/html/abi.txt: Fix typos.
+ Add more info.
+
+ * src/misc-inst.cc: Add missing instantiations.
+
+ * testsuite/abi_check.cc: Make output results more verbose.
+
+ * config/os/gnu-linux/ctype_base.h: Remove shadow headers injections.
+
+2002-09-07 Jakub Jelinek <jakub@redhat.com>
+
+ * config/locale/generic/messages_members.cc: Add specialization for
+ messages<wchar_t>.
+ * config/locale/ieee_1003.1-20021/messages_members.cc: Likewise.
+
+2002-09-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/localefwd.h: Tweak formatting.
+ * docs/html/abi.txt: Add.
+
+2002-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.target: Use cpu_include_dir="config/cpu/sparc" for all
+ sparc targets.
+ * config/cpu/sparc/atomicity.h: New file.
+ * config/cpu/sparc/sparc32/atomicity.h: Removed.
+ * config/cpu/sparc/sparc64/atomicity.h: Removed.
+
+2002-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ * config/os/gnu-linux/ctype_noninline.h
+ [_GLIBCPP_USE_SHADOW_HEADERS]: Remove using _C_legacy::__ctype_*.
+ (ctype<char>::classic_table): If _GLIBCPP_C_LOCALE_GNU, return
+ _S_c_locale->__ctype_b, otherwise temporarily switch to "C" locale
+ and return __ctype_b.
+ (ctype<char>::ctype(__c_locale, const mask*, bool, size_t)): If not
+ _GLIBCPP_C_LOCALE_GNU, temporarily switch to "C" locale and
+ initialize using __ctype_{b,tolower,toupper}.
+ (ctype<char>::ctype(const mask*, bool, size_t)): If
+ _GLIBCPP_C_LOCALE_GNU, initialize using
+ _S_c_locale->__ctype_{b,tolower,toupper}, otherwise temporarily
+ switch to "C" locale and initialize using __ctype_{b,tolower,toupper}.
+
+2002-09-05 Paolo Carlini <pcarlini@unitus.it>
+ Roland McGrath <roland@redhat.com>
+
+ PR libstdc++/7811
+ * src/locale.cc (locale::locale(__s)): Use getenv instead
+ of setenv for the environment locale.
+ * testsuite/22_locale/ctor_copy_dtor.cc (test03): New.
+
+2002-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ * config/abi/ia64-unknown-linux-gnu: Add.
+ * config/abi/ia64-unknown-linux-gnu/baseline_symbols.txt: New file.
+ * config/abi/alphaev67-unknown-linux-gnu: Add.
+ * config/abi/alphaev67-unknown-linux-gnu/baseline_symbols.txt: New file.
+
+2002-09-05 Jonathan Wakely <jw@kayari.org>
+
+ * docs/html/Makefile: Use more portable shell wildcard.
+ * docs/html/makedoc.awk: Nest elements correctly for XHTML conversion.
+ * docs/html/configopts.html, docs/html/documentation.html,
+ docs/html/explanations.html, docs/html/install.html,
+ docs/html/17_intro/contribute.html, docs/html/17_intro/howto.html,
+ docs/html/17_intro/license.html, docs/html/18_support/howto.html,
+ docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
+ docs/html/21_strings/howto.html, docs/html/22_locale/codecvt.html,
+ docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
+ docs/html/22_locale/locale.html, docs/html/22_locale/messages.html,
+ docs/html/23_containers/howto.html, docs/html/24_iterators/howto.html,
+ docs/html/25_algorithms/howto.html, docs/html/26_numerics/howto.html,
+ docs/html/27_io/howto.html, docs/html/ext/howto.html,
+ docs/html/ext/sgiexts.html, docs/html/faq/index.html: Convert
+ to XHTML.
+ * docs/html/faq/index.txt: Regenerate.
+
+2002-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_widen(char)):
+ Switch to _M_c_locale_ctype around btowc call.
+ (ctype<wchar_t>::do_widen(const char*, const char *, wchar_t*)):
+ Switch to _M_c_locale_ctype around mbsrtowcs call.
+ (ctype<wchar_t>::do_narrow(char)): Switch to _M_c_locale_ctype around
+ wctob call.
+ (ctype<wchar_t>::do_narrow(const char*, const char *, wchar_t*)):
+ Switch to _M_c_locale_ctype around wcsrtombs call.
+
+2002-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ * config/locale/gnu/monetary_members.cc
+ (moneypunct<wchar_t, true>::_M_initialize_moneypunct,
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct): Use
+ __uselocale instead of setlocale for glibc 2.3.
+
+2002-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ * config/locale/generic/c++locale_internal.h: New header.
+ * config/locale/gnu/c++locale_internal.h: New header.
+ * config/locale/gnu/c_locale.cc: Include it.
+ * config/locale/gnu/collate_members.cc: Include it.
+ * config/locale/gnu/ctype_members.cc: Include it.
+ * config/locale/gnu/messages_members.cc: Include it.
+ * config/locale/gnu/monetary_members.cc: Include it.
+ * config/locale/gnu/numeric_members.cc: Include it.
+ * config/locale/gnu/time_members.cc: Include it.
+ (_M_put): Reorder __strftime_l and __wcsftime_l arguments to match
+ glibc.
+ (_M_initialize_timepunct): Initialize _M_c_locale_timepunct for
+ C locale.
+ * acinclude.m4: Include string.h when testing strcoll_l.
+ For glibc 2.3 provide __-prefixed prototypes.
+ (CLOCALE_INTERNAL_H): Set, add AC_LINK_FILES line.
+ * aclocal.m4, configure: Rebuilt.
+
+2002-09-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h: Add declaration of specialization
+ here.
+ * config/locale/gnu/messages_members.cc: Add specialization for
+ messages<wchar_t>.
+ * config/locale/gnu/messages_members.h: Remove generic definition
+ of do_get.
+
+2002-09-04 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
+ __glibcpp_f32_has_infinity, __glibcpp_f64_infinity_bytes,
+ __glibcpp_f64_has_infinity, __glibcpp_f80_infinity_bytes,
+ __glibcpp_f80_has_infinity, __glibcpp_f96_infinity_bytes,
+ __glibcpp_f96_has_infinity, __glibcpp_f128_infinity_bytes,
+ __glibcpp_f128_has_infinity, __glibcpp_float_infinity_bytes,
+ __glibcpp_float_has_infinity, __glibcpp_double_infinity_bytes,
+ __glibcpp_double_has_infinity, __glibcpp_long_double_infinity_bytes,
+ __glibcpp_long_double_has_infinity): Remove.
+ (std::numeric_limits<float>, std::numeric_limits<double>,
+ std::numeric_limits<long double>): Use __builtin_huge_val
+ to implement has_infinity and infinity().
+ * src/limits.cc (__glibcpp_float_infinity, __glibcpp_double_infinity,
+ __glibcpp_long_double_infinity): Remove.
+
+2002-09-03 Richard Henderson <rth@redhat.com>
+
+ * include/std/std_limits.h (__glibcpp_f32_min, __glibcpp_f32_max,
+ __glibcpp_f32_digits, __glibcpp_f32_digits10, __glibcpp_f32_radix,
+ __glibcpp_f32_epsilon, __glibcpp_f32_min_exponent,
+ __glibcpp_f32_min_exponent10, __glibcpp_f32_max_exponent,
+ __glibcpp_f32_max_exponent10, __glibcpp_f64_min, __glibcpp_f64_max,
+ __glibcpp_f64_digits, __glibcpp_f64_digits10, __glibcpp_f64_radix,
+ __glibcpp_f64_min_exponent, __glibcpp_f64_min_exponent10,
+ __glibcpp_f64_max_exponent, __glibcpp_f64_max_exponent10,
+ __glibcpp_f80_min, __glibcpp_f80_max, __glibcpp_f80_digits,
+ __glibcpp_f80_digits10, __glibcpp_f80_radix, __glibcpp_f80_epsilon,
+ __glibcpp_f80_min_exponent, __glibcpp_f80_min_exponent10,
+ __glibcpp_f80_max_exponent, __glibcpp_f80_max_exponent10,
+ __glibcpp_f96_min, __glibcpp_f96_max, __glibcpp_f96_digits,
+ __glibcpp_f96_digits10, __glibcpp_f96_radix, __glibcpp_f96_epsilon,
+ __glibcpp_f96_min_exponent, __glibcpp_f96_min_exponent10,
+ __glibcpp_f96_max_exponent, __glibcpp_f96_max_exponent10,
+ __glibcpp_f128_min, __glibcpp_f128_max, __glibcpp_f128_digits,
+ __glibcpp_f128_digits10, __glibcpp_f128_radix, __glibcpp_f128_epsilon,
+ __glibcpp_f128_min_exponent, __glibcpp_f128_min_exponent10,
+ __glibcpp_f128_max_exponent, __glibcpp_f128_max_exponent10,
+ __glibcpp_float_min, __glibcpp_float_max, __glibcpp_float_digits,
+ __glibcpp_float_digits10, __glibcpp_float_radix,
+ __glibcpp_float_epsilon, __glibcpp_float_min_exponent,
+ __glibcpp_float_min_exponent10, __glibcpp_float_max_exponent,
+ __glibcpp_float_max_exponent10, __glibcpp_double_min,
+ __glibcpp_double_max, __glibcpp_double_digits,
+ __glibcpp_double_digits10, __glibcpp_double_radix,
+ __glibcpp_double_epsilon, __glibcpp_double_min_exponent,
+ __glibcpp_double_min_exponent10, __glibcpp_double_max_exponent,
+ __glibcpp_double_max_exponent10, __glibcpp_long_double_min,
+ __glibcpp_long_double_max, __glibcpp_long_double_digits,
+ __glibcpp_long_double_digits10, __glibcpp_long_double_radix,
+ __glibcpp_long_double_epsilon, __glibcpp_long_double_min_exponent,
+ __glibcpp_long_double_min_exponent10,
+ __glibcpp_long_double_max_exponent,
+ __glibcpp_long_double_max_exponent10): Remove macros.
+ (std::numeric_limits<float>, std::numeric_limits<double>,
+ std::numeric_limits<long double>): Use protected float.h macros.
+
+2002-09-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am: Use LD_RUN_PATH when linking abi_check.
+ Fix spelling in comment.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/abi_check.cc: Use string literals to build 'cmd' rather
+ than 'quote' and 'bslash'.
+
+2002-08-31 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Minor comment tweaks.
+
+ * docs/html/makedoc.awk: New file...
+ * docs/html/Makefile: ...called from here...
+ * docs/html/documentation.html: ...to help generate this.
+
+ * docs/html/21_strings/howto.html: Prepare for new entry.
+ * include/bits/basic_string.h: Initial basic_stirng hook for
+ doxygen. Remove trailing whitespace.
+ * include/bits/char_traits.h: Point to onlinedocs for new entry.
+ * include/bits/stringfwd.h: Add doxygen hooks for string and
+ wstring typedefs.
+
+2002-08-29 Richard Earnshaw <rearnshaw@arm.com>
+
+ * config/cpu/arm/cpu_limits.h: New file.
+ * configure.target: Use config/cpu/arm for XScale and StrongARM
+ configurations.
+
+2002-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * include/std/std_limits.h (__glibcpp_char_bits,
+ __glibcpp_short_bits, __glibcpp_int_bits, __glibcpp_long_bits,
+ __glibcpp_long_long_bits, __glibcpp_float_bits,
+ __glibcpp_double_bits, __glibcpp_long_double_bits): Remove. Use
+ compiler predifined macros.
+ (__glibcpp_wchar_t_is_signed): Define based on compiler predefined
+ __WCHAR_UNSIGNED__.
+
+2002-08-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
+ __glibcpp_f32_has_infinity, __glibcpp_f32_QNaN_bytes,
+ __glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
+ __glibcpp_f32_has_SNaN, __glibcpp_f32_denorm_min_bytes,
+ __glibcpp_f32_has_denorm, __glibcpp_f32_is_iec559,
+ __glibcpp_f64_infinity_bytes,
+ __glibcpp_f64_has_infinity, __glibcpp_f64_QNaN_bytes,
+ __glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
+ __glibcpp_f64_has_SNaN, __glibcpp_f64_denorm_min_bytes,
+ __glibcpp_f64_has_denorm, __glibcpp_f64_is_iec559,
+ __glibcpp_f80_infinity_bytes,
+ __glibcpp_f80_has_infinity, __glibcpp_f80_QNaN_bytes,
+ __glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
+ __glibcpp_f80_has_SNaN, __glibcpp_f80_denorm_min_bytes,
+ __glibcpp_f80_has_denorm, __glibcpp_f80_is_iec559,
+ __glibcpp_f96_infinity_bytes,
+ __glibcpp_f96_has_infinity, __glibcpp_f96_QNaN_bytes,
+ __glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
+ __glibcpp_f96_has_SNaN, __glibcpp_f96_denorm_min_bytes,
+ __glibcpp_f96_has_denorm, __glibcpp_f96_is_iec559,
+ __glibcpp_f128_infinity_bytes,
+ __glibcpp_f128_has_infinity, __glibcpp_f128_QNaN_bytes,
+ __glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
+ __glibcpp_f128_has_SNaN, __glibcpp_f128_denorm_min_bytes,
+ __glibcpp_f128_has_denorm, __glibcpp_f128_is_iec559,
+ __glibcpp_float_infinity_bytes,
+ __glibcpp_float_has_infinity, __glibcpp_float_QNaN_bytes,
+ __glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
+ __glibcpp_float_has_SNaN, __glibcpp_float_denorm_min_bytes,
+ __glibcpp_float_has_denorm, __glibcpp_float_is_iec559,
+ __glibcpp_double_infinity_bytes,
+ __glibcpp_double_has_infinity, __glibcpp_double_QNaN_bytes,
+ __glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
+ __glibcpp_double_has_SNaN, __glibcpp_double_denorm_min_bytes,
+ __glibcpp_double_has_denorm, __glibcpp_double_is_iec559,
+ __glibcpp_long_double_infinity_bytes,
+ __glibcpp_long_double_has_infinity, __glibcpp_long_double_QNaN_bytes,
+ __glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
+ __glibcpp_long_double_has_SNaN, __glibcpp_long_double_denorm_min_bytes,
+ __glibcpp_long_double_has_denorm, __glibcpp_long_double_is_iec559:
+ New macros.
+ (__glibcpp_word_bits, __glibcpp_word): Likewise.
+ (__glibcpp_byte): New typedef.
+ (__float_storage, __double_storage, __long_double_storage): New types.
+ (__glibcpp_float_infinity, __glibcpp_float_QNaN,
+ __glibcpp_float_SNaN, __glibcpp_float_denorm_min): Now
+ objects. Declare.
+ (__glibcpp_double_infinity, __glibcpp_double_QNaN,
+ __glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
+ (__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
+ __glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
+ Likewise.
+
+ * src/limits.cc (__glibcpp_float_infinity, __glibcpp_float_QNaN,
+ __glibcpp_float_SNaN, __glibcpp_float_denorm_min): Define.
+ (__glibcpp_double_infinity, __glibcpp_double_QNaN,
+ __glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
+ (__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
+ __glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
+ Likewise.
+
+2002-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * include/std/std_limits.h: Indent conditional macro definitions.
+
+2002-08-23 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.am (check-abi): Specify current directory.
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Fix shell syntax, use
+ abi_baseline_triplet in baseline_file.
+ * Makefile.in, aclocal.m4, configure: Regenerate.
+ * configure.target: Add abi_baseline_triplet with default.
+ * testsuite/abi_check.cc: More error checking.
+
+2002-08-23 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/linker-map.gnu: Verbose comments, clean up spacing.
+ * include/bits/stl_alloc.h: Fix indentation of 'if' bodies, return
+ statements.
+ __allocator: Change class declaration to struct.
+ * docs/html/17_intro/C++STYLE: Fix typo.
+ * include/bits/stl_deque.h, include/bits/stl_list.h,
+ include/bits/stl_map.h, include/bits/stl_multimap.h,
+ include/bits/stl_vector.h: Fix fallout from typo.
+
+2002-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Set
+ GLIBCPP_BUILD_ABI_CHECK based on cross compiling, build, host
+ variables.
+ * aclocal.m4: Regenerate.
+ * testsuite/Makefile.am (noinst_PROGRAMS): Make conditional on
+ native compiling.
+ * testsuite/Makefile.in: Regenerate.
+
+2002-08-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/abi_check.cc: Enhance shell portability.
+ Support older binutils/readelf.
+ * config/abi/i386-unknown-freebsd4.6: Add.
+ * config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file.
+
+2002-08-22 Paolo Carlini <pcarlini@unitus.it>
+
+ * docs/html/faq/index.html: Add Loren James Rittle and
+ Paolo Carlini to the list of v3 maintainers.
+ * docs/html/faq/index.txt: Ditto.
+ * docs/html/17_intro/RELEASE-NOTES: Ditto.
+
+2002-08-22 Benjamin Kosnik <bkoz@redhat.com>
+ Phil Edwards <pme@gcc.gnu.org>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (check-abi): New rule.
+ * Makefile.in: Regenerate.
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Export baseline_file.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (noinst_PROGRAMS): Add abi_check.
+ (abi_check_SOURCES): Add.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/abi_check.cc: New file.
+ * config/abi: Add.
+ * config/abi/i686-pc-linux-gnu: Add.
+ * config/abi/i686-pc-linux-gnu/baseline_symbols.txt: New file.
+
+2002-08-19 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (libtool_VERSION): Update to 5:1:0.
+ * configure: Regenerate.
+
+2002-08-19 Jonathan Wakely <jw@kayari.org>
+
+ * docs/html/configopts.html, docs/html/documentation.html,
+ docs/html/install.html, docs/html/22_locale/codecvt.html,
+ docs/html/22_locale/ctype.html, docs/html/22_locale/howto.html,
+ docs/html/22_locale/locale.html,
+ docs/html/22_locale/messages.html: Conform to HTML 4.01 standard.
+
+2002-08-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/stdio_filebuf.h (stdio_filebuf): Explicitly set
+ _M_buf_size_opt to zero when unbuffering.
+ * include/bits/fstream.tcc (filebuf::showmanyc): Simplify.
+ Consistency checks for _M_buf_size_opt.
+
+ Revert PR libstdc++/7445
+ * src/locale.cc (locale::classic): Revert.
+
+ * docs/html/17_intro/TODO: Add.
+
+2002-08-15 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/documentation.html: Update doxygen links for 3.2.
+
+2002-08-15 Steve Ellcey <sje@cup.hp.com>
+
+ * libsupc++/unwind-cxx.h (__cxa_exception): Change catchTemp
+ type from void* to _Unwind_Ptr.
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
+ Do not cast landing_pad or base_of_encoded_value to (void *).
+ * libsupc++/eh_throw.cc (__gxx_exception_cleanup):
+ Accept _URC_NO_REASON as a valid reason code.
+
+2002-08-14 Jonathan Wakely <jw@kayari.org>
+
+ * docs/html/22_locale/messages.html: Use HTML entities for
+ punctuation.
+
+2002-08-13 Jonathan Wakely <jw@kayari.org>
+ Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/documentation.html: Use HTML entities for punctuation.
+
+2002-08-09 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/deque.tcc, include/bits/list.tcc,
+ include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
+ include/bits/stl_list.h, include/bits/stl_map.h,
+ include/bits/stl_multimap.h, include/bits/stl_queue.h,
+ include/bits/stl_stack.h, include/bits/stl_vector.h,
+ include/bits/vector.tcc: Re-indent contents of namespace std,
+ re-wrap comment lines as necessary.
+
+2002-08-08 Danny Smith <dannysmith@users.sourceforge.net>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/istream.tcc (basic_istream::ignore): Use sbumpc,
+ not snextc.
+ * testsuite/27_io/narrow_stream_objects.cc (test10): Add.
+
+2002-08-07 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * libsupc++/Makefile.am (LTCOMPILE): Add LIBSUPCXX_PICFLAGS.
+ * libsupc++/Makefile.in: Regenerate.
+
+2002-08-05 Gabriel Dos Reis <gdr@nerim.net>
+
+ PR/7491
+ * include/bits/slice_array.h(_DEFINE_VALARRAY_OPERATOR):
+ Instantiate with new function objects.
+ * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise.
+ Reformat. Uglify.
+ * include/bits/gslice_array.h: Likewise.
+ * include/bits/indirect_array.h: Likewise.
+
+2002-08-03 Gabriel Dos Reis <gdr@nerim.net>
+
+ * testsuite/26_numerics/valarray_name_lookup.cc: Rename from
+ testsuite/26_numerics/valarray_name_lookup.C
+
+ * include/bits/valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our
+ object function surrogates.
+ * include/bits/valarray_meta.h (__shift_left): Fix typo.
+ (_BinFunClos<>): Remove.
+ (_BinFunBase<>): Likewise.
+ (_BinFunBase1<>):Likewise.
+ (_BinFunBase2<>): Likewise.
+ (_DEFINE_EXPR_RELATIONAL_OPERATOR): Likewise.
+ (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
+ (_DEFINE_EXPR_BINARY_OPERATOR): Likewise.
+ (_DEFINE_EXPR_BINARY_FUNCTION): Likewise.
+ * include/std/std_valarray.h: Dont #include <functional> anymore.
+ (_Bitwise_or<>, _Bitwise_and<>, _Bitwise_xor<>, _Shift_left<>,
+ _Shift_right<>): Remove.
+ (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT): Adjust instantiation.
+ (_DEFINE_BINARY_OPERATOR): Tweak definition.
+ (_DEFINE_LOGICAL_OPERATOR): Remove.
+ * testsuite/26_numerics/valarray_name_lookup.C (main): Add more tests.
+
+2002-08-02 Gabriel Dos Reis <gdr@nerim.net>
+
+ * include/bits/valarray_meta.h (_UnFunBase<>): Remove.
+ (_UnFunClos<>): Same.
+ (_UnBase<>): Reformat. Make first template-parameter non
+ template.
+ (_UnClos<>): Likewise.
+ (_Expr<>): Reformate. Adjust unary member operator return types.
+ (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
+ (_DEFINE_EXPR_UNARY_FUNCTION): Likewise.
+ * include/std/std_valarray.h (_UnClos<>): Adjust declaration.
+ (valarray<>::_UnaryOp<>): New nested traits. Adjust unary member
+ operator return types. Reformat.
+ (_Bitwise_not): Remove.
+ (_DEFINE_VALARRAY_UNARY_OPERATOR): Adjust definition.
+ * testsuite/26_numerics/valarray_name_lookup.C: New test.
+
+2002-08-02 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
+ (scan_is): Use this->is.
+ (scan_not): Likewise.
+
+2002-08-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revert PR libstdc++/6594
+ * src/strstream.cc (strstreambuf): Revert.
+ (strstreambuf::overflow): Same.
+ (strstreambuf::~strstreambuf): Same.
+ * testsuite/backward/strstream_members.cc (test02): Add.
+
+ * docs/html/abi.txt: Update. Spell check.
+
+ * testsuite/19_diagnostics/stdexceptions.cc (test04): Add bool test.
+
+ * testsuite/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/testsuite_hooks.h: Use __throw_exception_again,
+ include functexcept.h so that -fno-exceptions will build.
+
+2002-08-02 Gabriel Dos Reis <gdr@nerim.net>
+
+ * include/bits/valarray_meta.h (__unary_plus, __negate,
+ __bitwise_not, __plus, __minus, __multiplies, __divides,
+ __modulus, __bitwise_xor, __bitwise_or, __bitwise_and,
+ __shift_left, __shift_right, __logical_and, __logical_or,
+ __logical_not, __equal_to, __not_equal_to, __less, __less_equal,
+ __greater_equal, __greater, __atan2, __pow): New function object
+ classes.
+ (__fun<>): New function traits class.
+
+2002-08-01 Rick Danos <rdanos@hotmail.com>
+
+ PR libstdc++/7461
+ * config/os/newlib/ctype_noninline.h (classic_table): Add offset.
+ * config/os/newlib/ctype_inline.h (is): Use static_cast.
+
+2002-08-01 Neil Booth <neil@daikokuya.co.uk>
+
+ * libsupc++/Makefile.am (LT_COMPILE): Remove C++ flags.
+ * libsupc++/Makefile.in: Regenerate.
+
+2002-08-01 Benjamin Kosnik <bkoz@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * config/linker-map.gnu: Change CXXABI_1 to CXXABI_1.2,
+ GLIBCPP_3.1 to GLIBCPP_3.2.
+
+2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR libstdc++/7442
+ * libsupc++/cxxabi.h (class __base_class_type_info::hwm_bit):
+ Change to __hwm_bit.
+ (__class_type_info): And here.
+
+2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7442
+ * libsupc++/cxxabi.h
+ (__base_class_info): Change to __base_class_type_info. 2.9.5p6c
+ (__base_class_info::__base): Change to __base_type. 2.9.5p6c
+ (__base_class_info::offset_shift): Change to __offset_shift. 2.9.5p6c
+ (__vmi_class_type_info::__base_info): Don't make const, of type
+ __base_class_type_info, as per 2.9.5p6c
+ (__pbase_type_info::__qualifier_flags): Change to __flags, as per
+ 2.9.5p7.
+ (__pbase_type_info::__qualifier_masks): Change to __masks, as per
+ 2.9.5p7.
+ (__pointer_to_member_type_info::__context_class): Change member to
+ __context, as per 2.9.5p9.
+ * libsupc++/tinfo2.cc (__pointer_catch): Change __context_class to
+ __context.
+ * libsupc++/tinfo2.cc (__do_catch): Change __qualifier_flags to
+ __flags.
+ * libsupc++/tinfo.cc (__do_find_public_src): Change __base to
+ __base_type.
+ * libsupc++/tinfo.cc (__do_dyncast): Same.
+ * libsupc++/tinfo.cc (__do_upcast): Same.
+
+2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/fstream.cc: Add _GLIBCPP_USE_WCHAR_T guards.
+
+2002-07-31 Simon Whomsley <whomsley@avacadcam.com>
+
+ * docs/html/22_locale/howto.html: Fix.
+
+2002-07-31 Alex Kompel <shurik@sequoiap.com>
+
+ PR libstdc++/7445
+ * src/locale.cc (locale::classic): Move locks inside !_S_classic
+ block.
+
+2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/abi.txt: Update.
+
+2002-07-30 Benjamin Kosnik <bkoz@redhat.com>
+ Gabriel Dos Reis <gdr@nerim.net>
+
+ * include/bits/char_traits.h: Remove generic definitions.
+ * include/bits/streambuf_iterator.h (istreambuf_iterator): Use
+ eof, not -2.
+ * include/bits/istream.tcc (istream::readsome): Don't check
+ against eof, instead use constants.
+ (istream::sync): Same.
+ (istream::sentry::sentry): Use eq_int_type.
+ (istream::get): Same.
+ * include/bits/ostream.tcc: Change __pad to
+ __pad<_CharT, _Traits>::_S_pad.
+ * include/bits/locale_facets.h: Add __pad_traits generic and
+ ostreambuf_iterator specialization.
+ * include/bits/locale_facets.tcc: Change __pad into struct __pad
+ with a _CharT and _Traits template parameter and _S_pad static
+ member function.
+ * src/locale-inst.cc: Update __pad instantiations.
+
+ * include/std/std_fstream.h: Declare _M_underflow_common
+ specializations.
+ * src/fstream.cc: New. Add _M_underflow_common specializations.
+ * include/bits/fstream.tcc (filebuf::close): Use traits_type.
+ (filebuf::_M_underflow_common(bool)): Remove generic version, as
+ sys_ungetc and custom int_types don't get along.
+ * include/std/std_streambuf.h: Add _M_pos.
+ * src/Makefile.am (sources): Add fstream.cc.
+ * src/Makefile.in: Regenerate.
+
+ * testsuite/21_strings/capacity.cc: Add char_traits specializations.
+ * testsuite/22_locale/codecvt_members_unicode_char.cc: Same.
+ * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc: Same.
+ * testsuite/22_locale/ctor_copy_dtor.cc: Same.
+ * testsuite/27_io/filebuf_virtuals.cc (test07): Move to...
+ * testsuite/27_io/filebuf.cc: ...here.
+ * testsuite/testsuite_hooks.h: Add gnu_char, gnu_int, char_traits
+ specialization for both.
+ * testsuite/27_io/streambuf.cc: Add instantiation test,
+ testsuite_hooks include.
+ * testsuite/27_io/istream.cc: Same.
+ * testsuite/27_io/ostream.cc: Same.
+ * testsuite/27_io/fstream.cc: Same.
+ * testsuite/27_io/stringstream.cc: Same.
+ * testsuite/27_io/filebuf.cc: Same.
+ * testsuite/27_io/stringbuf.cc: Same.
+
+2002-07-29 Alan Modra <amodra@bigpond.net.au>
+
+ * config/cpu/powerpc/cpu_limits.h (__glibcpp_long_bits): Define.
+ * configure.target (cpu_include_dir): Use cpu/powerpc for powerpc64.
+ * config/cpu/powerpc/atomicity.h (__always_swap): Remove.
+ (__test_and_set): Remove.
+ (_STWCX): Define and use.
+
+2002-07-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * libsupc++/new (placement delete): Remove unused parameter names.
+
+2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7216
+ * include/std/std_istream.h (basic_iostream): Add typedefs for
+ char_type, int_type, pos_type, off_type, and traits_type.
+ * testsuite/27_io/iostream.cc (test01): Add typedef tests.
+ * testsuite/27_io/istream.cc: Same.
+ * testsuite/27_io/ostream.cc: Same.
+ * testsuite/27_io/filebuf.cc: Same.
+ * testsuite/27_io/stringbuf.cc: Replace content, move to...
+ * testsuite/27_io/stringbuf_members.cc: ...here.
+ * testsuite/27_io/streambuf.cc: Replace content, move to...
+ * testsuite/27_io/streambuf_members.cc: ...here.
+ * testsuite/27_io/stringstream.cc: Replace content, move to...
+ * testsuite/27_io/stringstream_members.cc: ...here.
+ * testsuite/27_io/ios.cc: New file.
+ * testsuite/27_io/fstream.cc: New file.
+ * testsuite/27_io/ifstream.cc: New file.
+ * testsuite/27_io/ofstream.cc: New file.
+ * testsuite/27_io/istringstream.cc: New file.
+ * testsuite/27_io/ostringstream.cc: New file.
+
+2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7220
+ * include/bits/istream.tcc (istream::ignore): Don't extract on
+ zero.
+ * testsuite/27_io/istream_unformatted.cc (test10): Add.
+
+2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base_type.cc: Move to...
+ * testsuite/27_io/ios_base_types.cc: ...here.
+
+2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7222
+ * src/locale.cc (locale::locale(const char*)): Use setlocale NULL.
+ * testsuite/22_locale/ctor_copy_dtor.cc (test02): New.
+
+2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7230
+ * config/linker-map.gnu: Revert strstream patch from 2002-07-01.
+ * include/Makefile.am (backward_headers): Use strstream, not
+ strstream.h.
+ * include/Makefile.in: Regenerate.
+ * include/backward/strstream: Revert.
+ * include/backward/strstream.h: Remove.
+ * src/strstream.cc: Revert.
+ * testsuite/backward/strstream_members.cc: Change include.
+
+2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7219
+ * include/bits/ios_base.h (ios_base::streampos): Add.
+ (ios_base::streamoff): Add.
+ * testsuite/27_io/ios_base_type.cc: New.
+
+2002-07-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7286
+ * libsupc++/new: Add placement delete.
+ * testsuite/18_support/new_delete_placement.cc: New.
+
+ * docs/html/abi.txt: Fix typos.
+
+2002-07-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: Remove libstdc++-v3.0.86 links,
+ confusing usage of "latest."
+ De-tangle contributor information from introductory notes.
+ Move abi.txt link placement, activate.
+ Re-organize.
+ Move chapter info into old FAQ format.
+ * docs/html/organization.html: Removed, obsoleted by doxygen work.
+ * docs/html/abi.txt: Add notes on testing ABI changes.
+
+2002-07-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/abi.txt: New file.
+ * docs/html/23_containers/howto.html: Tweak vector-overhead text.
+ * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
+ Import from upstream, R22.
+
+ * include/bits/char_traits.h, include/bits/stl_iterator.h,
+ include/bits/stl_iterator_base_types.h, libsupc++/exception,
+ libsupc++/new, libsupc++/typeinfo: Use @brief markup.
+
+ * include/bits/deque.tcc, include/bits/stl_alloc.h,
+ include/bits/stl_deque.h, include/bits/stl_list.h: Postpone removal
+ of deprecated functions until 3.4. (Same timeframe, different text.)
+ * include/bits/stl_vector.h: Ditto. Also do the same cleanups that
+ the other sequence classes received.
+
+2002-07-18 Brendan Kehoe <brendan@zen.org>
+
+ * bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR): Fix typo of
+ _Nname to _Name.
+
+2002-07-19 Gabriel Dos Reis <gdr@nerim.net>
+
+ DR/123
+ * include/bits/slice_array.h
+ (slice_array<T>::operator=(const T&)): Constify.
+ * include/bits/gslice_array.h
+ (gslice_array<T>::operator=(const T&)): Likewise.
+ * include/bits/mask_array.h
+ (mask_array<T>::operator=(const T&)): Likewise.
+ * include/bits/indirect_array.h
+ (indirect_array<T>::operator=(const T&): Likewise.
+
+2002-07-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/run_doxygen: Remove template parameter names from
+ "Compound List" summary page. Reformat.
+ * docs/html/documentation.html: XHTML fixes.
+
+2002-07-16 Andreas Schwab <schwab@suse.de>
+
+ * libsupc++/new (set_new_handler): Declare to not throw any
+ exceptions.
+ * libsupc++/new_handler.cc (set_new_handler): Likewise.
+
+2002-07-16 Gabriel Dos Reis <gdr@nerim.net>
+
+ * include/Makefile.am (bits_headers): Remove slice.h
+ * include/Makefile.in: Regenerate.
+ * include/bits/slice.h (slice): move to include/bits/slice_array.h
+ * include/bits/slice.h Remove.
+ * include/std/std_valarray.h: Don't #include bits/slice.h anymore.
+ * include/bits/slice_array.h: Comply to official coding styles.
+ * testsuite/26_numerics/slice.cc: New test.
+
+2002-07-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config/os/solaris/solaris2.5/ctype_base.h (ctype_base): Fix
+ print to match vendor <ctype.h>.
+
+2002-07-15 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Fix download links.
+ * docs/html/faq/index.txt: Regenerate.
+ * docs/html/17_intro/porting.html: Regenerate from earlier changes.
+
+2002-07-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.target (target_os switch): Allow for irix6*o32
+ configurations.
+
+2002-07-10 Gabriel Dos Reis <gdr@nerim.net>
+
+ * include/bits/valarray_meta.h (_UnFunBase): Take a second
+ template parameter. Remove _M_func data member.
+ (_UnFunClos): Take a third template parameter.
+ (__abs, __cos, __acos, __cosh, __sin, __asin, __sinh, __tan,
+ __atan, __tanh, __exp, __log, __log10, __sqrt): New classes.
+ (_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
+
+2002-07-08 Eric Christopher <echristo@redhat.com>
+
+ * configure.target: Fix comment for mips atomicity. Add
+ mips*-*-linux* target, enable atomic operations there.
+ * config/cpu/mips/atomicity.h: Fix comments, remove
+ #ifndef/#endif. Add push/pop mips2.
+
+2002-07-08 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * include/bits/stl_deque.h (_Deque_alloc_base): Change order of
+ member declarations to avoid compiler warnings and restore 3.1 ABI.
+
+2002-07-08 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/23_containers/howto.html: Link to dk_std::vector paper
+ and homepage.
+
+2002-07-07 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/7186
+ * include/bits/stl_deque.h (_Deque_iterator::operator-):
+ Make non-member, as already happens for the comparison
+ operators in accord with DR179 (Ready).
+ * testsuite/23_containers/deque_operators.cc: Add test02.
+
+2002-07-04 Benjamin Kosnik <bkoz@redhat.com>
+ Jack Reeves <jackw_reeves@hotmail.com>
+
+ * include/std/std_streambuf.h (basic_streambuf::_M_buf): Change to
+ size_t, from int_type.
+ (basic_streambuf::_M_buf_size_opt): Same.
+ (basic_streambuf::_S_pback_sizex): Same.
+ * include/bits/streambuf.tcc: Same.
+ * include/std/std_streambuf.h (basic_streambuf::snextc): Use
+ eq_int_type.
+ (basic_streambuf::uflow): Same.
+ * include/bits/sstream.tcc (basic_stringbuf::overflow): Use
+ to_char_type.
+ * include/bits/basic_ios.tcc (basic_ios::init): Use _CharT().
+ * include/bits/streambuf.tcc (basic_streambuf::xsgetn): Use
+ eq_int_type.
+ (basic_streambuf::xsputn): Same.
+ (__copy_streambufs): Same.
+
+2002-07-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_memory.h: Fix formatting.
+ * testsuite/20_util/auto_ptr_neg.cc: New.
+ * testsuite/20_util/auto_ptr.cc: Tweaks.
+ * testsuite/23_containers/map_operators.cc (test01): Split into..
+ * testsuite/23_containers/map_operators_neg.cc (test01): ...this. New.
+ * testsuite/23_containers/set_operators.cc: Move to...
+ * testsuite/23_containers/set_operators_neg.cc: ...here.
+ * testsuite/README: Add some more naming rules.
+
+2002-07-03 Steev Wilcox <steev@paradigmds.com>
+
+ PR libstdc++/7057
+ * include/ext/stl_hashtable.h: Fix.
+ * testsuite/ext/hash_map.cc: New.
+
+2002-07-03 Jack Reeves <jackw_reeves@hotmail.com>
+ Kenny Simpson <theonetruekenny@yahoo.com>
+ Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/3946
+ * testsuite/20_util/auto_ptr.cc (test08): New test.
+ * include/std/std_memory.h (auto_ref_ptr): Make constructor explicit.
+ (auto_ptr::operator auto_ptr_ref): Fix typo.
+ General reformatting and doxygenating of the whole file.
+
+2002-07-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7097
+ * include/c/std_cwchar.h: Fix.
+
+2002-07-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6410
+ * include/bits/locale_facets.h (moneypunct::moneypunct): Add const
+ char* name parameter.
+ * config/locale/gnu/monetary_members.cc: Use it.
+ * config/locale/generic/monetary_members.cc: Same.
+ * src/localename.cc (_Impl::_Impl(const char*, size_t)): Use it.
+
+ * include/backward/strstream.h: Update date.
+
+2002-07-02 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6642
+ * include/bits/stl_iterator.h
+ (__normal_iterator::operator-(const __normal_iterator&)):
+ Make non-member, as already happens for the comparison
+ operators in accord with DR179 (Ready).
+ * testsuite/24_iterators/iterator.cc: Add test from the PR.
+
+2002-07-02 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/7173
+ * acinclude.m4: Simplify determination of gcc_version, and move
+ up to GLIBCPP_CONFIGURE.
+ * configure.in (release_VERSION): Really remove.
+ (AM_INIT_AUTOMAKE, AM_CONFIG_HEADER): Move after GLIBCPP_CONFIGURE.
+ * aclocal.m4, configure: Regenerate.
+
+2002-07-02 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/configopts.html, docs/html/install.html: Tweaks.
+ * include/ext/algorithm, include/ext/hash_map, include/ext/hash_set,
+ include/ext/iterator, include/ext/numeric, include/ext/rb_tree,
+ include/ext/slist, include/ext/stl_rope.h: Add doxygen hooks.
+
+2002-07-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/backward/strstream: Remove namespace std. Transfer to...
+ * include/backward/strstream.h: ...here. Qualify std names.
+ * src/strstream.cc: Remove namespace std.
+ * include/Makefile.am (backward_headers): Remove strstream.h.
+ * include/Makefile.in: Regenerate.
+ * config/linker-map.gnu: Export strstream bits.
+
+ * src/fstream-inst.cc: Tweak.
+ * src/io-inst.cc: Same.
+ * src/istream-inst.cc: Same.
+ * src/misc-inst.cc: Same.
+ * src/ostream-inst.cc: Same.
+ * src/sstream-inst.cc: Same.
+ * src/valarray-inst.cc: Same.
+ * src/misc-inst.cc: Remove unused instantiations.
+
+2002-07-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (libtool_VERSION): Bump to 5:0:0.
+ * configure: Regenerate.
+
+2002-06-28 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/7157, PR libstdc++/7158, PR libstdc++/7161
+ * include/std/std_queue.h: Include deque.tcc, vector.tcc.
+ * include/std/std_stack.h: Include deque.tcc.
+ * testsuite/23_containers/adaptors.cc: New file.
+
+2002-06-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_alloc.h: Deprecate all 'reallocate' memfns.
+ * docs/html/ext/howto.html: Update allocator notes.
+
+2002-06-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (INTERFACE): Remove.
+ (release_VERSION): Remove.
+ * acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Change include placement.
+ (libstdcxx_interface): Change. Use gcc methods to determine version.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
+2002-06-25 DJ Delorie <dj@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CONFIGURE): Split out
+ GLIBCPP_TOPREL_CONFIGURE.
+ * aclocal.m4: Likewise.
+ * configure.in: Call it before AC_CANONICAL_SYSTEM.
+ * configure: Regenerate.
+
+2002-06-25 Jessica Han <jessica@cup.hp.com>
+
+ * config/os/hpux/os_defines.h Define _GLIBCPP_VTABLE_PADDING
+ * libsupc++/tinfo.cc Handle the 8 byte aligned vtable entries when
+ _GLIBCPP_VTABLE_PADDING is defined.
+
+2002-06-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_alloc.h: Additional formatting.
+
+2002-06-24 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_alloc.h: Reformat as per C++STYLE.
+
+2002-06-24 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/cpu/*/bits/*: Move header files up a level. Remove bits.
+ * config/os/*/bits/*: Likewise.
+ * configure.in: Update.
+ * configure: Regenerate.
+ * configure.target: Update.
+ * docs/html/17_intro/porting.texi: Update.
+
+2002-06-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_map.h, include/bits/stl_multimap.h,
+ include/bits/stl_queue.h, include/bits/stl_stack.h: Reformat and
+ complete doxygenation.
+ * include/bits/boost_concept_check.h: Minor comment.
+
+2002-06-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c_compatibility: New.
+ * include/c_compatibility/assert.h: New.
+ * include/c_compatibility/ctype.h: New.
+ * include/c_compatibility/errno.h: New.
+ * include/c_compatibility/float.h: New.
+ * include/c_compatibility/iso646.h: New.
+ * include/c_compatibility/limits.h: New.
+ * include/c_compatibility/locale.h: New.
+ * include/c_compatibility/math.h: New.
+ * include/c_compatibility/setjmp.h: New.
+ * include/c_compatibility/signal.h: New.
+ * include/c_compatibility/stdarg.h: New.
+ * include/c_compatibility/stddef.h: New.
+ * include/c_compatibility/stdio.h: New.
+ * include/c_compatibility/stdlib.h: New.
+ * include/c_compatibility/string.h: New.
+ * include/c_compatibility/time.h: New.
+ * include/c_compatibility/wchar.h: New.
+ * include/c_compatibility/wctype.h: New.
+
+ * include/c/std_cerrno.h: Get out of the way... define errno.
+ * include/c/std_cmath.h: Add abs, modf overloads.
+ Undefine C99 isms. Still not sure how to deal with this sanely.
+ * include/c/std_csetjmp.h: Tweak.
+ * include/c/std_cwchar.h: Include cstddef for size_t.
+
+ * include/c_std/std_cmath.h: Remove extra function.
+
+ Pendantic std usage in testsuites.
+ * testsuite/17_intro/header_cstdlib.cc (test01): Qualify ldiv_t
+ with std.
+ * testsuite/17_intro/header_cwchar.cc: Tweak.
+ * testsuite/22_locale/codecvt_members_char_char.cc (test03): Use
+ std::setlocale.
+ * testsuite/22_locale/ctype_to_wchar_t.cc (test05): Same.
+ * testsuite/22_locale/ctype_to_char.cc (test05): Same.
+ * testsuite/22_locale/ctype_is_wchar_t.cc (test05): Same.
+ * testsuite/22_locale/ctype_is_char.cc (test05): Same.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Same.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Same.
+ * testsuite/22_locale/time_get_members_char.cc (test08): Same.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/time_put_members_char.cc (test04): Same.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/num_put_members_char.cc (test04): Same.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/numpunct_members_char.cc (test03): Same.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Same.
+ * testsuite/22_locale/num_get_members_char.cc: Same.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Same.
+ * testsuite/22_locale/money_put_members_char.cc (test07): Same.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/moneypunct_members_char.cc (test03): Same.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Same.
+ * testsuite/22_locale/money_get_members_char.cc (test08): Same.
+ * testsuite/22_locale/messages_members_char.cc (test03): Same.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/collate_members_char.cc (test04): Same.
+ * testsuite/26_numerics/fabs_inline.cc: Use std::printf.
+ * testsuite/27_io/istream_seeks.cc (test02): Qualify abort.
+ * testsuite/27_io/istream_extractor_arith.cc (test11): Qualify strtol.
+
+2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libsupc++/Makefile.am (libsupc__convenience_la_SOURCES): Add
+ c_sources.
+
+2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/ext-inst.cc (__gnu_cxx): Use instead of std:: for extensions.
+ Use size_type instead of unsigned long.
+
+2002-06-20 Steve Ellcey <sje@cup.hp.com>
+
+ * src/ext-inst.cc (_S_fetch): Add explicit templates for char and
+ wchar types.
+ (_S_min_len): Ditto.
+
+2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am: Add rules.
+ * include/Makefile.in: Regenerate.
+
+ * acinclude.m4: Define GLIBCPP_C_HEADERS_COMPATIBILITY.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * configure.target (c_model, c_compatibility): Add.
+
+ * libsupc++/Makefile.am (c_sources): New.
+ (libsupc___la_SOURCES): Add c_sources.
+ (LTCOMPILE): Remove INCLUDES.
+ (GCC_INCLUDES): New.
+ (C_COMPILE): New, like COMPILE but without INCLUDES.
+ (cxa_demangle.o): Use C_COMPILE.
+ (dyn-string.o): Use C_COMPILE.
+
+ * include/c/std_cstdarg.h: Define __need___va_list.
+ * include/c/std_cstddef.h: Define need_size_t, need_ptrdiff_t,
+ need_NULL, need_offsetof.
+
+2002-06-19 Steve Ellcey <sje@cup.hp.com>
+
+ * configure.in (HAVE_FINITE*, HAVE_ISINF*, HAVE_ISNAN*): Remove
+ definitions in hpux11 cross-build because these functions do
+ not exist on hpux11 (but some exist on hpux10); move defaults out
+ into existing sections.
+ * configure: Regenerate.
+
+2002-06-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c/std_cwchar.h: Guard. Add mbstate_t bits.
+ * include/c/std_cwctype.h: Guard.
+
+ * libsupc++/eh_alloc.cc: Tweak include order.
+ * libsupc++/pure.cc: Use cstdio.
+ * libsupc++/new_op.cc: Remove malloc forward declaration, as
+ cstdlib brings it in. Use std::malloc.
+
+ * src/Makefile.am (sources): Remove cmath.cc.
+ * src/Makefile.in: Regenerate.
+ * src/cmath.cc: Remove.
+
+2002-06-18 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.target: Force mips to use the generic cpu routines.
+
+2002-06-18 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.host: Delete file.
+ * configure.target: More documentation. Factor out common parts of
+ script into "intelligent" settings about defaults. Remove redundancy.
+
+ * acinclude.m4: Update comments. Do not call configure.host.
+ (GLIBCPP_ENABLE_SYMVERS): If disabled, do not bother checking for
+ libgcc_s.
+ * configure.in: Slight reformatting, more comments. Factor out
+ "config/" from all the directories.
+ * docs/html/17_intro/porting.texi: Update and expand.
+ * testsuite/Makefile.am (AM_RUNTESTFLAGS): Move empty setting
+ from configure.host.
+
+ * aclocal.m4, configure, docs/html/17_intro/porting.html,
+ testsuite/Makefile.in: Regenerate.
+
+2002-06-16 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/tables.html: Uncomment magical middle column.
+ * docs/doxygen/user.cfg.in: Kludge to ignore function-like macros.
+ * include/bits/stl_queue.h: Doxygenate and reformat.
+ * include/bits/ios_base.h, include/std/std_streambuf.h: Add comment
+ for deprecated names required by the standard.
+
+2002-06-14 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * configure.in (target_alias): Fix.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
+2002-06-12 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/Makefile.am: Add new files.
+ * include/Makefile.in: Regenerate.
+
+ * include/bits/stl_deque.h, include/bits/stl_list.h,
+ include/bits/stl_vector.h: Clean up, reformat. Move definitions...
+ * include/bits/deque.tcc, include/bits/list.tcc,
+ include/bits/vector.tcc: ...to here. New files.
+
+ * include/ext/stl_hashtable.h: Inclide correct full headers.
+ * include/std/std_deque.h: Include .tcc files for now.
+ * include/std/std_list.h: Likewise.
+ * include/std/std_vector.h: Likewise.
+
+2002-06-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.am: Add FLAGS_TO_PASS.
+ * Makefile.in: Regenerated.
+
+2002-06-11 J.T. Conklin <jtc@acorntoolworks.com>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.target: Set os_include_dir to config/os/qnx/qnx6.1
+ under *-qnx6.[12]*.
+ * configure.in: Add support for *-qnx6.[12]*.
+ * configure: Regenerate.
+
+ * config/os/qnx, config/os/qnx/qnx6.1, config/os/qnx/qnx6.1/bits:
+ New directories.
+ * config/os/qnx/qnx6.1/bits/ctype_base.h, ctype_inline.h,
+ ctype_noninline.h, os_defines.h: New files.
+
+2002-06-10 Loren J. Rittle <ljrittle@acm.org>
+
+ * acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT_ancilliary): Reorder and
+ include all required headers for test against older POSIX standard.
+ (GLIBCPP_CHECK_SETRLIMIT): Likewise.
+ (ac_setrlimit): Likewise.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * testsuite/testsuite_hooks.cc: Reorder and include all
+ required headers for use against older POSIX standard.
+
+2002-06-08 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/backwards/strstream_members.cc: New.
+
+2002-06-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/backwards/strstream: Format.
+ * src/strstream.cc: Format.
+
+2002-06-08 Andreas Schwab <schwab@suse.de>
+
+ * src/strstream.cc (strstreambuf::overflow): Set _M_buf,
+ _M_buf_size and _M_buf_size_opt to the new buffer and size.
+
+2002-06-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/generic/bits/ctype_noninline.h: Tweak format.
+
+2002-06-07 Steve Ellcey <sje@cup.hp.com>
+
+ * src/locale-inst.cc (__codecvt_abstract_base):
+ Put inside _GLIBCPP_USE_WCHAR_T ifdef.
+ * include/bits/istream.tcc (basic_istream): Ditto.
+ (ws) Ditto.
+ (operator>>) Ditto.
+ * include/bits/ostream.tcc (basic_ostream): Ditto.
+ (endl): Ditto.
+ (ends): Ditto.
+ (flush): Ditto.
+ (operator<<): Ditto.
+
+2002-06-07 Phil Edwards <pme@gcc.gnu.org>
+
+ * mkcheck.in: Link against local testsuite library.
+ * testsuite/testsuite_hooks.h (__set_testsuite_memlimit): Move null
+ implementation out...
+ * testsuite/testsuite_hooks.cc: ...to here.
+
+2002-06-06 Loren J. Rittle <ljrittle@acm.org>
+
+ * src/Makefile.am (AUTOMAKE_OPTIONS): Use cygnus-style generation.
+ * include/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
+ * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
+ * src/Makefile.in: Regenerate (explicitly with --cygnus option).
+ * testsuite/Makefile.in: Likewise.
+
+2002-06-05 David Edelsohn <edelsohn@gnu.org>
+
+ * config/os/aix/bits/ctype_noninline.h (do_toupper,do_tolower):
+ Call external symbol.
+
+2002-06-04 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
+ Search correct multilib testsuite dir for libv3test.
+
+2002-06-04 Paolo Carlini <pcarlini@unitus.it>
+ Gaby Dos Reis <gdr@codesourcery.com>
+
+ * include/bits/basic_string.tcc
+ (basic_string::_S_construct(forward_iterator_tag):
+ Fix typo in null pointer check.
+ * testsuite/21_strings/ctor_copy_dtor.cc: Add test04.
+
+2002-06-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/money_get_members_char.cc
+ (test02): Add decimal point to long double constants.
+ * testsuite/22_locale/money_get_members_wchar_t.cc
+ (test02): Likewise.
+ * testsuite/22_locale/money_put_members_char.cc
+ (test02, test03, test06): Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc:
+ (test02, test03, test06): Likewise.
+ * testsuite/22_locale/num_get_members_char.cc:
+ (test02, test01): Likewise; suffix long long constants with LL.
+ * testsuite/22_locale/num_get_members_wchar_t.cc:
+ (test02, test01): Likewise.
+ * testsuite/22_locale/num_put_members_char.cc:
+ (test02, test01): Likewise.
+ * testsuite/22_locale/num_put_members_wchar_t.cc:
+ (test02, test01): Likewise.
+
+2002-06-03 Marc Espie <espie@openbsd.org>
+
+ * config/cpu/m68k/bits/atomicity.h(__exchange_and_add): Fix inline
+ assembly for old assemblers.
+
+2002-06-03 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_bvector.h (swap(_Bit_reference,_Bit_reference)):
+ Move/rename...
+ (vector<bool>::swap(reference,reference)): ...to this.
+
+2002-06-03 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/user.cfg.in (SORT_MEMBER_DOCS): Set to off, now that
+ some class members are in 14882 order.
+ * docs/html/ext/howto.html: 3.1 is in the past now, not the future.
+
+ * include/std/std_bitset.h: Update comment.
+ * src/bitset.cc: Update comments, clean up spacing.
+
+ * src/Makefile.am (sources): Alphabetize for convenience.
+ * src/Makefile.in: Regenerate.
+
+2002-06-03 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_deque.h, include/bits/stl_list.h,
+ include/bits/stl_vector.h: Reformat to (mostly) match C++STYLE.
+ Reorder to match 14882. Doxygen blocks for all public members.
+
+2002-05-31 Marcus Meissner <meissner@suse.de>
+
+ PR libstdc++/6886
+ * include/bits/stl_bvector.h: Use UL suffix for unsigned longs.
+ * testsuite/23_containers/vector_bool.cc (test02): New test.
+
+2002-05-30 Marc Espie <espie@openbsd.org>
+
+ * configure.in: Always check for sys/types.h
+ * configure: Regenerate.
+
+2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):
+ Rebuild the wrapper file every time this proc is called.
+
+2002-05-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am (noinst_LIBRARIES): New target. Pull in
+ CXX/INCLUDES.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/testsuite_hooks.h (gnu_copy_tracker): Move from
+ list_modifiers.cc and rename from 'T'. Move code bodies...
+ * testsuite/testsuite_hooks.cc: ...to here. New file.
+ * testsuite/23_containers/list_modifiers.cc: Move 'T' class out.
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
+ Add libv3test.a to link options.
+
+2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/misc-inst.cc: Define unnecessary algorithm
+ instantiations. Break apart instantiations into groupings below.
+ * src/fstream-inst.cc: New.
+ * src/io-inst.cc: New.
+ * src/istream-inst.cc: New.
+ * src/ostream-inst.cc: New.
+ * src/streambuf-inst.cc: New.
+ * src/sstream-inst.cc: New.
+ * src/Makefile.am (sources): Add files.
+ * src/Makefile.in: Regenerate.
+
+ * acinclude.m4: Work around automake 1.4-p5 bug, change
+ AM_GNU_GETTEXT in comments to AM-GNU-GETTEXT.
+
+2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6795.
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h
+ (classic_table): Fix.
+ * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+
+2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/ctype_is_wchar_t.cc: Guard with
+ _GLIBCPP_USE_WCHAR_T.
+ * testsuite/22_locale/ctype_narrow_wchar_t.cc: Same.
+ * testsuite/22_locale/ctype_to_wchar_t.cc: Same.
+ * testsuite/22_locale/ctype_widen_wchar_t.cc: Same.
+
+2002-05-26 Carlo Wood <carlo@alinoe.com>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6811
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h
+ (__enc_traits::operator=): add missing return statement.
+
+2002-05-24 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/6282
+ * include/std/std_bitset.h (_Base_biteset<0>): New specialization.
+ (operator>>): If nothing was extracted, don't fail in the
+ zero-length case.
+ * testsuite/23_containers/bitset_ctor.cc (test02): New test.
+
+2002-05-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6701
+ * testsuite/22_locale/ctype_narrow_char.cc: New.
+ * testsuite/22_locale/ctype_narrow_wchar_t.cc: New.
+ * testsuite/22_locale/ctype_widen_char.cc: New.
+ * testsuite/22_locale/ctype_widen_wchar_t.cc: New.
+ * testsuite/22_locale/ctype_members_char.cc: Move some bits into...
+ * testsuite/22_locale/ctype_is_char.cc: ...this.
+ * testsuite/22_locale/ctype_to_char.cc: ...and this.
+ * testsuite/22_locale/ctype_members_wchar_t.cc: Move some bits into...
+ * testsuite/22_locale/ctype_is_wchar_t.cc: ...this.
+ * testsuite/22_locale/ctype_to_wchar_t.cc: ...and this.
+
+ * testsuite/22_locale/ctype_scan_wchar_t.cc: Should pass.
+
+2002-05-24 Dale Peakall <dale@peakall.net>
+
+ PR libstdc++/6701
+ * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_narrow): Fix.
+ * config/locale/generic/ctype_members.cc: Same.
+
+2002-05-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6750
+ * include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
+ for empty string literal.
+ (ostream::operator<<(const _CharT*)): Same.
+ (ostream<char>::operator<<(const char*)): Same.
+ (ostream<char>::operator<<(streambuf*)): Same.
+ * testsuite/27_io/ostream_inserter_char.cc (test08): Add tests.
+ * testsuite/27_io/ostream_inserter_other.cc (test02): Modify.
+
+2002-05-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (release_VERSION): Update to 3.1.1.
+ (libtool_VERSION): Update to 4:1:0.
+ * configure: Regenerate.
+
+2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_pair.h: Tweak comment markup.
+
+2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/ext/stdio_filebuf.h: Add header guards. Doxygenate.
+
+2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/user.cfg.in (EXCLUDE): Add 'CVS'.
+
+2002-05-21 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_vector.h: Reformat to follow C++STYLE.
+ Doxygenate all public members. Reorder to follow 14882.
+ (vector::push_back(void)): Remove previously-deprecated fn.
+ (vector::insert(iterator), vector::_M_insert_aux(iterator)):
+ Deprecate for removal in 3.3.
+
+2002-05-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html (5.4): Recommend against -I options for
+ finding the ext headers.
+ * docs/html/faq/index.txt: Regenerate.
+
+2002-05-19 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/23_containers/deque_operators.cc (test01):
+ Fix minor typo in last commit.
+
+2002-05-18 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6503
+ * include/bits/stl_deque.h (_Deque_iterator::operator==,
+ operator!=, operator<, operator>, operator>=, operator<=):
+ Make non-member functions, to allow comparing const and
+ non-const iterators in any order.
+ * testsuite/23_containers/deque_operators.cc: New testfile.
+
+2002-05-16 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Update not-a-bug list with basic_file.h.
+ * docs/html/faq/index.txt: Regenerate.
+
+2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * Makefile.am: Allow for PWDCMD to override hardcoded pwd.
+ * acinclude.m4: Likewise.
+ * docs/html/Makefile: Likewise.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2002-05-15 Loren J. Rittle <ljrittle@acm.org>
+
+ libstdc++/6641
+ * include/bits/c++config (__USE_MALLOC): Report case where
+ the user improperly defined it on the command line.
+
+2002-05-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * testsuite/testsuite_hooks.h (__set_testsuite_memlimit):
+ Retrieve current limits before setting.
+
+2002-05-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6518
+ * include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
+ for null case.
+ (ostream::operator<<(const _CharT*)): Same.
+ (ostream<char>::operator<<(const char*)): Same.
+ * testsuite/27_io/ostream_inserter_char.cc (test07): Add test.
+
+2002-05-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6594
+ * src/strstream.cc (strstreambuf): Fix leak.
+
+2002-05-15 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6648
+ * include/bits/istream.tcc (istream::getline, ignore):
+ Upon __idelim (__delim) call sbumpc() not snextc().
+ * testsuite/27_io/narrow_stream_objects.cc:
+ Add test08 and test09.
+
+2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/ctype_scan_char.cc: Tweak.
+ * testsuite/22_locale/ctype_scan_wchar_t.cc: New.
+
+ * docs/html/install.html: Fix.
+
+2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/fstream.tcc
+ (basic_filebuf::_M_allocate_internal_buffer): Remove extraneous
+ try/catch blocks.
+ * src/localename.cc (locale::_Impl::_M_install_facet): Same.
+
+ * docs/html/install.html: Tweak, add bits about required locales
+ for the 22_locale tests when using the gnu model.
+
+ * testsuite/27_io/istream_sentry.cc: Tweak.
+
+2002-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/os/irix/irix5.2/bits/ctype_inline.h (scan_is, scan_not):
+ Fix typo, use this->is() rather than manually (and perhaps
+ incorrectly) inlining it.
+ * config/os/irix/irix6.5/bits/ctype_inline.h (scan_is, scan_not):
+ Likewise.
+ * testsuite/22_locale/ctype_scan_char.cc: New file.
+
+2002-05-13 Paolo Carlini <pcarlini@unitus.it>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/22_locale/money_get_members_char.cc
+ (test01, test02, test04): Use the de_DE@euro named locale
+ instead of de_DE to allow for an uniform behaviour with
+ both old and Euro-era localedata; tweak some tests.
+ * testsuite/22_locale/money_get_members_wchar_t.cc
+ (test01, test02, test04): Likewise.
+ * testsuite/22_locale/money_put_members_char.cc
+ (test01, test02, test04): Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc
+ (test01, test02, test04): Likewise.
+
+2002-05-13 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/codecvt_members_char_char.cc
+ (test03): Robustify wrt localedata.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Likewise.
+ * testsuite/22_locale/collate_members_char.cc (test04): Likewise.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/ctype_members_char.cc (test05): Likewise.
+ * testsuite/22_locale/ctype_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/messages_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/money_get_members_char.cc (test08): Likewise.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Likewise.
+ * testsuite/22_locale/money_put_members_char.cc (test07): Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Likewise.
+ * testsuite/22_locale/moneypunct_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Likewise.
+ * testsuite/22_locale/num_get_members_char.cc (test06): Likewise.
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test06): Likewise.
+ * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/numpunct_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Likewise.
+ * testsuite/22_locale/time_get_members_char.cc (test08): Likewise.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Likewise.
+ * testsuite/22_locale/time_put_members_char.cc (test04): Likewise.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Likewise.
+
+2002-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/os/irix/irix5.2/bits/os_defines.h: Revert 2002-05-06
+ change.
+
+2002-05-11 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config/os/gnu-linux/bits/os_defines.h (__glibcpp_long_bits): Define
+ to 64 for hppa 64-bit port.
+ (__glibcpp_long_double_bits): Define to 64 for all hppa ports.
+
+2002-05-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (enable_symvers): Quote $LD.
+ * aclocal.m4: Regenerate.
+ * configure: Likewise.
+
+2002-05-09 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Append all
+ multilib dirs containing libgcc_s*.so.1 below gcc object dir to
+ LD_LIBRARY_PATH.
+
+2002-05-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
+ script entry, and set LD to it when configuring multilibs.
+ * configure: Rebuilt.
+
+2002-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in: Add support for WindISS.
+ * configure: Regenerated.
+ * configure.target: Add support for WindISS.
+ * config/os/windiss/bits/ctype_base.h: New file.
+ * config/os/windiss/bits/ctype_inline.h: Likewise.
+ * config/os/windiss/bits/ctype_noninline.h: Likewise.
+ * config/os/windiss/bits/os_defines.h: Likewise.
+
+2002-05-06 Paolo Carlini <pcarlini@unitus.it>
+
+ Test all the facets for the temporary "C" locale switch issue.
+ * testsuite/22_locale/codecvt_members_char_char.cc: Add test03.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
+ * testsuite/22_locale/collate_members_char.cc: Add test04.
+ * testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/ctype_members_char.cc: Add test05.
+ * testsuite/22_locale/ctype_members_wchar_t.cc: Add test04.
+ * testsuite/22_locale/messages_members_char.cc: Add test03.
+ * testsuite/22_locale/money_get_members_char.cc: Add test08.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/money_put_members_char.cc: Add test07.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/moneypunct_members_char.cc: Add test03.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/num_get_members_char.cc: Add test06.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/numpunct_members_char.cc: Add test03.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_get_members_char.cc: Add test08.
+ * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_put_members_char.cc: Add test04.
+ * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.
+
+ * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
+
+2002-05-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/os/irix/irix5.2/bits/os_defines.h (_SGI_SOURCE,
+ __EXTENSIONS__): Ensure they are always defined.
+
+2002-05-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/documentation.html: Fix broken link.
+
+2002-05-04 Benjamin Kosnik <bkoz@redhat.com>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/num_put_members_char.cc: Add test04(),
+ testing for the locale_facets.tcc entry of the previous commit.
+ * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.
+
+2002-05-04 Takeshi Kobayakawa <tskoba@mte.biglobe.ne.jp>
+
+ * config/locale/generic/c_locale.cc
+ (__convert_to_v(float, double, long double)):
+ Fix the temporary switch to the "C" locale, saving and
+ restoring in the proper way the current locale.
+ * config/locale/generic/time_members.cc
+ (__timepunct<char, wchar_t>::_M_put): Likewise.
+ * config/locale/gnu/messages_members.cc
+ (messages<char>::do_get): Likewise.
+ * config/locale/gnu/messages_members.h
+ (messages<_CharT>::do_get): Likewise.
+ * config/locale/gnu/time_members.cc
+ (__timepunct<char, wchar_t>::_M_put): Likewise.
+ * include/bits/locale_facets.tcc (__convert_from_v): Likewise.
+
+2002-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in (AC_CHECK_HEADERS): Check for string.h & stdlib.h.
+ * libsupc++/Makefile.am (LTCOMPILE): Add $(DEFS).
+
+ * Makefile.in, config.h.in, configure: Regenerate.
+
+2002-05-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6549.
+ * include/bits/fstream.tcc (filebuf::_M_underflow_common): Revert.
+ * testsuite/27_io/narrow_stream_objects.cc (test07): Add.
+
+2002-05-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/os/irix/irix5.2/bits/ctype_noninline.h (classic_table):
+ Return __ctype + 1.
+ (ctype:_M_table): Initialize to classic_table(), not __ctype.
+
+2002-05-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in: Update local install.html, configopts.html paths.
+ * configure: Regenerate.
+
+2002-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/os/irix/irix5.2/bits/os_defines.h
+ (__glibcpp_long_double_bits, __glibcpp_long_bits): Define.
+
+ * config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
+ char.
+
+2002-05-02 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Update list in #4.1.
+ * docs/html/faq/index.txt: Regenerated.
+
+2002-05-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/RELEASE-NOTES (New): Update.
+
+2002-05-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_bitset.h: Fix doxygen comments.
+ * docs/html/documentation.html: Minor tweaks for 3.1.
+ * docs/html/27_io/howto.html: Likewise.
+ * docs/html/ext/howto.html: Likewise, mention stdio_filebuf.
+ * docs/html/faq/index.html: Likewise.
+ * docs/html/faq/index.txt: Regenerated.
+
+2002-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6533
+ * include/bits/streambuf_iterator.h (istreambuf_iterator::_M_get): New.
+ (istreambuf_iterator::equal): Use it.
+ (istreambuf_iterator::operator*): Use it.
+
+2002-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6513
+ * include/bits/stl_uninitialized.h
+ (uninitialized_copy(_InputIter, _InputIter, _ForwardIter)):
+ Fix typo in 2001-07-17 commit: typedef _ValueType to
+ iterator_traits<_ForwardIter> not <_InputIter>.
+ * testsuite/23_containers/vector_ctor.cc: Add test04.
+
+2002-04-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ PR libstdc++/6501
+ * include/c_std/std_cctype.h: Include bits/c++config.h.
+ * config/os/hpux/bits/os_defines.h (_SB_CTYPE_MACROS): Define.
+
+2002-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/stdio_filebuf.h: New file.
+ * include/ext/enc_filebuf.h: New file.
+ * config/io/basic_file_stdio.h (__basic_file::sys_open): Add fd ctor.
+ * config/io/basic_file_stdio.cc: Same.
+ * include/bits/fstream.tcc (filebuf::_M_allocate_internal_buffer):
+ Remove _M_unbuf hacks.
+ (filebuf::_M_destroy_internal_buffer): Same.
+ (filebuf::filebuf(cfile, openmode, int_type): Remove definition.
+ (filebuf::fd): Remove.
+ * include/std/std_fstream.h (filebuf::_M_unbuf): Remove.
+ (filebuf::filebuf(__c_file*, openmode, int_type)): Remove.
+ (filebuf::fd): Remove.
+ * src/ios.cc (ios_base::_S_ios_create): Change to use specialized
+ filebufs.
+ (ios_base::_S_ios_destroy): Same.
+ * src/misc-inst.cc (file_filebuf<char>): Add instantiation.
+ * include/Makefile.am (ext_headers): Add ext_filebuf.h,
+ stdio_filebuf.h. * include/Makefile.in: Regenerate.
+
+2002-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6511
+ * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Fix typo.
+
+2002-04-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/5820
+ * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common):
+ Check for eof.
+ * include/bits/streambuf_iterator.h: Match stream_iterator.h.
+ (istreambuf_iterator::operator++): Invalidate on eof.
+ (istreambuf_iterator::operator++(int)): Same.
+ (istreambuf_iterator::operator*): Same.
+
+2002-04-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set all
+ of LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
+ LD_LIBRARY64_PATH.
+
+2002-04-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/5820
+ * config/io/basic_file_stdio.h (__basic_file::sys_getc): Return int.
+ (__basic_file::sys_ungetc): Take int.
+ * config/io/basic_file_stdio.cc (__basic_file::sys_ungetc): Same.
+ * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common):
+ Use sys_getc for unbuffered input.
+ * testsuite/27_io/narrow_stream_objects.cc (test06): New.
+
+ * src/ios.cc (_M_grow_words): Adjust error checking.
+ * testsuite/27_io/ios_base_storage.cc: Same.
+
+2002-04-28 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * include/ext/stl_hashtable.h: Import __iterator_category
+
+2002-04-28 Paolo Carlini <pcarlini@unitus.it>
+ Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * testsuite/ext/hash_set.cc: New testfile.
+
+2002-04-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/solaris/solaris2.5/bits/os_defines.h: Remove
+ _G_USING_THUNKS.
+ * config/os/solaris/solaris2.6/bits/os_defines.h: Same.
+ * config/os/solaris/solaris2.7/bits/os_defines.h: Same.
+
+2002-04-26 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.h (replace(__pos, __n1, __s, __n2):
+ Fix and tighten __throw_length_error check.
+ * testsuite/21_strings/replace.cc (test05): New.
+ * testsuite/21_strings/replace.cc (test02, test03, test04): Tweak.
+
+2002-04-23 Loren J. Rittle <ljrittle@acm.org>
+
+ * include/std/std_fstream.h (basic_filebuf::sync): Hoist
+ unconditional flush on lower-layer handle to here...
+ * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow):
+ ...from here. Optimize remaining _M_file.sync() call pattern.
+ * testsuite/27_io/narrow_stream_objects.cc (test04): New test.
+ (test05): Likewise.
+
+2002-04-23 Jason Merrill <jason@redhat.com>
+
+ * include/bits/fstream.tcc (basic_filebuf::seekoff): Fix for
+ output-only filebufs.
+ * include/std/std_fstream.h (basic_filebuf::_M_set_indeterminate):
+ Likewise.
+ (basic_filebuf::_M_set_determinate): Likewise.
+
+ PR libstdc++/6414
+ * include/bits/fstream.tcc (basic_filebuf::seekoff): Adjust return
+ value properly in the trivial case.
+ * testsuite/27_io/istream_seeks.cc (test04): Make sure that
+ tellg() returns the right value after a read.
+
+2002-04-23 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/cpu/mmix/bits/cpu_limits.h: New file.
+ * configure.target (CPULIMITSH): Use it.
+
+2002-04-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * docs/html/17_intro/porting.texi (_GLIBCPP_AVOID_FSEEK): Remove.
+ * docs/html/17_intro/porting.html: Rebuilt.
+
+2002-04-20 Jason Merrill <jason@redhat.com>
+
+ PR libstdc++/4150
+ * include/std/std_streambuf.h (basic_streambuf::_M_set_indeterminate):
+ Move to filebuf.
+ (basic_streambuf::_M_set_determinate): Likewise.
+ (basic_streambuf::_M_is_indeterminate): Likewise.
+ * include/bits/std_fstream.h (basic_filebuf::_M_filepos): New
+ non-static data member.
+ (basic_filebuf::_M_underflow_common): New non-static member function.
+ (basic_filebuf::_M_underflow, _M_uflow): Call it.
+ (basic_filebuf::sync): Avoid useless seeking.
+ (basic_filebuf::_M_set_indeterminate): Move here from streambuf.
+ Set _M_filepos.
+ (basic_filebuf::_M_set_determinate): Likewise.
+ (basic_filebuf::_M_is_indeterminate): Likewise.
+ * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow): Seek
+ back to _M_out_beg if necessary.
+ (basic_filebuf::seekoff): Likewise.
+ (basic_filebuf::_M_underflow_common): Generalization of old
+ underflow(). Don't seek back to _M_in_beg.
+ * src/ios.cc: Lose _GLIBCPP_AVOID_FSEEK stuff.
+ * config/os/solaris/solaris2.?/bits/os_defines.h: Likewise.
+ * config/os/bsd/freebsd/bits/os_defines.h: Likewise.
+ * config/os/mingw32/bits/os_defines.h: Likewise.
+ * testsuite/27_io/filebuf_virtuals.cc (test05): Don't overspecify
+ ungetc test.
+
+2002-04-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/istream.tcc (istream::read): Fix.
+ * testsuite/27_io/istream_unformatted.cc (main): Add.
+
+2002-04-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6360
+ * include/bits/istream.tcc (istream::ignore): Streamline, use
+ delimiter as is.
+ * include/bits/streambuf.tcc: Use this->gptr.
+ * testsuite/27_io/istream_unformatted.cc (test08): Add test.
+
+2002-04-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/localefwd.h (locale::id::_M_id): Do this correctly,
+ as type safety is important, especially on solaris.
+ * include/bits/istream.tcc (istream::read): Clean.
+ (istream::readsome): Same.
+ * locale.cc: Wrap lines.
+
+ * testsuite/21_strings/inserters_extractors.cc: Tweaks.
+ * testsuite/27_io/instantiations.cc (test): Add bool variable...
+ * testsuite/21_strings/capacity.cc: Clean.
+
+2002-04-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/doxygroups.cc: New group on binary searching.
+ * include/bits/stl_algo.h: Document binary searches and merges.
+ * include/bits/stl_deque.h: The 'map' member is not the 'map' class.
+
+2002-04-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/mainpage.html: Doxygen logo is now a PNG file.
+ * docs/doxygen/run_doxygen: Bump required version.
+ * docs/doxygen/user.cfg.in: Revert accidental change.
+ * docs/html/faq/index.html: Reindent a block of links.
+ (4.4): New note on using dlsym.
+ * docs/html/faq/index.txt: Regenerated.
+
+2002-04-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite_flags.in (cxxflags): Also pass @EXTRA_CXX_FLAGS@.
+
+2002-04-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu (__malloc_alloc_template): Add.
+ (__default_alloc_template): Same.
+ * include/bits/stl_alloc.h (__malloc_alloc_template): Add extern
+ template.
+ (__default_alloc_template): Same.
+
+2002-04-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/filebuf_virtuals.cc: Add _S_pback_size instantiation.
+
+2002-04-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/concept-inst.cc (vector<locale::facet*>): Remove instantiations.
+ * src/stl-inst.cc (vector::_M_insert_aux): Remove instantiation.
+ (__malloc_alloc_template): Conditionalize.
+
+ * include/bits/istream.tcc: Remove sputbackc calls.
+
+ * testsuite/19_diagnostics/stdexceptions.cc: Fix comment.
+
+2002-04-16 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/24_iterators/rel_ops.cc: New test.
+
+2002-04-16 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
+
+ * include/bits/type_traits.h (__normal_iterator): Declare in
+ __gnu_cxx. Adjust use at global namespace.
+ * include/bits/stl_iterator.h (__normal_iterator): Move definition
+ into __gnu_cxx::. Add more operator overloads. Tidy existing ones.
+ * include/bits/basic_string.h (basic_string): Adjust use of
+ __normal_iterator.
+ * include/bits/stl_vector.h (_Alloc>): Likewise.
+ * src/concept-inst.cc (__gnu_cxx): __normal_iterator<> is now here.
+ * src/string-inst.cc (operator==): Instantiate in __gnu_cxx.
+
+2002-04-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/4164
+ Valgrind fixes.
+ * config/io/basic_file_stdio.cc (__basic_file::~__basic_file):
+ Call close.
+ (__basic_file::close): Call fflush. Correct return if fclose ok.
+ (__basic_file::is_open): Make const.
+ Change __c_file_type to __c_file.
+ * config/io/basic_file_stdio.h: Change __c_file_type to __c_file.
+ (__basic_file::is_open): Make const.
+ * config/io/c_io_stdio.h: Change __c_file_type to __c_file.
+ * include/std/std_fstream.h (filebuf::_M_allocate_file): Remove.
+ (filebuf::_M_unbuf): Add.
+ (filebuf::_M_file): Change to non-pointer.
+ (filebuf::_M_allocate_pback_buffer): Remove.
+ * include/bits/fstream.tcc (filebuf::_M_allocate_file): Remove.
+ (filebuf::_M_allocate_internal_buffer): Use _M_unbuf.
+ Change initialization list for _M_file change.
+ (filebuf::_M_allocate_pback_buffer): Remove.
+ Change _M_file usage to reflect non-pointer data member.
+
+ * config/locale/generic/c_locale.cc
+ (locale::facet::_S_create_c_locale): Add parameter.
+ * config/locale/generic/collate_members.cc: Change
+ _M_compare_helper to _M_compare.
+ Change _M_transform_helper to _M_transform.
+ * config/locale/generic/monetary_members.cc: Changeup data types.
+ Add dtors.
+ * config/locale/generic/numeric_members.cc: Add dtors.
+ * config/locale/generic/time_members.cc: Add dtors.
+ * config/locale/gnu/c_locale.cc: Add parameter.
+ * config/locale/gnu/collate_members.cc:Change
+ _M_compare_helper to _M_compare.
+ Change _M_transform_helper to _M_transform.
+ * config/locale/gnu/ctype_members.cc: Better error checking.
+ * config/os/gnu-linux/bits/ctype_noninline.h: Better error checking.
+ * config/locale/gnu/messages_members.cc: Tweak comment.
+ * config/locale/gnu/monetary_members.cc: Change data types.
+ Add dtors.
+ * config/locale/gnu/numeric_members.cc: Add dtors, better error
+ checking.
+ * config/locale/gnu/time_members.cc: Same.
+ * config/locale/ieee_1003.1-2001/c_locale.cc
+ (locale::facet::_S_create_c_locale): Add parameter.
+ * config/locale/ieee_1003.1-2001/c_locale.h: Correct typedef.
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Remove
+ bogus ctor.
+
+ * include/bits/locale_facets.h (moneypunct): Use string literals.
+ Don't define dtor.
+ (numpunct): Same.
+ (__timepunct): Same.
+ (locale::_Impl::_M_facets): Change from vector to array.
+ (locale::_Impl::_M_names): Change from array of strings to array
+ of string literals.
+ (locale::facet::_S_create_c_locale): Add parameter.
+ (locale::locale::_S_num_facets): Move to...
+ (locale::_Impl::_M_facets_size): Here.
+ * include/bits/locale_facets.tcc: Fixups for _M_facets, _M_name
+ changes.
+ * include/bits/localefwd.h: (locale::id::_M_id): Add member function.
+ (locale::_Impl::_Impl(facet**, size_t, bool)): Add.
+ (locale::_Impl::_Impl(string, size_t)): Change to
+ (locale::_Impl::_Impl(const char*, size_t)): This.
+
+ * include/bits/streambuf.tcc (streambuf::_S_pback_size): Define.
+ * include/std/std_streambuf.h (streambuf::_M_pback_size): Change to
+ (streambuf::_S_pback_size): This.
+
+ * src/globals.cc: Add pre-allocations for "C" facets.
+ * src/locale-inst.cc: Remove vector instantiations.
+ * src/locale.cc: Remove vector include. Fixups for _M_names,
+ _M_facets changes.
+ * src/localename.cc: Same.
+
+ * include/bits/stl_vector.h: Fix odd formatting.
+
+ * include/bits/basic_string.tcc: Tweak comment.
+
+ * libsupc++/new: Make sure parameters are uglified.
+ * libsupc++/typeinfo: Same.
+
+ * testsuite/22_locale/num_get_members_char.cc: Fixup.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Same.
+ * testsuite/27_io/filebuf_members.cc: Same.
+
+2002-04-12 Steve Ellcey <sje@cup.hp.com>
+
+ * gcc/libstdc++-v3/config/os/hpux/bits/os_defines.h
+ (strtoll, strtoull): In 64 bit mode HP-UX (IA64 and HPPA)
+ does not define strtoll or strtoull, but does define strtol
+ and strtoul which are the same since in 64 bit mode
+ sizeof(long) == sizeof(long long).
+
+2002-04-12 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_bitset.h: Doxygenate std::bitset<>. Clean up
+ trailing spaces, indentation, and macro names. Make exception
+ messages more informative.
+
+2002-04-11 Richard Henderson <rth@redhat.com>
+
+ * include/bits/fstream.tcc (basic_filebuf<>::open): Fix & ordering.
+ * include/bits/ostream.tcc (basic_ostream<>::operator<<(long)): Same.
+ (basic_ostream<>::operator<<(long long)): Same.
+
+2002-04-11 Richard Henderson <rth@redhat.com>
+
+ * config/linker-map.gnu: Add __gxx_personality_sj0.
+
+2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/1072
+ * include/bits/localefwd.h (locale::_Impl::_M_facets): Change from
+ pointer to vector.
+ Remove forward declaration of vector.
+ Include vector.
+ * include/bits/locale_facets.tcc: Remove vector include.
+ (use_locale): Adjust.
+ (has_locale): Adjust.
+ * src/locale.cc: Adjust.
+ * src/localename.cc: Same.
+
+2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * include/bits/sstream.tcc: Clean up bit ops.
+ * include/bits/fstream.tcc: Same.
+
+2002-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ * include/bits/locale_facets.h (__num_base::_S_scale_hex): Remove.
+ (__num_base::_S_scale_oct): Remove.
+ * src/locale.cc (__num_base::_S_scale_hex): Remove.
+ (__num_base::_S_scale_oct): Remove.
+
+2002-04-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/6124
+ * testsuite/23_containers/bitset_members.cc: New test.
+ * include/std/std_bitset.h (_Bit_count::_S_bit_count): Move..
+ (_S_bit_count): Here.
+ (_First_one::_S_first_one): Move...
+ (_S_first_one): Here.
+ Format.
+ * src/bitset.cc: Adjust.
+ * config/linker-map.gnu: Export.
+
+2002-04-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/5180
+ * include/bits/fstream.tcc (filebuf::seekpos): Fix.
+ * include/std/std_fstream.h: Clean.
+ * include/bits/ostream.tcc: Remove extraneous variables.
+ * include/bits/sstream.tcc (stringbuf::seekoff): Be strict about
+ open modes and which modes.
+ (stringbuf::seekpos): Same.
+ * testsuite/27_io/stringbuf_virtuals.cc: New tests.
+
+2002-04-05 Jonathan Wakely <jw@kayari.org>
+
+ * include/bits/stl_algo.h (unique_copy, __gcd, rotate, rotate_copy,
+ random_shuffle, partition, stable_partition, sort, stable_sort,
+ partial_sort, partial_sort_copy, nth_element): Doxygenate.
+
+2002-04-05 David S. Miller <davem@redhat.com>
+
+ * config/os/gnu-linux/bits/os_defines.h
+ (__glibcpp_long_double_bits): Set to 64 on 32-bit Sparc.
+
+2002-04-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/3457
+ via gawrilow@math.tu-berlin.de
+ * acinclude.m4 (version_specific_libs): Fix combo usage with
+ --with-gxx-include-dir.
+ * aclocal.m4: Regenerate.
+ * configure: Same.
+
+2002-04-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ As per DR 184, libstdc++/3139
+ * include/std/std_limits.h (__glibcpp_bool_digits): Change to 1.
+ (numeric_limits<bool>::is_iec559): False.
+ (numeric_limits<bool>::is_modulo): False.
+
+ * testsuite/27_io/ios_init.cc: Add instantiations.
+
+2002-04-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/5268
+ * src/ios.cc: (ios_base::Init::_S_ios_destroy): Remove flush calls.
+ * testsuite/27_io/ios_init.cc (tests04): Add test.
+
+ libstdc++/3983
+ * include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
+ (basic_ios::_M_ios_fctype): Consistently name to _M_fctype.
+ * include/bits/basic_ios.tcc: Same. Remove outdated comments.
+ * include/bits/istream.tcc: Use _M_fctype, make consistent with
+ ostream.
+ * testsuite/27_io/ios_init.cc (tests03): Add test.
+
+2002-04-02 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/Makefile.am (install-data-local): Use mkinstalldirs.
+ * include/Makefile.in: Regenerate.
+
+2002-04-02 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+ Philip Martin <philip@codematters.co.uk>
+
+ * include/bits/basic_string.h
+ (replace(i1, i2, _CharT* k1, _CharT* k2),
+ replace(i2, i2, const _CharT* k1, const _CharT* k2),
+ replace(i1, i2, iterator k1, iterator k2,
+ replace(i1, i2, const_iterator k1, const_iterator k2):
+ New specializations to optimize for the common cases of
+ pointers and iterators.
+ (replace(pos, n1, s, n2)): Tweak.
+ * include/bits/basic_string.tcc: Tweak comments.
+ * testsuite/21_strings/replace.cc (test04): New tests.
+
+2002-04-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/5542
+ * acinclude: More extensive checks for msgfmt, --enable-nls.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2002-04-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * libsupc++/exception (__verbose_terminate_handler): Point to docs.
+ * docs/doxygen/doxygroups.cc: Doxygen hooks for abi::__cxa_demangle.
+ * docs/html/18_support/howto.html: Document the demangler.
+ * docs/html/17_intro/howto.html: And link to it.
+
+ * docs/doxygen/mainpage.html: Describe user-vs-maintainer docs.
+ * docs/doxygen/run_doxygen: Print user-vs-maintainer.
+
+2002-04-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/linker-map.gnu: Export __verbose_terminate_handler.
+ * libsupc++/Makefile.am (sources): Add cxa_demangle.c, dyn-string.c.
+ Make new LTCOMPILE variable, use it in new special build rules.
+ * libsupc++/Makefile.in: Rebuild.
+ * src/vterminate.cc (__verbose_terminate_handler): Enable use of
+ runtime __cxa_demangle.
+
+ * docs/html/install.html: Update prereqs and instructions.
+ * docs/html/19_diagnostics/howto.html: Bring naming for
+ verbose_terminate_handler into line with reality.
+
+2002-04-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/3129
+ * include/bits/basic_ios.h (basic_ios::_M_exception): Move.
+ (basic_ios::_M_streambuf_state): Move.
+ * include/bits/ios_base (ios_base): To here.
+ * include/bits/ios_base.h (ios_base::_S_local_words): To
+ _S_local_word_size.
+ (ios_base::_M_word_array): To _M_local_word.
+ (ios_base::_M_words_limit): To _M_word_size.
+ (ios_base::_M_words): To _M_word.
+ Comment.
+ * include/bits/basic_ios.tcc: Adjust.
+ * src/ios.cc (ios_base::_M_grow_words): Tweak.
+ * testsuite/27_io/ios_base_storage.cc: Add tests.
+
+ libstdc++/5207
+ Kenny Simpson <theonetruekenny@yahoo.com>
+ * include/bits/ios_base.h: Fix.
+
+ Richard Henderson <rth@redhat.com>
+ * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Correct
+ last change.
+
+ * include/bits/basic_string.h: Tweak formatting.
+
+2002-04-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h
+ (codecvt::do_out, codecvt::do_unshift, codecvt::do_in):
+ By definition, sizeof(char) == 1.
+ * include/bits/locale_facets.tcc (money_get::do_get,
+ money_put::do_put): Ditto.
+ * testsuite/21_strings/inserters_extractors.cc
+ (test04): Ditto.
+
+2002-03-30 Richard Henderson <rth@redhat.com>
+
+ PR c++/3719
+ * libsupc++/eh_personality.cc (__cxa_call_unexpected): Copy handler
+ data out of the exception struct before calling unexpectedHandler.
+
+2002-03-28 Roger Sayle <roger@eyesopen.com>
+
+ * include/c_std/std_cmath.h: To prevent problems overloading
+ g++ builtins, use the double variants from the global namespace
+ before defining float and long double variants in std::.
+
+2002-03-28 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/18_support/numeric_limits.cc (test_extrema): Fix typo.
+
+2002-03-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/24_iterators/istream_iterator.cc
+ (test02): New tests.
+
+2002-03-28 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc
+ (test01): Protect the test with _GLIBCPP_USE_WCHAR_T;
+ fix i_lit_base e_lit_base arrays, making them independent
+ from the endianness of the platform; tweak UCS4 to UCS-4BE.
+
+2002-03-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Always
+ allocate at least a byte.
+
+ * testsuite/18_support/numeric_limits.cc (test_extrema): Make
+ debugger-friendly.
+ * testsuite/27_io/streambuf.cc (test07): Fix.
+ (test06): Enable.
+
+2002-03-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/Intro.3: Date tweak.
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/doxygroups.cc: Point to tables.html.
+ * docs/doxygen/mainpage.html: Date tweak.
+ * docs/doxygen/run_doxygen: Version tweak. Copy tables.html over.
+ * docs/doxygen/tables.html: Fill in the blanks.
+
+ * docs/doxygen/user.cfg.in (ALIASES): Remove maint and endmaint.
+ * include/bits/stl_algo.h: Likewise; use expanded form.
+ * include/bits/stl_alloc.h: Likewise.
+ * include/bits/stl_construct.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_iterator_base_types.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_relops.h: Likewise.
+ * include/bits/stl_tempbuf.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/std/std_memory.h: Likewise.
+
+ * include/bits/stl_deque.h: Point into tables.html and add @ingroup.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+
+2002-03-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c/: Guard with _CPP_.
+ * include/c_std/: Same.
+ * include/Makefile.am: Fixup install, link routines for null
+ c_base_headers_extra scenarios.
+ * include/Makefile.in: Regerate.
+
+2002-03-25 Paolo Carlini <pcarlini@unitus.it>
+ Richard Henderson <rth@redhat.com>
+
+ * testsuite/22_locale/codecvt_members_unicode_char.cc
+ (test01, test02): make sure that the i_lit_base array
+ is sufficiently aligned.
+
+2002-03-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/newlib/bits/ctype_noninline.h (ctype::classic): Set to
+ _ctype_.
+
+2002-03-25 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/collate_byname.cc
+ (test01): compare the result of collate::compare with
+ that of collate::transform + string::compare, not with
+ that of collate::transform + collate::compare; values
+ returned by collate::compare are normalized, therefore
+ test against +-1.
+
+2002-03-25 Benjamin Kosnik <bkoz@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * config/locale/gnu/messages_members.h: Correct conditional.
+ * config/locale/gnu/messages_members.cc: Same.
+ * config/locale/gnu/time_members.cc: Same.
+
+2002-03-25 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/codecvt_members_unicode_char.cc
+ (test01, test02): Fix i_lit_base arrays, making them
+ independent from the endianness of the platform.
+
+2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPP): Just test for
+ signbit and __signbit directly.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+ * libmath/Makefile.am: Simplify.
+ * libmath/Makefile.in: Regenerate.
+ * include/c_std/std_cmath.h: Update paths for include of cmath.tcc.
+
+ * include/Makefile.am: Clean up handling of extra "C" header files.
+ Add hooks for "C" compatibility headers.
+ * include/Makefile.in: Regenerate.
+
+ * include/c/*: Formatting tweaks, cleanups.
+ * include/c_std/*: Same.
+
+2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/gnu/messages_members.h: Add __uselocale bits.
+ * config/locale/gnu/messages_members.cc: Same.
+ * config/locale/gnu/time_members.cc: Same.
+
+2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/vterminate.cc: Format, -fno-exceptions cleanup.
+
+2002-03-21 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3): New.
+ (GLIBCPP_CONFIGURE_TESTSUITE): Use it to check for setenv.
+ * aclocal.m4: Regenerate.
+ * configure: Likewise.
+
+2002-03-19 Paolo Carlini <pcarlini@unitus.it>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * src/locale-inst.cc (__convert_from_v): Add an additional
+ __size parameter in the declarations.
+ * include/bits/locale_facets.tcc
+ (__convert_from_v): When available (that is,
+ _GLIBCPP_USE_C99 defined) use snprintf instead of sprintf.
+ (num_put::_M_convert_float): Depending on _GLIBCPP_USE_C99
+ being defined or not, call and use __convert_from_v in the
+ appropriate way.
+ (num_put::_M_convert_int): Same here.
+ (money_put::do_put(long double)): Same here.
+
+2002-03-19 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html (#3.6): Rewrap and close <a href> tags.
+ * docs/html/faq/index.txt: Regenerate.
+
+2002-03-19 Steve Ellcey <sje@cup.hp.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Define
+ GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS to set LIBUNWIND_FLAG if
+ --enable-libunwind-exceptions is set.
+ * configure.in (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Call new
+ macro to check for libunwind.
+ * configure: Regenerate.
+ * src/Makefile.am (libstdc___la_LDFLAGS): Add
+ LIBUNWIND_FLAG to libstdc link line.
+ * src/Makefile.in: Regenerate.
+
+2002-03-19 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/faq/index.html: Add OS X workaround.
+ * docs/html/17_intro/TODO: Update.
+
+2002-03-18 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc
+ (money_put::do_put(long double)): Fix dimensioning of
+ temporary buffers to avoid risk of overruns.
+ (money_put::do_put(string)): Same for the buffer used to
+ add the grouping chars.
+ * testsuite/22_locale/money_put_members_char.cc: Add test06.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.
+
+ * include/bits/locale_facets.tcc
+ (collate::do_transform): Simplify.
+
+2002-03-18 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCPP_CONFIGURE): Make indentation/spacing uniform.
+ * configure.in: Add comments pointing the way for autoconf 2.5x.
+ * aclocal.m4, config.h.in, configure: Regenerate.
+
+2002-03-18 Philipp Thomas <pthomas@suse.de>
+
+ * include/backward/hash_map.h: hash, hashtable, hash_map and
+ hash_multimap are in namespace __gnu_cxx.
+ include/backward/hash_set.h: hash, hashtable, hash_set and
+ hash_multiset are in namespace __gnu_cxx.
+ include/backward/hashtable.h: hash and hashtable are in
+ namespace __gnu_cxx.
+ include/backward/rope.h: char_producer, sequence_buffer,
+ rope, crope and wrope are in namespace __gnu_cxx.
+ include/backward/slist.h: slist is in namespace __gnu_cxx.
+ * testsuite/backward/header_hash_map_h.cc
+ testsuite/backward/header_hash_set_h.cc
+ testsuite/backward/header_hashtable_h.cc
+ testsuite/backward/header_rope_h.cc
+ testsuite/backward/header_slist_h.cc
+ testsuite/backward/header_tempbuf_h.cc: New tests for
+ checking that we're using the correct namespace.
+
+2002-03-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/4381
+ * libsupc++/eh_personality.cc (get_adjusted_ptr): New static fn.
+ (check_exception_spec): Call it. Take the thrown pointer.
+ (__cxa_call_unexpected): Pass it.
+ (PERSONALITY_FUNCTION): Likewise. Use get_adjusted_ptr.
+
+2002-03-15 Anthony Green <green@redhat.com>
+
+ * configure.in: Remove useless is_mingw32.
+ * configure: Rebuilt.
+
+2002-03-15 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/collate_members_char.cc
+ (test01): compare the result of collate::compare with
+ that of collate::transform + string::compare, not with
+ that of collate::transform + collate::compare.
+ (test01): values returned by collate::compare are
+ normalized, therefore test against +-1.
+ * testsuite/22_locale/collate_members_wchar_t.cc: Ditto.
+
+2002-03-12 Loren Rittle <ljrittle@acm.org>
+
+ reported by Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+ * testsuite/thread/pthread4.cc: Lower nominal iteration counter.
+
+2002-03-12 Benjamin Kosnik <bkoz@redhat.com>
+ Per Liboriussen <liborius@stofanet.dk>
+
+ * config/os/gnu-linux/bits/ctype_noninline.h: Cast to
+ unsigned char.
+ * config/os/gnu-linux/bits/ctype_inline.h: Same.
+
+ * config/os/irix/irix6.5/bits/ctype_inline.h: Same.
+
+ * config/os/solaris/solaris2.5/bits/ctype_inline.h: Same.
+ * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+
+ * config/os/solaris/solaris2.6/bits/ctype_inline.h: Same.
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
+
+ * config/os/solaris/solaris2.7/bits/ctype_inline.h: Same.
+ * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
+
+ * testsuite/22_locale/ctype_members_char.cc (main): Add tests.
+
+2002-03-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_string.tcc (string::_S_construct(_InIter,
+ _InIter, const _Alloc&, forward_iterator_tag): Check for null.
+ (string::basic_string(const _CharT* __s, const _Alloc& __a)): Same.
+ * testsuite/21_strings/ctor_copy_dtor.cc (test01): Re-enable, now
+ that memory limits are in place.
+ (test03): Add tests.
+
+2002-03-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for wctype.h.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * include/c_std/std_cwctype.h: Guard.
+
+2002-03-11 Chris Demetriou <cgd@broadcom.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Enhance check for
+ whether GLIBCPP_CHECK_LINKER_FEATURES has been used.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2002-03-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_bvector.h: Fix warning.
+
+2002-03-11 Richard Henderson <rth@redhat.com>
+
+ * include/bits/stl_bvector.h (_Bit_type): New. Use throughout.
+
+2002-03-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-list-sourcefiles):
+ New function. Build the list of tests to run in testsuite_files.
+ * testsuite/libstdc++-v3.dg/dg.exp: Use it.
+
+2002-03-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/21_strings/capacity.cc: Only explicitly instantiate on
+ platforms with no weak support.
+ * testsuite/27_io/ios_init.cc: Likewise.
+
+2002-03-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (time_put::do_put):
+ Consider sizeof(char_type) in allocating the buffer.
+
+ * include/bits/locale_facets.tcc (collate::do_tranform):
+ Remove redundant variable.
+
+2002-03-10 Ulrich Drepper <drepper@redhat.com>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/generic/collate_members.cc
+ (collate<char,wchar_t>::_M_compare_helper): normalize
+ values returned by strcoll and wcscoll.
+ * config/locale/gnu/collate_members.cc
+ (collate<char,wchar_t>::_M_compare_helper): ditto
+ for __strcoll_l and __wcscoll_l.
+
+2002-03-10 Anthony Green <green@redhat.com>
+
+ * configure.in: Support cross builds to mingw32 target.
+ * configure: Rebuilt.
+
+2002-03-09 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (collate::do_transform):
+ Rewrite to fix problems with long transformed strings.
+
+2002-03-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * c_locale_generic.cc: Move to...
+ * generic/c_locale.cc
+ * c_locale_generic.h: Move to...
+ * generic/c_locale.h
+ * codecvt_specializations_generic.h: Move to...
+ * generic/codecvt_specializations.h
+ * collate_members_generic.cc: Move to...
+ * generic/collate_members.cc
+ * ctype_members_generic.cc: Move to...
+ * generic/ctype_members.cc
+ * messages_members_generic.cc: Move to...
+ * generic/messages_members.cc
+ * messages_members_generic.h: Move to...
+ * generic/messages_members.h
+ * moneypunct_members_generic.cc: Move to...
+ * generic/monetary_members.cc
+ * numpunct_members_generic.cc: Move to...
+ * generic/numeric_members.cc
+ * time_members_generic.cc: Move to...
+ * generic/time_members.cc
+ * c_locale_gnu.cc: Move to...
+ * gnu/c_locale.cc
+ * c_locale_gnu.h: Move to...
+ * gnu/c_locale.h
+ * collate_members_gnu.cc: Move to...
+ * gnu/collate_members.cc
+ * ctype_members_gnu.cc: Move to...
+ * gnu/ctype_members.cc
+ * messages_members_gnu.cc: Move to...
+ * gnu/messages_members.cc
+ * messages_members_gnu.h: Move to...
+ * gnu/messages_members.h
+ * moneypunct_members_gnu.cc: Move to...
+ * gnu/monetary_members.cc
+ * numpunct_members_gnu.cc: Move to...
+ * gnu/numeric_members.cc
+ * time_members_gnu.cc: Move to...
+ * gnu/time_members.cc
+ * c_locale_ieee_1003.1-200x.cc: Move to...
+ * ieee_1003.1-2001/c_locale.cc
+ * c_locale_ieee_1003.1-200x.h: Move to...
+ * ieee_1003.1-2001/c_locale.h
+ * codecvt_specializations_ieee_1003.1-200x.h: Move to...
+ * ieee_1003.1-2001/codecvt_specializations.h
+ * messages_members_ieee_1003.1-200x.cc: Move to...
+ * ieee_1003.1-2001/messages_members.cc
+ * messages_members_ieee_1003.1-200x.h: Move to...
+ * ieee_1003.1-2001/messages_members.h
+
+ * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Make consistent.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * src/Makefile.am (sources): Change to monetary and numeric.
+ * src/Makefile.in: Regenerate.
+ * docs/html/configopts.html: Update to ieee_1003.1-2001.
+
+2002-03-08 scott snyder <snyder@fnal.gov>
+
+ libstdc++/5875
+ * include/bits/locale_facets.tcc (num_put::_M_convert_float):
+ Allow one more digit of precision.
+ * testsuite/27_io/ostream_inserter_arith.cc: Test that we can
+ write a double and read back in the same value.
+
+2002-03-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_limits.h: Move static const data members out of
+ generic template, into base class __numeric_limits_base.
+ * src/limits.cc: Add definitions.
+ * config/linker-map.gnu: Add __numeric_limits_base.
+ * testsuite/18_support/numeric_limits.cc: Declare test in scope.
+
+2002-03-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_alloc.h: Add extern implicit allocator
+ instantiations.
+ * include/bits/basic_string.tcc: Tweak.
+ * include/bits/locale_facets.tcc: Remove default args. Add
+ has_facet, use_facet extern instantiations.
+ * src/stl-inst.cc: Add explicit instantiation.
+ * src/locale-inst.cc: Clean. Remove locale member template
+ instantiations.
+
+ * testsuite/22_locale/operators.cc (test02): Enable.
+
+2002-03-06 Benjamin Kosnik <bkoz@redhat.com>
+ Stephen M. Webb <stephen.webb@bregmasoft.com>
+
+ * include/bits/stl_tree.h (_S_rb_tree_red): Make enum.
+ (_S_rb_tree_black): Make enum.
+ Clean. Format.
+ * include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum.
+ * include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum.
+ (__stl_threshold): _M_threshold, enum.
+ * src/stl-inst.cc: Same.
+ * config/linker-map.gnu: Remove.
+
+ * testsuite/23_containers/vector_bool.cc: New.
+
+2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/user.cfg.in: Also document deprecated entries.
+ * docs/html/Makefile: Example rule to rebuild porting-howto.html.
+ * docs/html/17_intro/howto.html: "gcc"->"GCC" changes, when
+ referring to the collection as a whole. New section on which macros
+ can be redefined by the user.
+ * docs/html/19_diagnostics/howto.html: Update note for concepts.
+ * docs/html/20_util/howto.html: Update link to SGI.
+ * docs/html/faq/index.html: Update snapshot versions. New entry
+ on why g++ (but not gcc) must currently predefine certain macros.
+ * docs/html/faq/index.txt: Regenerated.
+
+ * include/bits/basic_string.h (basic_string::_S_construct): Fix
+ names in declaration.
+ (basic_string::compare): These are no longer optional.
+ * include/bits/ostream.tcc: Tweak closing brace placement.
+ * include/bits/stl_algo.h: Lots of initial doxygen comment hooks.
+ * include/std/std_sstream.h: Fix typo in comment.
+ * include/bits/locale_facets.tcc: Remove unneeded header inclusion.
+ * src/locale.cc: Likewise.
+
+2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/5734
+ * include/bits/stl_vector.h (vector::push_back()): Guard with
+ _GLIBCPP_DEPRECATED.
+
+2002-03-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/c++config: Fix misplaced leading blanks on first line.
+
+2002-03-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/RELEASE-NOTES: Fix usage.
+ * README (libmath): Make clear.
+
+2002-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version
+ script globbing in ld.
+ * aclocal.m4: Rebuilt.
+ * configure: Rebuilt.
+
+2002-03-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/RELEASE-NOTES: Update.
+ * README: Format subdirectories.
+
+2002-03-05 Paolo Carlini <pcarlini@unitus.it>
+
+ libstdc++/5816
+ * include/bits/locale_facets.tcc
+ (num_get::_M_extract_float): Fix the parsing of __dec, since
+ the standard prescribes that if no grouping characters are
+ seen, no grouping check is applied.
+ * testsuite/22_locale/num_get_members_char.cc: Add test05
+ distilled from the PR.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.
+
+2002-03-04 Craig Rodrigues <rodrigc@gcc.gnu.org>
+
+ * docs/html/17_intro/porting-howto.xml: Refer to
+ http://www.oasis-open.org for docbookx.dtd.
+ * docs/html/17_intro/porting-howto.html: Regenerated.
+
+2002-03-03 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/3955
+ * include/std/std_sstream.h: Remove trailing spaces.
+ (basic_stringbuf::_M_stringbuf_init): Also check for ios_base::app.
+ * testsuite/27_io/stringbuf.cc (test05, test06): New tests.
+
+2002-03-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/num_get_members_char.cc (test04):
+ Use a named locale expecting grouping (de_DE).
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test04):
+ Ditto.
+ * testsuite/27_io/ios_manip_basefield.cc (test01):
+ Extend coverage, uniform treatment of hexs and octs.
+
+2002-02-28 Richard Henderson <rth@redhat.com>
+
+ * config/linker-map.gnu: Export operator new with unsigned long,
+ and with std::nothrow_t. Likewise operator delete.
+
+2002-02-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int):
+ Admit grouping for octals and hexadecimals too.
+ * testsuite/22_locale/num_get_members_char.cc: Add test04.
+ (test01): Tweak "." -> "," in void* test.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.
+
+ * testsuite/27_io/ios_manip_basefield.cc: Remove static keyword.
+ * testsuite/27_io/ios_manip_fmtflags.cc: Remove two of them.
+
+2002-02-27 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/ios_manip_basefield.cc (test01):
+ Fix for 64 bit machines.
+
+2002-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/3983
+ * include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero.
+ Adjust comment.
+ * include/bits/basic_ios.h (basic_ios::_M_fill): Make mutable.
+ (basic_ios::_M_fill_init): New.
+ (basic_ios::fill()): Delay dealing with _M_fill.
+ Adjust comment.
+ * ios.cc (ios_base::ios_base()): Initialize _M_callbacks, _M_words.
+ (ios_base::_M_call_callbacks): Adjust.
+ * testsuite/27_io/ios_init.cc (test02): Adjust testcase.
+
+2002-02-26 Loren Rittle <ljrittle@acm.org>
+
+ * include/Makefile.am (thread_target_headers): Unconditionally
+ stage and install gthr-posix.h.
+ (${target_builddir}/gthr-posix.h): New rule cloned off
+ ${target_builddir}/gthr-default.h.
+ (${target_builddir}/gthr-default.h): Support chained inclusion
+ of gthr support headers.
+ * include/Makefile.in: Rebuilt.
+
+2002-02-26 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (num_put::_M_widen_int):
+ Group all the integral types, not only decs.
+ * testsuite/27_io/ios_manip_basefield.cc (test01): Tweak existing
+ tests, add a few more.
+
+2002-02-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/ios.cc (ios_base::~ios_base): Tweak.
+ (ios_base::_M_call_callbacks): Deal with null __p.
+ (ios_base::ios_base): Set _M_callbacks.
+ * include/bits/basic_ios.tcc (basic_ios::init): Adjust comment.
+ * testsuite/27_io/ios_init.cc (test02): Fix.
+
+ * mkcheck.in (static_fail): Failed links go to output file.
+
+2002-02-25 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Update.
+ * docs/html/faq/index.txt: Regenerate.
+
+2002-02-22 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Fix comment.
+ * aclocal.m4: Regenerate.
+ * docs/html/configopts.html: Document --enable-symvers.
+ * config/linker-map.gnu: Break libsupc++ symbols out to their own tag.
+
+2002-02-22 Philipp Thomas <pthomas@suse.de>
+
+ * include/backward/tempbuf.h: get_temporary_buffer and
+ return_temporary_buffer are in namespace std, not in __gnu_cxx.
+
+2002-02-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (target_alias): Default to yes.
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Add check for shared
+ libgcc to default case.
+
+2002-02-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Also check version.
+ (GLIBCPP_ENABLE_SYMVERS): Redo logic, use linker version.
+ * configure.in (GLIBCPP_ENABLE_SYMVERS): Move later in the script.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config/linker-map.dummy: New file. Contains nothing useful.
+
+2002-02-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/money_put_members_char.cc: Fix.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Fix.
+
+ * testsuite/27_io/standard_manipulators.cc: New file.
+
+ * testsuite/27_io/ios_manip_basefield.cc: Check results, now failing.
+ * testsuite/27_io/ios_manip_fmtflags.cc: Use locale::classic().
+
+2002-02-20 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/mingw32/bits/ctype_noninline.h
+ (ctype<char>::ctype): Remove default args from parm list.
+ * config/os/djgpp/bits/ctype_noninline.h: Same.
+
+2002-02-19 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_iomanip.h: Inline, tweaks.
+ * config/linker-map.gnu: Remove hacks.
+
+ * testsuite/21_strings/capacity.cc: Add explicit instantiations.
+ * testsuite/27_io/ios_init.cc: Same.
+ * testsuite/22_locale/money_get_members_char.cc (test07): Fix.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test07): Same.
+
+2002-02-19 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Export global vtable, typeinfo, guard
+ variable, and thunk info as per CXXABI docs.
+
+2002-02-19 Loren Rittle <ljrittle@acm.org>
+
+ * include/Makefile.am: Use CONFIG_HEADER instead of ad hoc names.
+ * include/Makefile.in: Rebuilt.
+
+2002-02-18 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * testsuite/22_locale/collate_byname.cc (test01): Replace size4
+ with size3 for the string collations of str5.
+
+2002-02-18 Paolo Carlini <pcarlini@unitus.it>
+
+ libstdc++/5708
+ * include/bits/locale_facets.tcc (money_put::do_put):
+ For the space field use __fill instead of ' ', uniformly.
+ * testsuite/22_locale/money_put_members_char.cc:
+ Add test05 distilled from PR.
+ (test01-02-03): Trim some '*' to ' '.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.
+
+2002-02-18 Loren Rittle <ljrittle@acm.org>
+
+ libstdc++/5697
+ * include/Makefile.am (thread_builddir): Remove (map all
+ existing uses to target_builddir).
+ (thread_headers): Rename to...
+ (thread_target_headers): ...this.
+ (stamp-thread): Remove.
+ (stamp-target): Correctly state the position as built.
+ Update all dependencies to match the new reality. Remove all
+ dependency calculations on directories.
+ * include/Makefile.in: Rebuilt.
+
+2002-02-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc: Add pragma GCC system_header.
+ * include/bits/fstream.tcc: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/bits/istream.tcc: Same.
+ * include/bits/streambuf.tcc: Same.
+ * include/bits/basic_ios.tcc: Same.
+ * include/bits/basic_string.tcc: Same.
+
+2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_iosfwd.h: Don't guard typedefs with
+ _GLIBCPP_USE_WCHAR_T
+ * include/bits/stringfwd.h: Same.
+
+2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/locale.cc (moneypunct_byname): Remove definitions.
+ * include/std/std_streambuf.h (streambuf::operator=): Return.
+
+2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ Tune for size.
+ * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant
+ explicit instantiation.
+ (string::_Rep::_S_max_size): Same.
+ * include/bits/basic_string.tcc: Add extern explicit
+ instantiations for string, wstring.
+ * include/bits/basic_ios.tcc: Add extern explicit instantiations
+ for ios, wios.
+ * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf.
+ * include/bits/istream.tcc: Same, for istream, wistream.
+ * include/bits/ostream.tcc: Same for ostream, wostream, iostream,
+ wiostream.
+ * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf,
+ istringstream, wistringstream, ostringstream, wostringstream,
+ stringstream, wstringstream.
+ * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream,
+ wifstream, ofstream, wofstream, fstream, wfstream.
+ * src/misc-inst.cc: Correct comments.
+ Add iomanip instantiations for wide streams.
+ * include/std/std_iomanip.h: Same.
+ * include/bits/locale_facets.tcc: Same.
+
+ * include/std/std_streambuf.h: Correct
+ _GLIBCPP_FULLY_COMPLIANT_HEADERS guard.
+ * include/std/std_sstream.h: Same.
+ * include/std/std_ostream.h: Same.
+ * include/std/std_istream.h: Same.
+ * include/std/std_fstream.h: Same.
+
+ * include/std/std_streambuf.h: Add definitions for private copy
+ ctor and assignment operator.
+ * include/std/std_istream.h: Remove declared but undefined copy
+ ctor and assignment operator. This is taken care of in ios_base,
+ so adding it in the derived class as well is superfluous.
+ * include/std/std_ostream.h: Same.
+
+ * include/bits/basic_ios.h (basic_ios::clear): Don't inline.
+ * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here.
+
+2002-02-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1.
+ Add typeinfo bits. Smooth.
+ * aclocal.m4: Regenerate.
+ * configure: Same.
+ * src/Makefile.in: Same.
+
+2001-02-14 Joel Sherrill <joel@OARcorp.com>
+
+ * config/cpu/m68k/bits/atomicity.h: Corrected for RTEMS targets
+ which do not have a CAS instruction.
+
+2002-02-14 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision.
+ * configure.in: Call it.
+ * config/linker-map.gnu: New file, initial incomplete revision.
+ * src/Makefile.am: Optionally pass version script to the linker.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * src/Makefile.in: Regenerate.
+
+2002-02-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/localename.cc: Remove stdexcept include.
+ * src/locale-inst.cc: Same.
+ * src/locale.cc: Same.
+ * src/functexcept.cc: Remove string includes.
+ * include/std/std_bitset.h: Remove stdexcept include.
+ * testsuite/23_containers/bitset_members.cc: Add stdexcept.
+ * testsuite/23_containers/bitset_ctor.cc: Same.
+
+2002-02-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_algo (__stl_threshold): Declare external.
+ (__stl_chunk_size): Same.
+ * include/bits/stl_bvector.h (__WORD_BIT): Same.
+ * include/bits/stl_tree.h (_S_rb_tree_red): Same.
+ (_S_rb_tree_black): Same.
+ * src/stl-inst.cc (__stl_threshold): Define.
+ (__stl_chunk_size): Same.
+ (__WORD_BIT): Same.
+ (_S_rb_tree_red): Same.
+ (_S_rb_tree_black): Same.
+
+ * config/io/basic_file_libio.h (__basic_file): Add declarations.
+ * include/bits/basic_file.h: Remove.
+ * config/io/c_io_stdio.h: Remove _GLIBCPP_BASIC_FILE_ENCAPSULATION
+ Declare generic types, specialization.
+ * config/io/basic_file_stdio.cc: Definitions.
+ * config/io/c_io_libio.h: Remove _GLIBCPP_BASIC_FILE_INHERITANCE.
+ Declare generic types.
+ * include/Makefile.am (bits_headers): Remove basic_file.h.
+ (extra_target_headers): Change basic_file_model.h to basic_file.h.
+ (stamp-target): Same.
+
+ * include/bits/stl_alloc.h: Tweaks.
+ * include/bits/localefwd.h: Same.
+
+2002-02-11 Aaron W LaFramboise <AWLaFramboise@aol.com>
+
+ * include/bits/locale_facets.tcc (collate::do_hash): Fix.
+ * testsuite/22_locale/collate_members_char.cc (test03): New test.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test03): Same.
+
+2002-02-10 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_algo.h (transform (both signatures), generate_n):
+ Use __typeof__ in concept checks.
+
+2002-02-10 Jonathan Wakely <cow@compsoc.man.ac.uk>
+
+ * include/bits/stl_algo.h (__median, for_each, find, find_if,
+ adjacent_find, count, count_if, search, search_n, swap_ranges,
+ transform, replace, replace_if, replace_copy, replace_copy_if,
+ generate, generate_n, remove_copy, remove_copy_if, remove, remove_if,
+ unique, unique_copy, reverse, reverse_copy): Doxygenate.
+
+2002-02-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h
+ (numpunct<_CharT>::_M_initialize_numpunct): Remove definition.
+ (__timepunct<_CharT>::_M_initialize_timepunct): Same.
+ (__timepunct<_CharT>::_M_put_helper): Same.
+ (moneypunct<_CharT, _Intl>::_M_initialize_moneypunct): Same.
+
+ * include/bits/fstream.tcc (filebuf::underflow): Remove
+ __codecvt_type typedef.
+ (filebuf::_M_convert_to_external): Same.
+
+2002-02-08 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/doxygroups.cc: Tweak __gnu_cxx description.
+ * docs/doxygen/mainpage.html: Add TODO list link.
+ * docs/doxygen/user.cfg.in: Add @doctodo hook.
+ * docs/doxygen/tables.html: New file, emoty structure only.
+
+ * include/bits/stl_iterator.h: Doxygenate just about everything.
+ * include/bits/stl_iterator_base_funcs.h: Ditto, clean up spaces.
+ * include/bits/stl_iterator_base_types.h: Add notes.
+
+2002-02-07 Stephan Buys <sbproxy@icon.co.za>
+
+ * include/bits/stl_map.h: Tweak doxygen markup.
+ * include/bits/stl_multimap.h: Doxygenate and remove extra spaces.
+ * include/bits/stl_vector.h: Likewise.
+
+2002-02-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/5286
+ libstdc++/3860
+ * include/std/std_fstream.h (filebuf::__file_type): Change to
+ __basic_file<char>.
+ (filebuf::_M_convert_to_external): Declare.
+ * include/bits/fstream.tcc (filebuf::_M_convert_to_external): Define
+ codecvt bits for wide streams.
+ (filebuf::_M_really_overflow): Use it.
+ (filebuf::underflow): Use codecvt.
+ * config/locale/codecvt_specializations_ieee_1003.1-200x.h:
+ (codecvt<__enc_traits>::do_out): Deal with partial.
+ (codecvt<__enc_traits>::do_encoding): Return something useful.
+ * src/codecvt.cc (codecvt<wchar_t>::do_encoding): Return sizeof
+ wchar_t.
+ * testsuite/22_locale/codecvt_members_unicode_char.cc (test01):
+ Change expected encoding output.
+ (test02): Same.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test01): Same.
+ (test02): Same.
+
+2002-02-07 Benjamin Kosnik <bkoz@redhat.com>
+ Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>
+
+ * include/bits/basic_ios.tcc (basic_ios::narrow): Add default value.
+ (basic_ios::widen): Same.
+
+2002-02-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/money_get_members_char.cc:
+ Add comment, tidy up.
+ (test01): more "en_HK" tests (without showbase).
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Ditto.
+
+2002-02-06 Loren Rittle <ljrittle@acm.org>
+
+ * config/locale/c_locale_generic.cc: Do not trust
+ _GLIBCPP_HAVE_STRTOF or _GLIBCPP_HAVE_STRTOLD as
+ set by configure.
+
+2002-02-06 Loren Rittle <ljrittle@acm.org>
+
+ * acinclude.m4: Add C++ linkage check for strtof.
+ * aclocal.m4: Rebuilt.
+ * config.h.in: Rebuilt.
+ * configure: Rebuilt.
+ * config/locale/c_locale_generic.cc: Conditionally include
+ <ieeefp.h>. Improve handling and error checking of float
+ and long double input for non-C99 configurations.
+
+2002-02-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(string)):
+ In case money_base::symbol deal properly with multi-char sign
+ for patterns {X,Y,Z,symbol} and {X,Y,symbol,none}.
+ * testsuite/22_locale/money_get_members_char.cc: Add test07.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Add test07.
+
+2002-02-05 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(string)):
+ First construct a tentative returned string, then, only if the
+ parsing succeeds, copy it into the string passed by reference.
+ * testsuite/22_locale/money_get_members_char.cc: Add test06.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Add test06.
+
+2002-02-04 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/TODO: Impl-defined behavior now documented...
+ * docs/html/17_intro/howto.html: ...here.
+ * docs/doxygen/mainpage.doxy: Remove, rename...
+ * docs/doxygen/mainpage.html: ...to this. Tweak HTML, add license.
+ * docs/doxygen/style.css: Add small text.
+ * docs/doxygen/run_doxygen: Adjust for new mainpage.
+ * docs/doxygen/user.cfg.in: Likewise.
+
+2002-02-04 Stephan Buys <sbproxy@icon.co.za>
+
+ * include/bits/stl_map.h: Initial doxygen markup.
+ * include/std/std_fstream.h: Initial doxygen markup.
+
+2002-02-04 Paolo Carlini <pcarlini@unitus.it>
+
+ libstdc++/5579
+ * include/bits/locale_facets.tcc (money_get::do_get(string)):
+ Deal correctly with !(__io.flags() & ios_base::showbase)
+ for case money_base::symbol.
+ * testsuite/22_locale/money_get_members_char.cc: Add test05.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Add test05.
+
+2002-02-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/operators.cc
+ (gnu_collate::do_compare()): Add return statement to
+ suppress "no return statement" warning.
+
+2002-02-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/ostream_manip.cc: Enable test02.
+
+2002-02-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/documentation.html: Update for 3.0.96.
+ * docs/html/faq/index.html: Update for 3.0.96.
+ * docs/html/faq/index.txt: Regenerated.
+ * docs/doxygen/TODO: Update notes.
+ * docs/html/17_intro/howto.html: Initial impl-specific listing.
+
+2002-01-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/codecvt_specializations_ieee_1003.1-200x.h:
+ Initialize all data members in copy ctor. Make ctors explicit.
+ (__enc_traits::__enc_traits()): Default ctor does nothing.
+ (__enc_traits::_M_init): Guard against multiple iconv_opens.
+ * include/std/std_sstream.h (basic_stringbuf): Make data members
+ protected.
+ * include/std/std_fstream.h (basic_filebuf): Same.
+ * include/std/std_streambuf.h: Tweak.
+ * include/bits/streambuf.tcc: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/fstream.tcc: Same.
+
+2002-01-31 Loren Rittle <ljrittle@acm.org>
+
+ * testsuite/22_locale/codecvt_members_char_char.cc: Do not
+ allow NULL argument to be passed to setenv().
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
+ * testsuite/22_locale/collate_members_char.cc: Likewise.
+ * testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/ctype_members_char.cc: Likewise.
+ * testsuite/22_locale/ctype_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/messages_members_char.cc: Likewise.
+ * testsuite/22_locale/money_get_members_char.cc: Likewise.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/money_put_members_char.cc: Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/moneypunct_members_char.cc: Likewise.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/num_get_members_char.cc: Likewise.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/num_put_members_char.cc: Likewise.
+ * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/numpunct_members_char.cc: Likewise.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_get_members_char.cc: Likewise.
+ * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_put_members_char.cc: Likewise.
+ * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.
+
+2002-01-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/c_locale_gnu.cc: Same errno fixes as generic.
+
+ * ChangeLog-2001: Fix spelling errors...
+ * docs/html/17_intro/RELEASE-NOTES: Update.
+ * docs/html/17_intro/TODO: Update.
+ * README (file): Update.
+
+2002-01-30 Loren Rittle <ljrittle@acm.org>
+
+ * config/locale/c_locale_generic.cc: Check errno for ERANGE
+ instead of non-zero to aid portability.
+
+2002-01-30 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * docs/html/22_locale/messages.html: Fix example code.
+
+2002-01-30 Richard Henderson <rth@redhat.com>
+
+ * testsuite/27_io/ostream_inserter_arith.cc (test03_check): Break
+ out from test03 and templatize.
+ (test03): Use it.
+
+2002-01-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/numpunct_members_gnu.cc
+ (numpunct<char, wchar_t>::_M_initialize_numpunct()):
+ Fix initialization of _M_grouping for locales which have
+ _M_thousands_sep == '\0'(L'\0', respectively).
+ * testsuite/22_locale/numpunct_byname.cc (test02): Add test.
+
+2002-01-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/ostream_inserter_arith.cc (test03):
+ Better fix for 32/64 bit architectures, avoiding the
+ implicit assumption that CHAR_BIT == 8.
+
+2002-01-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.am (doxygen, doxygen-maint, doxygen-man): Tweak targets.
+ * Makefile.in: Regenerate.
+
+ * docs/doxygen/run_doxygen: Update, mostly for man pages.
+ * docs/doxygen/Intro.3: Update.
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/doxygroups.cc: Add namespace hook for __gnu_cxx.
+ * docs/doxygen/mainpage.doxy: Update.
+ * docs/doxygen/user.cfg.in: Update for header rename. Also
+ regenerate comments and variables with 1.2.12.
+ * docs/doxygen/maint.cfg.in: Remove file.
+
+ * include/bits/stl_relops.h: Doxygenate.
+ * include/bits/stl_tempbuf.h (std::_Temporary_buffer): Likewise.
+
+ * include/c_std/std_cassert.h, include/c_std/std_cctype.h,
+ include/c_std/std_cerrno.h, include/c_std/std_cfloat.h,
+ include/c_std/std_ciso646.h, include/c_std/std_climits.h,
+ include/c_std/std_clocale.h, include/c_std/std_cmath.h,
+ include/c_std/std_csetjmp.h, include/c_std/std_csignal.h,
+ include/c_std/std_cstdarg.h, include/c_std/std_cstddef.h,
+ include/c_std/std_cstdio.h, include/c_std/std_cstdlib.h,
+ include/c_std/std_cstring.h, include/c_std/std_ctime.h,
+ include/c_std/std_cwchar.h, include/c_std/std_cwctype.h,
+ include/ext/algorithm, include/ext/functional, include/ext/hash_map,
+ include/ext/hash_set, include/ext/iterator, include/ext/memory,
+ include/ext/numeric, include/ext/rb_tree, include/ext/rope,
+ include/ext/ropeimpl.h, include/ext/slist, include/ext/stl_hash_fun.h,
+ include/ext/stl_hashtable.h, include/ext/stl_rope.h,
+ include/std/std_algorithm.h, include/std/std_bitset.h,
+ include/std/std_complex.h, include/std/std_deque.h,
+ include/std/std_fstream.h, include/std/std_functional.h,
+ include/std/std_iomanip.h, include/std/std_ios.h,
+ include/std/std_iosfwd.h, include/std/std_iostream.h,
+ include/std/std_istream.h, include/std/std_iterator.h,
+ include/std/std_limits.h, include/std/std_list.h,
+ include/std/std_locale.h, include/std/std_map.h,
+ include/std/std_memory.h, include/std/std_numeric.h,
+ include/std/std_ostream.h, include/std/std_queue.h,
+ include/std/std_set.h, include/std/std_sstream.h,
+ include/std/std_stack.h, include/std/std_stdexcept.h,
+ include/std/std_streambuf.h, include/std/std_string.h,
+ include/std/std_utility.h, include/std/std_valarray.h,
+ include/std/std_vector.h: Add/correct @file doxygen hook.
+
+ * include/ext/memory: Doxygenate most of rest of file.
+ * libsupc++/exception: Doxygen output formatting.
+ * libsupc++/new: Say which header it is.
+
+ * testsuite/lib/libstdc++-v3-dg.exp: Fix spacing.
+ * docs/html/19_diagnostics/howto.html: Describe concept-checks switch.
+ * docs/html/23_containers/howto.html: Describe O(n) list::size().
+ * docs/html/27_io/howto.html: Also link to Langer and Kreft text.
+
+2002-01-28 Paolo Carlini <pcarlini@unitus.it>
+ Charles Leggett <CGLeggett@lbl.gov>
+
+ * testsuite/27_io/filebuf_members.cc (test_05): Add test.
+
+2002-01-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/ostream_inserter_arith.cc (test03):
+ Fix to deal correctly with both 32 bit and 64 bit architectures
+
+2002-01-25 Loren Rittle <ljrittle@acm.org>
+
+ * testsuite/thread/pthread1.cc: Use one condition variable
+ per predicate instead of tricky use of one condition variable.
+
+2002-01-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/fstream.tcc (filebuf::close()): Fix close for input
+ streams.
+ (filebuf::_M_really_overflow): Match indeterminate and sync calls.
+ * testsuite/27_io/filebuf.cc: Compile only.
+ * testsuite/27_io/filebuf_members.cc: Move tests to here.
+ * testsuite/27_io/filebuf_virtuals.cc: And here.
+ Revert sungetc, sync changes for expected values.
+ * testsuite/27_io/filebuf-*: Move to...
+ * testsuite/27_io/filebuf_virtuals-*: ...here.
+ * testsuite/27_io/istream.cc: Compile only, activate.
+ * testsuite/27_io/ostream.cc: Same.
+ * testsuite/27_io/iostream.cc: New.
+ * testsuite/27_io/iostream_members.cc: New.
+
+2002-01-25 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * testsuite/thread/pthread1.cc: Enable on cygwin.
+ * testsuite/thread/pthread2.cc: Likewise.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread6.cc: Likewise.
+
+2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ostream_inserter_char.cc (test07): New.
+
+2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_ios.h (basic_ios::_M_check_facet): Make
+ const, tweak.
+ (basic_ios::fill(char_type)): Use fill().
+ * include/bits/basic_ios.tcc (basic_ios::widen): Use _M_check_facet.
+ (basic_ios::narrow): Same.
+ (basic_ios::_M_cache_facets): Explicitly set cached facets to zero
+ if they are invalid.
+ (basic_ios::init): Comment.
+ * testsuite/27_io/ios_init.cc (test02): New.
+
+2002-01-24 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_tempbuf.h (_Temporary_buffer): Add doxygen hook.
+ * include/bits/stl_algo.h: Include stl_tempbuf.h.
+ * include/ext/memory: Do not include stl_tempbuf.h.
+ (temporary_buffer): Add doxygen hook.
+ (__get_temporary_buffer, get_temporary_buffer,
+ return_temporary_buffer): Move back to std:: header...
+ * include/std/std_memory.h: ...here. Do not include stl_tempbuf.h.
+ * include/ext/rope: Do not include stl_tempbuf.h.
+ * include/ext/stl_hashtable.h: Likewise.
+ * include/std/std_algorithm.h: Likewise.
+ * testsuite/20_util/temporary_buffer.cc: New file.
+
+2002-01-24 andrew@andypo.net
+ (tweaks, test and commit by Loren J. Rittle <ljrittle@acm.org>)
+
+ libstdc++/5432
+ * include/bits/ios_base.h: Use _Atomic_word for reference counts.
+ * include/bits/localefwd.h: Likewise.
+ Also use for std::locale::id::_S_highwater.
+ * src/ios.cc (ios_base::xalloc): Use _Atomic_word.
+ * src/locale.cc: Support new usage of _Atomic_word.
+ (std::locale::classic): Guard entire function against reentry.
+ * src/localename.cc: Support new usage of _Atomic_word.
+
+2002-01-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test03): Use
+ _GLIBCPP_HAVE_SETENV.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): Same.
+ * testsuite/22_locale/collate_members_char.cc (test02): Same.
+ * testsuite/22_locale/ctype_members_char.cc (test03): Same.
+ * testsuite/22_locale/ctype_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/messages_members_char.cc (test02): Same.
+ * testsuite/22_locale/moneypunct_members_char.cc (test02): Same.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): Same.
+ * testsuite/22_locale/money_put_members_char.cc (test04): Same.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/num_get_members_char.cc (test03): Same.
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/numpunct_members_char.cc (test02): Same.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): Same.
+ * testsuite/22_locale/time_get_members_char.cc (test07): Same.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test07): Same.
+ * testsuite/22_locale/time_put_members_char.cc (test03): Same.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/num_put_members_char.cc (test03): Same.
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Check for setenv.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+
+2002-01-23 Loren Rittle <ljrittle@acm.org>
+
+ * testsuite/thread/pthread1.cc: New test.
+ * testsuite/thread/pthread2.cc: New test adapted from libstdc++/5347.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: New test adapted from
+ http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
+ * testsuite/thread/pthread5.cc: New test adapted from libstdc++/5464.
+ * testsuite/thread/pthread6.cc: New test adapted from libstdc++/5444.
+
+2002-01-23 Richard Henderson <rth@redhat.com>
+
+ PR libstdc++/5198
+ * config/cpu/m68k/bits/atomicity.h (__exchange_and_add): Only use
+ CAS on the cpu variants that support it. Add versions that use
+ TAS and that disable interrupts.
+ (__atomic_add): Use __exchange_and_add to guarantee atomicity.
+
+2002-01-23 Matt Kraai <kraai@alumni.cmu.edu>
+
+ * include/bits/locale_facets.tcc: Remove old comments.
+
+2002-01-23 Andreas Tobler <toa@pop.agri.ch>
+
+ * include/bits/locale_facets.tcc (__convert_to_v): Change template
+ parameter to _Tv.
+ (__convert_from_v): Same.
+
+2002-01-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (num_get::_M_extract_int): Change
+ prototype.
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int): Remove
+ __max_digits checks, adjust arguments.
+ (num_get::do_get(*)): Changeup.
+
+2002-01-23 Loren Rittle <ljrittle@acm.org>
+
+ * config/locale/c_locale_generic.cc: Fix typename usage.
+
+2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/c_locale_generic.cc: Fix.
+
+2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/22_locale/messages.html: Remove angle brackets.
+ * docs/html/17_intro/TODO: Add.
+
+2002-01-22 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/ios_manip_basefield.cc: Enable test02.
+ * testsuite/27_io/ostream_inserter_arith.cc: Enable test03.
+ * testsuite/27_io/ostream_inserter_char.cc: Enable test01.
+ * testsuite/27_io/ostream_inserter_other.cc: Enable test04.
+
+2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ Audit for LANG independence.
+ * include/bits/localefwd.h: Tweaks.
+ * include/bits/locale_facets.tcc (money_get::do_get(long double)):
+ Use __convert_to_v.
+ (time_get::do_get_year): Same.
+ (__convert_from_v): Add.
+ (num_put::_M_convert_float): Use.
+ (num_put::_M_convert_int): Same.
+ (money_put::do_put): Same.
+
+ * src/locale-inst.cc: Add instantiations for __convert_from_v.
+ * config/locale/time_members_gnu.cc: Cleanup setlocale usage.
+ * config/locale/time_members_generic.cc:
+ * config/locale/messages_members_gnu.cc: Same.
+ * config/locale/messages_members_gnu.h: Same.
+
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): New.
+ * testsuite/22_locale/codecvt_members_char_char.cc (test02): New.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test02): New.
+ * testsuite/22_locale/collate_members_char.cc (test02): New.
+ * testsuite/22_locale/ctype_members_wchar_t.cc (test03): New.
+ * testsuite/22_locale/ctype_members_char.cc (test03): New.
+ * testsuite/22_locale/messages_members_char.cc (test02): New.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): New.
+ * testsuite/22_locale/moneypunct_members_char.cc (test02): New.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test04): New.
+ * testsuite/22_locale/money_get_members_char.cc (test04): New.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test04): New.
+ * testsuite/22_locale/money_put_members_char.cc (test04): New.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): New.
+ * testsuite/22_locale/numpunct_members_char.cc (test02): New.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test03): New.
+ * testsuite/22_locale/time_put_members_char.cc (test03): New.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test07): New.
+ * testsuite/22_locale/time_get_members_char.cc (test07): New.
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test03): New.
+ * testsuite/22_locale/num_get_members_char.cc (test03): New.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test03): New.
+ * testsuite/22_locale/num_put_members_char.cc (test03): New.
+
+ * testsuite/22_locale/time_get_members_char.cc: Fixups for global
+ locale issues.
+ * testsuite/22_locale/time_get_members_char.cc: Same.
+
+2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/5280
+ * include/bits/localefwd.h: Tweak comments.
+ * include/bits/locale_facets.h (__convert_to_v): Add.
+ * include/bits/locale_facets.tcc (num_get::do_get(double)): Use it.
+ (num_get::do_get(float)): Same.
+ (num_get::do_get(long double)): Same.
+ (num_get::do_get(bool)): Same.
+ (num_get::do_get(long)): Same.
+ (num_get::do_get(long long)): Same.
+ (num_get::do_get(unsigned int)): Same.
+ (num_get::do_get(unsigned short)): Same.
+ (num_get::do_get(unsigned long)): Same.
+ (num_get::do_get(unsigned long long)): Same.
+ * config/locale/c_locale_gnu.cc (__convert_to_v): Specialize.
+ * config/locale/c_locale_generic.cc: Same.
+
+2002-01-22 Loren Rittle <ljrittle@acm.org>
+
+ * include/Makefile.am (c_base_builddir): Remove redundant slash.
+ (std_builddir): Likewise.
+ (std_headers_rename): Fix cut-n-paste typo.
+ (install-data-local): Concat path per element instead of once to
+ first element of list.
+ * include/Makefile.in: Rebuilt.
+
+2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/aix/bits/ctype_noninline.h: Fix formatting.
+ * config/os/bsd/netbsd/bits/ctype_noninline.h: Fix typo.
+ * config/os/bsd/freebsd/bits/ctype_noninline.h: Fix formatting.
+
+2002-01-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (ctype<char>::classic_table):
+ Remove definition.
+ (ctype<char>::_S_ctable): Remove.
+ * config/os/gnu-linux/bits/ctype_noninline.h
+ (ctype<char>::_S_table): Remove definition.
+ (ctype<char>::classic_table): Define.
+ (ctype<char>::ctype): Replace _S_ctable with classic_table().
+ * config/os/aix/bits/ctype_noninline.h: Same.
+ * config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
+ * config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
+ * config/os/djgpp/bits/ctype_noninline.h: Same.
+ * config/os/generic/bits/ctype_noninline.h: Same.
+ * config/os/gnu-linux/bits/ctype_noninline.h: Same.
+ * config/os/hpux/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
+ * config/os/mingw32/bits/ctype_noninline.h: Same.
+ * config/os/newlib/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
+
+2002-01-20 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/mingw32/bits/ctype_noninline.h: Declare _ctype instead
+ of _pctype. Use to define _S_ctable. Add definition for alternate
+ ctor. Initialise _M_ctable to _S_ctable in ctors.
+ (do_toupper, do_tolower): Use inline code appropriate for C-locale
+ rather than ::toupper, ::tolower.
+
+2002-01-18 Loren Rittle <ljrittle@acm.org>
+
+ * testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
+ Add specialization for FreeBSD systems only to avoid losing test
+ only due to extra precision unmentioned in system headers.
+
+2002-01-18 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * config/os/irix/irix6.5/bits/ctype_noninline.h: Fix typo
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * testsuite/testsuite_hooks.h: Fix comment typo. Memory
+ limiting is only attempted if _GLIBCPP_MEM_LIMIT is defined.
+
+2002-01-17 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * testsuite/22_locale/ctor_copy_dtor.cc: Remove check.
+
+2002-01-17 David Edelsohn <edelsohn@gnu.org>
+
+ * configure.target: Define OPT_LDFLAGS for AIX case.
+
+2002-01-17 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
+
+ * include/std/std_limits.h (__glibcpp_float_has_quiet_NaN,
+ __glibcpp_double_has_quiet_NaN): Correct mispelling.
+
+2002-01-17 Andreas Tobler <toa@pop.agri.ch>
+
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Fix.
+
+2002-01-16 David Edelsohn <dje@watson.ibm.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Do not clear
+ SECTION_LDFLAGS and OPT_LDFLAGS. Fix ac_sectionLDflags type.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (c_base_headers_rename): New.
+ (c_base_headers_extra): New.
+ (stamp-c_base): Modify.
+ (install-data-local): Use both.
+ * include/Makefile.in: Regenerate.
+ * include/c/[cctype ciso646 cmath cstdarg cstdlib cerrno climits
+ csetjmp cstddef cstring cwchar cassert cfloat clocale csignal
+ cstdio ctime cwctype]: Move to..
+ * include/c/std_*: Here.
+ * include/c_std/[cctype ciso646 cmath cstdarg cstdlib cerrno climits
+ csetjmp cstddef cstring cwchar cassert cfloat clocale csignal
+ cstdio ctime cwctype]: Move to..
+ * include/c_std/std_*: Here.
+
+ Alexandre Oliva <aoliva@redhat.com>
+ * include/Makefile.am (.PRECIOUS): Add rule.
+ * include/Makefile.in: Regenerate.
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+ Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * include/bits/stl_iterator.h (reverse_iterator::_M_current):
+ Deuglify, should be current.
+ (back_insert_iterator::_M_container): Deuglify, should be container.
+ (front_insert_iterator::_M_container): Same.
+ (insert_iterator::_M_container): Same.
+ * testsuite/24_iterators/reverse_iterator.cc: Add check.
+ * testsuite/24_iterators/back_insert_iterator.cc: Add check.
+ * testsuite/24_iterators/front_insert_iterator.cc: Same.
+ * testsuite/24_iterators/insert_iterator.cc: Same.
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (ctype<char>::classic_table): Make
+ static.
+ (ctype<char>::_M_ctable): Make static, change name to _S_ctable.
+ * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable.
+ * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+ * config/os/newlib/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
+ * config/os/hpux/bits/ctype_noninline.h: Same.
+ * config/os/djgpp/bits/ctype_noninline.h: Same.
+ * config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
+ * config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
+ * config/os/aix/bits/ctype_noninline.h: Same.
+
+ Testcase by Dietmar Kühl via Peter Schmid
+ * testsuite/22_locale/ctype_members_char.cc (char>): Add test for
+ classic_table().
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libmath/signbitl.c: Copyright years as list, not range.
+ * libmath/Makefile.am: Same.
+ * libmath/Makefie.in: Regenerate.
+ * libmath/signbit.c: Same.
+ * libmath/nan.c: Same.
+ * libmath/copysignf.c: Same.
+ * libmath/signbitf.c: Same.
+ * testsuite/22_locale/money_get_members_char.cc: Same.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Same.
+ * testsuite/22_locale/money_put_members_char.cc: Same.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Same.
+ * testsuite/22_locale/time_get_members_char.cc: Same.
+ * testsuite/22_locale/time_get_members_wchar_t.cc: Same.
+ * testsuite/22_locale/time_put_members_char.cc: Same.
+ * testsuite/22_locale/time_put_members_wchar_t.cc: Same.
+ * testsuite/21_strings/nonmember.cc: Same.
+ * testsuite/21_strings/compare.cc: Same.
+ * testsuite/27_io/stringstream.cc: Same.
+ * testsuite/27_io/stringbuf.cc: Same.
+ * testsuite/27_io/filebuf.cc: Same.
+ * testsuite/27_io/ios_manip_basefield.cc: Same.
+ * testsuite/27_io/ios_manip_fmtflags.cc: Same.
+ * include/bits/cpp_type_traits.h: Same.
+ * include/bits/generic_shadow.h: Same.
+ * include/bits/gslice_array.h: Same.
+ * include/bits/gslice.h: Same.
+ * include/bits/indirect_array.h: Same.
+ * include/bits/slice_array.h: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/streambuf_iterator.h: Same.
+ * include/bits/valarray_array.tcc: Same.
+ * include/bits/valarray_meta.h: Same.
+ * include/bits/valarray_array.h: Same.
+ * config/os/mingw32/bits/ctype_noninline.h: Same.
+ * config/os/mingw32/bits/ctype_base.h: Same.
+ * config/os/hpux/bits/ctype_noninline.h: Same.
+ * config/os/hpux/bits/ctype_base.h: Same.
+ * config/os/gnu-linux/bits/ctype_noninline.h: Same.
+ * config/os/gnu-linux/bits/ctype_base.h: Same.
+ * config/os/generic/bits/ctype_noninline.h: Same.
+ * config/os/generic/bits/ctype_base.h: Same.
+
+ * libsupc++/tinfo.h: Tweaks.
+
+2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Same.
+ * testsuite/22_locale/num_put_members_char.cc (test01): Tweak.
+ * testsuite/22_locale/ctype_members_char.cc: Tweak.
+
+2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (num_put::do_put(bool): Fix.
+ (num_put::do_put(void*)): Fix.
+ * testsuite/22_locale/num_put_members_char.cc (test02): Add.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Add.
+ * testsuite/22_locale/num_get_members_char.cc (test02): Add
+ long double, void, bool types.
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test02): Add.
+
+2002-01-15 Benjamin Kosnik <bkoz@redhat.com>
+ Alexandre Oliva <aoliva@redhat.com>
+
+ * libmath/Makefile.am (LINK): Add --tag CC.
+ * libmath/Makefile.in: Regenerate.
+
+2002-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config/os/hpux/bits/ctype_noninline.h: Use __SB_masks for address
+ of character to attribute mapping table.
+
+2002-01-15 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * testsuite/26_numerics/c99_classification_macros_c.cc
+ Remove dg-error and dg-excess-errors comments.
+
+2002-01-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (time_put::put): Correct output
+ iterator positions.
+ * testsuite/22_locale/time_put_members_char.cc (test02): Add.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test02): Add.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test06): Add.
+ * testsuite/22_locale/time_get_members_char.cc (test06): Add.
+
+2002-01-14 Craig Rodrigues <rodrigc@gcc.gnu.org>
+
+ * docs/html/17_intro/porting-howto.xml: Update filebuf section.
+
+2002-01-14 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ * include/bits/basic_string.h
+ (replace(__pos, __n1, __s, __n2)): Optimize by avoiding
+ temporaries (i.e., call _M_replace_safe) when possible.
+ (replace(__pos, __n, __str)): Call replace(__pos, __n1, __s, __n2).
+ (replace(__pos, __n1, __s)): Call replace(__pos, __n1, __s , __n2).
+ (replace(__i1, __i2, __str)): Call replace(__i1, __i2, __s, __n).
+ (replace(__i1, __i2, __s)): Call replace(__i1, __i2, __s, __n).
+ (replace(__i1, __i2, __s, __n)): Call replace(__pos1, __n1, __s, __n2).
+ * include/bits/basic_string.tcc
+ (replace(__pos1, __n1, __str, __pos2, __n2)): Call
+ replace(__pos, __n1, __s, __n2).
+ * testsuite/21_strings/replace.cc (test03): New testcases.
+
+ * include/bits/basic_string.h (insert(__pos, __s, __n)):
+ Adjust comparison wrt overflow.
+
+2002-01-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (std_headers_rename): New variable.
+ (install-data-local): Use it.
+ * include/Makefile.in: Regenerate.
+
+2002-01-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (money_put::do_put(string):
+ Correct output iterator value.
+ * testsuite/22_locale/money_put_members_char.cc (test03): Add.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Same.
+
+2002-01-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/Makefile.am, include/Makefile.in (stamp-std): Fix typo from
+ previous commit.
+
+2002-01-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/Makefile.am (std_headers): Update list with new names.
+ (stamp-std): Link to standardized name.
+ * include/Makefile.in: Regenerate.
+
+ * include/std/algorithm, include/std/bitset, include/std/complex,
+ include/std/deque, include/std/fstream, include/std/functional,
+ include/std/iomanip, include/std/ios, include/std/iosfwd,
+ include/std/iostream, include/std/istream, include/std/iterator,
+ include/std/limits, include/std/list, include/std/locale,
+ include/std/map, include/std/memory, include/std/numeric,
+ include/std/ostream, include/std/queue, include/std/set,
+ include/std/sstream, include/std/stack, include/std/stdexcept,
+ include/std/streambuf, include/std/string, include/std/utility,
+ include/std/valarray, include/std/vector: Rename to...
+
+ * include/std/std_algorithm.h, include/std/std_bitset.h,
+ include/std/std_complex.h, include/std/std_deque.h,
+ include/std/std_fstream.h, include/std/std_functional.h,
+ include/std/std_iomanip.h, include/std/std_ios.h,
+ include/std/std_iosfwd.h, include/std/std_iostream.h,
+ include/std/std_istream.h, include/std/std_iterator.h,
+ include/std/std_limits.h, include/std/std_list.h,
+ include/std/std_locale.h, include/std/std_map.h,
+ include/std/std_memory.h, include/std/std_numeric.h,
+ include/std/std_ostream.h, include/std/std_queue.h,
+ include/std/std_set.h, include/std/std_sstream.h,
+ include/std/std_stack.h, include/std/std_stdexcept.h,
+ include/std/std_streambuf.h, include/std/std_string.h,
+ include/std/std_utility.h, include/std/std_valarray.h,
+ include/std/std_vector.h: ...this.
+
+2002-01-11 Loren Rittle <ljrittle@acm.org>
+
+ * include/Makefile.am (extra_target_headers): New list of all
+ target files built with ad hoc naming rules.
+ (stamp-*): Handle LN_S failure in manner portable across make
+ implementations.
+ (install-data-local): Install header files from human-maintained
+ file lists and directory components instead of non-robust find.
+ * include/Makefile.in: Rebuilt.
+
+2002-01-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(string)):
+ Check for zero-length negative sign before adding it to output
+ string.
+ (money_get::do_get(long double)): Return beg.
+ * testsuite/22_locale/money_get_members_char.cc (test02): Add
+ iterator checks.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Same.
+
+2002-01-10 David Seymour <seymour_dj@yahoo.com>
+
+ libstdc++/5331
+ * include/bits/locale_facets.h (num_get<>): Return advanced iterator
+ for _M_extract_float and _M_extract_int
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_float)
+ (num_get<>::_M_extract_int): Likewise, all callers changed
+ * testsuite/22_locale/num_get_members_char.cc: Testcase
+
+2002-01-09 Paolo Carlini <pcarlini@unitus.it>
+
+ * libsupc++/exception (bad_exception): Add comment.
+ * libsupc++/new (bad_alloc): Same.
+ * libsupc++/typeinfo (bad_cast, bad_typeid): Same.
+
+2002-01-09 Paolo Carlini <pcarlini@unitus.it>
+
+ libstdc++/3150: revert 2001-11-30 commit. DR266 only means
+ that the destructors should be removed from the descriptions
+ in the standard: writing them explicitly allows the vtable
+ heuristic to work. For additional information see:
+ http://gcc.gnu.org/ml/libstdc++/2002-01/msg00090.html
+ http://gcc.gnu.org/ml/libstdc++/2002-01/msg00110.html
+ http://gcc.gnu.org/ml/libstdc++/2002-01/msg00155.html
+ * libsupc++/exception (bad_exception::~bad_exception()):
+ Reintroduce declaration.
+ * libsupc++/new (bad_alloc::~bad_alloc()): Same.
+ * libsupc++/typeinfo (bad_cast::~bad_cast()): Same.
+ (bad_typeid::~bad_typeid()): Same.
+ * libsupc++/eh_exception.cc (bad_exception::~bad_exception()):
+ Reintroduce definition.
+ * libsupc++/new_handler.cc (bad_alloc::~bad_alloc()): Same.
+ * libsupc++/tinfo.cc (bad_cast::~bad_cast()): Same.
+ (bad_typeid::~bad_typeid()): Same.
+
+2002-01-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (c_base_srcdir): Remove duplicate '/'.
+ * include/Makefile.in: Regenerate.
+
+2002-01-09 Bo Thorsen <bo@suse.co.uk>
+
+ * config/cpu/x86-64/bits/cpu_limits.h (__glibcpp_long_bits): Add
+ definition.
+
+2002-01-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ libstdc++/2913
+ libstdc++/4879
+ * include/bits/fstream.tcc (filebuf::_M_really_overflow): Test
+ return value of _M_file->sync().
+ (filebuf::showmanyc): Check for is_open.
+ * include/std/fstream (filebuf::sync): Tweak.
+ * testsuite/27_io/filebuf.cc: Tweak.
+
+2002-01-08 John Fardo <jfardo@laurelnetworks.com>
+ Brad Garcia <garsh@attbi.com>
+
+ * testsuite/27_io/filebuf_members.cc: Add test.
+
+2002-01-07 Benjamin Kosnik <bkoz@redhat.com>
+ Craig Rodrigues <rodrigc@mediaone.net>
+
+ libstdc++/5174
+ * po/Makefile.am (mkinstalldirs): Add.
+ * po/Makefile.in: Regenerate.
+
+2002-01-07 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * testsuite_flags.in: Add -fmessage-length=0 to CXXFLAGS *
+ testsuite/lib/prune.exp: Delete lines ":In function ..." from
+ compiler output.
+ * testsuite/23_containers/map_operators.cc: Remove
+ dg-excess-errors comment.
+ * testsuite/23_containers/set_operators.cc: Likewise.
+
+2002-01-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_function.h: Remove two lines of comments;
+ adjust copyright years.
+
+2002-01-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (std_headers): Remove cXXX from list.
+ (c_base_srcdir): No bits subdirectory.
+ (c_base_builddir): Same.
+ (c_base_headers): Adjust names, add ciso646.
+ (bits_headers): Remove std_xxx.h headers.
+ * include/Makefile.in: Regenerate.
+
+ * include/ext/iterator: Adjust includes.
+ * include/ext/ropeimpl.h: Same.
+ * include/ext/stl_hash_fun.h: Same.
+ * include/ext/algorithm: Same.
+
+ * include/backward/bvector.h: Adjust includes.
+ * include/backward/vector.h: Same.
+ * include/backward/strstream: Same.
+ * include/backward/streambuf.h: Same.
+ * include/backward/stack.h: Same.
+ * include/backward/set.h: Same.
+ * include/backward/queue.h: Same.
+ * include/backward/multiset.h: Same.
+ * include/backward/multimap.h: Same.
+ * include/backward/map.h: Same.
+ * include/backward/list.h: Same.
+ * include/backward/iterator.h: Same.
+ * include/backward/iostream.h: Same.
+ * include/backward/iomanip.h: Same.
+ * include/backward/fstream.h: Same.
+ * include/backward/deque.h: Same.
+ * include/backward/complex.h: Same.
+
+ * include/bits/std_algorithm.h: Move to...
+ * include/std/algorithm: ...here.
+ * include/bits/std_iosfwd.h, std_locale.h, std_stack.h,
+ std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h,
+ std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h,
+ std_deque.h, std_istream.h, std_numeric.h, std_string.h,
+ std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h,
+ std_queue.h, std_valarray.h, std_functional.h, std_limits.h,
+ std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h:
+ Same.
+
+ * include/c_std/bits/std_cassert.h: Move to...
+ * include/c_std/cassert: Here.
+ * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h,
+ std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
+ std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
+ std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
+ std_cwctype.h: Same.
+ * include/c_std/cmath: Adjust cmath.tcc include.
+ * include/c_std/cstdlib: Adjust includes.
+ * include/c_std/cwchar: Same.
+ * include/c_std/ctime: Same.
+ * include/c_std/cstring: Same.
+ * include/c_std/cstdio: Same.
+ * include/c_std/bits: Remove directory.
+
+ * include/c/bits/std_cassert.h: Move to...
+ * include/c/cassert: Here.
+ * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h,
+ std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
+ std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
+ std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
+ std_cwctype.h: Same.
+ * include/c/bits: Remove directory.
+
+ * include/std/cwctype: Remove.
+ * include/std/cwchar: Remove.
+ * include/std/ctime: Remove.
+ * include/std/cstring: Remove.
+ * include/std/cstdlib: Remove.
+ * include/std/cstdio: Remove.
+ * include/std/cstddef: Remove.
+ * include/std/cstdarg: Remove.
+ * include/std/csignal: Remove.
+ * include/std/csetjmp: Remove.
+ * include/std/cmath: Remove.
+ * include/std/clocale: Remove.
+ * include/std/climits: Remove.
+ * include/std/ciso646: Remove.
+ * include/std/cfloat: Remove.
+ * include/std/cerrno: Remove.
+ * include/std/cctype: Remove.
+ * include/std/cassert: Remove.
+
+ * include/bits/fpos.h: Adjust includes, removing <bits/std_xxx.h>
+ files and subsituting <xxx>.
+ * include/bits/valarray_array.h: Same.
+ * include/bits/stl_uninitialized.h: Same.
+ * include/bits/stl_alloc.h: Same.
+ * include/bits/stl_algobase.h: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/pthread_allocimpl.h: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/bits/localefwd.h: Same.
+ * include/bits/locale_facets.tcc: Same.
+ * include/bits/locale_facets.h: Same.
+ * include/bits/istream.tcc: Same.
+ * include/bits/char_traits.h: Same.
+ * include/bits/boost_concept_check.h: Same.
+ * include/bits/basic_file.h: Same.
+ * include/std/bitset: Same.
+ * include/std/complex: Same.
+ * include/std/fstream: Same.
+ * include/std/functional: Same.
+ * include/std/ios: Same.
+ * include/std/iostream: Same.
+ * include/std/ostream: Same.
+ * include/std/sstream: Same.
+ * include/std/streambuf: Same.
+ * include/std/string: Same.
+ * include/std/iterator: Same.
+ * include/std/valarray: Same.
+
+ * src/ios.cc: Adjust includes.
+ * src/valarray-inst.cc: Same.
+ * src/string-inst.cc: Same.
+ * src/stl-inst.cc: Same.
+ * src/stdexcept.cc: Same.
+ * src/misc-inst.cc: Same.
+ * src/localename.cc: Same.
+ * src/locale-inst.cc: Same.
+ * src/locale.cc: Same.
+ * src/limits.cc: Same.
+ * src/concept-inst.cc: Same.
+ * src/complex_io.cc: Same.
+ * src/codecvt.cc: Same.
+ * src/bitset.cc: Same.
+ * src/cmath.cc: Same.
+
+2002-01-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_tree.h (rb_tree): Move to...
+ * include/ext/rb_tree: ...here, new file.
+ * include/Makefile.am (ext_headers): Add new file.
+ * include/Makefile.in: Regenerate.
+ * include/bits/stl_tempbuf.h (get_temporary_buffer + helper,
+ return_temporary_buffer, struct temporary_buffer): Move to...
+ * include/ext/memory: ...here.
+ * testsuite/ext/headers.cc: Include <ext/rb_tree>.
+ * include/backward/tempbuf.h: Include <ext/memory>, tweak.
+ * include/backward/tree.h: Include <ext/rb_tree), tweak.
+
+2002-01-03 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_numeric.h (power + helpers, iota): Move to...
+ * include/ext/numeric: ...here, new file.
+ * include/bits/stl_function.h (identity_element, unary_compose,
+ binary_compose, compose1, compose2, identity, select1st,
+ select2nd, project1st + helper, project2nd + helper,
+ constant_void_fun + helper, constant_unary_fun + helper,
+ costant_binary_fun + helper, constant0, constant1, constant2,
+ subtractive_rng, mem_fun1, mem_fun1_ref): Move to...
+ * include/ext/functional: ...here, new file.
+ * include/Makefile.am (ext_headers): Add new files.
+ * include/Makefile.in: Regenerate.
+ * testsuite/ext/headers.cc: Include <ext/numeric> and
+ <ext/functional>.
+ * include/backward/algo.h: Include <ext/numeric>, tweak.
+ * include/backward/function.h: Include <ext/functional>, tweak.
+ * include/ext/ropeimpl.h: Include <ext/numeric>.
+
+2002-01-03 Jeffrey A Law <law@redhat.com>
+
+ * config/os/hpux/bits/os_defines.h: Prefix __strtoll and
+ __strtoull declarations with __extension__.
+
+2002-01-03 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * testsuite/lib/prune.exp: Correct regular expression for
+ -ffunction-sections
+
+2002-01-02 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/stl_algo.h (upper_bound, equal_range, binary_search):
+ Change concept checks, as with lower_bound and PR 2054.
+ * testsuite/ext/concept_checks.cc: Expand test to include those.
+
+2002-01-02 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/boost_concept_check.h: Import some changes from
+ upsteam (Boost) version.
+
+2002-01-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algobase.h (copy_n + helpers,
+ lexicographical_compare_3way + helpers): Move to...
+ * include/ext/algorithm: ...here.
+ * include/bits/stl_uninitialized.h (uninitialized_copy_n +
+ helpers): Move to...
+ * include/ext/memory: ...here, new file.
+ * include/Makefile.am (ext_headers): Add new file.
+ * include/Makefile.in: Regenerate.
+ * testsuite/ext/headers.cc: Include <ext/memory>.
+ * include/backward/algobase.h: Include <ext/memory> and
+ <ext/algorithm>, tweak.
+ * include/ext/ropeimpl.h: Include <ext/memory>, tweak.
+ * include/ext/stl_rope.h: Include <ext/memory>, tweak.
+
+2002-01-01 Roger Sayle <roger@eyesopen.com>
+
+ * libmath/stubs.c (sinf,cosf): Implement stubs to enable the
+ equivalent ___builtin__ versions.
+
+ * include/c_shadow/bits/std_cmath.h: All __builtin math functions
+ are available in libstdc++ as the necessary stub implementations
+ are provided by libmath/stubs.c.
+
+2002-01-01 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in: Add support for NetBSD cross compiles.
+ * configure: Regenerate.
diff --git a/contrib/libstdc++/ChangeLog-2003 b/contrib/libstdc++/ChangeLog-2003
new file mode 100644
index 0000000..4a976be
--- /dev/null
+++ b/contrib/libstdc++/ChangeLog-2003
@@ -0,0 +1,8619 @@
+2003-12-31 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int,
+ num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
+ _first_ look for thousands_sep, then for decimal_point and
+ finally for digits.
+ (num_get::_M_extract_float): After the decimal_point or
+ 'e'/'E', decimal_point and thousands_sep just break out the
+ parsing loop.
+ * testsuite/22_locale/num_get/get/char/11.cc: Add tests.
+ * testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
+
+2003-12-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13369
+ * include/bits/locale_facets.tcc (__verify_grouping):
+ Fix to deal properly with __grouping_tmp.size() >
+ __grouping.size().
+ * testsuite/22_locale/num_get/get/char/13.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/13.cc: Ditto.
+
+2003-12-29 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.h (ctype.narrow,widen): Add cast.
+
+2003-12-29 Paolo Carlini <pcarlini@suse.de>
+
+ * acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions
+ to CXXFLAGS.
+ * aclocal.m4: Regenerate.
+ * configure: Likewise.
+
+2003-12-29 Mark Mitchell <mark@codesourcery.com>
+
+ * acconfig.h: Add _GLIBCXX_USE_C99_MATH.
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Define GLIBCXX_USE_C99_MATH.
+ * configure.ac: Define HAVE_S_ISREG and HAVE_S_IFREG when
+ targeting newlib.
+ * aclocal.m4: Regenerated.
+ * config.h.in: Likewise.
+ * configure: Likewise.
+ * Makefile.in: Likewise.
+ * include/Makefile.in: Likewise.
+ * libmath/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+ * src/Makefile.in: Likewise.
+ * po/Makefile.in: Likewise.
+ * include/c_std/std_cmath.h (_GLIBCXX_USE_C99): Replace with ...
+ (_GLIBCXX_USE_C99_MATH): ... this.
+
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL for
+ arm-none-elf.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
+ * testsuite/27_io/basic_istream/readsome/char/6476-2.cc: Likewise.
+ * testsuite/27_io/objects/char/9.cc: Likewise.
+ * testsuite/ext/stdio_filebuf/char/10063-2.cc: Likewise.
+
+2003-12-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/pool_allocator.h (class __pool_alloc): Use
+ operator new and operator delete.
+
+2003-12-24 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * config/cpu/i386/atomicity.h (__exchange_and_add): Fix output
+ constraint.
+
+ PR libstdc++/13480
+ * config/cpu/i386/atomicity.h: Split up read-write memory operand.
+
+2003-12-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/new_allocator.h (new_allocator): Proper allocator class.
+ (__new_alloc): Delete.
+ * include/ext/malloc_allocator.h (malloc_allocator): Same.
+ (__malloc_alloc): Delete.
+ * include/ext/mt_allocator.h: Same, but weakly.
+ * include/ext/debug_allocator.h: Convert to the new style.
+ * include/ext/pool_allocator.h: Use global new and delete directly.
+ * include/backward/alloc.h: Don't inject malloc_allocator, or
+ debug_allocator.
+ * testsuite/ext/allocators.cc: Minimal fixups for usage of new
+ classes. Comment out tests with __pool_alloc for now.
+ * testsuite/performance/allocator.cc: Same.
+
+2003-12-22 Matt Austern <austern@apple.com>
+
+ * include/bits/stl_bvector.h (_Bvector_alloc_base): Eliminate.
+ (_Bvector_base): Inherit directly from word allocator.
+ * include/bits/stl_tree.h (_Rb_tree_alloc_base): Eliminate.
+ (_Rb_tree_base): Eliminate.
+ (_Rb_tree): Inherit directly from node allocator.
+ * include/ext/slist (_Alist_alloc_base): Eliminate.
+ (_Slist_base): Inherit direcly from node allocator.
+
+2003-12-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/18_support/numeric_limits.cc: Add _GLIBCXX_ASSERT to
+ dg-options in testcases that use VERIFY.
+ * testsuite/23_containers/vector/invalidation/1.cc: Same.
+ * testsuite/23_containers/vector/invalidation/2.cc: Same.
+ * testsuite/23_containers/vector/invalidation/3.cc: Same.
+ * testsuite/23_containers/vector/invalidation/4.cc: Same.
+ * testsuite/23_containers/vector/resize/1.cc: Same.
+ * testsuite/26_numerics/complex_value.cc: Same.
+ * testsuite/27_io/ios_base/storage/1.cc: Same.
+ * testsuite/27_io/ios_base/storage/2.cc: Same.
+ * testsuite/27_io/ios_base/storage/3.cc: Same.
+ * testsuite/27_io/manipulators/standard/char/2.cc: Same.
+ * testsuite/backward/11460.cc: Same.
+ * testsuite/backward/strstream_members.cc: Same.
+
+ * include/ext/hash_set (class hash_multiset): Fix typo.
+
+2003-12-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/objects/char/5.cc: Don't use stdc++.h.gch.
+ * testsuite/27_io/objects/wchar_t/5.cc: Same.
+ * docs/html/test.html: Add docs for constructing test files that
+ don't use stdc++.h.gch.
+ * scripts/testsuite_flags.in (PCHFLAGS): Move to --cxxpchflags.
+ * testsuite/libstdc++-dg/normal.exp: Compute DEFAULT_CXXFLAGS
+ differently.
+
+ * include/bits/ios_base.h (ios_base::Init::_S_initialized): Remove.
+ * src/ios_init.cc: Same.
+ * config/linker-map.gnu: Same.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
+
+2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR libstdc++/13462
+ * include/bits/stl_multiset.h (__gnu_norm::multiset): Define pointer
+ as allocator's pointer, likewise for reference, const_pointer, and
+ const_reference.
+ * include/bits/stl_set.h (__gnu_norm::set): Likewise.
+ * include/ext/hash_set (__gnu_ext::hash_set): Likewise.
+ (__gnu_ext::hash_multiset): Likewise.
+
+2003-12-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int,
+ num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
+ first look for decimal_point and thousands_sep, when parsing
+ sign, leading zeros (and 0, Ox, 0X for integer types) too.
+ * testsuite/22_locale/num_get/get/char/12.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.
+
+ * testsuite/22_locale/num_get/get/char/11.cc: Add a comment.
+ * testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
+
+2003-12-20 Jason Merrill <jason@redhat.com>
+
+ * config/cpu/powerpc/atomicity.h: Fix oversight in previous
+ change.
+
+2003-12-20 Jerry Quinn <jlquinn@optonline.net>
+
+ * docs/doxygen/TODO: Update.
+ * include/bits/locale_classes.h (locale, facet, id): Document.
+ * include/bits/locale_facets.tcc (has_facet, use_facet): Document.
+
+2003-12-19 Jason Merrill <jason@redhat.com>
+
+ * config/cpu/cris/atomicity.h: Remove memory clobbers.
+ * config/cpu/mips/atomicity.h: Likewise.
+ * config/cpu/i486/atomicity.h: Remove memory clobbers.
+ Split up read-write memory operand.
+ * config/cpu/m68k/atomicity.h: Likewise.
+ * config/cpu/powerpc/atomicity.h: Make memory I/O explicit.
+ * config/cpu/s390/atomicity.h: Likewise.
+ * config/cpu/sparc/atomicity.h: Likewise.
+
+2003-12-20 Carlo Wood <carlo@alinoe.com>
+
+ * bits/demangle.h
+ namespace __gnu_cxx::demangler
+ (session<Allocator>::decode_encoding): Put the postfix
+ of the return type of (member) functions after the function
+ instead of after the return type.
+
+2003-12-19 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facet.h
+ (__ctype_abstract_base,ctype<charT>,ctype<char>,ctype<wchar_t>):
+ Document.
+
+2003-12-19 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int,
+ num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
+ first look for decimal_point and thousands_sep.
+ * testsuite/22_locale/num_get/get/char/11.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
+
+2003-12-19 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ When __found_sci becomes true stop eating thousands separators
+ and the decimal radix separator.
+ * testsuite/22_locale/num_get/get/char/9.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/9.cc: Likewise.
+
+ * config/locale/generic/c_locale.cc (__convert_to_v): Don't
+ check that *__sanity == '\0': parsing may stop earlier, still
+ be successful.
+ * config/locale/gnu/c_locale.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/10.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/10.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
+ Tweak in one place accordingly.
+
+ * testsuite/22_locale/money_get/get/char/1.cc: Fix typo.
+ * testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
+
+2003-12-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_list.h: Formatting tweaks.
+ * include/bits/list.tcc: Same.
+
+2003-12-18 Matt Austern <austern@apple.com>
+
+ * include/bits/demangle.h: Fix allocator type correctness,
+ i.e. make sure that when we instantiate a container with a value
+ type and an allocator, the allocator's value type matches the
+ container's.
+ * include/bits/stl_deque.h (_Deque_alloc_base): Eliminate.
+ (_Deque_base): inherit directly from the deque's allocator. Use
+ rebinding instead of _Alloc_traits. Pick up data members from
+ _Deque_alloc_base.
+ * include/bits/stl_list.h (_List_alloc_base): Eliminate.
+ (_List_base): Inherit directly from the list's allocator. Use
+ rebinding instead of _Alloc_traits. Pick up data members from
+ _List_alloc_base.
+ * include/bits/stl_vector.h (_Vector_alloc_base): Eliminate
+ (_Vector_base): Inherit directly from the vector's allocator. Use
+ rebinding instead of _Alloc_traits. Pick up data members from
+ _Vector_alloc_base.
+ * include/ext/hashtable.h: Fix allocator type correctness (the
+ vector of buckets must be passed an allocator for objects of
+ type _Node*). Use rebinding instead of _Alloc_traits.
+
+2003-12-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
+ Use narrow to get from __format[__i] a char __c representing a
+ formatting code, don't use it to compare *__beg to __format[__i].
+ * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: New.
+
+2003-12-17 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/performance/container_benchmark.cc: Tweak outputs.
+
+ * testsuite/performance/list_create_fill_sort.cc: Shrink a
+ bit some outputs.
+
+ * testsuite/testsuite_performance.h: Widen a few output fields.
+
+ * testsuite/performance/ifstream_extract_int.cc: New.
+
+2003-12-16 Phil Edwards <phil@codesourcery.com>
+
+ * configure.ac (AM_INIT_AUTOMAKE): Don't warn about GNU Make.
+ * configure: Regenerated.
+ * Makefile.am (check-%): New catch-all forwarding target.
+ * Makefile.in: Regenerated.
+
+2003-12-16 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/performance/container_benchmark.cc: New, a
+ benchmark developed by Bjarne Stroustrup and Alexander
+ Stepanov and made available with no restrictions.
+
+ * testsuite/testsuite_performance.h (report_header): New,
+ useful to produce header lines in the reports.
+
+2003-12-16 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/21_strings/howto.html: Document shrink-to-fit reserve().
+ * docs/html/faq/index.html: Reducing vector's capacity() to size().
+ * docs/html/documentation.html, docs/html/faq/index.txt: Regenerate.
+
+2003-12-16 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/performance/narrow_widen_char.cc: Tweak the
+ number of iterations for each test.
+ * testsuite/performance/narrow_widen_wchar_t.cc: Add a
+ missing clear_counters.
+
+2003-12-16 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/11723
+ * include/bits/locale_facets.h: Add _M_bit and _M_wmask,
+ used to speed up the computation of ctype::do_is.
+ * config/locale/generic/ctype_members.cc
+ (_M_initialize_ctype): Fill _M_bit and _M_wmask.
+ (ctype::do_is): Use _M_bit and _M_wmask.
+ * config/locale/gnu/ctype_members.cc: Likewise.
+ * testsuite/performance/is_wchar_t.cc: New.
+
+ * testsuite/performance/narrow_widen_wchar_t.cc: Tweak
+ string literal (incorrect citation ;)
+
+ * include/bits/locale_facets.h: Minor tweaks, const
+ correctness, unsigned -> size_t.
+
+2003-12-16 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.h (widen, narrow): Uncomment the
+ intended code.
+
+2003-12-15 Jerry Quinn <jlquinn@optonline.net>
+
+ * config/os/aix/ctype_noninline.h,
+ config/os/bsd/freebsd/ctype_noninline.h,
+ config/os/bsd/netbsd/ctype_noninline.h,
+ config/os/djgpp/ctype_noninline.h,
+ config/os/generic/ctype_noninline.h,
+ config/os/gnu-linux/ctype_noninline.h,
+ config/os/hpux/ctype_noninline.h,
+ config/os/irix/irix5.2/ctype_noninline.h,
+ config/os/irix/irix6.5/ctype_noninline.h,
+ config/os/mingw32/ctype_noninline.h,
+ config/os/newlib/ctype_noninline.h,
+ config/os/qnx/qnx6.1/ctype_noninline.h,
+ config/os/solaris/solaris2.5/ctype_noninline.h,
+ config/os/solaris/solaris2.6/ctype_noninline.h,
+ config/os/solaris/solaris2.7/ctype_noninline.h,
+ config/os/vxworks/ctype_noninline.h,
+ config/os/windiss/ctype_noninline.h (ctype): Initialize
+ _M_narrow, _M_widen.
+ * include/bits/locale_facets.h (_M_widen, _M_widen_ok,
+ _M_narrow, _M_narrow_ok): New.
+ (widen, narrow): Use tables to bypass virtual functions.
+ (_M_widen_init, _M_narrow_init): New.
+
+2003-12-15 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/ios_base.h (Init::_S_initialized): Change into
+ declaration.
+ * src/ios_init.cc (Init::_S_initialized): Add definition.
+
+2003-12-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/12658
+ * include/Makefile.am (bits_headers): Add concurrence.h.
+ * include/Makefile.in: Regenerated.
+ * include/bits/concurrence.h: New.
+ * src/locale_init.cc: Use it.
+ (locale::locale): Lock critical regions.
+ (locale::global): Same.
+
+2003-12-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_string.h: Change _*_references to _*_refcount.
+ * include/bits/locale_classes.h: Same.
+ * src/locale.cc: Same.
+ * src/locale_name.cc: Same.
+ * src/locale_init.cc: Same.
+
+2003-12-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/12855
+ * include/bits/ios_base.h (Init::_S_ios_base_init): Change to
+ _S_refcount, make atomic.
+ * src/ios.cc: Adjust definition.
+ * src/ios_init.cc (ios_base::Init::Init): Use __exchange_and_add,
+ and __atomic_add.
+ (ios_base::Init::~Init): Same.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-12-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::do_get(bool&)):
+ Fail as soon as the begins of both truename and falsename
+ stop to match; always leave __beg one position beyond the
+ last char successfully matched.
+ * testsuite/22_locale/num_get/get/char/8.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/8.cc: Likewise.
+
+2003-12-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (_M_widen): Reserve space
+ for all the possible widened chars.
+ * config/locale/generic/ctype_members.cc (_M_initialize_ctype):
+ Compute at construction time all the possible widened chars.
+ (do_widen): Tweak, simplify.
+ * config/locale/gnu/ctype_members.cc: Likewise.
+ * testsuite/performance/narrow_widen_wchar_t.cc: Add tests
+ for the array versions.
+
+2003-12-12 Paolo Carlini <pcarlini@suse.de>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/13341
+ * include/bits/locale_facets.h (ctype<wchar_t>): Declare
+ _M_initialize_ctype() and _M_narrow_ok, _M_narrow and _M_widen.
+ * src/ctype.cc (ctype<wchar_t>::ctype(size_t),
+ ctype<wchar_t>::ctype(__c_locale, size_t)): Use
+ _M_initialize_ctype to fill _M_narrow and _M_widen.
+ (ctype_byname<wchar_t>::ctype_byname(const char*, size_t)):
+ Likewise.
+ * config/locale/generic/ctype_members.cc (do_narrow, do_widen)
+ Use _M_narrow and _M_widen when possible, instead of calling
+ wctob and btowc, respectively.
+ (_M_initialize_ctype): Define, it fills at construction time
+ _M_narrow and _M_widen.
+ * config/locale/gnu/ctype_members.cc: Likewise.
+ * testsuite/performance/narrow_widen_wchar_t.cc: New.
+
+2003-12-12 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.txt: Regenerate after adding <link> tags.
+
+2003-12-11 Neil Ferguson <nferguso@eso.org>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc (reserve): Allow shrink-to-fit.
+ * testsuite/21_strings/basic_string/capacity/1.cc: Tweak.
+ * testsuite/21_strings/basic_string/capacity/char/1.cc: Ditto.
+ * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Ditto.
+
+2003-12-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/6243
+ * testsuite/lib/libstdc++.exp (v3-init): Add
+ original_ld_library_path, calculate ld_library path, set
+ LD_LIBRARY_PATH to both. Based on libjava.exp.
+
+2003-12-10 Benjamin Kosnik <bkoz@redhat.com>
+ Alexandre Oliva <aoliva@redhat.com>
+
+ PR libstdc++/11612
+ * testsuite/Makefile.am (GLIBCXX_DIR): New.
+ (GLIBGCC_DIR): New.
+ (CXXLINK): Use both with -R so libtool links the correct libs.
+
+2003-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/13217
+ * include/bits/fstream.tcc (underflow): Deal gracefully with
+ read errors: throw ios_base::failure.
+
+2003-12-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/10063
+ * config/io/basic_file_stdio.cc (__basic_file::sys_open): Sync.
+ * testsuite/ext/stdio_filebuf/char/10063-1.cc: New.
+ * testsuite/ext/stdio_filebuf/char/10063-2.cc: New.
+
+2003-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_put::do_put(void*)):
+ Remove the try/catch, not necessary.
+
+2003-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/locale/cons/12438.cc: Tweak memory
+ limit and iterations to avoid spurious failures on some
+ 64 bit machines.
+
+2003-12-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Remove private ios_base members from
+ export list.
+
+ * config/cpu/alpha/atomicity.h: Consistently format.
+ * config/cpu/cris/atomicity.h: Same.
+ * config/cpu/generic/atomicity.h: Same.
+ * config/cpu/hppa/atomicity.h: Same.
+ * config/cpu/i386/atomicity.h: Same.
+ * config/cpu/i486/atomicity.h: Same.
+ * config/cpu/ia64/atomicity.h: Same.
+ * config/cpu/m68k/atomicity.h: Same.
+ * config/cpu/mips/atomicity.h: Same.
+ * config/cpu/powerpc/atomicity.h: Same.
+ * config/cpu/s390/atomicity.h: Same.
+ * config/cpu/sparc/atomicity.h: Same.
+
+2003-12-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/13296
+ * acinclude.m4 (GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS): Remove.
+ * aclocal.m4: Regenerate.
+ * configure.ac: Remove call to GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS.
+ * conigure: Regenerate.
+ * src/Makefile.am (libstdc___la_LDFLAGS): Remove LIBUNWIND_FLAGS.
+ * src/Makefile.in: Regenerate.
+ * docs/html/17_intro/configury.html: Modify.
+
+2003-12-09 Paolo Carlini <pcaelini@suse.de>
+
+ * include/bits/demangle.h (struct implementation_details):
+ Keep in comments the names of the unused parameters.
+
+2003-12-09 Paolo Carlini <pcaelini@suse.de>
+
+ * include/bits/demangle.h (struct implementation_details):
+ Fix unused parameters warning.
+
+2003-12-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int):
+ Slightly streamline the code dealing with overflows and the
+ parsing of the sign.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/ext/algorithm, include/ext/debug_allocator.h,
+ include/ext/enc_filebuf.h, include/ext/functional,
+ include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
+ include/ext/hashtable.h, include/ext/iterator,
+ include/ext/malloc_allocator.h, include/ext/memory,
+ include/ext/mt_allocator.h, include/ext/numeric,
+ include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
+ include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
+ include/ext/slist, include/ext/stdio_filebuf.h,
+ include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/debug/bitset, include/debug/debug.h, include/debug/deque,
+ include/debug/formatter.h, include/debug/hash_map.h,
+ include/debug/hash_multimap.h, include/debug/hash_multiset.h,
+ include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
+ include/debug/map.h, include/debug/multimap.h,
+ include/debug/multiset.h, include/debug/safe_base.h,
+ include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
+ include/debug/safe_sequence.h, include/debug/set.h,
+ include/debug/string, include/debug/vector: Remove trailing whitespace.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/c_compatibility/iso646.h, include/c_compatibility/limits.h,
+ include/c_compatibility/locale.h, include/c_compatibility/stdio.h,
+ include/c_compatibility/string.h, include/c_compatibility/time.h,
+ include/c_compatibility/wchar.h, include/c_compatibility/wctype.h:
+ Remove trailing whitespace.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/c_std/cmath.tcc, include/c_std/std_cassert.h,
+ include/c_std/std_cctype.h, include/c_std/std_cmath.h,
+ include/c_std/std_cstddef.h, include/c_std/std_cstdio.h,
+ include/c_std/std_cstdlib.h, include/c_std/std_cstring.h,
+ include/c_std/std_cwchar.h, include/c_std/std_cwctype.h:
+ Remove trailing whitespace.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/c/std_cctype.h, include/c/std_cmath.h,
+ include/c/std_cstdlib.h include/c/std_cwchar.h,
+ include/c/std_cwctype.h: Remove trailing whitespace.
+
+2003-12-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/backward/algo.h, include/backward/algobase.h,
+ include/backward/alloc.h, include/backward/complex.h,
+ include/backward/defalloc.h, include/backward/function.h,
+ include/backward/iterator.h, include/backward/new.h,
+ include/backward/ostream.h, include/backward/queue.h,
+ include/backward/rope.h, include/backward/stream.h,
+ include/backward/streambuf.h, include/backward/strstream,
+ include/backward/tempbuf.h, include/backward/tree.h,
+ include/backward/vector.h: Remove trailing whitespace.
+
+2003-12-08 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/c_locale.cc (__convert_to_v(long&),
+ __convert_to_v(unsigned long&), __convert_to_v(long long&),
+ __convert_to_v(unsigned long long&): Remove.
+ (__convert_to_v(float&), __convert_to_v(double&),
+ __convert_to_v(long double&)): Remove last unused parameter.
+ * config/locale/gnu/c_locale.cc: Likewise.
+ * include/bits/locale_facets.h: Likewise.
+ (num_get::_M_extract_int): Update declaration.
+ (class __num_base): Tweak _S_ie and _S_iE according to the
+ _S_atoms_in changes.
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int):
+ Provide directly the final _ValueT, not a string: accumulate
+ the result checking for overflow at each digit.
+ (num_get::do_get(bool&), num_get::do_get(long&),
+ num_get::do_get(unsigned short&), num_get::do_get(unsigned int&),
+ num_get::do_get(unsigned long&), num_get::do_get(long long&),
+ num_get::do_get(unsigned long long&), num_get::do_get(void*&)):
+ Use the new _M_extract_int, simplify.
+ * src/locale-inst.cc (num_get::_M_extract_int(long&),
+ num_get::_M_extract_int(unsigned short&),
+ num_get::_M_extract_int(unsigned int&),
+ num_get::_M_extract_int(unsigned long&),
+ num_get::_M_extract_int(long long&),
+ num_get::_M_extract_int(unsigned long long&): Instantiate.
+ * src/locale_facets.cc (__num_base::_S_atoms_in): Reorder
+ the chars in the natural order: abcdefABCDEF.
+
+2003-12-08 David S. Miller <davem@redhat.com>
+
+ PR libstdc++/12496
+ * config/cpu/sparc/atomicity.h (__exchange_and_add, __atomic_add):
+ Extend increment to _Atomic_word before giving to assembler.
+
+2003-12-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/ext/enc_filebuf/char/13189.cc: Guard for __enc_traits.
+ * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
+
+2003-12-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/11691
+ * include/ext/stdio_filebuf.h (stdio_filebuf::stdio_filebuf):
+ Remove __del argument to file descriptor constructor.
+ * config/io/basic_file_stdio.h (__basic_file::sys_open): Remove
+ bool argument.
+ * config/io/basic_file_stdio.cc: Same.
+
+2003-12-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/13189
+ * include/ext/enc_filebuf.h: Fix.
+ * include/bits/fstream.tcc: Tweak formatting.
+ * include/bits/postypes.h: Same.
+ * include/bits/sstream.tcc: Same.
+ * include/bits/streambuf.tcc: Same.
+ * testsuite/ext/stdio_filebuf.cc: Split.
+ * testsuite/ext/stdio_filebuf_2.cc: Split.
+ * testsuite/ext/stdio_sync_filebuf_char.cc: Split.
+ * testsuite/ext/stdio_sync_filebuf_wchar_t.cc: Split.
+ * testsuite/ext/enc_filebuf/char/13189.cc: New.
+ * testsuite/ext/enc_filebuf/wchar_t/13189.cc: New.
+ * testsuite/ext/stdio_filebuf/char/1.cc: New.
+ * testsuite/ext/stdio_filebuf/char/2.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/char/1.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc: New.
+
+2003-12-05 Carlo Wood <carlo@alinoe.com>
+
+ PR libstdc++/13045
+ * bits/demangle.h
+ namespace __gnu_cxx::demangler
+ (enum substitution_nt): Removed trailing comma.
+ (implementation_details): Added.
+ (session<Allocator>::M_implementation_details): Added.
+ (session<Allocator>::session): Pass implementation_details.
+ (session<Allocator>::decode_encoding): Same.
+ (session<Allocator>::decode_real): Added.
+ (_GLIBCXX_DEMANGLER_STYLE_VOID _GLIBCXX_DEMANGLER_STYLE_LITERAL
+ _GLIBCXX_DEMANGLER_STYLE_LITERAL_INT
+ _GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
+ _GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Replaced with
+ implementation_details equivalent.
+ (session<Allocator>::decode_expression):
+ Use M_implementation_details instead of macros. Add extra parentheses
+ around 'larger than' operator in expressions in template arguments.
+ (session<Allocator>::decode_bare_function_type): Idem.
+ (session<Allocator>::decode_literal):
+ Idem, and call decode_real for floating literals.
+ (session<Allocator>::decode_type_with_postfix): Put the postfix
+ of the return type of (member) functions after the function
+ instead of after the return type. Also, put a space after the
+ prefix of qualified function pointers: "int (* const<space>".
+ * src/demangle.cc: include most dependent header file first.
+ * testsuite/demangle/regression/cw-16.cc: Updated two
+ and added three tests.
+
+2003-12-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/13284
+ * include/bits/stl_algo.h (__random_number): Remove.
+ (random_shuffle): Use rand, as permitted by DR 395.
+ * include/ext/algorithm: Same.
+ * linkage.m4 (GLIBCXX_CHECK_STDLIB_SUPPORT): Remove lrand48.
+ * acconfig.h: Same.
+ * crossconfig.m4: Remove HAVE_DRAND48, HAVE_LRAND48.
+ * config.h.in: Regenerated.
+ * configure: Same.
+ * aclocal.m4: Same.
+
+2003-12-04 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12653
+ * include/std/std_bitset.h (operator>>): Implement resolution
+ of DR 303 [WP]: use widen('0') and widen('1').
+ * docs/html/ext/howto.html: Add an entry for DR 303.
+
+ * include/std/std_bitset.h (operator>>): Implement the common
+ requirements of formatted input functions (27.6.1.2.1).
+
+ * include/std/std_bitset.h (operator>>): Set the failbit when
+ nothing was extracted and _Nb != 0.
+ * testsuite/23_containers/bitset/input/1.cc: New.
+
+2003-12-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12791
+ * include/bits/locale_facets.tcc (time_get::_M_extract_num):
+ Rewrite, stop the parsing as soon as a digit cannot possibly
+ lead to a final number within the bounds; otherwise, simplify,
+ avoiding __ctype.is() and atoi().
+ * testsuite/22_locale/time_get/get_date/char/12791.cc: New.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.
+
+ * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
+ Minor tweak: a 4-digit integer cannot be bigger than 9999.
+
+ * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
+ type-correct wchar_t string literals.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
+ * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
+ * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
+
+2003-12-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get::do_get_year):
+ Avoid using a basic_string and calling a full blown strtol
+ (via __convert_to_v) for simple 2 or 4 digits, base 10,
+ positive integers; simplify.
+
+2003-12-02 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/monetary_members.cc
+ (money_base::_S_construct_pattern): For case 3: and 4:
+ exchanging 'if (__precedes)' and 'if (__space)' allows
+ to factor out a few more assignments.
+
+2003-12-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_ios.h (basic_ios::setstate): Revert.
+ * include/bits/istream.tcc: Only call setstate if __err != goodbit.
+ * include/bits/ostream.tcc: Same.
+ * testsuite/27_io/basic_ios/exceptions/char/2.cc: New.
+
+ * testsuite/testsuite_io.h (__gnu_test::fail_streambuf): Make
+ internal buffer non-static.
+
+2003-12-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/C++STYLE: Add exception bits.
+ * include/bits/fstream.tcc: Add location info to exception strings.
+
+ * include/bits/stl_construct.h: Formatting tweaks.
+
+2003-12-01 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/10378
+ * include/bits/allocator.h (allocator::construct): Implement
+ resolution of DR 402 [Ready] (in Revision 28).
+ * include/bits/allocator_traits.h (__allocator::construct):
+ Likewise.
+ * include/bits/stl_construct.h (_Construct): Likewise.
+ * testsuite/20_util/allocator_members.cc: Move to...
+ * testsuite/20_util/allocator/1.cc: ... here.
+ * testsuite/20_util/allocator/10378.cc: New.
+ * docs/html/ext/howto.html: Add an entry for DR 402.
+
+2003-11-30 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/codecvt_members.cc (codecvt::do_in,
+ codecvt::do_length): More minor tweaks.
+
+2003-11-30 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/codecvt_members.cc (codecvt::do_in):
+ Minor stylistic tweak.
+
+2003-11-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_put::do_put(..., bool)):
+ Minor tweaks, consistent with the style used in other facets.
+
+2003-11-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/fstream.tcc (underflow): Minor tweaks in
+ preparation for libstdc++/13217.
+
+2003-11-29 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc:
+ Tweak for a few small problems (fix timings, use VERIFY..)
+
+2003-11-28 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: Remove.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: New,
+ the original third testcase for libstdc++/13171 belong here.
+
+2003-11-28 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc:
+ Remove extraneous wchar_t lines.
+
+2003-11-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/11544
+ PR libstdc++/11603
+ * include/bits/fstream.tcc (underflow): Throw ios_base::failure
+ upon incomplete or invalid byte sequences in the file.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-1.cc: New.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-2.cc: New.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc: New.
+
+2003-11-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/std_streambuf.h (__copy_streambufs): Remove
+ the first, unused, basic_ios<> parameter.
+ * src/streambuf-inst.cc: Likewise.
+ * include/bits/streambuf.tcc: Likewise.
+ * include/bits/istream.tcc (operator>>(__streambuf_type*)):
+ Tweak accordingly the call.
+ * include/bits/ostream.tcc (operator<<(__streambuf_type*)):
+ Likewise.
+
+ * include/bits/streambuf.tcc (__copy_streambufs): Remove
+ redundant try/catch.
+
+2003-11-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/9371
+ PR libstdc++/9546
+ PR libstdc++/10093
+ PR libstdc++/10095
+ * include/bits/basic_ios.h (basic_ios::setstate): Elide if goodbit.
+ (basic_ios::_M_setstate): Consolidate common error handling code.
+ * include/bits/basic_ios.tcc: Tweak.
+ * include/bits/fstream.tcc: Tweak.
+ * include/bits/istream.tcc: Use _M_setstate for common exception
+ handling. Move setstate calls after catch.
+ (basic_istream::tellg): Check for exceptions thrown by streambuf
+ virtual functions.
+ (basic_istream::seekg): Same.
+ * include/bits/ostream.tcc: Same, but for ostream.
+ (basic_ostream::flush): Check for exceptions thrown by streambuf
+ virtual functions.
+ (basic_istream::tellp): Same.
+ (basic_istream::seekp): Same.
+ * include/bits/locale_facets.tcc: Tweak.
+ * include/bits/streambuf.tcc: Tweak.
+ (__copy_streambufs): Propagate exceptions.
+ * testsuite/testsuite_io.h (fail_streambuf): New.
+ (fail_num_get): New.
+ (fail_num_put): New.
+ (facet_error): New.
+ (underflow_error): New.
+ (overflow_error): New.
+ (positioning_error): New.
+ * testsuite/27_io/basic_istream/exceptions/char/9561.cc: Tweak.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/
+ exceptions_badbit_throw.cc, exceptions_failbit.cc,
+ exceptions_failbit_throw.cc: New.
+ * testsuite/27_io/basic_istream/extractors_other/char/
+ error_failbit.cc, exceptions_badbit_throw.cc,
+ exceptions_failbit_throw.cc, exceptions_null.cc: New.
+ * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
+ New.
+ * testsuite/27_io/basic_istream/tellg/char/exceptions_badbit_throw.cc:
+ New.
+ * testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
+ New.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/
+ exceptions_badbit_throw.cc, exceptions_failbit_throw.cc: New.
+ * testsuite/27_io/basic_ostream/inserters_other/char/
+ error_failbit.cc, exceptions_badbit_throw.cc,
+ exceptions_failbit_throw.cc, exceptions_null.cc: New.
+ * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
+ New.
+ * testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
+ New.
+
+2003-11-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/12297
+ * include/bits/istream.tcc
+ (basic_istream::sentry::sentry): Set failbit and eofbit when eof.
+ * testsuite/27_io/basic_istream/sentry/char/12297.cc: New.
+
+2003-11-26 Paolo Carlini <pcarlini@suse.de>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/13171
+ * include/bits/fstream.tcc (imbue): Relax the conditions under
+ which the function succeeds: allow for two consecutive calls with
+ the same name; state dependent encodings are ok even after open
+ if at the beginning of the file; don't check seekoff return value
+ (pipes, cin, cout, etc...)
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak comment.
+ * testsuite/27_io/basic_filebuf/imbue/char/3.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Tweak comment.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: Likewise.
+
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: More
+ correctly use the UTF-8 locale appearing in the PR.
+
+2003-11-26 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h
+ (__numpunct_cache<>::_M_cache): Avoid zeroing _M_grouping,
+ _M_truename and _M_falsename: the constructor always does
+ it immediately before the _M_cache call.
+
+2003-11-25 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/codecvt_members.cc (codecvt::do_length):
+ Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
+ former is very fast, but stops if encounters a NUL.
+ (codecvt::do_out): Tweaks.
+ (codecvt::do_in): Tweaks, improve the code dealing with errors.
+ * testsuite/performance/wchar_t_length.cc: New.
+
+2003-11-24 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/codecvt_members.cc (codecvt::do_in):
+ Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
+ former is very fast, but stops if encounters a NUL.
+ (codecvt::do_out): Tweak.
+ * testsuite/performance/wchar_t_in.cc: New.
+
+2003-11-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h
+ (__numpunct_cache<>::_M_cache): Set _M_allocated at the beginning
+ in order to avoid memory leaks; simplify a bit.
+
+2003-11-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/streambuf_iterator.h (ostreambuf_iterator): Remove
+ non-standard throw specs.
+ * testsuite/24_iterators/istreambuf_iterator.cc: Split into...
+ * testsuite/24_iterators/istreambuf_iterator/1.cc
+ * testsuite/24_iterators/istreambuf_iterator/2.cc
+ * testsuite/24_iterators/istreambuf_iterator/2627.cc
+ * testsuite/24_iterators/ostreambuf_iterator.cc: Split into...
+ * testsuite/24_iterators/ostreambuf_iterator/1.cc
+ * testsuite/24_iterators/ostreambuf_iterator/2.cc
+
+ * testsuite/24_iterators/reverse_iterator/1.cc: Just compile,
+ don't link.
+
+ * include/bits/allocator.h: Formatting tweak.
+
+2003-11-24 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale_init.cc: Cosmetic reformatting.
+
+2003-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__add_grouping):
+ Cosmetic reformatting.
+
+2003-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (_M_extract_float,
+ _M_extract_int): Remove a wrong comment and simplify
+ the corresponding code using char_traits::find().
+
+2003-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/monetary_members.cc
+ (money_base::_S_construct_pattern): Factor out two assignments.
+
+2003-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/istream.tcc (getline(basic_string<>&)):
+ Fix error in comment of the previous commit.
+
+2003-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12593
+ * include/bits/istream.tcc (operator>>(basic_string<>&),
+ getline(basic_string<>&)): Implement resolution of DR 91 [WP];
+ fix some minor issues with the exit conditions.
+ * docs/html/ext/howto.html: Add an entry for DR 91.
+
+2003-11-21 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/monetary_members.cc
+ (money_base::_S_construct_pattern): Factor out an assignment.
+
+2003-11-21 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12882 (partial)
+ * acinclude.m4 (GLIBCXX_CHECK_LFS): Check fseeko64
+ and ftello64 too.
+ * include/ext/stdio_sync_filebuf.h (seekoff): Use fseeko64
+ and ftello64 if available.
+ * aclocal.m4: Regenerate.
+ * configure: Ditto.
+
+2003-11-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/debug/formatter.h: Use _Tp as template argument.
+ * src/debug.cc: Same, instantiate std::size_t.
+
+2003-11-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/13109
+ * include/debug/formatter.h (_Error_formatter::_M_format_word): New.
+ * src/debug.cc (__gnu_debug): Format.
+ (_Error_formatter::_M_format_word): Define, use, instantiate.
+
+2003-11-20 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/11602
+ * config/locale/gnu/codecvt_members.cc (codecvt::do_out):
+ Rewrite, using both wcsnrtombs and wcrtomb in a loop: the
+ former is very fast, but stops if encounters a NUL.
+ * testsuite/performance/wchar_t_out.cc: New, from the PR.
+
+2003-11-19 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/codecvt_members.cc (do_out): If
+ we can upper bound the total number of external chars
+ to something smaller than __to_end - __to, avoid the
+ temporary buffer, the memcopy and simplify the loop.
+ * config/locale/generic/codecvt_members.cc (do_out):
+ Likewise.
+
+2003-11-19 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/lib/libstdc++.exp: Add DYLD_LIBRARY_PATH for darwin.
+ * testsuite/libstdc++-dg/normal.exp: Add -multiply_defined suppress
+ flag.
+
+2003-11-18 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/configopts.html, docs/html/debug.html,
+ docs/html/documentation.html, docs/html/explanations.html,
+ docs/html/install.html, docs/html/17_intro/contribute.html,
+ docs/html/17_intro/howto.html, docs/html/17_intro/license.html,
+ docs/html/18_support/howto.html, docs/html/19_diagnostics/howto.html,
+ docs/html/20_util/howto.html, docs/html/21_strings/howto.html,
+ docs/html/22_locale/codecvt.html, docs/html/22_locale/ctype.html,
+ docs/html/22_locale/howto.html, docs/html/22_locale/locale.html,
+ docs/html/22_locale/messages.html, docs/html/23_containers/howto.html,
+ docs/html/24_iterators/howto.html, docs/html/25_algorithms/howto.html,
+ docs/html/26_numerics/howto.html, docs/html/27_io/howto.html,
+ docs/html/ext/howto.html, docs/html/ext/sgiexts.html: Add <link> tags.
+
+2003-11-18 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12868
+ * include/bits/fstream.tcc (imbue): For encodings != -1 it's
+ always ok to imbue a new locale, provided seekoff(0, cur, ...)
+ doesn't fail, of course.
+ (underflow): In order for the above to work, deal gracefully
+ with _M_codecvt->in returning codecvt_base::error while
+ (__ilen = __iend - this->eback()) > 0: it just means __ilen
+ correctly converted internal characters before an error.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: New.
+
+2003-11-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc: Fix typo in comment.
+
+2003-11-17 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/num_put/put/char/8.cc: New test,
+ summarizing the discussion ensuing libstdc++/12988.
+ * testsuite/22_locale/num_put/put/wchar_t/8.cc: Ditto.
+
+2003-11-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/std_fstream.h: Tweak a comment.
+
+2003-11-15 Roger Sayle <roger@eyesopen.com>
+
+ * include/c_std/std_cmath.h: Don't import C99's float transcendentals
+ into the __gnu_cxx::__c99_binding namespace.
+ (acos, asin, atan, atan2, ceil, cosh, exp, floor, fmod, frexp,
+ ldexp, log, log10, modf, pow, sinh, tan, tanh): Implement using
+ GCC's math builtins, i.e. __builtin_foo.
+ * libmath/stubs.c (acosf, acosl, asinf, asinl, atanf, atanl,
+ ceilf, ceill, floorf, floorl, fmodf, fmodl, frexpf, frexpl,
+ ldexpf, ldexpl, modff, modfl): Provide stub implementations.
+
+2003-11-14 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/locale/cons/12352.cc: Use
+ __gnu_test::try_named_locale.
+
+2003-11-14 Paolo Carlini <pcarlini@suse.de>
+
+ * docs/html/ext/howto.html: Add entries for DR 63, 75
+ and 305; tweak entries for DR 60 and 328.
+
+2003-11-13 Douglas Gregor <gregod@cs.rpi.edu>
+
+ * docs/html/debug.html: Users are allowed to specialize in
+ namespace __gnu_debug, unlike in the Apple version of the debug
+ mode. Clear up a confusing double-negative. Note that
+ std::basic_string does provide extra debugging capabilities, but
+ not safe iterators.
+ * include/bits/basic_string.tcc: Make sure there's never an
+ ambiguity when calling __is_null_pointer.
+ * include/debug/deque: (deque::erase) Properly handle invalidation
+ when erasing at the end of the deque.
+ * include/debug/vector: (vector::swap): Swap _M_guaranteed_capacity.
+ (vector::clear): Set the guaranteed capacity to 0.
+ * testsuite/23_containers/deque/invalidation/4.cc: (test04): Test
+ iterator invalidation when erasing at the end of the deque.
+
+2003-11-13 Paolo Carlini <pcarlini@suse.de>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/13007
+ * include/bits/fstream.tcc (imbue): Don't touch the stored
+ locale.
+ * include/std/std_streambuf.h (imbue): According to the
+ standard, base class version does nothing.
+ (pubimbue): Store the locale.
+ * testsuite/27_io/basic_filebuf/imbue/char/13007.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/imbue/char/13007-1.cc: New.
+ * testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc: New.
+ * testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-1.cc: New.
+ * testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc: New.
+
+2003-11-13 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/12594
+ * include/bits/ostream.tcc
+ (basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
+ basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
+ basic_ostream::operator<<(ios_base& (*)(ios_base&))):
+ Implement the resolution of DR 60 (TC): These are not formatted
+ output functions so don't construct sentry objects and don't
+ catch exceptions.
+ (basic_ostream::put, basic_ostream::write): Implement the
+ resolution of DR 63 (TC) by catching exceptions and setting
+ badbit.
+ (basic_ostream::flush): Implement the resolution of DR 60 (TC):
+ This is not an unformatted output function so don't construct
+ a sentry object.
+ * testsuite/testsuite_io.h (sync_streambuf): Define.
+ * testsuite/27_io/basic_ostream/flush/char/2.cc: New test.
+ * testsuite/27_io/basic_ostream/inserters_other/char/5.cc: New test.
+ * testsuite/27_io/basic_ostream/put/char/1.cc: New test.
+ * testsuite/27_io/basic_ostream/write/char/1.cc: New test.
+
+2003-11-13 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1:
+ Fix, closely following the testcase included in the PR.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2: Ditto.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3: Ditto.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4: Ditto.
+
+2003-11-13 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/17_intro/configury.html: XHTML tweak.
+
+2003-11-13 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/debug_mode.html: XHTML fixes.
+
+2003-11-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/debug_mode.html: Update.
+ * docs/html/17_intro/TODO: Update.
+
+2003-11-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config: Move using directive...
+ * include/debug/formatter.h: ...here.
+
+2003-11-12 Carlo Wood <carlo@alinoe.com>
+
+ PR libstdc++/12947
+ * bits/demangle.h
+ (_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS): Added.
+ (_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Added.
+ (session<Allocator>::next_peek() const): Added.
+ (decode_non_negative_decimal_integer(string_type&)):
+ Renamed from decode_decimal_integer(string_type&).
+ (session<Allocator>::decode_nested_name):
+ Decode <template_param> as well.
+ (session<Allocator>::add_substitution):
+ Handle <template-param> for <nested-name>'s.
+ (enum xary_nt): Added.
+ (struct entry_st): Added member `xary_nt type' instead of `bool unary'.
+ (symbol_name_table_c): Updated for `entry_st::type' and additional
+ operators (unary `operator+' and `sizeof(type)').
+ (offset_table_c): Updated for new operators (causing a new hash map).
+ (decode_operator_name): Match the updated hash map.
+ (session<Allocator>::decode_expression):
+ Support for `sizeof ([typename] type)' (st),
+ dependent names (sr) and casting operator (cv). Handle
+ `entry_st::type'. Handle _GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
+ and _GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME.
+ (session<Allocator>::decode_type_with_postfix):
+ Support `extern "C"' function types (FY).
+ * testsuite/demangle/regression/cw-16.cc: Added tests for the
+ added functionality.
+ * testsuite/demangle/regression/3111-2.cc: sizeof now has a space
+ appended.
+
+2003-11-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12875
+ * include/bits/fstream.tcc (setbuf): Don't do anything
+ after open(), in particular don't discard data.
+ (_M_allocate_internal_buffer): Tweak to not allocate memory
+ in case the buffer is provided by the user via setbuf.
+ * include/ext/stdio_filebuf.h: Tweak comment.
+ * testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: New.
+ * testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Tweak, now
+ setbuf does nothing after open().
+ * testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Likewise.
+
+2003-11-11 Doug Gregor <gregod@cs.rpi.edu>
+
+ * docs/html/debug.html: Document libstdc++ debug mode.
+ * docs/html/debug_mode.html: Document libstdc++ debug mode design.
+ * docs/html/test.html: Document how to test under debug mode.
+ * docs/html/17_intro/howto.html: Document debug-mode macros.
+ * include/Makefile.am: Install debug-mode headers.
+ * src/Makefile.am: Include debug.cc.
+ * include/bits/basic_string.tcc:
+ (basic_string::_S_construct): Fix NULL pointer check.
+ (__is_null_pointer): New.
+ Add precondition annotations.
+ * include/bits/stream_iterator.h (istream_iterator,
+ ostream_iterator): Added precondition annotations.
+ * include/bits/streambuf_iterator.h (istreambuf_iterator): Ditto.
+ * include/bits/stl_queue.h (queue, priority_queue): Ditto.
+ * include/bits/stl_stack.h (stack): Ditto.
+ * include/bits/basic_string.h (basic_string): Ditto.
+ * include/bits/basic_string.tcc (basic_string): Ditto.
+ * include/std/std_memory.h (auto_ptr): Ditto.
+ * include/std/std_valarray.h (valarray): Ditto.
+ * include/bits/stl_algo.h: Added algorithm precondition
+ annotations.
+ * include/bits/stl_algobase.h: Added algorithm precondition
+ annotations.
+ * include/bits/stl_numeric.h: Ditto.
+ * include/ext/algorithm: Added algorithm precondition
+ annotations.
+ (__is_heap): Moved away from here.
+ * include/bits/stl_heap.h: Added algorithm precondition
+ annotations.
+ (__is_heap): Moved to the top of this file.
+ (__is_heap): Added iterator range overloads.
+ * testsuite/20_util/auto_ptr_neg.cc: Fix line numbers to match up
+ with changes in std_memory.h.
+ * testsuite/23_containers/list/operators/4.cc: Don't verify
+ performance guarantees when in debug mode.
+ * testsuite/23_containers/bitset/invalidation/1.cc: New.
+ * testsuite/23_containers/deque/invalidation/1.cc: New.
+ * testsuite/23_containers/deque/invalidation/2.cc: New.
+ * testsuite/23_containers/deque/invalidation/3.cc: New.
+ * testsuite/23_containers/deque/invalidation/4.cc: New.
+ * testsuite/23_containers/list/invalidation/1.cc: New.
+ * testsuite/23_containers/list/invalidation/2.cc: New.
+ * testsuite/23_containers/list/invalidation/3.cc: New.
+ * testsuite/23_containers/list/invalidation/4.cc: New.
+ * testsuite/23_containers/map/invalidation/1.cc: New.
+ * testsuite/23_containers/map/invalidation/2.cc: New.
+ * testsuite/23_containers/multimap/invalidation/1.cc: New.
+ * testsuite/23_containers/multimap/invalidation/2.cc: New.
+ * testsuite/23_containers/multiset/invalidation/1.cc: New.
+ * testsuite/23_containers/multiset/invalidation/2.cc: New.
+ * testsuite/23_containers/set/invalidation/1.cc: New.
+ * testsuite/23_containers/set/invalidation/2.cc: New.
+ * testsuite/23_containers/vector/invalidation/1.cc: New.
+ * testsuite/23_containers/vector/invalidation/2.cc: New.
+ * testsuite/23_containers/vector/invalidation/3.cc: New.
+ * testsuite/23_containers/vector/invalidation/4.cc: New.
+ * testsuite/25_algorithms/heap.cc: Don't verify
+ performance guarantees when in debug mode.
+ * include/debug/bitset: New.
+ * include/debug/debug.h: New.
+ * include/debug/deque: New.
+ * include/debug/formatter.h: New.
+ * include/debug/hash_map: New.
+ * include/debug/hash_map.h: New.
+ * include/debug/hash_multimap.h: New.
+ * include/debug/hash_set: New.
+ * include/debug/hash_set.h: New.
+ * include/debug/hash_multiset.h: New.
+ * include/debug/list: New.
+ * include/debug/map: New.
+ * include/debug/map.h: New.
+ * include/debug/multimap.h: New.
+ * include/debug/multiset.h: New.
+ * include/debug/safe_base.h: New.
+ * include/debug/safe_iterator.h: New.
+ * include/debug/safe_iterator.tcc: New.
+ * include/debug/safe_sequence.h: New.
+ * include/debug/set: New.
+ * include/debug/set.h: New.
+ * include/debug/string: New.
+ * include/debug/vector: New.
+ * src/debug.cc: New.
+ * config/linker-map.gnu: Add debug mode symbols.
+
+2003-11-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/string-inst.cc: Tweak namespaces.
+ * src/misc-inst.cc: Same.
+ * docs/html/debug.html: Edits.
+ * config/link-map.gnu: Remove cruft.
+
+ * include/bits/c++config: Add in namespace associations.
+ * include/std/std_bitset.h: Adjust namespace to __gnu_norm,
+ comment tweaks.
+ * include/bits/deque.tcc: Same.
+ * include/bits/list.tcc: Same.
+ * include/bits/stl_bvector.h: Same.
+ * include/bits/stl_deque.h: Same.
+ * include/bits/stl_list.h: Same.
+ * include/bits/stl_map.h: Same.
+ * include/bits/stl_multimap.h: Same.
+ * include/bits/stl_multiset.h: Same.
+ * include/bits/stl_set.h: Same.
+ * include/bits/stl_vector.h: Same.
+ * include/bits/vector.tcc: Same.
+
+ * include/std/std_algorithm.h: Remove markup comments.
+ * include/std/std_functional.h: Same.
+ * include/std/std_iterator.h: Same.
+ * include/std/std_numeric.h: Same.
+ * include/std/std_utility.h: Same.
+ * include/bits/stl_queue.h: Formatting tweaks.
+ * include/bits/stl_stack.h: Same.
+ * include/std/std_deque.h: Include debugging version in debug mode.
+ * include/std/std_list.h: Same.
+ * include/std/std_map.h: Same.
+ * include/std/std_set.h: Same.
+ * include/std/std_vector.h: Same.
+ * include/std/std_queue.h: Use deque, vector.
+ * include/std/std_stack.h: Same.
+
+2003-11-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (_M_insert_int,
+ _M_insert_float): Move a couple of vars inside an if block.
+
+2003-11-09 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12971
+ * include/bits/locale_facets.tcc
+ (money_put::do_put(..., long double)): Fix conversion
+ specification as per DR 328 [WP].
+ * testsuite/22_locale/money_put/put/char/12971.cc: Add.
+ * testsuite/22_locale/money_put/put/wchar_t/12971.cc: Ditto.
+ * docs/html/ext/howto.html: Add entry for DR 328.
+
+2003-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12967
+ * include/bits/list.tcc (merge): Implement resolution of
+ DR 300 [WP].
+ * docs/html/ext/howto.html: Add entry for DR 300; tweak entry
+ for DR 231.
+
+ * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
+ Import R27.
+
+2003-11-07 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * libsupc++/vec.cc: Conform to C++STYLE.
+
+2003-11-07 Carlo Wood <carlo@alinoe.com>
+
+ PR libstdc++/12736
+ * bits/demangle.h (qualifier_list<Allocator>::decode_KVrA): Added.
+ (qualifier_list<Allocator>::decode_qualifiers): Collect concatenated
+ K, V, r and A qualifiers before processing them as a group.
+ * testsuite/demangle/abi_text/01.cc: Reordered CV-qualifiers.
+ * testsuite/demangle/regression/cw-16.cc: New.
+
+2003-11-07 Robert Millan <robertmh@gnu.org>
+
+ * configure.host: Add kfreebsd*-gnu and knetbsd*-gnu.
+ * crossconfig.m4: Likewise.
+ * configure: Regenerate.
+
+2003-11-07 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/demangle.h
+ (qualifier_list<Allocator>::decode_qualifiers(string_type&,
+ string_type&, bool member_function_pointer_qualifiers):
+ Always separate the '[' of an array type with a space from
+ what is left of it, except when that is the closing bracket
+ of another array dimension.
+
+2003-11-07 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/demangle.h
+ (qualifier_list<Allocator>::decode_qualifiers(string_type&,
+ string_type&, bool) const): Made const.
+ (qualifier_list<Allocator>::M_printing_suppressed): Added mutable.
+ (_GLIBCXX_DEMANGLER_DOUT_ENTERING3, _GLIBCXX_DEMANGLER_RETURN3,
+ std::ostream& operator<<(std::ostream&, qualifier const&),
+ std::ostream& operator<<(std::ostream&, qualifier_list const&),
+ qualifier_list<Allocator>::decode_qualifiers(string_type&,
+ string_type&, bool) const,
+ session<Allocator>::decode_type_with_postfix(string_type&,
+ string_type&, qualifier_list<Allocator>*))
+ Added and/or changed debug-only hooks and code.
+
+2003-11-04 Jeffrey D. Oldham <oldham@codesourcery.com>
+
+ * libsupc++/vec.cc (__cxa_vec_delete2): If given a NULL pointer,
+ immediately return. This reflects a C++ ABI change 2003 Nov 03.
+ (__cxa_vec_delete3): Likewise.
+
+2003-11-03 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/12790
+ * include/bits/fstream.tcc: Delete _M_last_overflowed.
+ (basic_filebuf::basic_filebuf): Initialize _M_state_last.
+ (basic_filebuf::open, basic_filebuf::close): Assign
+ _M_state_beg to _M_state_cur and _M_state_last.
+ (basic_filebuf::close): Call _M_terminate_output to handle
+ unshift and flushing.
+ (basic_filebuf::underflow): Assign _M_state_last, throw
+ exception instead of calling abort when codecvt::max_length()
+ is bad.
+ (basic_filebuf::seekoff): Use _M_state_last when calling
+ codecvt::length(), pass correct state to _M_seek.
+ (basic_filebuf::seekpos): Pass __pos.state() to _M_seek.
+ (basic_filebuf::_M_seek): Add __state_type parameter,
+ set _M_state_cur correctly, store the resulting state in
+ the return value and use _M_terminate_output to handle
+ flushing and unshift.
+ (basic_filebuf::_M_terminate_output): Flush contents of
+ output buffer, if any, then call codecvt::unshift as
+ needed and output the result.
+ (basic_filebuf::sync): Move here, don't modify _M_writing
+ or _M_reading.
+
+ * include/std/std_fstream.h
+ (basic_filebuf::_M_state_last): Declare it.
+ (basic_filebuf::_M_last_overflowed): Delete.
+ (basic_filebuf::_M_seek): Add __state_type parameter.
+ (basic_filebuf::sync): Declare only.
+ (basic_filebuf::_M_output_unshift): Delete.
+ (basic_filebuf::_M_terminate_output): Declare it.
+
+ * testsuite/testsuite_character.h:
+ Define character class and state class plus char_traits and
+ codecvt specializations for same for testing support for
+ stateful encodings.
+
+ * testsuite/27_io/basic_filebuf/close/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/close/char/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/close/char/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/close/char/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/close/char/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/open/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-3.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc,
+ * testsuite/27_io/basic_filebuf/sync/char/1.cc,
+ * testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc:
+ New tests.
+
+ * testsuite/27_io/basic_filebuf/3.cc,
+ * testsuite/27_io/basic_filebuf/seekoff/10132-2.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/10132-3.cc,
+ * testsuite/27_io/basic_fstream/3.cc,
+ * testsuite/27_io/basic_ifstream/3.cc,
+ * testsuite/27_io/basic_ofstream/3.cc:
+ Use streamoff as off_type and fpos<state_type> as pos_type.
+
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc,
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc:
+ Check that sync does *not* set _M_writing to false.
+
+2003-11-03 Anthony Green <green@redhat.com>
+
+ * libmath/stubs.c (sqrtf, sqrtl): Reorder so they appear before
+ they're used.
+
+2003-11-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (time_get::_M_extract_name): Add
+ ctype argument.
+ * include/bits/locale_facets.tcc: Same, use it to allow
+ capitalized names.
+
+ * include/bits/fstream.tcc: Spacing tweak.
+ * include/bits/istream.tcc: Same.
+ * include/bits/ostream.tcc: Same.
+
+2003-10-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
+ __mod is only assigned, never used its value, remove it.
+
+2003-10-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get::do_get_year):
+ Absolutely avoid dereferencing end iterators.
+ (time_put::put): Minor clean up.
+
+ * include/bits/locale_facets.tcc: Cosmetic reformattings.
+
+2003-10-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ Revert the last commit, is not correct, sorry.
+
+2003-10-29 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/c_locale.cc: Add back <cmath> and
+ <cstdlib>.
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ Clean up.
+
+2003-10-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_put::put): Absolutely
+ avoid dereferencing end iterators; clean up.
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float,
+ num_get::_M_extract_int): Minor tweak.
+
+2003-10-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc: Remove some unnecessary
+ includes.
+ * config/locale/generic/c_locale.cc: Include <cerrno> here.
+ * config/locale/gnu/c_locale.cc: Likewise.
+
+2003-10-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc
+ (money_get<>::do_get(..., string_type&)): Absolutely avoid
+ dereferencing end iterators; general clean up.
+
+2003-10-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (time_get::_M_extract_num):
+ Absolutely avoid dereferencing end iterators.
+ (time_get::_M_extract_name): Likewise.
+
+ * include/bits/locale_facets.tcc
+ (time_get::_M_extract_via_format, case 'e'): Don't try to
+ be smart wrt returning the right __beg in case of parse
+ error, time_get::_M_extract_num must be fixed instead.
+
+2003-10-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12778
+ * acinclude.m4 (GLIBCXX_CHECK_LFS): Use the C++ compiler.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-10-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/TODO: Add links.
+ * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
+ Uncomment.
+
+2003-10-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12750
+ * include/bits/locale_facets.tcc
+ (time_get::_M_extract_via_format): Deal with code 'e'.
+ * testsuite/22_locale/time_get/get_date/char/12750.cc: New.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Ditto.
+
+ * include/bits/locale_facets.tcc
+ (time_get::_M_extract_via_format): Tweak to absolutely avoid
+ dereferencing end iterators.
+
+ * include/bits/locale_facets.h (__verify_grouping):
+ Const-ify second parameter.
+ * include/bits/locale_facets.tcc (__verify_grouping): Ditto.
+ * src/locale-inst.cc (__verify_grouping): Ditto.
+
+2003-10-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ Various things: 1- Avoid absolutely end iterator dereferences;
+ 2- Improve performance-wise the code skipping leading zeros;
+ 3- Fix two bugs wrt early bail out in case of parsing errors
+ (see testcases); 4- General clean up.
+ (num_get::_M_extract_int): Likewise, except 3-. Additionally,
+ use __builtin_expect to favor base 10 inputs.
+ * testsuite/22_locale/num_get/get/char/7.cc: New.
+ * testsuite/22_locale/num_get/get/wchar_t/7.cc: Ditto.
+
+2003-10-26 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/money_put/put/char/1.cc: Clean up.
+ * testsuite/22_locale/money_put/put/wchar_t/1.cc: Ditto.
+
+2003-10-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_int):
+ __pos in only incremented, never used its value, remove it.
+
+2003-10-24 Robert Millan <robertmh@gnu.org>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Add kfreebsd*-gnu
+ and knetbsd*-gnu.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(...,
+ long double&): Properly size the temporary buffer.
+ * testsuite/22_locale/money_get/get/char/11.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/11.cc: Ditto.
+
+ * include/bits/locale_facets.tcc (num_put::_M_group_int,
+ num_put::_M_group_float, money_put::do_put(..., const
+ string_type&), collate::do_compare, collate::do_transform):
+ Prefer basic_string::data() to c_str() when the '\0'
+ terminator is not really needed.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__verify_grouping):
+ Prefer '=' to an unnecessary '&='.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_ios.tcc (copyfmt(const basic_ios&)):
+ Tweak my fix for libstdc++/12657.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(...,
+ string_type&): Minor tweak to the previous commit.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(...,
+ string_type&): Disregard the previous commit: doesn't hurt but
+ doesn't accomplish anything useful either. This is the right
+ one, speeding up greatly the function in case of early fail.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get::do_get(...,
+ string_type&): Move an if block, thus minimizing the amount
+ of code processed anyway when __tmp_units.size() == 0.
+
+2003-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc
+ (time_get<>::_M_extract_via_format): Deal with case 'C' too,
+ equivalent to 'y'.
+
+2003-10-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: Add a pointer to the doxygen style
+ guide.
+ * docs/html/17_intro/TODO: Update.
+ * docs/html/test.html: Add instructions for running a subset of
+ tests, update.
+
+2003-10-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (money_get<>::do_get(...,
+ string_type&)): Use find_first_not_of to strip leading
+ zeros; if __tmp_units == "0" never prefix it with '-';
+ always fail if __tmp_units is empty.
+ * testsuite/22_locale/money_get/get/char/10.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/10.cc: Ditto.
+
+2003-10-23 Phil Edwards <phil@codesourcery.com>
+
+ * config/os/vxworks/ctype_noninline.h: Adjust ctor to match
+ 2003-10-21 change.
+
+2003-10-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__int_to_char): Remove
+ the const int parameter.
+ (_M_insert_int): Update caller.
+ * src/locale-inst.cc (__int_to_char): Update instantiations.
+
+2003-10-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h: Correct byname facets for "C"
+ locale.
+ * config/locale/generic/ctype_members.cc: Same.
+ * config/locale/generic/messages_members.h: Same.
+ * config/locale/gnu/ctype_members.cc: Same.
+ * config/locale/gnu/messages_members.h: Same.
+ * include/bits/codecvt.h: Same.
+ * src/ctype.cc: Same.
+ * testsuite/22_locale/codecvt_byname/1.cc: New.
+ * testsuite/22_locale/collate/1.cc: Edit.
+ * testsuite/22_locale/collate_byname/1.cc: Derivation tests, move to...
+ * testsuite/22_locale/collate_byname/named_equivalence.cc: ...here.
+ * testsuite/22_locale/ctype/1.cc: Derivation tests.
+ * testsuite/22_locale/ctype/11844.cc: Move...
+ * testsuite/22_locale/ctype_base/11844.cc: ...here.
+ * testsuite/22_locale/ctype_base/1.cc: Move mask bits here.
+ * testsuite/22_locale/ctype_byname/1.cc: Name.
+ * testsuite/22_locale/messages_byname/1.cc: New.
+ * testsuite/22_locale/messages_byname/named_equivalence.cc: New.
+ * testsuite/22_locale/moneypunct_byname/1.cc: Derivation test.
+ * testsuite/22_locale/moneypunct_byname/named_equivalence.cc: New.
+ * testsuite/22_locale/numpunct/1.cc: Edit.
+ * testsuite/22_locale/numpunct_byname/2.cc: Move...
+ * testsuite/22_locale/numpunct/members/char/3.cc: ...here.
+ * testsuite/22_locale/numpunct_byname/1.cc: Derivation tests.
+ * testsuite/22_locale/numpunct_byname/named_equivalence.cc: New.
+
+2003-10-22 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/8610
+ * acinclude.m4 (GLIBCXX_CHECK_INT64_T): New macro,
+ checking for the availability of int64_t.
+ (GLIBCXX_CHECK_LFS): New macro, checking for LFS support.
+ * configure.ac: Call here.
+ * acconfig.h: Add undef for the corresponding symbols.
+ * config/io/basic_file_stdio.cc (__basic_file<char>::open):
+ Depending on _GLIBCXX_USE_LFS, call fopen64 or fopen.
+ (__basic_file<char>::seekoff): Likewise, call lseek64 when
+ available, otherwise lseek, checking the __off parameter.
+ * include/bits/postypes.h: Typedef __streamoff_base_type
+ to int64_t if available, otherwise long long.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Likewise.
+ * configure: Likewise.
+
+ * acinclude.m4 (GLIBCXX_CHECK_POLL, GLIBCXX_CHECK_WRITEV):
+ Use AC_TRY_LINK instead of AC_TRY_COMPILE.
+
+2003-10-22 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12657
+ * include/bits/basic_ios.tcc (copyfmt(const basic_ios&)):
+ Implement resolution of DR 292 (WP).
+ * docs/html/ext/howto.html: Add entry for DR 292.
+
+2003-10-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/mt_allocator.h: Change include to gthr.h.
+ * include/ext/rope: Same. Add _Refcount_base definitions.
+ * include/ext/pool_allocator.h: Adjust namespaces.
+ * include/bits/stl_threads.h (_Refcount_base): Move.
+ Put remaining into namespace __gnu_cxx.
+
+2003-10-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/9858
+ * include/bits/locale_facets.h (ctype<char>): Remove
+ __ctype_abstract_base.
+ (ctype<char>::do_is): Remove.
+ (ctype<char>::do_scan_is): Remove.
+ * src/ctype.cc: Same. Inline the rest.
+ * testsuite/22_locale/ctype/is/char/9858.cc: New.
+ * config/os/aix/ctype_noninline.h: Adjust ctor.
+ * config/os/bsd/freebsd/ctype_noninline.h: Same.
+ * config/os/bsd/netbsd/ctype_noninline.h: Same.
+ * config/os/djgpp/ctype_noninline.h: Same.
+ * config/os/generic/ctype_noninline.h: Same.
+ * config/os/gnu-linux/ctype_noninline.h: Same.
+ * config/os/hpux/ctype_noninline.h: Same.
+ * config/os/irix/irix5.2/ctype_noninline.h: Same.
+ * config/os/irix/irix6.5/ctype_noninline.h: Same.
+ * config/os/mingw32/ctype_noninline.h: Same.
+ * config/os/newlib/ctype_noninline.h: Same.
+ * config/os/qnx/qnx6.1/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.5/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.6/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.7/ctype_noninline.h: Same.
+ * config/os/windiss/ctype_noninline.h: Same.
+
+2003-10-21 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale.cc: Tweak a comment.
+ * src/localename.cc: Move a comment.
+
+2003-10-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/10081
+ * testsuite_hooks.h: Add pod_type, ctype and numpunct specializations.
+ * testsuite_hooks.cc: Same.
+ * 22_locale/numpunct/members/pod/1.cc: Edit.
+ * 22_locale/numpunct/members/pod/2.cc: Same.
+ * 27_io/basic_istream/sentry/char/3983-fstream.cc: Move ...
+ * 27_io/basic_istream/sentry/char/3983-sstream.cc: Move ...
+ * 27_io/basic_istream/extractors_arithmetic/pod/3983-1.cc: Here.
+ * 27_io/basic_istream/extractors_character/pod/3983-2.cc: Here.
+ * 27_io/basic_istream/extractors_other/pod/3983-3.cc: Here.
+ * 27_io/basic_ostream/sentry/char/3983-fstream.cc: Remove.
+ * 27_io/basic_ostream/sentry/char/3983-sstream.cc: Remove.
+ * 27_io/basic_istream/sentry/pod/1.cc: New.
+ * 27_io/basic_ostream/sentry/pod/1.cc: New.
+ * 21_strings/basic_string/inserters_extractors/pod/10081-in.cc: New.
+ * 21_strings/basic_string/inserters_extractors/pod/10081-out.cc: New.
+
+2003-10-20 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config/cpu/mips/atomicity.h (__atomic_add): Use _ABIO32 instead
+ of external _MIPS_SIM_ABI32.
+
+2003-10-20 Phil Edwards <phil@codesourcery.com>
+
+ * configure.ac: Fix comment typo.
+ * configure.host: Add vxworks to host_os switch.
+ * crossconfig.m4: Remove old commented os_include_dir variables
+ left over from autotools transition.
+ (*-vxworks): New stanza.
+ (*-windiss): Add missing symbols.
+ * configure: Regenerate.
+ * config/os/vxworks/ctype_base.h, config/os/vxworks/ctype_inline.h,
+ config/os/vxworks/ctype_noninline.h, config/os/vxworks/os_defines.h:
+ New files.
+ * config/os/windiss/os_defines.h: Define __C9X__.
+
+2003-10-19 David Edelsohn <edelsohn@gnu.org>
+
+ PR other/12506
+ * configure.host (aix4,aix*): Define os_include_dir to os/generic.
+
+2003-10-18 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * src/locale.cc (locale::_S_initialize): Re-apply workaround a
+ confusion of the use of the gthr API when __gthread_active_p()
+ returns true.
+
+2003-10-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/Makefile.am: Add new files.
+ * src/Makefile.in: Regenerate.
+ * src/globals.cc: Split into..
+ * src/globals_io.cc: New.
+ * src/globals_locale.cc: New.
+ * src/ios.cc: Split into...
+ * src/ios_init.cc: New.
+ * src/ios_locale.cc: New.
+ * src/locale-inst.cc: Split into..
+ * src/wlocale-inst.cc: New.
+ * src/locale-misc-inst.cc: New.
+ * src/locale.cc, src/localename: Split into...
+ * src/locale_facets.cc: New.
+ * src/locale_init.cc: New.
+ * src/wstring-inst.cc: Add copyright info.
+
+2003-10-16 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/11450
+ PR libstdc++/11543
+ PR libstdc++/12065
+ * config/io/basic_file_stdio.cc (__basic_file::seekoff):
+ Change return value from streampos to streamoff.
+ (__basic_file::seekpos): Delete.
+ * config/io/basic_file_stdio.h: Same.
+ * config/io/c_io_stdio.h: Remove streamoff and wstreamsize typedefs.
+ * include/Makefile.am (bits_headers): Add bits/postypes.h.
+ * include/bits/char_traits.h: Include bits/postypes.h instead of
+ bits/fpos.h.
+ * include/bits/fstream.tcc (basic_filebuf::open,
+ basic_filebuf::pbackfail): Don't use < or >= to compare pos_type
+ values, use == and != instead.
+ (basic_filebuf::_M_seek): Use explicit conversion from streamoff
+ to pos_type.
+ (basic_filebuf::imbue): Don't use ! on pos_type values, use
+ == instead. Don't use __check_facet(_M_codecvt) unless is_open().
+ * include/bits/postypes.h: New file.
+ Add __streamoff_base_type typedef, streamsize.
+ (streamoff, streampos, wstreampos): Define typedefs, with
+ streamoff defined as...
+ (streamoff): New class. Document implementation defined
+ aspects.
+ (fpos): New implementation. Document implementation defined
+ aspects.
+ * include/bits/sstream.tcc (basic_stringbuf::seekpos): Use
+ explicit conversion from pos_type to off_type.
+ * include/std/std_iosfwd.h: Include bits/postypes.h instead
+ of bits/fpos.h.
+ * testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: New test.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: New test.
+ * testsuite/27_io/fpos/11450.cc: New test.
+ * testsuite/27_io/fpos/mbstate_t/12065.cc: New test.
+ * testsuite/27_io/fpos/mbstate_t/4_neg.cc: New test.
+ * testsuite/27_io/types/3.cc: New test.
+
+2003-10-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.host: Remove fpos_include_dir.
+ * configure.ac: Remove FPOS_INC_SRCDIR.
+ * configure: Regenerate.
+ * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Remove FPOS_H.
+ * aclocal.m4: Regenerate.
+ * include/Makefile.am (host_headers): Remove fpos.h.
+ (bits_headers): Add postypes.h.
+ * include/Makefile.in: Regenerate.
+ * config/os/gnu-linux/fposh: Remove.
+ * config/os/generic/fpos.h: Remove.
+
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Fixup.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Same.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Same.
+ * testsuite/27_io/basic_istream/seekg/char/2.cc: Same.
+ * testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Same.
+ * testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Same.
+ * testsuite/27_io/fpos/mbstate_t/3.cc: Same.
+ * testsuite/27_io/objects/char/10.cc: Same.
+
+2003-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale.cc (locale::locale(const char*)): ... one
+ more comparison missed in the previous commit.
+
+2003-10-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acconfig.h: Add HAVE_DRAND48.
+ * crossconfig.m4: Remove ISATTY.
+ * aclocal.m4: Regenerated.
+ * config.h.in: Regenerated.
+ * configure: Regenerated.
+
+2003-10-16 Bernardo Innocenti <bernie@develer.com>
+
+ * config/cpu/m68k/atomicity.h (__exchange_and_add): Use TAS on
+ __mcf5400__. Don't rely on __mc68000__ to detect a bare 68000.
+ Document SMP safeness of asm macros.
+
+2003-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale.cc (locale::locale(const char*)): Tweak
+ a couple of comparisons to use basic_string operators.
+
+2003-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/12540
+ * config/locale/gnu/monetary_members.cc
+ (moneypunct<wchar_t, true/false>::_M_initialize_moneypunct):
+ Don't leak memory if new throws.
+ * src/locale.cc (locale::locale(const char*)): In order not
+ to leak memory in case new throws, use a basic_string type
+ for __res too and avoid strdup.
+
+2003-10-14 Jeff Bailey <jbailey@nisa.net>
+
+ PR libstdc++/12562
+ * crossconfig.m4: Share the config between *-linux* and *-gnu*.
+ * configure: Regenerate.
+
+2003-10-14 Carlo Wood <carlo@alinoe.com>
+
+ PR libstdc++/12600
+ * include/bits/demangle.h (session<Allocator>::
+ decode_unqualified_name(string_type& output)): Fail on a
+ <operator-name> when decoding <template-argument>.
+ * testsuite/demangle/regression/cw-15.cc: New.
+
+2003-10-14 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11480
+ * include/bits/stl_algo.h (unique): Fix.
+ * testsuite/25_algorithms/unique.cc: Move to unique/1.cc.
+ * testsuite/25_algorithms/unique/11480.cc: New, from the PR.
+ * testsuite/25_algorithms/unique/2.cc: New.
+
+2003-10-14 Paolo Carlini <pcarlini@unitus.it>
+
+ * src/localename.cc (_M_replace_categories, M_replace_facet):
+ Const-ify a couple of variables.
+
+2003-10-14 Petur Runolfsson <peturr02@ru.is>
+ Andreas Tobler <a.tobler@schweiz.ch>
+
+ * src/locale.cc (locale::_S_initialize): Workaround a confusion
+ of the use of the gthr API when __gthread_active_p() returns true.
+
+2003-10-12 Petur Runolfsson <peturr02@ru.is>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11460
+ * src/strstream.cc (pbackfail): Fix to use to_int_type.
+ * testsuite/backward/11460.cc: New, from the PR.
+
+2003-10-12 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
+ Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
+ * include/bits/basic_string.tcc: Likewise.
+ * include/bits/ios_base.h: Likewise.
+ * include/bits/istream.tcc: Likewise.
+ * include/bits/locale_facets.tcc: Likewise.
+ * include/bits/ostream.tcc: Likewise.
+ * include/bits/stl_function.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_pair.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
+ * include/bits/streambuf_iterator.h
+ * include/std/std_iosfwd.h: Likewise.
+ * include/std/std_istream.h: Likewise.
+ * include/std/std_sstream.h: Likewise.
+ * include/std/std_streambuf.h: Likewise.
+ * src/ios.cc: Likewise.
+ * include/bits/c++config:
+ Comment out #define _GLIBCXX_RESOLVE_LIB_DEFECTS 1.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak a
+ dg-error directive due to removal of a blank line.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
+
+2003-10-12 Andreas Tobler <a.tobler@schweiz.ch>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11844/11740 (cont)
+ * config/os/generic/ctype_inline.h (ctype<char>::is):
+ Generically, use a bitmasksize of 15 (instead of 10);
+ Fix the logic to actually return (M & m) != 0 as per
+ 22.2.1.1.2.
+
+2003-10-11 Bernardo Innocenti <bernie@develer.com>
+
+ * crossconfig.m4 (*-uclinux*): New target.
+ * configure: Regenerate.
+
+2003-10-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/ostream.tcc (operator<<(basic_ostream&, _CharT))
+ Avoid unnecessarily calling __builtin_alloca and dealing
+ explicitly with width() smaller than zero.
+ (operator<<(basic_ostream&, char), operator<<(basic_ostream&,
+ const _CharT*), operator<<(basic_ostream<_CharT, _Traits>&,
+ const char*), operator<<(basic_ostream<char, _Traits>&,
+ const char*), operator<<(basic_ostream, const basic_string&)):
+ Likewise.
+
+2003-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Make more *_type_info bits visible.
+ Move new/delete bits back into GLIBCXX space.
+
+ * include/bits/locale_classes.h: Move _M_id out of line, so that
+ locale::id::_S_highwater can be removed from the export list.
+ * src/locale.cc (locale::id::_M_id): Define.
+
+2003-10-09 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_64 for
+ SPARC64.
+
+2003-10-09 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11844
+ * config/os/aix/ctype_base.h: Fix 'alnum' and 'graph'
+ to conform to the requirements of 22.2.1.
+ * config/os/bsd/freebsd/ctype_base.h: Likewise.
+ * config/os/djgpp/ctype_base.h: Likewise.
+ * config/os/generic/ctype_base.h: Likewise.
+ * config/os/gnu-linux/ctype_base.h: Likewise.
+ * config/os/hpux/ctype_base.h: Likewise.
+ * config/os/irix/irix6.5/ctype_base.h: Likewise.
+ * config/os/solaris/solaris2.6/ctype_base.h: Likewise.
+ * config/os/solaris/solaris2.7/ctype_base.h: Likewise.
+ * testsuite/22_locale/ctype/11844.cc: New.
+
+ * config/locale/generic/ctype_members.cc (do_is):
+ Generically, use a bitmasksize of 15 (instead of 10), since
+ we don't know the numerical encoding of the various categories
+ in the underlying /usr/include/ctype.h.
+
+2003-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/string-inst.cc: Prune.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-10-09 Petur Runolfsson <peturr02@ru.is>
+
+ * src/io-inst.cc: Don't include iostream.
+ * include/bits/ios_base.h (ios_base::failure): Use string.
+ * src/Makefile.am: Add ios_failure.cc.
+ * src/Makefile.in: Regenerate.
+ * src/ios.cc: Move ios_base::failure definitions to...
+ * src/ios_failure.cc: ...here. New.
+
+2003-10-09 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9874
+ * include/bits/fstream.tcc (basic_filebuf::seekoff):
+ Move code needed for both seekoff and seekpos...
+ (basic_filebuf::_M_seek): ...here. New function.
+ (basic_filebuf::seekpos): Don't call seekoff, call _M_seek.
+ * include/std/std_fstream.h (basic_filebuf::_M_seek): Declare it.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: New test.
+
+ * testsuite/22_locale/locale/cons/12438.cc: Increase memory limit.
+
+2003-10-08 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc: More minor cosmetic
+ changes and const-ifications of some variables.
+
+2003-10-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc: Minor cosmetic changes
+ and const-ifications of some variables.
+
+ * include/bits/locale_facets.tcc
+ (money_get::do_get(..., string_type&)): Simplify an if-else.
+
+2003-10-06 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11740
+ * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_is):
+ Fix to actually return (M & m) != 0 as per 22.2.1.1.2.
+ * config/locale/generic/ctype_members.cc: Same.
+ * testsuite/22_locale/ctype/is/wchar_t/11740.cc: New.
+
+2003-10-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (__pad<>::_S_pad):
+ Improve performance-wise: avoid one traits::copy, avoid
+ the __builtin_alloca, streamline.
+
+2003-10-05 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc
+ (num_put::do_put(..., bool)): Prefer ?: to if-else.
+ (time_get::_M_extract_name): Qualify min with std::.
+ (__pad<>::_S_pad): Constify two variables; simplify an
+ if-else statement factoring out some code.
+
+ * include/bits/locale_facets.tcc: Minor cosmetic changes.
+
+2003-10-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ Constify a couple of variables.
+ (num_get::do_get(..., bool&)): Constify __c; prefer *__beg,
+ ++__beg to *__beg++.
+
+2003-10-04 Paolo Carlini <pcarlini@unitus.it>
+ Petur Runolfsson <peturr02@ru.is>
+
+ * include/ext/stdio_sync_filebuf.h: Don't include the whole
+ <fstream>, only <streambuf> and <cstdio>.
+
+2003-10-04 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12206
+ * include/bits/fstream.tcc (imbue): In case a codecvt facet
+ is not available, set _M_codecvt = 0.
+ * testsuite/27_io/basic_filebuf/imbue/12206.cc: New.
+
+2003-10-02 Harald Boehme <boehme@informatik.hu-berlin.de>
+
+ PR libstdc++/12451
+ * libsupc++/cxxabi.h: Move forward declaration of __class_type_info.
+
+2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_classes.h (locale::facet::_S_get_c_name): Add.
+ * src/locale.cc: Define.
+ * src/localename.cc: Use it.
+ * config/locale/generic/time_members.h: Same.
+ * config/locale/gnu/messages_members.h: Same.
+ * config/locale/gnu/time_members.h: Same.
+
+2003-10-02 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12232
+ * include/bits/fstream.tcc (seekoff): Ignore the openmode
+ argument; simplify.
+ * config/io/basic_file_stdio.h (__basic_file<char>::seekoff,
+ seekpos): Remove the openmode argument.
+ * config/io/basic_file_stdio.cc (__basic_file<char>::seekoff,
+ seekpos): Remove redundant placeholder for the openmode argument.
+ * testsuite/27_io/basic_filebuf/seekoff/char/12232.cc: New.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc: Tweak.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc: Likewise.
+
+2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/locale.cc (locale::_S_initialize): Use __gthread_active_p.
+ (locale::facet::_S_get_c_locale): Same.
+
+2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Export _S_get_c_locale instead of
+ _S_c_locale object.
+
+2003-10-02 Petur Runolfsson <peturr02@ru.is>
+
+ * config/locale/generic/c_locale.cc
+ (category_names, locale::_S_categories): Const qualify.
+ * config/locale/gnu/c_locale.cc: Same.
+ * config/locale/generic/time_members.h (__timepunct::__timepunct):
+ Copy string contents before assigning to _M_name_timepunct,
+ qualify strcpy and strlen with std::.
+ * config/locale/gnu/time_members.h: Same.
+ * config/locale/gnu/messages_members.h (messages::messages):
+ Copy string contents before assigning to _M_name_messages,
+ qualify strcpy and strlen with std::.
+ * config/os/gnu-linux/ctype_noninline.h
+ (ctype<char>::classic_table()): Don't call locale::classic().
+ * include/bits/locale_classes.h
+ (locale::_S_categories): Const qualify.
+ (locale::_S_once, locale::_S_initialize_once,
+ locale::facet::_S_once, locale::facet::_S_initialize_once,
+ locale::facet::_S_get_c_locale): Declare.
+ (locale::_S_initialize): Don't define.
+ (locale::facet::_S_c_locale): Make private.
+ (locale::facet::_S_c_name): Same, const qualify.
+ (locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused
+ parameters, add throw() specifier.
+ * include/bits/locale_facets.h (__timepunct::_M_name_timepunct,
+ messages::_M_name_messages): Const qualify.
+ * src/locale.cc
+ (locale::_S_once, locale::facet::_S_once): Define.
+ (locale::classic): Move initialization code...
+ (locale::_S_initialize_once): ...here.
+ (locale::_S_initialize): Call _S_initialize_once through
+ __gthread_once.
+ (locale::facet::_S_initialize_once): Initialize _S_c_locale.
+ (locale::facet::_S_get_c_locale): Call _S_initialize_once through
+ __gthread_once before returning _S_c_locale.
+ * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)):
+ Drop unused parameters, add throw() specifier, don't initialize
+ locale::facet::_S_c_locale and _S_c_name.
+
+ * config/locale/generic/messages_members.h:
+ Replace _S_c_locale with _S_get_c_locale().
+ * config/locale/gnu/c_locale.cc: Same.
+ * config/locale/gnu/messages_members.h: Same.
+ * config/locale/gnu/numeric_members.cc: Same.
+ * config/locale/gnu/time_members.cc: Same.
+ * config/os/gnu-linux/ctype_noninline.h: Same.
+ * include/bits/locale_facets.h: Same.
+ * include/bits/locale_facets.tcc: Same.
+ * src/codecvt.cc: Same.
+ * src/ctype.cc: Same.
+
+2003-10-02 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/demangle.h (demangle<Allocator>::symbol(char const*)):
+ Decode symbols that start with _GLOBAL_[ID]_ differently: the
+ trailing part ends with a terminating zero and is not necessarily an
+ encoding.
+ * src/demangle.cc (): Same.
+ * testsuite/demangle/regression/cw-13.cc: Adjust for new output.
+
+2003-10-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/locale/cons/12438.cc: Use
+ __gnu_test::try_named_locale("").
+
+2003-10-01 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_0): Define.
+ (GLIBCXX_CHECK_STDLIB_SUPPORT): Use it to test for lrand48
+ instead of drand48.
+ * acconfig.h (HAVE_DRAND48): Renamed to HAVE_LRAND48.
+ * crossconfig.m4 (*-freebsd*): Define HAVE_LRAND48 instead of
+ HAVE_DRAND48.
+ * config.h.in, configure: Regenerate.
+ * include/bits/stl_algo.h: Use _GLIBCXX_HAVE_LRAND48 to guard
+ lrand48 use.
+
+2003-10-01 Nathan Myers <ncm@cantrip.org>
+
+ * include/bits/locale_facets.tcc (time_put::put): Avoid
+ expensive *__s++, in favor of *__s, ++__s.
+
+2003-10-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_facets.tcc (time_put::put): Minor
+ tweak to the previous commit.
+
+2003-10-01 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12439
+ * include/bits/locale_facets.tcc (time_put::put): Deal
+ with the three issues pointed out by the PR.
+ * testsuite/22_locale/time_put/put/char/12439_1.cc: New.
+ * testsuite/22_locale/time_put/put/char/12439_3.cc: New.
+ * testsuite/22_locale/time_put/put/wchar_t/12439_1.cc: New.
+ * testsuite/22_locale/time_put/put/wchar_t/12439_2.cc: New.
+ * testsuite/22_locale/time_put/put/wchar_t/12439_3.cc: New.
+
+2003-09-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algo.h: Minor cosmetic reformattings.
+
+2003-09-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algo.h (search_n): Tweak, to spare the
+ first --__n.
+
+2003-09-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/locale/cons/12352.cc: Explicitly
+ qualify exception name.
+
+2003-09-30 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12438
+ * include/bits/locale_facets.tcc (locale::combine): Don't
+ leak memory if _M_replace_facet throws.
+ * testsuite/22_locale/locale/cons/12438.cc: New, from the PR.
+
+ * include/bits/locale_classes.h (locale::locale(const locale&,
+ _Facet*)): Tweak, use consistently _M_remove_reference.
+
+2003-09-30 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12352 (cont)
+ * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
+ Don't leak __cloc; don't leak if any of the _M_init_facet(...)
+ calls fail.
+ (locale::_Impl::_Impl(const _Impl&, size_t)): Tweak.
+ (locale::_Impl::~_Impl): Don't do anything if !_M_facets,
+ !_M_caches, !_M_names.
+
+2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.host: Handle Solaris 2.5 micro releases explicitly.
+ Remove wildcards from Solaris 2.6, 7-9: there were no
+ micro releases.
+ Treat Solaris 10 and up like 7-9.
+
+2003-09-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algo.h (search_n): Improve the previous
+ fix as suggested by Martin.
+
+2003-09-29 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12296
+ * include/bits/istream.tcc (peek): Set eofbit if sgetc
+ returns eof.
+ * testsuite/27_io/basic_istream/peek/char/12296.cc:
+ New, from the PR.
+
+2003-09-29 Nathan Myers <ncm@cantrip.org>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11400
+ * include/bits/stl_algo.h (search_n):
+ Use iterator_traits<>::difference_type for __n.
+ * testsuite/25_algorithms/search_n/11400.cc: New, from the PR.
+
+2003-09-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/locale/cons/12352.cc:
+ Use __attribute__((unused)) for test.
+
+2003-09-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * testsuite/22_locale/time_put/put/char/2.cc (test_02): Allow either
+ "Son" or "So" as abbreviated name for Sunday in de_DE locale.
+ * testsuite/22_locale/time_put/put/wchar_t/2.cc (test_02): Likewise.
+
+2003-09-26 Brad Spencer <spencer@infointeractive.com>
+
+ * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc:
+ Explicitly qualify exceptions.
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same.
+
+2003-09-25 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/12352
+ * src/localename.cc (locale::_Impl::_Impl(const _Impl&,
+ size_t)): Don't leak if memory allocations for _M_facets,
+ _M_caches, and _M_names fail.
+ (locale::_Impl::_Impl(const char*, size_t)): Ditto.
+ (locale::_Impl::_M_replace_categories(const _Impl*,
+ category)): Ditto.
+ (locale::_Impl::_M_install_facet(const locale::id*,
+ const facet*)): Ditto.
+ * include/bits/locale_classes.h (locale::locale(const locale&,
+ _Facet*)): Don't leak memory.
+ * testsuite/22_locale/locale/cons/12352.cc: New, from the PR.
+
+ * src/localename.cc (locale::_Impl::_Impl(facet**, size_t,
+ bool)): Qualify with std:: strcpy, tweak.
+ * include/bits/locale_classes.h
+ (locale::_Impl::_M_check_same_name): Qualify strcmp.
+
+2003-09-25 Brad Spencer <spencer@infointeractive.com>
+
+ PR libstdc++/6072
+ * acinclude.m4: Split out checks for vfwscanf, vswscanf, vwscanf,
+ wcstof, iswblank.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * crossconfig.m4: Add in wchar_t bits for solaris crosses.
+ * config/io/basic_file_stdio.cc: Guard unistd.h.
+ * include/c_compatibility/wchar.h: Guard extra wchar_t functionality.
+ * include/c_std/std_cwchar.h: Same.
+ * include/c_std/std_cwctype.h: Same.
+
+2003-09-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/11065
+ * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_is): Fix.
+ * config/locale/generic/ctype_members.cc: Same.
+ * testsuite/22_locale/ctype/is/char/1.cc: Initialize mask.
+ * testsuite/22_locale/ctype/is/wchar_t/1.cc: Same.
+
+ * config/os/generic/ctype_inline.h: Update.
+
+2003-09-25 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * src/Makefile.am (version_dep): New variable.
+ (libstdc___la_DEPENDENCIES): Use it to add dependency on
+ libstdc++-symbol.ver only when using symbol versioning.
+ * src/Makefile.in: Regenerate.
+
+2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc: Tweak to avoid warnings.
+ * testsuite/testsuite_hooks.h: Same.
+ * testsuite/*/*.cc: Same.
+
+2003-09-22 Petur Runolfsson <peturr02@ru.is>
+
+ * include/bits/istream.tcc (basic_istream::read,
+ basic_istream::readsome, basic_istream::putback,
+ basic_istream::unget, operator>>(basic_istream, CharT)):
+ Avoid redundant setstate(failbit) calls when sentry::operator bool()
+ returns false.
+
+2003-09-22 Carlo Wood <carlo@alinoe.com>
+
+ PR libstdc++/12365
+ * include/bits/demangle.h (qualifier(int, cv_qualifier_nt,
+ char const*, int, int)): Remove unused identifier
+ cv_qualifier for overloaded constructor.
+
+2003-09-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/11504
+ * acinclude.m4 (GLIBCXX_EXPORT_FLAGS): Add -Wcast-qual to
+ WARN_FLAGS, remove -Wno-format.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-09-18 Petur Runolfsson <peturr02@ru.is>
+
+ * config/io/basic_file_stdio.cc (sys_getc, sys_ungetc): Delete.
+ * config/io/basic_file_stdio.h: Same.
+ * include/std/std_fstream.h (__ctype_type): Delete.
+ * include/std/std_streambuf.h (__ctype_type, __state_type): Delete.
+
+2003-09-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/12239
+ * configure.host (abi_baseline_pair): Error out on solaris2
+ configurations without a minor version number.
+
+2003-09-13 Phil Edwards <phil@codesourcery.com>
+
+ * docs/doxygen/run_doxygen: Clear GENERATE_TAGFILE entirely
+ if man pages are on.
+ * docs/doxygen/user.cfg.in: And here.
+
+2003-09-10 Daniel Jacobowitz <drow@mvista.com>
+ Andreas Jaeger <aj@suse.de>
+
+ PR libstdc++/12189
+ * acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Don't build
+ abi_check if cross compiling.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-09-10 Jeffrey D. Oldham <oldham@codesourcery.com>
+
+ * libsupc++/vec.cc (__cxa_vec_new2): If the allocator returns
+ NULL, return NULL. This reflects a C++ ABI change 2003 Sep 05.
+ (__cxa_vec_new3): Likewise.
+
+2003-09-10 Petur Runolfsson <peturr02@ru.is>
+
+ * include/bits/fstream.tcc (basic_filebuf::seekoff):
+ Use codecvt::length to handle variable-width stateless encodings
+ correctly.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc: New test.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc: New test.
+
+2003-09-10 Alan Modra <amodra@bigpond.net.au>
+
+ * config/io/basic_file_stdio.cc (_M_open_mode): Assign __p_mode
+ rather than or'ing.
+
+2003-09-09 Alan Modra <amodra@bigpond.net.au>
+
+ * configure: Regenerate.
+
+2003-09-09 David Edelsohn <edelsohn@gnu.org>
+
+ * src/ios.cc (ios_base::Init::Init): Remove unnecessary
+ qualifier from _S_synced_with_stdio.
+
+2003-09-09 Bernardo Innocenti <bernie@develer.com>
+
+ * include/c_std/std_cstdlib.h: Avoid using missing C library symbols.
+
+2003-09-04 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9028
+ * include/bits/fstream.tcc
+ (basic_filebuf::_M_destroy_internal_buffer): Destroy _M_ext_buf.
+ (basic_filebuf::basic_filebuf): Initialize _M_ext_buf,
+ _M_ext_buf_size, _M_ext_next and _M_ext_end.
+ (basic_filebuf::underflow): Handle variable-width stateless
+ encodings (codecvt::encoding() == 0), including UTF-8.
+ * include/std/std_fstream.h (basic_filebuf):
+ Declare _M_ext_buf, _M_ext_buf_size, _M_ext_next, _M_ext_end.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc: New test.
+ * testsuite/27_io/objects/wchar_t/12.cc: New test.
+ * testsuite/27_io/objects/wchar_t/13.cc: New test.
+
+2003-09-04 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Note that a namespace alias can't be
+ used when specialising templates in extension namespace.
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-09-03 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/12048
+ * include/ext/stdio_sync_filebuf.h
+ (stdio_sync_filebuf::_M_unget_buf): Declare it.
+ (stdio_sync_filebuf::stdio_sync_filebuf): Initialize _M_unget_buf.
+ (stdio_sync_filebuf::uflow): Store the returned character in
+ _M_unget_buf.
+ (stdio_sync_filebuf::pbackfail): If argument is eof(), pass
+ _M_unget_buf to syncungetc(). Set _M_unget_buf to eof().
+ (stdio_sync_filebuf<char>::xsgetn): Store last read character in
+ _M_unget_buf, if any, else eof().
+ (stdio_sync_filebuf<wchar_t>::xsgetn: Store last read character in
+ _M_unget_buf, if any, else eof().
+ * testsuite/27_io/objects/char/12048.cc: Rename to...
+ * testsuite/27_io/objects/char/12048-1.cc: ...this.
+ * testsuite/27_io/objects/char/12048-2.cc: New test.
+ * testsuite/27_io/objects/char/12048-3.cc: New test.
+ * testsuite/27_io/objects/char/12048-4.cc: New test.
+ * testsuite/27_io/objects/char/12048-5.cc: New test. XFAIL.
+ * testsuite/27_io/objects/wchar_t/12048-1.cc: New test.
+ * testsuite/27_io/objects/wchar_t/12048-2.cc: New test.
+ * testsuite/27_io/objects/wchar_t/12048-3.cc: New test.
+ * testsuite/27_io/objects/wchar_t/12048-4.cc: New test.
+ * testsuite/27_io/objects/wchar_t/12048-5.cc: New test. XFAIL.
+ * testsuite/ext/stdio_sync_filebuf_char.cc
+ (test02, test03, test04, test05): New tests.
+ * testsuite/ext/stdio_sync_filebuf_wchar_t.cc
+ (test02, test03, test04, test05): New tests.
+
+2003-09-03 Petur Runolfsson <peturr02@ru.is>
+
+ * docs/html/27_io/howto.html: setbuf(0, 0) has no effect on
+ stringbuf or strstreambuf. Fix typos.
+
+2003-09-02 Phil Edwards <phil@codesourcery.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_HOSTED): #define _GLIBCXX_HOSTED
+ appropriately.
+ * config.h.in: Add _GLIBCXX_HOSTED.
+ * libsupc++/eh_term_handler.cc: Test it here; initialize
+ __terminate_handler to std::abort if freestanding.
+ * aclocal.m4, configure: Regenerated.
+ * docs/html/configopts.html: Document --disable-hosted-libstdcxx.
+
+2003-08-29 Nathan Myers <ncm@cantrip.org>
+
+ PR libstdc++/11990
+ * include/bits/locale_facets.tcc (__pad): delete dead code.
+
+2003-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.ac: Test $with_cross_host against $build_alias, not $build.
+ * configure: Regenerate.
+
+2003-08-27 Petur Runolfsson <peturr02@ru.is>
+
+ * testsuite/27_io/objects/wchar_t/10.cc: Move wcout stuff...
+ * testsuite/27_io/objects/wchar_t/11.cc: ...here. New file.
+
+2003-08-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.am: Remove trailing whitespace. Remove needless
+ "foo = @foo@" assignments. Replace direct uses of @foo@ with $(foo).
+ * include/Makefile.am: Likewise.
+ * libmath/Makefile.am: Likewise.
+ * libsupc++/Makefile.am: Likewise.
+ * po/Makefile.am: Likewise.
+ * src/Makefile.am: Likewise.
+ * testsuite/Makefile.am: Likewise.
+
+ * Makefile.in, include/Makefile.in, libmath/Makefile.in,
+ libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
+ testsuite/Makefile.in: Regenerated.
+
+2003-08-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_EXPORT_INCLUDES): Change quoting of
+ includedir.
+ * aclocal.m4, configure: Regenerate.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * acinclude.m4: Include no-executables.m4.
+ * configure.ac: Uncomment GCC_NO_EXECUTABLES.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * acinclude.m4: Don't call AC_ISC_POSIX.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-08-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_CONDITIONAL): New macro. Wrap
+ AM_CONDITIONAL. Replace all calls to AM_CONDITIONAL with this one.
+ (GLIBCXX_ENABLE_HOSTED): New macro, sets new variable is_hosted,
+ used elsewhere in this file.
+ (GLIBCXX_EVALUATE_CONDITIONALS): New macro...
+ * configure.ac: ...called here to expand all conditionals.
+ * Makefile.am: Conditionalize SUBDIRS on GLIBCXX_HOSTED.
+ * include/Makefile.am: Remove redundant gxx_include_dir assignment.
+ (install-freestanding-headers): New target, a subset of
+ install-headers. Conditionalize install-data-local on GLIBCXX_HOSTED.
+
+ * aclocal.m4, configure, Makefile.in, include/Makefile.in,
+ libmath/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
+ src/Makefile.in, testsuite/Makefile.in: Regenerated.
+
+2003-08-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/run_doxygen: Shell fixes. Remove hardcoded local
+ pathnames from generated tag file.
+
+2003-08-26 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.am: Add comment.
+ * acinclude.m4 (GLIBCXX_CONFIGURE): Set new glibcxx_SUBDIRS and
+ SUBDIRS variables.
+ * configure.ac: Use them both here, instead of hardcoded lists.
+
+ * fragment.am: Add STAMP varaible.
+ * include/Makefile.am: Cosmetic whitespace cleanup. Use $(LN_S)
+ instead of @LN_S@.
+ (stamp-*): Move file creation rule outside of 'if' branches to
+ ensure the stamp-* files are actually updated. Use $(STAMP).
+ * src/Makefile.am: Remove now-nonexistant variable.
+ * libsupc++/Makefile.am: Likewise. Snap the assignment chain
+ for -prefer-pic.
+ * po/Makefile.am: Include same fragment as all the others.
+
+ * aclocal.m4, configure, Makefile.in, include/Makefile.in,
+ libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in: Regenerated.
+
+2003-08-26 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/data/cin_unget-1.txt: New.
+ * testsuite/27_io/objects/char/12048.cc: New.
+
+2003-08-25 Zack Weinberg <zack@codesourcery.com>
+
+ * config/os/hpux/os_defines.h: Unconditionally define
+ _GLIBCXX_GTHREAD_USE_WEAK to 0.
+
+2003-08-19 Geoffrey Keating <geoffk@apple.com>
+
+ * crossconfig.m4 (*-darwin*): Add a large and boring stanza for
+ crosses to Darwin targets.
+ * configure: Regenerate.
+
+2003-08-19 Petur Runolfsson <peturr02@ru.is>
+
+ * include/ext/ropeimpl.h: #include <ostream> instead of <iostream>
+
+2003-08-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.ac: GCC_NO_EXECUTABLES was supposed to be commented
+ in the patch from 3 minutes ago. Boy, is my face red.
+ * configure: At least I remembered to regenerate this.
+
+2003-08-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_EXPORT_INCLUDES): Remove LIBMATH_INCLUDES
+ and LIBSUPCXX_INCLUDES. Re-purpose TOPLEVEL_INCLUDES to refer to
+ things from the top level.
+ * configure.ac (GLIBCXX_IS_NATIVE): Determine earlier and re-order.
+ Comment out the conditionals for CANADIAN and GLIBCXX_BUILD_LIBMATH
+ (currently unused). Strip the fake-VPATH shell fragment from
+ automake-generated rules, if present.
+ * linkage.m4: Add comment.
+
+ * fragment.am: New file, containing factored-out common settings.
+ (AM_CPPFLAGS): Absorb the deprecated INCLUDES variable contents.
+ * Makefile.am: Include fragment.am. Remove common variables.
+ * include/Makefile.am: Likewise.
+ * libmath/Makefile.am: Likewise.
+ * libsupc++/Makefile.am: Likewise.
+ * po/Makefile.am: Likewise. Print rules during check.
+ * src/Makefile.am: Likewise.
+ * testsuite/Makefile.am: Likewise.
+
+ * aclocal.m4, configure, Makefile.in, include/Makefile.in,
+ libmath/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
+ src/Makefile.in, testsuite/Makefile.in: Regenerate.
+
+2003-08-11 John Levon <levon@movementarian.org>
+
+ * docs/html/ext/howto/guide.html (GLIBCXX_FORCE_NEW): Update
+ remaining places for the name change from GLIBCPP_FORCE_NEW
+ to GLIBCXX_FORCE_NEW
+
+2003-08-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_ios.h: Remove *_iter typedefs, change num*
+ typedefs to num_*.
+ * include/bits/basic_ios.tcc: Same.
+ * include/bits/istream.tcc: Same.
+ * include/bits/locale_facets.h: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/std/std_istream.h: Same.
+ * include/std/std_ostream.h: Same.
+ * testsuite/26_numerics/complex_inserters_extractors.cc: Fix.
+
+ * include/ext/rope: Remove build warning.
+
+2003-08-11 Andreas Jaeger <aj@suse.de>
+
+ * include/Makefile.am (stamp-c_base): Add dependency on stamp-bits
+ to make SMP-safe.
+ * include/Makefile.in: Regenerated.
+
+2003-08-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_CONFIGURE): Unprecious CC and CFLAGS
+ when calling AC_PROG_CC.
+ * aclocal.m4, configure: Regenerate.
+
+2003-08-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Properly quote variable which will be expanded
+ inside makefiles. Use CXX instead of CC to extract compiler info.
+ * configure.ac (AC_INIT): Use the new 4-arg form to finally get the
+ correct form in PACKAGE.
+ * aclocal.m4, configure: Regenerate.
+
+2003-08-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/Makefile.am (check-abi): Change libstdc++-v3 to libstdc++.
+ (check-abi-verbose): Same.
+ * testsuite/testsuite_performance.h (report_performance): Same.
+
+2003-08-08 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/testsuite_performance.h (__FreeBSD__): Add fake mallinfo.
+
+2003-08-07 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/char_traits.h (char_traits::not_eof): Match operand
+ types in ? :.
+
+2003-08-07 Bernardo Innocenti <bernie@develer.com>
+
+ PR libstdc++/11784
+ * libstdc++-v3/config/cpu/m68k/atomicity.h (__exchange_and_add):
+ Replace variants with new BSET-based version.
+
+2003-08-07 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/demangle.h: Do not use cctype functions that depend
+ on locale.
+
+2003-08-05 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in: Rename...
+ * configure.ac: ...to this.
+ * docs/html/17_intro/porting.texi: Update name.
+
+ * docs/html/17_intro/porting.html: Regenerate.
+ * config.h.in, Makefile.in, include/Makefile.in, libmath/Makefile.in,
+ libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
+ testsuite/Makefile.in: Regenerate (picks up new dependancy).
+
+2003-08-05 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Put down the crack
+ pipe, open the window to let out the fumes, redo the option-handling
+ logic to properly execute the detection test.
+ * aclocal.m4, configure: Regenerate.
+
+2003-08-04 Phil Edwards <pme@gcc.gnu.org>
+
+ Convert to new autotools.
+ * acconfig.h: Update with correct names.
+ * configure.host (ATOMICITYH): Rename to atomicity_include_dir.
+ (qnx6.[12]*): 'q' comes before 's', not after 'w'.
+ * configure.in: Update. Split hardcoded cross-configury settings
+ out to...
+ * crossconfig.m4: ...here. New file. Contents untouched.
+ * acinclude.m4: Reorganize and rewrite as needed. Split large
+ chunks out to...
+ * linkage.m4: ...here. New file. Math and stdlib linkage tests.
+ Contents untouched.
+ * scripts/testsuite_flags.in: Update.
+
+ * Makefile.am: Remove unneeded AUTOMAKE_OPTIONS settings and other
+ variables (already generated by automake).
+ * include/Makefile.am: Ditto.
+ * libmath/Makefile.am: Ditto.
+ * libsupc++/Makefile.am: Ditto.
+ * po/Makefile.am: Ditto.
+ * src/Makefile.am: Ditto.
+
+ * aclocal.m4: Regenerate using new versions.
+ * config.h.in: Ditto.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * include/Makefile.in: Ditto.
+ * libmath/Makefile.in: Ditto.
+ * libsupc++/Makefile.in: Ditto.
+ * po/Makefile.in: Ditto.
+ * src/Makefile.in: Ditto.
+ * testsuite/Makefile.in: Ditto.
+
+2003-08-04 Phil Edwards <pme@gcc.gnu.org>
+
+ * po/libstdc++.pot: Re-extract/regenerate.
+
+2003-08-04 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am (DEJATOOL,EXPECT,RUNTEST,RUNTESTFLAGS):
+ Remove unneeded variable assignments. Leave them for automake.
+ * testsuite/lib/libstdc++-v3.exp: Rename...
+ * testsuite/lib/libstdc++.exp: ...to this. Adjust function names
+ accordingly.
+ * testsuite/libstdc++-v3.dg/dg.exp: Rename...
+ * testsuite/libstdc++-dg/normal.exp: ...to this. Adjust function
+ names accordingly.
+
+2003-08-04 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/guide.html: run_doxygen uses bash.
+ * docs/doxygen/mainpage.html: We'll be shipping tag files.
+ * docs/doxygen/run_doxygen: Tweaks and improvements.
+ * docs/doxygen/user.cfg.in: Set GENERATE_TAGFILE.
+ * docs/html/install.html: Update autoconf/automake requirements.
+ * docs/html/test.html: Add section describing DejaGNU support.
+ * docs/html/17_intro/confdeps.dot: New file, generates...
+ * docs/html/17_intro/confdeps.png: ...this new file.
+ * docs/html/Makefile: Generated here.
+ * docs/html/17_intro/configury.html: New file.
+
+2003-07-31 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/lib/libstdc++-v3-dg.exp: Rename...
+ * testsuite/lib/libstdc++-v3.exp: ...to this.
+ * testsuite/libstdc++-v3.dg/dg.exp: No special case needed now.
+
+2003-07-31 Doug Gregor <dgregor@apple.com>
+
+ Add user specialization tests.
+ * testsuite/23_containers/deque/1.cc: New.
+ * testsuite/23_containers/list/1.cc: New.
+ * testsuite/23_containers/map/1.cc: New.
+ * testsuite/23_containers/multimap/1.cc: New.
+ * testsuite/23_containers/multiset/1.cc: New.
+ * testsuite/23_containers/set/1.cc: New.
+ * testsuite/23_containers/vector/1.cc: New.
+
+2003-07-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ Reshuffle 23_containers testsuite.
+ * 23_containers/adaptors.cc, bitset_ctor.cc,bitset_members.cc,
+ bitset_shift.cc, deque_ctor.cc, deque_operators.cc,
+ list_capacity.cc, list_ctor.cc, list_modifiers.cc, list_operators.cc,
+ map_insert.cc, map_operators.cc, map_operators_neg.cc, multiset.cc,
+ set_operators_neg.cc, vector_bool.cc, vector_capacity.cc,
+ vector_ctor.cc, vector_element_access.cc, vector_modifiers.cc,
+ vector_resize.cc: Split into...
+ * 23_containers/bitset/cons/1.cc: New.
+ * 23_containers/bitset/cons/6282.cc: New.
+ * 23_containers/bitset/count/6124.cc: New.
+ * 23_containers/bitset/operations/1.cc: New.
+ * 23_containers/bitset/operations/2.cc: New.
+ * 23_containers/bitset/test/1.cc: New.
+ * 23_containers/bitset/to_ulong/1.cc: New.
+ * 23_containers/deque/cons/1.cc: New.
+ * 23_containers/deque/cons/2.cc: New.
+ * 23_containers/deque/operators/1.cc: New.
+ * 23_containers/list/capacity/1.cc: New.
+ * 23_containers/list/cons/1.cc: New.
+ * 23_containers/list/cons/2.cc: New.
+ * 23_containers/list/cons/3.cc: New.
+ * 23_containers/list/cons/4.cc: New.
+ * 23_containers/list/cons/5.cc: New.
+ * 23_containers/list/cons/6.cc: New.
+ * 23_containers/list/cons/7.cc: New.
+ * 23_containers/list/cons/8.cc: New.
+ * 23_containers/list/cons/9.cc: New.
+ * 23_containers/list/modifiers/1.cc: New.
+ * 23_containers/list/modifiers/2.cc: New.
+ * 23_containers/list/modifiers/3.cc: New.
+ * 23_containers/list/operators/1.cc: New.
+ * 23_containers/list/operators/2.cc: New.
+ * 23_containers/list/operators/3.cc: New.
+ * 23_containers/list/operators/4.cc: New.
+ * 23_containers/map/insert/1.cc: New.
+ * 23_containers/map/operators/1.cc: New.
+ * 23_containers/map/operators/1_neg.cc: New.
+ * 23_containers/multiset/insert/1.cc: New.
+ * 23_containers/priority_queue/members/7161.cc: New.
+ * 23_containers/queue/members/7157.cc: New.
+ * 23_containers/set/operators/1_neg.cc: New.
+ * 23_containers/stack/members/7158.cc: New.
+ * 23_containers/vector/bool/1.cc: New.
+ * 23_containers/vector/bool/6886.cc: New.
+ * 23_containers/vector/capacity/1.cc: New.
+ * 23_containers/vector/capacity/2.cc: New.
+ * 23_containers/vector/capacity/8230.cc: New.
+ * 23_containers/vector/cons/1.cc: New.
+ * 23_containers/vector/cons/2.cc: New.
+ * 23_containers/vector/cons/3.cc: New.
+ * 23_containers/vector/cons/4.cc: New.
+ * 23_containers/vector/cons/6513.cc: New.
+ * 23_containers/vector/element_access/1.cc: New.
+ * 23_containers/vector/modifiers/1.cc: New.
+ * 23_containers/vector/modifiers/2.cc: New.
+ * 23_containers/vector/resize/1.cc: New.
+
+2003-07-31 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * testsuite/thread/pthread1.cc: Add alpha*-*-osf* to dg-do run,
+ dg-options.
+ * testsuite/thread/pthread2.cc: Likewise.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread6.cc: Likewise.
+ * testsuite/thread/pthread7-rope.cc: Likewise.
+
+2003-07-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/c++config: Partial reversion (comment placement) of
+ previous patch.
+
+2003-07-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config (_GLIBCXX_FULLY_COMPLIANT_HEADERS): Remove.
+ (_GLIBCXX_NO_TEMPLATE_EXPORT): To _GLIBCXX_EXPORT_TEMPLATE.
+ (_GLIBCXX_AT_AT): Remove.
+ (__USE_MALLOC): Remove.
+ * include/std/std_fstream.h: Modify.
+ * include/bits/basic_ios.h: Same.
+ * include/bits/valarray_array.h: Same.
+ * include/c_std/std_cmath.h: Same.
+ * include/c_std/cmath.tcc: Same.
+ * include/std/std_vector.h: Same.
+ * include/std/std_string.h: Same.
+ * include/std/std_stack.h: Same.
+ * include/std/std_queue.h: Same.
+ * include/std/std_list.h: Same.
+ * include/std/std_deque.h: Same.
+ * include/std/std_streambuf.h: Same.
+ * include/std/std_sstream.h: Same.
+ * include/std/std_ostream.h: Same.
+ * include/std/std_istream.h: Same.
+ * include/bits/valarray_array.tcc: Same, format.
+
+ * include/c/std_cctype.h: Fix include guards.
+ * include/c/std_cerrno.h: Same.
+ * include/c/std_cfloat.h: Same.
+ * include/c/std_climits.h: Same.
+ * include/c/std_clocale.h: Same.
+ * include/c/std_cmath.h: Same.
+ * include/c/std_csetjmp.h: Same.
+ * include/c/std_csignal.h: Same.
+ * include/c/std_cstdarg.h: Same.
+ * include/c/std_cstddef.h: Same.
+ * include/c/std_cstdio.h: Same.
+ * include/c/std_cstdlib.h: Same.
+ * include/c/std_cstring.h: Same.
+ * include/c/std_ctime.h: Same.
+ * include/c/std_cwchar.h: Same.
+ * include/c/std_cwctype.h: Same.
+ * include/c_std/cmath.tcc: Same.
+ * include/c_std/std_cmath.h: Same.
+
+2003-07-30 Gawain Bolton <gp.bolton@computer.org>
+
+ PR libstdc++/11504.
+ * include/bits/stl_tree.h: Replace C-style casts with C++-style
+ casts. Changes to avoid casting away constness. Eliminate
+ _Rb_tree_base_iterator class. Change _Rb_tree_iterator to use
+ initialization lists. Move out implementation of __black_count()
+ to...
+ * src/stl_tree.cc: ...here and rename _Rb_tree_black_count().
+ Rename_Rb_tree_base_iterator::_M_increment() to
+ _Rb_tree_increment and _Rb_tree_base_iterator::_M_decrement() to
+ _Rb_tree_decrement.
+ * config/linker-map.gnu: Add and change symbols here.
+
+2003-07-30 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/22_locale/howto.html: Use locale::classic() instead
+ of locale("C").
+
+2003-07-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_hooks.h: Remove list include.
+ (func_callback): Define as unique type, not std::list.
+ Change DEBUG_ASSERT to _GLIBCXX_ASSERT.
+ * testsuite/libstdc++-v3.dg/dg.exp: Same.
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Same.
+ * testsuite/23_containers/bitset_ctor.cc:
+ * testsuite/17_intro/header_ciso646.cc: Remove DEBUG_ASSERT.
+ * testsuite/18_support/numeric_limits.cc: Same.
+ * testsuite/21_strings/basic_string/append/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/append/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/compare/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/char/2.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/char/3.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Same.
+ * testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Same.
+ * testsuite/21_strings/basic_string/find/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/find/char/2.cc: Same.
+ * testsuite/21_strings/basic_string/find/char/3.cc: Same.
+ * testsuite/21_strings/basic_string/find/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/find/wchar_t/2.cc: Same.
+ * testsuite/21_strings/basic_string/find/wchar_t/3.cc: Same.
+ * testsuite/21_strings/basic_string/insert/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/insert/char/2.cc: Same.
+ * testsuite/21_strings/basic_string/insert/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/insert/wchar_t/2.cc: Same.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
+ * testsuite/21_strings/basic_string/operators/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/operators/char/2.cc: Same.
+ * testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Same.
+ * testsuite/21_strings/basic_string/replace/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/char/2.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/char/3.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/wchar_t/1.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: Same.
+ * testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: Same.
+ * testsuite/21_strings/basic_string/substr/char/1.cc: Same.
+ * testsuite/21_strings/basic_string/substr/wchar_t/1.cc: Same.
+ * testsuite/23_containers/bitset_ctor.cc: Same.
+ * testsuite/23_containers/bitset_shift.cc: Same.
+ * testsuite/23_containers/vector_ctor.cc: Same.
+ * testsuite/23_containers/vector_element_access.cc: Same.
+ * testsuite/24_iterators/istreambuf_iterator.cc: Same.
+ * testsuite/24_iterators/iterator.cc: Same.
+ * testsuite/24_iterators/ostreambuf_iterator.cc: Same.
+ * testsuite/25_algorithms/lower_bound.cc: Same.
+ * testsuite/26_numerics/complex_inserters_extractors.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc: Same.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc: Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
+ Same.
+
+2003-07-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/user.cfg.in, docs/html/abi.txt, docs/html/debug.html,
+ docs/html/test.html, docs/html/17_intro/headers_cc.txt,
+ docs/html/17_intro/howto.html, docs/html/ext/howto.html: Change
+ GLIBCPP to GLIBCXX (and explain as needed).
+
+2003-07-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * README: Update.
+
+2003-07-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/22_locale/messages/members/char/1.cc,
+ testsuite/22_locale/messages/members/char/2.cc,
+ testsuite/22_locale/messages/members/char/3.cc,
+ testsuite/22_locale/messages_byname/1.cc: Update comment regarding
+ the origin of LOCALEDIR.
+ * testsuite/lib/libstdc++-v3.exp: New file.
+
+2003-07-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/char_traits.h: Update copyright, tweak.
+ * testsuite/ext/pod_char_traits.cc: Explicitly qualify namespace
+ std types.
+
+2003-07-24 Matt Austern <austern@apple.com>
+
+ * /include/bits/char_traits.h (class char_traits): Put all the
+ real work into the new class template __gnu_cxx::char_traits.
+ Gave generic definitions for member functions. Types are taken
+ from the new class template __gnu_cxx::_Char_types.
+ * testsuite/21_strings/char_traits/requirements/short/1.cc: New
+ file. Test of std::char_traits<short>, which serves as a test of
+ the char_traits primary template.
+
+2003-07-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/*: Change __gnu_cxx_test to __gnu_test.
+
+2003-07-24 Nathan Myers <ncm-nospam@cantrip.org>
+
+ * testsuite/23_containers/map_operators.cc: Conform to
+ container requirement as value must be Assignable.
+
+2003-07-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_PCH): Rework test such that it
+ tests not only generation of pch files, but also their use.
+ * aclocal.m4, configure: Rebuilt.
+
+2003-07-23 Steve Ellcey <sje@cup.hp.com>
+
+ * config/cpu/hppa/atomicity.h: Change
+ _GLIBCXX_INST_GLIBCXX_ATOMICITY_LOCK to _GLIBCXX_INST_ATOMICITY_LOCK
+ to match misc-inst.cc
+
+2003-07-23 Steve Ellcey <sje@cup.hp.com>
+
+ * include/c_std/cmath.tcc: Use _GLIBCXX_ prefix on file guard.
+ * include/c_std/std_cctype.h: Ditto.
+ * include/c_std/std_cerrno.h: Ditto.
+ * include/c_std/std_cfloat.h: Ditto.
+ * include/c_std/std_climits.h: Ditto.
+ * include/c_std/std_clocale.h: Ditto.
+ * include/c_std/std_cmath.h: Ditto.
+ * include/c_std/std_csetjmp.h: Ditto.
+ * include/c_std/std_csignal.h: Ditto.
+ * include/c_std/std_cstdarg.h: Ditto.
+ * include/c_std/std_cstddef.h: Ditto.
+ * include/c_std/std_cstdio.h: Ditto.
+ * include/c_std/std_cstdlib.h: Ditto.
+ * include/c_std/std_cstring.h: Ditto.
+ * include/c_std/std_ctime.h: Ditto.
+ * include/c_std/std_cwchar.h: Ditto.
+ * include/c_std/std_cwctype.h: Ditto.
+ * include/std/std_algorithm.h: Ditto.
+ * include/std/std_bitset.h: Ditto.
+ * include/std/std_complex.h: Ditto.
+ * include/std/std_deque.h: Ditto.
+ * include/std/std_fstream.h: Ditto.
+ * include/std/std_functional.h: Ditto.
+ * include/std/std_iomanip.h: Ditto.
+ * include/std/std_ios.h: Ditto.
+ * include/std/std_iosfwd.h: Ditto.
+ * include/std/std_iostream.h: Ditto.
+ * include/std/std_istream.h: Ditto.
+ * include/std/std_iterator.h: Ditto.
+ * include/std/std_limits.h: Ditto.
+ * include/std/std_list.h: Ditto.
+ * include/std/std_locale.h: Ditto.
+ * include/std/std_map.h: Ditto.
+ * include/std/std_memory.h: Ditto.
+ * include/std/std_numeric.h: Ditto.
+ * include/std/std_ostream.h: Ditto.
+ * include/std/std_queue.h: Ditto.
+ * include/std/std_set.h: Ditto.
+ * include/std/std_sstream.h: Ditto.
+ * include/std/std_stack.h: Ditto.
+ * include/std/std_stdexcept.h: Ditto.
+ * include/std/std_streambuf.h: Ditto.
+ * include/std/std_string.h: Ditto.
+ * include/std/std_utility.h: Ditto.
+ * include/std/std_valarray.h: Ditto.
+ * include/std/std_vector.h: Ditto.
+
+2003-07-22 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/basic_string.h (basic_string::insert): Deprecate
+ GNU extension.
+
+2003-07-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ * scripts/testsuite_flags.in (--build-includes): Remove extraneous
+ paths for libio.
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc
+ (test03): Include typeinfo for bad_cast.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same.
+
+2003-07-21 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/boost_concept_check.h:
+ (_EqualityComparableConcept::__constraints): Remove != from the
+ list of constraints; it is not listed in Table 28 of the C++98
+ standard.
+
+2003-07-18 Andreas Jaeger <aj@suse.de>
+
+ * config/abi/sparc-linux-gnu/baseline_symbols.txt: New file.
+ * config/abi/mips-linux-gnu/baseline_symbols.txt: New file.
+ * config/abi/hppa-linux-gnu/baseline_symbols.txt: New file.
+ * config/abi/x86_64-linux-gnu/baseline_symbols.txt: Regenerated.
+
+2003-07-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Add __moneypunct_cache, __timepunct_cache.
+ * config/locale/generic/messages_members.h: Tweaks.
+ * config/locale/generic/monetary_members.cc
+ (moneypunct::_M_initialize_moneypunct): Use cache.
+ (moneypunct::~moneypunct): Delete cache.
+ * config/locale/generic/time_members.cc:
+ (__timepunct::_M_initialize_timepunct): Use cache.
+ * config/locale/generic/time_members.h:
+ (__timepunct::~__timepunct): Delete cache.
+ (__timepunct::__timepunct): Set cache.
+ * config/locale/gnu/messages_members.h: Tweaks.
+ * config/locale/gnu/monetary_members.cc:
+ (moneypunct::_M_initialize_moneypunct): Use cache.
+ (moneypunct::~moneypunct): Delete cache.
+ * config/locale/gnu/time_members.cc:
+ (__timepunct::_M_initialize_timepunct): Use cache.
+ * config/locale/gnu/time_members.h:
+ (__timepunct::~__timepunct): Delete cache.
+ (__timepunct::__timepunct): Set cache.
+ * include/bits/locale_facets.h (__timepunct_cache): New.
+ (__moneypunct_cache): New.
+ * include/bits/locale_facets.tcc: Tweak.
+ * src/locale.cc (__timepunct::_S_timezones): Adjust for cache.
+ * src/locale-inst.cc: Instantiate caches.
+ * src/globals.cc: Add "C" caches.
+ * src/localename.cc: Use external "C" caches.
+
+2003-07-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/guide.html: Fix typo.
+
+2003-07-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/pod_char_traits.h: Add state template argument.
+
+2003-07-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (__num_base::_S_atoms_in): Add -+xX.
+ (num_get::_M_convert_int): To _M_insert_int.
+ (num_get::_M_convert_float): To _M_insert_float.
+ * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+ Use caches for ctype, num_get.
+ (num_get::_M_extract_int): Same.
+ (num_get::get(bool)): Same.
+ (__verify_grouping): Use size_t.
+ * src/locale-inst.cc: Update.
+ * src/locale.cc: Adjust _S_atoms_in.
+
+2003-07-16 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/mainpage.html: Move building/writing instructions...
+ * docs/doxygen/guide.html: ...to here. New file.
+
+2003-07-16 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/ext/howto.html: Update URL for SGI STL docs.
+ * docs/html/faq/index.html: Same.
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-07-16 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11528
+ * include/bits/locale_facets.tcc (money_get::do_get):
+ Strip only _leading_ zeros.
+ * testsuite/22_locale/money_get/get/char/11528.cc: Add.
+ * testsuite/22_locale/money_get/get/wchar_t/11528.cc: Add.
+
+2003-07-16 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * include/ext/hash_map (class hash_multimap): Remove extra
+ semicolons from __glibcxx_class_requires3 entries.
+ * include/ext/hash_set (class hash_set): Ditto.
+ (class hash_multiset): Ditto.
+
+2003-07-15 Petur Runolfsson <peturr02@ru.is>
+
+ * include/bits/char_traits.h (char_traits<wchar_t>::move):
+ Change last parameter from int_type to size_t.
+
+2003-07-15 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/stl_algo.h (includes, set_union, set_intersection,
+ set_difference, set_symmetric_difference, max_element, min_element,
+ next_permutation, prev_permutation, find_first_of, find_end):
+ Document.
+ * include/bits/stl_algobase.h (copy,copy_backward): Clarify overlap
+ restrictions in docs.
+ * include/bits/stl_heap.h (push_heap, pop_heap, make_heap, sort_heap):
+ Document.
+ * docs/doxygen/doxygroups.cc (setoperations): New group.
+
+2003-07-15 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/basic_string.h: Document public functions.
+ * docs/doxygen/TODO: Update c21 todo.
+
+2003-07-15 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/stl_list.h: Document more functions.
+ * docs/doxygen/TODO: Update c23 todo.
+
+2003-07-14 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/gnu/c_locale.h (__convert_from_v): One more
+ qualification.
+
+2003-07-14 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_tempbuf.h: Qualify free with std::.
+ * src/locale.cc: Include <cstdlib>, qualify getenv.
+
+2003-07-14 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/locale/gnu/c_locale.h (__convert_from_v): Include
+ <cstdio>. Qualify names.
+ * config/locale/generic/c_locale.h (__convert_from_v): Ditto.
+
+2003-07-14 Paolo Carlini <pcarlini@unitus.it>
+ Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ PR libstdc++/11378
+ * include/std/std_fstream.h (xsputn): Declare only.
+ * include/bits/fstream.tcc (xsputn): Define, optimize for the
+ always_noconv() case: when __n is sufficiently large flush
+ the buffer and issue a direct write, if possible combining the
+ two with writev in __basic_file<>::xsputn_2.
+ * config/io/basic_file_stdio.h (__basic_file<>::xsputn_2):
+ New, declare.
+ * config/io/basic_file_stdio.cc (__basic_file<>::xsputn_2):
+ Define.
+ * acinclude.m4 (GLIBCXX_CHECK_WRITE): New macro, checking for
+ the availability of writev in <sys/uio.h>.
+ * configure.in: Call here.
+ * acconfig.h: Add undef for the corresponding symbol.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+ * testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Tweak.
+
+ * include/std/std_fstream.h (sync): Constify a variable.
+
+2003-07-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-07-14 Gabriel Dos Reis <gcc@integrable-solutions.net>
+
+ * config/locale/gnu/c_locale.h (__convert_from_v): Include
+ <cstring> and <cstdlib>. Qualify names.
+
+2003-07-13 Mark Mitchell <mark@codesourcery.com>
+
+ * config/locale/generic/c_locale.h: Include <cstdlib> and
+ <cstring>.
+ * include/bits/boost_concept_check.h: Add this-> to unqualified
+ method calls.
+ * include/bits/deque.tcc: Likewise.
+ * include/bits/locale_facets.h : Likewise.
+ * include/bits/ostream.tcc: Likewise.
+ * include/bits/stl_algo.h: Likewise.
+ * include/bits/stl_bvector.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/bits/vector.tcc: Likewise.
+ * include/ext/rope: Likewise.
+ * include/ext/ropeimpl.h: Likewise.
+ * include/ext/stdio_filebuf.h: Likewise.
+
+2003-07-11 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/basic_ios.h (copyfmt): Document.
+ * include/bits/ios_base.h (event, event_callback, register_callback,
+ xalloc, iword, pword): Document.
+ (imbue, ~ios_base): Update docs on callbacks.
+
+2003-07-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCC_ENABLE_SYMVERS): Tweak comments. Add
+ warning messages if the environment cannot support symbol versioning.
+ (port_specific_symbol_file): It's plural, add an 's' on the end.
+ * configure.host: Likewise.
+ * src/Makefile.am: Likewise.
+ * config/linker-map.gnu: Remove one semicolon, heh.
+ * scripts/extract_symvers: Don't assume useful 'export' syntax.
+ Set LANG as well as LC_ALL for possibly-broken sort(1)s.
+ * aclocal.m4, configure, src/Makefile.in: Regenerated.
+
+2003-07-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc: Use function object for
+ __use_cache instead of template function. Partially specialize for
+ __numpunct<_CharT>.
+ * include/bits/locale_classes.h: Update friend declaration for
+ __use_cache.
+ (_M_install_cache): No throw exception specs.
+ * src/locale.cc: Remove __use_cache specializations.
+ * include/ext/pod_char_traits.h (length): Tweak.
+ * include/bits/locale_facets.h (__numpunct_cache): Remove
+ char_type typedef.
+ * testsuite/testsuite_hooks.h (pod_unsigned_int): Remove.
+ (pod_long): Remove.
+ * testsuite/22_locale/numpunct/members/char/cache_1.cc: New.
+ * testsuite/22_locale/numpunct/members/char/cache_2.cc: New.
+ * testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc: New.
+ * testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc: New.
+ * testsuite/22_locale/numpunct/members/pod/1.cc: New.
+ * testsuite/22_locale/numpunct/members/pod/2.cc: New.
+
+2003-07-09 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/ios.cc (_M_grow_words): Fix spelling.
+
+2003-07-09 Gawain Bolton <gp.bolton@computer.org>
+
+ * include/bits/stl_tree.h: Move larger member functions in
+ _Rb_tree_base_iterator and _Rb_tree_node to...
+ * src/stl_tree.cc: Here.
+ * src/Makefile.in: Add stl_tree.cc.
+ * src/Makefile.in: Regenerated.
+ * config/linker-map.gnu: Add symbols here.
+
+2003-07-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/ext/pod_char_traits.cc: New.
+ * include/ext/pod_char_traits.h: New.
+ * include/Makefile.am (ext_headers): Add pod_char_traits.h.
+ * include/Makefile.in: Regenerate.
+ * docs/html/21_strings/howto.html: Update.
+
+2003-07-08 Gawain Bolton <gp.bolton@computer.org>
+
+ * testsuite/performance/list_create_fill_sort.cc: New.
+
+2003-07-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/generic/numeric_members.cc: Correct type info.
+ * config/locale/gnu/numeric_members.cc: Same.
+ * include/bits/locale_facets.h: Same.
+
+ * include/bits/char_traits.h: Correct spacing.
+
+ * src/locale.cc: Wrap to 80 col.
+
+2003-07-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_complex.h: Partially revert last
+ changes: cmath functions must not be qualified.
+
+2003-07-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Do not test for binutils
+ 2.11 with globbing backport fix.
+ * aclocal.m4, configure: Regenerated.
+
+2003-07-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (xsputn): Don't call _M_destroy_pback:
+ if output is at all possible (!_M_reading), cannot be active.
+
+ * include/std/std_fstream.h: Tweak comments to doxygen style.
+
+2003-07-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/locale_classes.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/locale_facets.tcc: Likewise.
+ * src/locale.cc: Likewise.
+ * src/localename.cc: Likewise.
+
+2003-07-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/allocator_traits.h: Fix doxygen markup.
+ * include/ext/mt_allocator.h: Likewise.
+
+2003-07-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/testsuite_hooks.h: Guard against a missing unlink().
+
+2003-07-05 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Bump minimal version
+ requirement. Add port_specific_symbol_file variable.
+ * configure.host: Add docs for port_specific_symbol_file.
+ Clean up try_cpu block for x86.
+ * config/linker-map.gnu: No more "last symbol can't have a
+ semicolon" kaka. Add hook for port-specific symbols.
+ * src/Makefile.am: Remove trailing whitespace.
+ (libstdc++-symbol.ver): Detect the presence of port-specific
+ symbols, and add them accordingly.
+
+ * docs/html/17_intro/porting.texi: Bring up to date.
+
+ * src/Makefile.in, aclocal.m4, configure,
+ docs/html/17_intro/porting.html: Regenerated.
+
+2003-07-05 Phil Edwards <pme@gcc.gnu.org>
+
+ * scripts/create_testsuite_files: New file.
+ * testsuite/Makefile.am (all-local, check-performance): Use it.
+ * testsuite/lib/libstdc++-v3-dg.exp (v3-computer-tests): Remove.
+ * testsuite/Makefile.in: Regenerated.
+
+ * testsuite/performance/filebuf_sputc.cc: Remove the temporary
+ files at the end.
+ * testsuite/performance/fstream_seek_write.cc: Likewise.
+ * testsuite/performance/ofstream_insert_float.cc: Likewise.
+ * testsuite/performance/ofstream_insert_int.cc: Likewise.
+ * testsuite/abi_check.cc (main): Nicer spacing in usage output.
+
+2003-07-05 Gawain Bolton <gp.bolton@computer.org>
+
+ * include/bits/stl_list.h: Performance and memory usage
+ improvements. In particular, the behaviour of the constructor and
+ destructor as the list header node is no longer dynamically
+ allocated/de-allocated.
+ * include/bits/list.tcc: Likewise.
+
+2003-07-05 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_complex.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/std/std_memory.h: Likewise.
+ * include/std/std_valarray.h: Likewise.
+
+2003-07-05 Gawain Bolton <gp.bolton@computer.org>
+
+ * include/bits/stl_tree.h: _Rb_tree_rebalance(): Add local
+ variable for grandparent and use const
+
+2003-07-05 David Billinghurst <David.Billinghurst@riotinto.com>
+
+ * testsuite/27_io/basic_filebuf/close/char/4879.cc: xfail on cygwin
+ * testsuite/27_io/basic_filebuf/close/char/9964.cc: Ditto
+ * testsuite/27_io/basic_filebuf/open/char/9507.cc: Ditto
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Ditto
+ * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Ditto
+ * testsuite/27_io/objects/char/7.cc: Ditto
+ * testsuite/27_io/objects/char/9661-1.cc: Ditto
+
+2003-07-05 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_bitset.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+
+ * include/std/std_fstream.h: Change comment to doxygen style.
+
+2003-07-05 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_limits.h: More CPP->CXX changes.
+ * scripts/check_survey.in: Likewise.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ Move from CPP to CXX.
+ * include/bits/c++config: Move to GLIBCXX from GLIBCPP.
+ * testsuite/Makefile.am: Same.
+ * testsuite/Makefile.in: Regenerate.
+ * po/Makefile.am: Same.
+ * po/Makefile.in: Regenerate.
+ * libsupc++/Makefile.am: Same.
+ * libsupc++/Makefile.in: Regenerate.
+ * libmath/Makefile.am: Same.
+ * libmath/Makefile.in: Regenerate.
+ * include/Makefile.am: Same.
+ * include/Makefile.in: Regenerate.
+ * src/Makefile.am: Same.
+ * src/Makefile.in: Regenerate.
+ * acconfig.h: Same.
+ * configure.host: Same.
+ * configure.in: Same.
+ * configure: Regenerate.
+ * acinclude.m4: Same.
+ * aclocal.m4: Same.
+ * src: Change all files in this directory.
+ * testsuite: Same.
+ * include: Same, standardize include guards.
+ * config: Same.
+ * libsupc++: Same.
+
+2003-07-04 Zack Weinberg <zack@codesourcery.com>
+
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
+ * testsuite/22_locale/collate/hash/wchar_t/2.cc
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
+ * testsuite/22_locale/collate/transform/wchar_t/2.cc
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
+ XFAIL on all targets.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_PCH): Fix missed variable.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-07-04 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.tcc (__int_to_char): Move common case
+ to the top.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+ Petur Runolfsson <peturr02@ru.is>
+
+ * config/io/basic_file_stdio.cc: Revert.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/deque.tcc: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/gslice_array.h: Likewise.
+ * include/bits/indirect_array.h: Likewise.
+ * include/bits/list.tcc: Likewise.
+ * include/bits/mask_array.h: Likewise.
+ * include/bits/slice_array.h: Likewise.
+
+2003-07-04 Gawain Bolton <gbolton@free.fr>
+
+ * include/bits/stl_tree.h: Performance and memory usage
+ improvements.
+
+2003-07-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am: Replace PWD with PWD_COMMAND.
+ * Makefile.in: Regenerated.
+ * docs/html/Makefile: Likewise.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/valarray_array.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/vector.tcc: Likewise.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am: Update target_ to host_.
+ * include/Makefile.in: Regenerate.
+ * src/Makefile.am: Same.
+ * src/Makefile.in: Regenerate.
+
+ * config/os/gnu-linux/os_defines.h: Remove glibc-2.0 support.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_DEBUG_FLAGS): To
+ --enable-libstdcxx-debug-flags.
+ (GLIBCPP_ENABLE_DEBUG_FLAGS): To --enable-libstdcxx-debug.
+ (GLIBCPP_ENABLE_PCH): To --enable-libstdcxx-pch.
+ * aclocal.m4: Regenerate.
+ * configure: Same.
+ * docs/html/configopts.html: Update.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ Revert the fix for libstdc++/11378.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11378
+ * include/std/std_fstream.h (xsputn): In the unbuffered case,
+ provided always_noconv(), issue directly _M_file.xsputn.
+ * testsuite/performance/filebuf_unbuf_sputn.cc: New.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_list.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/stl_queue.h: Likewise.
+ * include/bits/stl_raw_storage_iter.h: Likewise.
+ * include/bits/stl_tempbuf.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+ * include/bits/stl_uninitialized.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/ext/rope: Change includes order.
+
+2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.host (fpos_include_dir): Fix.
+
+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_heap.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/stl_iterator_base_funcs.h: Likewise.
+
+ * include/bits/stl_algo.h: Qualify __iterator_category too.
+ * include/bits/stl_algobase.h: Likewise.
+ * include/bits/stl_bvector.h: Likewise.
+
+ * include/bits/stl_algo.h: Don't qualify the pair type.
+
+2003-07-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (target_headers): Add fpos.h
+ (bits_headers): Remove.
+ * include/Makefile.in: Regenerate.
+ * configure.in: Add FPOS_INC_SRCDIR, substitute it.
+ * configure: Regenerate.
+ * configure.host: Add fpos_include_dir.
+ * config/os/gnu-linux/fpos.h: New.
+ * config/os/generic/fpos.h: Add.
+ * include/bits/fpos.h: Remove.
+
+ * config/io/c_io_stdio.h: Remove fpos_t typedef.
+
+ * include/bits/fstream.tcc: Tweaks.
+ * include/std/std_fstream.h: Same.
+
+ * testsuite/27_io/fpos/1.cc (test01): Uncomment. Move to...
+ * testsuite/27_io/fpos/mbstate_t/1.cc: ...here.
+ * testsuite/27_io/fpos/mbstate_t/2.cc: Same.
+ * testsuite/27_io/fpos/mbstate_t/3.cc: Same.
+ * testsuite/27_io/fpos/1.cc: New.
+
+2003-07-03 Benjamin Kosnik <bkoz@redhat.com>
+ Petur Runolfsson <peturr02@ru.is>
+
+ * include/std/std_streambuf.h: Remove _M_pos.
+ * config/io/basic_file_stdio.h: Use seekpos instead of seekoff.
+ * config/io/basic_file_stdio.cc: Same, use fseek instead of lseek,
+ use fread/fwrite instead of read/write.
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc: Fix.
+ * testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Close filebufs
+ before reading again.
+ * testsuite/27_io/objects/char/6.cc: Tweak.
+
+2003-07-03 David Edelsohn <edelsohn@gnu.org>
+
+ * testsuite/22_locale/num_put/put/char/7.cc: Guard with
+ _GLIBCPP_USE_WCHAR_T.
+
+2003-07-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.tcc (_M_replace_aux): Constify
+ __n1 and __off1.
+
+2003-07-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_bvector.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+ * include/bits/stl_construct.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+
+2003-07-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/num_put/put/char/7.cc: Include
+ <testsuite_hooks.h>, tweak.
+ * testsuite/22_locale/num_put/put/wchar_t/7.cc: Likewise.
+
+2003-07-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am (AM_MAKEFLAGS): Set to -j1 (affects
+ check* targets, but not libs/programs).
+ * testsuite/Makefile.in: Regenerate.
+
+2003-07-01 Roger Sayle <roger@eyesopen.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_STDLIB_SUPPORT): Fix typo in CXXFLAGS.
+ (GLIBCPP_CHECK_MATH_SUPPORT): Likewise.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-07-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_PCH): Fix obvious error.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-07-01 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11389
+ * include/bits/fstream.tcc (underflow): For encoding() == 0
+ don't read more than __buflen chars.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc: New.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc: New.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc: New.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc: New.
+
+2003-07-01 Jerry Quinn <jlquinn@optonline.net>
+
+ * 22_locale/num_put/put/char/7.cc: New.
+ * 22_locale/num_put/put/wchar_t/7.cc: New.
+
+2003-06-30 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/locale.cc (__use_cache<numpunct>): Revert previous relocation.
+ * include/bits/locale_facets.tcc (__use_cache<numpunct>): Ditto.
+
+2003-06-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * 27_io/basic_filebuf/seekoff/char/1-in.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/1-io.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/1-out.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/2-in.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/2-io.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/2-out.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/2.cc: Remove.
+ * 27_io/basic_filebuf/seekoff/char/3-in.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/3-io.cc: Change.
+ * 27_io/basic_filebuf/seekoff/char/3-out.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/4-io.cc: Remove.
+ * 27_io/basic_filebuf/seekpos/char/1-in.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/1-io.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/1-out.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/2-in.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/2-io.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/2-out.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/2.cc: Change.
+ * 27_io/basic_filebuf/seekpos/char/3-in.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/3-io.cc: Remove.
+ * 27_io/basic_filebuf/seekpos/char/3-out.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/4-io.cc: Remove.
+ * data/seekoff-1.tst: Remove.
+ * data/seekoff-1io.tst: New.
+ * data/seekoff-1out.tst: New.
+ * data/seekoff-2.tst: Remove.
+ * data/seekoff-2io.tst: New.
+ * data/seekoff-2out.tst: New.
+ * data/seekoff.txt
+ * data/seekpos-1.tst: Remove.
+ * data/seekpos-1io.tst: New.
+ * data/seekpos-1out.tst: New.
+ * data/seekpos-2.tst: Remove.
+ * data/seekpos-2io.tst: New.
+ * data/seekpos-2out.tst: New.
+ * data/seekpos.txt: New.
+
+2003-06-30 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/locale.cc (__use_cache<numpunct>): Move from here ...
+ * include/bits/locale_facets.tcc (__use_cache<numpunct>): To
+ here.
+
+2003-06-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algobase.h: Fully qualify standard
+ functions with std::, thus avoiding Koenig lookup.
+
+2003-06-30 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/locale_facets.tcc (money_get::do_get): Avoid
+ subscripting empty string.
+
+2003-06-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am (check-am): Do not override.
+ (baseline_symbols): Declare as PHONY, so no need to 'touch' it.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-06-30 Doug Gregor <dgregor@apple.com>
+
+ * testsuite/24_iterators/insert_iterator.cc (test01, test02):
+ Don't initialize an insert_iterator with a singular iterator.
+
+2003-06-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_PCH): Add bits for --enable-pch.
+ * aclocal.m4: Regenerate.
+ * configure.in (GLIBCPP_CHECK_PCH): Move, change to
+ GLIBCPP_ENABLE_PCH, default to yes.
+ * configure: Regenerate.
+ * docs/html/configopts.html: Add --enable-pch.
+
+2003-06-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/lib/libstdc++-v3-dg.exp: Add comments.
+ (libstdc++-v3-init): Also set LD_RUN_PATH.
+
+2003-06-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (_M_mode): Unused by streambuf, move
+ from here to filebuf and stringbuf.
+ (~basic_streambuf()): Don't set _M_mode.
+ (basic_streambuf()): Don't set _M_mode.
+ * include/std/std_fstream.h (_M_mode): Move here, from streambuf.
+ (~basic_filebuf()): Clean up.
+ * include/bits/fstream.tcc (basic_filebuf()): Set _M_mode.
+ * include/std/std_sstream.h (_M_mode): Move here, from streambuf.
+ * testsuite/27_io/basic_streambuf/cons/char/1.cc: Don't set _M_mode.
+ * testsuite/27_io/basic_streambuf/overflow/char/1.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/sgetn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/sputn/char/1.cc: Likewise.
+
+2003-06-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_M_underflow): Remove.
+ (uflow): Remove, inherited from streambuf.
+ (underflow): Only declare.
+ * include/bits/fstream.tcc (_M_underflow): Rename to
+ underflow, to which is equivalent for __bump == false,
+ simplify.
+ * include/std/std_sstream.h (_M_underflow): Remove.
+ (uflow): Remove, inherited from streambuf.
+ (underflow): Only declare.
+ * include/bits/sstream.tcc (_M_underflow): Rename to
+ underflow, to which is equivalent for __bump == false,
+ simplify.
+
+2003-06-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/stl_algo.h: Fully qualify standard functions
+ with std::, thus avoiding Koenig lookup.
+
+2003-06-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc:
+ Improve type correctness-wise.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc:
+ Likewise.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc:
+ Likewise.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc:
+ Likewise.
+
+2003-06-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (uflow): According to
+ 27.5.2.4.3,p16, don't check gptr() < egptr().
+
+2003-06-28 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9875
+ * include/bits/fstream.tcc (seekoff): Fix for encoding() > 0.
+ (seekpos): Likewise.
+ * testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc:
+ New test.
+ * testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc:
+ New test.
+
+2003-06-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_performance.h (__gnu_cxx_test): Change
+ output name to libstdc++-v3-performance.sum.
+ * testsuite/Makefile.am (CLEANFILES): Remove .performance.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-06-27 Matthias Klose <doko@debian.org>
+
+ * testsuite/Makefile.am (check-abi, check-abi-verbose): Save
+ output of abi-check in libstdc++-v3-abi.sum.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-06-27 Krister Walfridsson <cato@df.lth.se>
+
+ * config/os/bsd/netbsd/ctype_noninline.h
+ (_C_ctype_): Declare.
+ (ctype<char>::classic_table): Return _C_ctype_ + 1.
+ (ctype<char>::ctype): Use classic_table.
+
+2003-06-27 Paolo Carlini <pcarlini@unitus.it>
+ Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ PR libstdc++/9178
+ * include/bits/fstream.tcc (_M_underflow): Properly estimate
+ the worst-case number of external bytes for a given get area.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: New.
+
+2003-06-27 Paolo Carlini <pcarlini@unitus.it>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/11305
+ * include/bits/fstream.tcc (overflow): Properly estimate the
+ worst-case number of external bytes for a given put area
+ (by using codecvt::max_length()).
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1: New.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2: New.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3: New.
+ * testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4: New.
+
+2003-06-27 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/linker-map.gnu: Remove ; after __numpunct_cache.
+
+2003-06-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/ios_base.h (ios_base::_M_getloc): Return reference
+ to the imbued locale.
+ * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use
+ _M_getloc.
+ (num_put::_M_convert_float): Use.
+
+2003-06-26 Benjamin Kosnik <bkoz@redhat.com>
+ Jerry Quinn <jlquinn@optonline.net>
+
+ * config/linker-map.gnu: Add __numpunct_cache.
+ * config/locale/gnu/numeric_members.cc
+ (numpunct::_M_initialize_numpunct): Account for _M_data, fill in
+ all elements for "C" locale.
+ (numpunct::~numpunct): Delete _M_data.
+ * config/locale/generic/numeric_members.cc: Same.
+ * include/bits/basic_ios.tcc
+ (basic_ios::init): Remove __locale_cache bits.
+ (basic_ios::_M_cache_locale): Same.
+ * include/bits/ios_base.h: Same. Tweaks.
+ * include/bits/locale_classes.h: Tweaks. Reorder classes.
+ (__use_cache): Make friends with _Impl, locale.
+ (_Impl::_M_caches): Add.
+ (_Impl::_M_install_cache): Add.
+ * include/bits/locale_facets.h (__numpunct_cache): New.
+ (numpunct): Encapsulate data members in __numpunct_cache member,
+ _M_data. Adjust virtuals.
+ (numpunct::numpunct): New ctor for the same.
+ (__locale_cache_base): Remove.
+ (__locale_cache): Remove.
+ * include/bits/locale_facets.tcc (__use_cache): New function,
+ specializations.
+ (num_put::_M_convert_int, _M_convert_float, do_put): Use it.
+ * src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w.
+ * src/ios.cc (ios_base::ios_base): Remove __locale_cache.
+ * src/locale-inst.cc: Same. Add __numpunct_cache.
+ * src/locale.cc: Tweak inlines.
+ (__use_cache): Define specializations.
+ * src/localename.cc: Use global bits.
+ (_Impl::~Impl): Deal with __numpunct_cache destruction.
+ (_Impl::_Impl): Same. Pre-cache standard numpunct facets.
+ (_Impl::_M_init_facet): Take into account __numpunct_cache.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-06-26 Nathan C. Myers <ncm-nospam@cantrip.org>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/performance/filebuf_copy.cc: New, testing char
+ by char file copy.
+
+2003-06-26 Paolo Carlini <pcarlini@unitus.it>
+ Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ * include/bits/fstream.tcc (_M_underflow): When the actual
+ end of file is reached, set 'uncommitted' mode to allow a
+ next write without an intervening seek (see C++98 27.8.1.1,2
+ and C89 7.9.5.3).
+ * testsuite/27_io/basic_filebuf/underflow/char/2.cc: New.
+
+2003-06-25 Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ * include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc,
+ sputc): Move inline, from here...
+ * include/std/std_streambuf.h: ... to here.
+
+ * include/std/std_streambuf.h (snextc, sbumpc, sgetc,
+ sputbackc, sungetc, sputc): Use __builtin_expect.
+
+2003-06-24 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/mainpage.html: Use a useful title.
+
+2003-06-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: Remove assignment info.
+ * docs/html/17_intro/contribute.html: Edits.
+ * docs/html/17_intro/libstdc++-assign.tx: Remove.
+
+ * docs/html/test.html: Update.
+
+ * README: Update.
+
+2003-06-24 Benjamin Kosnik <bkoz@redhat.com>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * testsuite/testsuite_performance.h: Tweak mallinfo.
+
+2003-06-24 Paolo Carlini <pcarlini@unitus.it>
+ Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ * include/std/std_fstream.h (_M_filepos): Remove.
+ (_M_reading, _M_writing): New, encode the various I/O modes:
+ 'read', 'write' and 'uncommitted'.
+ (sync): If there is something to flush, do it, then go to
+ 'uncommitted' mode.
+ * include/bits/fstream.tcc (_M_set_buffer): Overhaul to deal
+ with three different cases: __off > 0 (upon underflow),
+ __off == 0 (upon overflow), __off == -1 (upon open, setbuf,
+ seekoff/pos).
+ (_M_underflow): Don't call overflow, set _M_reading to true
+ on success, tweak.
+ (pbackfail): Set _M_reading to true on pback creation, tweak.
+ (overflow): Don't seek, deal with overflow in 'uncommitted' mode,
+ set _M_writing to true on success, tweak.
+ (seekoff): Simplify, set _M_reading, _M_writing to false, call
+ _M_set_buffer(-1) ('uncommitted').
+ (open, close, setbuf): Set _M_reading, _M_writing to false and
+ call _M_set_buffer(-1), tweak.
+ (basic_filebuf): Don't set _M_buf_unified.
+ (_M_destroy_internal_buffer): Don't call setg and setp.
+ * include/ext/stdio_filebuf.h (stdio_filebuf): Use _M_reading,
+ _M_writing and _M_set_buffer(-1).
+ * include/std/std_streambuf.h (_M_move_out_cur, _M_move_in_cur,
+ _M_out_lim, _M_buf_unified): Remove.
+ (basic_streambuf): Don't set _M_out_lim and _M_buf_unified.
+ (setp): Don't set _M_out_lim.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Fix for
+ the new logic ('read', 'write' and 'uncommitted' modes): e.g.,
+ upon open the mode is 'uncommitted' and therefore the put area
+ pointers are null.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc: Ditto.
+
+ * include/bits/fstream.tcc (showmanyc): Use only the
+ documented derivation interface to basic_streambuf (gptr(),
+ setg(), etc.) to work right with user specializations.
+ * include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc,
+ sputc, xsgetn, xsputn, __copy_streambufs): Likewise.
+ * include/std/std_streambuf.h (in_avail, sgetc, uflow, stossc):
+ Likewise.
+ * include/std/std_fstream.h (_M_create_pback, _M_destroy_pback,
+ xsgetn): Likewise.
+
+2003-06-23 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.host (freebsd*): Set abi_baseline_pair.
+ * config/abi/i386-freebsd4/baseline_symbols.txt: Update from 3.2
+ (at or near first release) to 3.3.
+ * config/abi/i386-freebsd5/baseline_symbols.txt: New file.
+ * config/abi/alpha-freebsd5/baseline_symbols.txt: New file.
+ * config/abi/sparc-freebsd5/baseline_symbols.txt: New file.
+
+ * include/ext/mt_allocator.h: Portability.
+ * testsuite/testsuite_performance.h: Likewise.
+
+2003-06-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/libstdc++-assign.txt: Update address.
+
+ * testsuite/performance/ifstream_getline.cc: Fix.
+
+2003-06-23 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/boost_concept_check.h: Don't use _D or _R for type
+ names.
+
+2003-06-22 Paolo Carlini <pcarlini@unitus.it>
+ Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ * include/std/std_streambuf.h (_M_move_out_cur): _M_out_lim
+ is now used only for filebuf, when _M_buf_unified is true.
+ epgtr() plays the role of _M_out_lim but it's only updated
+ upon overflow, underflow, uflow, seekoff/pos.
+ * include/bits/sstream.tcc (_M_underflow): New, implements
+ stringbuf::underflow and uflow.
+ (seekoff, seekpos): Tweak, use _M_update_egptr.
+ * include/std/std_sstream.h (str): Rewrote, deal correctly
+ with the new logic, in particular, when pptr() > egptr().
+ (_M_sync): When __testout && !__testin set all the get area
+ pointers to the current string end.
+ (_M_update_egptr): New, internal function updating egptr()
+ to the actual string end.
+ (_M_underflow): New, declare.
+ (underflow): Dispatch to _M_underflow(false).
+ (uflow): Dispatch to _M_underflow(true).
+
+ * include/bits/sstream.tcc (pbackfail, overflow, seekoff,
+ seekpos): Use only the documented derivation interface to
+ basic_streambuf (gptr(), setg(), etc.) to work right with
+ user specializations.
+ * include/std/std_sstream.h (str, _M_sync): Likewise.
+
+2003-06-20 Doug Gregor <dgregor@apple.com>
+
+ * testsuite/20_util/auto_ptr.cc: Don't dereference NULL auto_ptr
+ * testsuite/21_strings/basic_string/replace/char/4.cc: Don't
+ dereference end iterator.
+ * testsuite/21_strings/basic_string/replace/wchar_t/4.cc: Same.
+ * testsuite/22_locale/ctype/narrow/char/1.cc: Don't subscript with
+ index equal to the length of a string.
+ * testsuite/22_locale/ctype/narrow/char/2.cc: Same.
+ * testsuite/22_locale/ctype/narrow/wchar_t/1.cc: Same.
+ * testsuite/22_locale/ctype/narrow/wchar_t/2.cc: Same.
+ * testsuite/22_locale/ctype/widen/char/1.cc: Same.
+ * testsuite/22_locale/ctype/widen/wchar_t/1.cc: Same.
+ * testsuite/23_containers/list_modifiers.cc: Don't dereference
+ singular reverse iterator.
+ * testsuite/23_containers/vector_bool.cc: Don't increment singular
+ iterator.
+ * testsuite/24_iterators/rel_ops.cc: Don't compare singular iterator.
+
+2003-06-20 Doug Gregor <dgregor@apple.com>
+
+ * include/bits/basic_string.h (basic_string::replace): Dispatch
+ _InputIterator version based on _Is_integer.
+ * include/bits/basic_string.tcc (basic_string::replace):
+ Renamed replace(iterator, iterator, size_type, _CharT) to
+ _M_replace_aux.
+ * testsuite/21_strings/basic_string/assign/char/1.cc (test01):
+ Test basic_string::assign(_InputIterator, _InputIterator),
+ which calls basic_string::replace(iterator, iterator,
+ _Input_iterator, _InputIterator).
+
+2003-06-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_performance.h (resource_counter): Don't use
+ mallinfo at the moment.
+
+2003-06-20 Matthias Klose <doko@debian.org>
+
+ * configure.host: Set try_cpu to target_cpu for existing
+ baseline files.
+
+2003-06-19 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/Makefile.am (extract_symvers): Revert accidental
+ change.
+ * testsuite/Makefile.in: Regenerate.
+
+ * configure.in: Pass MULTISUBDIR to testsuite/Makefile.
+ * configure: Regenerated.
+
+2003-06-19 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (_M_sync): Make non virtual.
+
+2003-06-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_performance.h (time_counter): New.
+ (resource_counter): New.
+ (report_performance): New.
+ (start_counters): New.
+ (stop_counters): New.
+ (clear_counters): New.
+ * testsuite/performance/allocator.cc: Instrument.
+ * testsuite/performance/cout_insert_int.cc: Same.
+ * testsuite/performance/complex_norm.cc: Same.
+ * testsuite/performance/filebuf_sputc.cc: New.
+ * testsuite/performance/fstream_seek_write.cc: Same.
+ * testsuite/performance/ifstream_getline.cc: Same.
+ * testsuite/performance/map_create_fill.cc: Same.
+ * testsuite/performance/ofstream_insert_float.cc: Same.
+ * testsuite/performance/ofstream_insert_int.cc: Same.
+ * testsuite/performance/string_append.cc: Convert.
+ * scripts/check_performance: New.
+ * testsuite/Makefile.am (check-performance): New.
+ (CLEANFILES): Add.
+
+2003-06-18 Paolo Carlini <pcarlini@unitus.it>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_sstream.h (setbuf): Check __n >= 0.
+ * include/bits/fstream.tcc (setbuf): Tweak.
+
+2003-06-18 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (seekoff): We can't seek beyond
+ _M_out_lim, therefore _M_move_out_cur boils down to simply
+ updating _M_out_cur.
+ (seekpos): Likewise, clean up.
+
+2003-06-18 Nathan C. Myers <ncm-nospam@cantrip.org>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (setbuf): Allow (__s, 1) too,
+ simply equivalent to the unbuffered case (0, 0) as far as
+ _M_buf_size is concerned.
+
+2003-06-18 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/Makefile.am (new-abi-baseline): Create baseline
+ directory.
+ (baseline_file): Use baseline_dir.
+ (baseline_dir): New.
+ (mkinstalldirs): New.
+
+ * acinclude.m4: Rename baseline_file to baseline_dir, strip
+ filename from baseline_dir.
+
+ * testsuite/Makefile.in: Regenerated.
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-06-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in: Missed check_survey bit.
+ * configure: Regenerated.
+
+2003-06-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * scripts: New.
+ * config/abi/extract_symvers: Move to...
+ * scripts/extract_symvers: ...here.
+ * mkcheck.in: Move to..
+ * scripts/check_survey.in: ...here.
+ * testsuite_flags.in: Move to..
+ * scripts/testsuite_flags.in: ...here.
+ * configure.in: Change check and testsuite_flags locations.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (current_symbols.txt): Change location.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify
+ location of testsuite_flags.
+ * Makefile.am (check-script): Move..
+ (check-script-install): Move...
+ * testsuite/Makefile.am: ... here.
+ * testsuite/Makefile.in: Regenerate.
+ * Makefile.in: Regenerate.
+
+2003-06-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/abi/i486-linux-gnu/baseline_symbols.txt: Update to 3.3.0.
+
+2003-06-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * Makefile.am (check-abi): Move...
+ (new-abi-baseline): Move...
+ * testsuite/Makefile.am: ...here.
+ (new-abi-baseline): Conditionalize.
+ (check-abi): Conditionalize.
+ (check-abi-verbose): New.
+ * Makefile.in: Regenerate.
+ * testsuite/Makefile.in: Regenerate.
+ * configure.in: Consolidate testsuite configure bits.
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Same.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * testsuite/abi_check.cc: Add --check-verbose.
+ Only output detailed information if --check-verbose.
+
+2003-06-16 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/abi_check.cc: Create summary report.
+
+2003-06-16 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Fix
+ for systems with BUFSIZ != 8192.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Ditto.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc:
+ Minor tweaks.
+
+2003-06-16 Andreas Jaeger <aj@suse.de>
+
+ * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Make
+ check-abi multilib aware.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-06-16 Benjamin Kosnik <bkoz@redhat.com>
+ Andreas Jaeger <aj@suse.de>
+
+ * configure.host: Set x86_64 abi_baseline pair correctly.
+
+2003-06-16 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/sungetc/char/1.cc: Split and
+ fix for missing seeks between gets and puts into...
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc: New.
+
+2003-06-15 Richard Henderson <rth@redhat.com>
+
+ * config/linker-map.gnu: Export virtual function thunks for
+ 64-bit systems too.
+
+2003-06-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/abi/i686-pc-linux-gnu: To..
+ * config/abi/i486-linux-gnu: ...this.
+ * config/abi/alphaev67-unknown-linux-gnu: To..
+ * config/abi/alpha-linux-gnu: ...this.
+ * config/abi/ia64-unknown-linux-gnu: To...
+ * config/abi/ia64-linux-gnu: ...this.
+ * config/abi/x86_64-unknown-linux-gnu: To...
+ * config/abi/x86_64-linux-gnu: ...this.
+ * config/abi/i386-unknown-freebsd4: To...
+ * config/abi/i386-freebsd4: ...this.
+ * config/linker-map.gnu: Cleanups, move libsupc++ bits into
+ CXXABI.
+ * configure.host: abi_baseline_triplet to abi_baseline_pair.
+ Simplify cpu bits so that abi_baseline_pair can use the same
+ cpu configuration.
+ * acinclude.m4: Same.
+ * aclocal.m4: Regenerate.
+ * configure.in: Can't get enable_abi_check to yes unless native.
+ * configure: Regenerate.
+
+2003-06-13 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/seekoff/char/1.cc: Split and
+ fix for missing seeks between gets and puts into...
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: New.
+ * testsuite/27_io/basic_filebuf/seekoff/char/4-io.cc: New.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1.cc: Same, into...
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: New.
+ * testsuite/27_io/basic_filebuf/seekpos/char/4-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Fix
+ for missing seeks between gets and puts.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Ditto.
+ * testsuite/data/seekoff-1.tst: New.
+ * testsuite/data/seekoff-2.tst: New.
+ * testsuite/data/seekpos-1.tst: New.
+ * testsuite/data/seekpos-2.tst: New.
+
+2003-06-13 Nathan C. Myers <ncm-nospam@cantrip.org>
+
+ Avoid multi-processor bus contention on increment/decrement-and-
+ test of the reference count in the empty-string object, by comparing
+ addresses first, and never touching the reference count of the empty-
+ string object.
+ * include/bits/basic_string.h:
+ (_S_empty_rep_storage): Move into basic_string<>::_Rep for use by its
+ members.
+ (_Rep::_S_empty_rep()): New accessor.
+ (_Rep::_M_length, _Rep::_M_capacity, _Rep::_M_references): Move to
+ a base class _Rep_base.
+ (_Rep::_M_dispose, _Rep::_M_refcopy): Check for the empty string.
+ (basic_string()): Change to use _M_refdata() in place of _M_refcopy(),
+ since no longer must increment its refcount.
+ * include/bits/basic_string.tcc:
+ (_Rep::_M_destroy, _M_leak_hard): Check for the empty string and
+ return immediately. The former might be unnecessary. The latter
+ prevents begin() and end() from cloning it unnecessarily.
+ (_S_construct(_InIterator, _InIterator, const _Alloc&,
+ input_iterator_tag), _S_construct(_InIterator, _InIterator,
+ const _Alloc&, forward_iterator_tag), _S_construct(size_type, _CharT,
+ const _Alloc&)): Change to use _M_refdata() in place of _M_refcopy().
+ (_M_mutate): Check for the empty string and treat it as shared.
+ This is necessary here because _M_mutate is sometimes called with
+ all-zero arguments; in all other uses of _M_is_shared, the test comes
+ out right anyhow.
+
+2003-06-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/allocator-inst.cc: Explicitly instantiate.
+ * include/ext/pool_allocator.h: Inhibit implicit instantiations.
+ Tweaks.
+ * config/linker-map.gnu: Add __pool_alloc bits. Tweaks.
+
+2003-06-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
+ * aclocal.m4: Regenerate.
+ * Makefile.am (SUBDIRS): Remove libio.
+ * Makefile.in: Regenerate.
+ * configure.in: Same.
+ * configure: Regenerate.
+ * config/io/basic_file_libio.cc: Remove.
+ * config/io/basic_file_libio.h: Remove.
+ * config/io/c_io_libio_codecvt.c: Remove.
+ * config/io/c_io_libio.h: Remove.
+ * libio/*: Remove.
+ * src/Makefile.am: Same.
+ * src/Makefile.in: Regenerate.
+ * docs/html/configopts.html: Edits.
+ * docs/html/explanations.html: Edits.
+
+2003-06-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_alloc.h (__debug_alloc): Move out.
+ (__malloc_alloc): Same.
+ (__pool_alloc): Same.
+ (__new_alloc): Same.
+ Rename to..
+ * include/bits/allocator.h: ...this.
+ * include/bits/stl_deque.h: Modify comment.
+ * include/bits/stl_tree.h: Modify include.
+ * include/std/std_memory.h: Same.
+ * include/ext/rope: Same.
+ * include/ext/slist: Same.
+ * include/std/std_vector.h: Same.
+ * include/std/std_stack.h: Same.
+ * include/std/std_queue.h: Same.
+ * include/std/std_list.h: Same.
+ * include/std/std_deque.h: Same.
+ * include/backward/alloc.h: Same.
+ * include/ext/debug_allocator.h: New.
+ * include/ext/malloc_allocator.h: New.
+ * include/ext/pool_allocator.h: New.
+ * include/ext/new_allocator.h: New.
+ * include/bits/pthread_allocimpl.h: Remove.
+ * include/bits/stl_pthread_alloc.h: Remove.
+ * include/Makefile.am (ext_headers): Add.
+ * include/Makefile.in: Regenerate.
+ * src/stl-inst.cc: Use __gnu_cxx namespace.
+ * src/stl-inst.cc: Move to...
+ * src/allocator-inst.cc: Here.
+ * src/Makefile.am (sources): Update.
+ * src/Makefile.in: Regenerate.
+ * config/linker-map.gnu: Remove __pool_alloc bits.
+ * testsuite/ext/headers.cc: Add.
+ * testsuite/ext/allocators.cc: Fixup.
+
+2003-06-11 Stefan Olsson <stefan@snon.net>
+ Ola Rönnerup <fnolis@home.se>
+
+ * include/Makefile.am (ext_headers): Add.
+ * include/Makefile.in: Regenerate.
+ * include/ext/mt_allocator.h: New file.
+
+2003-06-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (close): Clean up a bit.
+
+ * include/bits/streambuf.tcc (sbumpc): Clean up a bit.
+
+ * include/std/std_fstream.h (_M_destroy_pback): _M_pback_cur_save
+ - the saved _M_in_cur, that is - cannot be null.
+ (sync): Constify a variable.
+
+ * include/std/std_streambuf.h: Tweak a comment.
+ (in_avail): Constify a variable.
+
+2003-06-10 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/17_intro/BUGS: Update from 2.90.8 snapshot.
+ * docs/html/17_intro/CHECKLIST: Bring up to date with respect to
+ correctness of container::iterator typedefs. Fix whitespace.
+ * docs/html/20_util/howto.html, docs/html/ext/howto.html: Add links
+ to allocator docs.
+ * docs/html/documentation.html: Regenerate.
+
+ * include/bits/basic_string.h, include/bits/basic_string.tcc,
+ include/bits/deque.tcc, include/bits/list.tcc, include/bits/stl_algo.h,
+ include/bits/stl_algobase.h, include/bits/stl_bvector.h,
+ include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
+ include/bits/stl_list.h, include/bits/stl_uninitialized.h,
+ include/bits/stl_vector.h, include/bits/vector.tcc,
+ include/ext/algorithm, include/ext/slist, include/std/std_bitset.h:
+ Change _Iter names to _Iterator, and __pos to __position.
+
+ * include/bits/stl_relops.h, include/bits/stl_numeric.h,
+ include/bits/stl_multiset.h, include/bits/stl_set.h:
+ Remove emacs markers.
+
+ * include/bits/stl_threads.h (_STL_auto_lock): Add __unused__.
+
+2003-06-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (overflow): According to
+ 27.5.2.4.5, overflow() returns not_eof(eof()).
+ * testsuite/27_io/basic_filebuf/overflow/char/2.cc: New.
+ * testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc: Ditto.
+
+2003-06-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (_M_underflow): Check overflow return
+ value; tweak slightly.
+
+2003-06-09 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (_M_underflow): Do not special
+ case the unbuffered case, which really means simply a one char
+ get area.
+ (basic_filebuf): Initialize _M_buf_size.
+ (setbuf): Unbuffered means _M_buf_size == 1, since only
+ _M_buf_size - 1 == 0 chars are going to be used for the
+ put area and 1 for the get area.
+ * include/std/std_streambuf.h (_M_buf_size): Move to basic_filebuf.
+ (~basic_streambuf): Tweak.
+ (basic_streambuf): Do not initialize _M_buf_size.
+ * include/std/std_fstream.h (_M_buf_size): Add from basic_streambuf.
+ (~basic_filebuf): Tweak.
+ (_M_set_buffer): Tweak, considering that _M_buf_size == 1 is the
+ unbuffered situation (i.e., put area pointers NULL).
+ * include/bits/streambuf.tcc (sbumpc): Clean up.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc: New.
+
+2003-06-09 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Move all AM_CONDITIONAL calls out.
+ (GLIBCPP_CONFIGURE): Set defaults for variables used in AM_CONDITIONAL
+ statements.
+ * configure.in: Centralize AM_CONDITIONALs so that they are always
+ run. Make use of GLIBCPP_IS_CROSS_COMPILING.
+ * aclocal.m4, configure: Regenerated.
+
+2003-06-09 Paolo Carlini <pcarlini@unitus.it>
+
+ * docs/html/ext/howto.html ('LWG Issues'): Add issue 235.
+
+2003-06-06 Nathan Myers <ncm-nospam@cantrip.org>
+
+ * include/bits/stl_iterator.h
+ (reverse_iterator::reverse_iterator()): Apply DR235: default
+ constructor default-initializes data member. Instantiated on a
+ pointer type, the member has to end up equal to zero.
+
+2003-06-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_alloc.h: Cleanups.
+ * include/ext/functional: Same.
+ * include/ext/hash_map: Same.
+ * include/ext/hash_set: Same.
+ * include/ext/iterator: Same.
+ * include/ext/memory: Same.
+ * include/ext/numeric: Same.
+ * include/ext/rb_tree: Same.
+ * include/ext/ropeimpl.h: Same.
+ * include/ext/slist: Same.
+ * include/ext/stdio_filebuf.h: Same.
+ * include/ext/stdio_sync_filebuf.h: Same.
+ * include/ext/stl_rope.h: Move to...
+ * include/ext/rope: ...here.
+ * include/ext/stl_hash_fun.h: Move to...
+ * include/ext/hash_fun.h: ...here.
+ * include/ext/stl_hashtable.h: Move to...
+ * include/ext/hashtable.h: ...here.
+ * include/backward/hashtable.h: Reflect new names.
+ * include/Makefile.am: Same.
+ * include/Makefile.in: Regenerated.
+
+2003-06-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/9024
+ * include/bits/fstream.tcc (_M_underflow): Fix for unbuffered.
+ * include/bits/stl_algobase.h: Tweak.
+ * include/std/std_fstream.h: Move _M_buf_size to...
+ * include/std/std_streambuf.h: ...here. Modify.
+ * include/bits/streambuf.tcc: Same.
+ * testsuite/testsuite_hooks.h: Tweak.
+ * testsuite/testsuite_io.h (constraint_filebuf): New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sgetn/char/3.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/snextc/char/2-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sputc/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/2.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sputc/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/1.cc: Split into...
+ * testsuite/27_io/basic_filebuf/sputn/char/1-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/2-in.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: New.
+ * testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: New.
+ * testsuite/data/sgetc.txt: New.
+ * testsuite/data/sgetn.txt: New.
+
+2003-06-05 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/11095
+ * include/bits/istream.tcc (operator>>(basic_istream&, _CharT*)):
+ Deal with width() smaller than zero.
+ * include/bits/ostream.tcc (operator<<(basic_ostream&, _CharT),
+ operator<<(basic_ostream&, char), operator<<(basic_ostream&, const
+ _CharT*), operator<<(basic_ostream<_CharT, _Traits>&, const
+ char*), operator<<(basic_ostream<char, _Traits>&, const char*),
+ operator<<(basic_ostream, const basic_string&)): Likewise.
+
+ * testsuite/27_io/basic_istream/extractors_character/char/
+ (11095-i.cc, 11095-oa.cc, 11095-ob.cc, 11095-oc.cc): New.
+ * testsuite/27_io/basic_ostream/inserters_character/char/
+ (11095-oa.cc, 11095-ob.cc, 11095-oc.cc): New.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ (11095-od.cc, 11095-oe.cc, 11095-of.cc): New.
+
+2003-06-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (GLIBCPP_CHECK_PCH): Only set glibcpp_PCHFLAGS if
+ .gch compilation works.
+ * aclocal.m4, configure: Regenerate.
+ * testsuite_flags.in (--build-cxx): Use glibcpp_PCHFLAGS to
+ initialize PCHFLAGS.
+
+2003-06-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/basic_string.h (_M_fold, insert(iterator, _CharT),
+ erase(iterator), erase(iterator, iterator), c_str,
+ compare(const basic_string&)): Constify various variables.
+ * include/bits/basic_string.tcc (_S_construct(_InIter, _InIter,
+ const _Alloc&, input_iterator_tag), _M_destroy, _M_mutate,
+ _S_create, resize, _M_replace, _M_replace_safe,
+ append(const basic_string&), append(const basic_string&, size_type,
+ size_type), append(const _CharT*, size_type), append(size_type,
+ _CharT), operator+(const _CharT*, const basic_string&),
+ operator+(_CharT, const basic_string&), replace(iterator, iterator,
+ size_type, _CharT), find(const _CharT*, size_type, size_type),
+ find(_CharT, size_type), rfind(const _CharT*, size_type, size_type),
+ rfind(_CharT, size_type), compare(size_type, size_type,
+ const basic_string&), compare(size_type, size_type,
+ const basic_string&, size_type, size_type), compare(const _CharT*),
+ compare(size_type, size_type, const _CharT*), compare(size_type,
+ size_type, const _CharT*, size_type)): Likewise.
+
+2003-06-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/fstream.tcc (pbackfail): Make a rarely taken
+ 'if' branch less obscure.
+
+2003-06-02 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR libstdc++/9815
+ * config/cpu/i386/atomicity.h (__exchange_and_add): add intel
+ asm case to asm.
+ * config/cpu/i486/atomicity.h (__exchange_and_add): Likewise.
+ (__atomic_add): likewise.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (pbackfail): Minor clean up and
+ reformatting, consistent with basic_filebuf::pbackfail.
+
+2003-06-02 Richard Kreckel <Richard.Kreckel@GiNaC.DE>
+
+ PR libstdc++/11062
+ * config/cpu/mips/atomicity.h: Change __attribute__ ((unused)) to
+ __attribute__ ((__unused__)).
+ * config/os/aix/atomicity.h: Likewise.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9761
+ * include/bits/fstream.tcc (pbackfail): If the pback buffer
+ is already active don't try to store in it a second char.
+ * testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc: New.
+
+ * include/bits/fstream.tcc (pbackfail): Add unbuffered bits.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_stringbuf/seekpos/char/3.cc: Tweak
+ line spacing.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_M_destroy_pback): Use _M_in_beg
+ instead of unnecessarily taking the address of _M_pback.
+ (xsgetn): Simplify slightly for a single char pback buffer.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (seekoff): Remove four unnecessary
+ variables and two 'if', clean up.
+
+2003-06-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (seekpos): Test against _M_out_lim
+ not _M_out_end, since the former actually points to the string
+ end (vs buffer end).
+ * testsuite/27_io/basic_stringbuf/seekpos/char/3.cc: New.
+
+2003-05-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/filter: New file.
+ * docs/doxygen/filter.sed: New file.
+ * docs/doxygen/run_doxygen: Add g flag to sed substitutions. Duh.
+ * docs/doxygen/user.cfg.in (INPUT_FILTER): Point to new filter.
+ * docs/html/documentation.html: Fix links to doxygen pages.
+
+2003-05-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (_M_convert_to_external): Don't
+ check for __ilen > 0.
+
+2003-05-29 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
+
+ PR libstdc++/10783
+ * include/bits/stl_iterator.h (class __normal_iterator):
+ Don't inherit from iterator, add missing typedefs.
+
+2003-05-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/24_iterators/reverse_iterator.cc: Split up, as follows.
+ * testsuite/24_iterators/reverse_iterator/1.cc: New.
+ * testsuite/24_iterators/reverse_iterator/2.cc: New.
+ * testsuite/24_iterators/reverse_iterator/3.cc: New, from
+ PR libstdc++/10783.
+
+2003-05-27 Steve Ellcey <sje@cup.hp.com>
+
+ * config/os/hpux/os_defines.h: Define _LIBUNWIND_STD_ABI if we are
+ on IA64 HP-UX.
+ * libsupc++/eh_throw.cc: Don't call _Unwind_Resume_or_Rethrow if
+ _LIBUNWIND_STD_ABI is set.
+
+2003-05-26 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and
+ make sure the number of digits required after the decimal-point
+ (if any) is exactly the value returned by frac_digits().
+ * testsuite/22_locale/money_get/get/char/9.cc: New.
+ * testsuite/22_locale/money_get/get/wchar_t/9.cc: New.
+
+2003-05-27 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * include/std/std_istream.h, include/std/std_ostream.h: Typo in
+ comment.
+
+2003-05-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/9339
+ * include/std/std_fstream.h (basic_filebuf::_M_overflow): Remove.
+ (_M_pback): No array necessary.
+ * include/bits/fstream.tcc (basic_filebuf::_M_overflow): Add
+ unbuffered case, coalesec into ...
+ (basic_filebuf::overflow): ...this.
+ * testsuite/27_io/basic_filebuf/sputn/char/9339.cc: New.
+ * testsuite/27_io/basic_filebuf/sputc/char/2.cc: Unbuffered.
+
+2003-05-24 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * libsupc++/Makefile.am, libsupc++/cxxabi.h, libsupc++/del_op.cc,
+ libsupc++/del_opnt.cc, libsupc++/del_opv.cc, libsupc++/del_opvnt.cc,
+ libsupc++/eh_alloc.cc, libsupc++/eh_aux_runtime.cc,
+ libsupc++/eh_catch.cc, libsupc++/eh_exception.cc,
+ libsupc++/eh_globals.cc, libsupc++/eh_personality.cc,
+ libsupc++/eh_term_handler.cc, libsupc++/eh_terminate.cc,
+ libsupc++/eh_throw.cc, libsupc++/eh_type.cc,
+ libsupc++/eh_unex_handler.cc, libsupc++/exception,
+ libsupc++/new, libsupc++/new_handler.cc, libsupc++/new_op.cc,
+ libsupc++/new_opnt.cc, libsupc++/new_opv.cc, libsupc++/new_opvnt.cc,
+ libsupc++/pure.cc, libsupc++/tinfo.cc, libsupc++/tinfo2.cc,
+ libsupc++/typeinfo, libsupc++/unwind-cxx.h, libsupc++/vec.cc:
+ Replace "GNU CC" with "GCC".
+
+ * include/backward/new.h: Replace "GNU CC" with "GCC".
+
+2003-05-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/3066.
+ * configure.in: Switch target to host, don't assume newlib.
+ (target_alias): Remove.
+ * configure: Regenerate.
+ * acinclude.m4: Same.
+ * aclocal.m4: Regenerate.
+ * configure.target: Same. Rename to...
+ * configure.host: This.
+
+2003-05-22 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_S_pback_size): Remove definition.
+ (_M_create_pback(), _M_destroy_pback()): Simplify for a single-char
+ pback buffer.
+ * include/bits/fstream.tcc (_S_pback_size): Remove declaration.
+ * testsuite/27_io/basic_filebuf/3.cc: Remove explicit instantiation
+ of _S_pback_size for systems with no COMDAT or weak support.
+ * testsuite/27_io/basic_filebuf/seekoff/10132-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekpos/10132-3.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/underflow/10096.cc: Likewise.
+ * testsuite/27_io/basic_fstream/3.cc: Likewise.
+ * testsuite/27_io/basic_ifstream/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Likewise.
+ * testsuite/27_io/basic_ofstream/3.cc: Likewise.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/3.cc: Likewise.
+
+2003-05-22 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (_M_underflow): Simplify:
+ !__testout implies _M_filepos == _M_in_end, therefore
+ the first _M_file.seekoff call is never issued.
+
+2003-05-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in: Sort cross table.
+ * configure: Regenerate.
+
+2003-05-22 Brad Spencer <spencer@infointeractive.com>
+
+ PR libstdc++/10106
+ * configure.in: Add Solaris cross bits.
+
+2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * libstdc++-v3/config/os/mingw32/os_defines.h
+ (__GTHREAD_HIDE_WIN32API): Define to 1 by defualt.
+ (NOMINMAX): Define. Update copyright year.
+
+2003-05-21 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_M_set_buffer): Fix indentation.
+
+2003-05-21 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Fix typo.
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-05-21 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/test.html: Fix markup.
+
+2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * libmath/stubs.c (hypot, hypotf, hypotl): Don't divide by
+ zero.
+ Update copyright year.
+
+2003-05-20 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/close/char/4.cc: Fix typo.
+
+2003-05-20 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/close/char/5.cc: New file,
+ further testing that upon filebuf::close() 27.8.1.1,3 is enforced.
+
+2003-05-20 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
+ Cast via void* to avoid -Wcast-align warnings.
+ (__default_alloc_template::_S_refill): Likewise.
+
+2003-05-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/README: Move to...
+ * docs/html/test.html: ...here. Add documentation.
+ * docs/html/install.html: Move testing bits out..
+ * docs/html/documentation.html: Add separate testing link.
+ * testsuite/performance: Add.
+ * testsuite/performance/allocator.cc: New.
+ * testsuite/performance/complex_norm.cc: New.
+ * testsuite/performance/cout_insert_int.cc: New.
+ * testsuite/performance/fstream_seek_write.cc: New.
+ * testsuite/performance/ifstream_getline.cc: New.
+ * testsuite/performance/map_create_fill.cc: New.
+ * testsuite/performance/ofstream_insert_float.cc: New.
+ * testsuite/performance/ofstream_insert_int.cc: New.
+ * testsuite/performance/string_append.cc: New.
+ * testsuite/lib/libstdc++-v3-dg.exp (v3-compute-tests): Filter
+ performance tests.
+
+2003-05-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR libstdc++/10689
+ * include/std/std_complex.h (pow): Tidy.
+
+2003-05-19 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/close/char/4.cc: New file, testing
+ that upon filebuf::close() 27.8.1.1,3 is enforced.
+
+2003-05-15 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/thread/pthread4.cc: Further tweak to avoid fini race.
+
+2003-05-15 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ * include/bits/fstream.tcc (_M_overflow): Rewrote to call
+ _M_convert_to_external only once (_M_buf_size is now the size of
+ the put area + 1 for the overflow char of a full area); call
+ _M_set_buffer instead of _M_set_indeterminate.
+ (setbuf): Don't accept a buffer smaller than 2 chars.
+ (_M_underflow): Refill _M_buf_size - 1 chars; call _M_set_buffer,
+ instead of _M_set_determinate.
+ (open): Call _M_set_buffer, instead of _M_set_indeterminate.
+ (seekoff): Likewise.
+ * include/ext/stdio_filebuf.h (stdio_filebuf(int,
+ std::ios_base::openmode, bool, size_t),
+ stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t):
+ Likewise.
+ * include/std/std_fstream.h (_M_set_indeterminate): Remove.
+ (_M_set_determinate): Rename as _M_set_buffer, _M_buf_size ->
+ _M_buf_size - 1.
+ * include/std/std_streambuf.h: Tweak _M_out_lim comment.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Tweak, taking
+ into account that, for _M_buf_size == BUFSIZ == 8192, the size of
+ the put area is now BUFSIZ - 1.
+ * testsuite/ext/stdio_filebuf_2.cc: Tweak, taking into account
+ that now the smallest _M_buf_size is 2 (still fails, for the same
+ reason, with 3.2.3)
+
+2003-05-14 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/thread/pthread4.cc: Tweak test.
+
+2003-05-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Remove
+ excess errors dg marker, use dg-errors instead.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
+ * testsuite/20_util/auto_ptr_neg.cc: Same.
+
+2003-05-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_fstream.h (basic_filebuf::_M_codecvt): Add
+ cached member.
+ * include/bits/fstream.tcc (basic_filebuf::basic_filebuf):
+ Initialize _M_codecvt.
+ (basic_filebuf::imbue): Same.
+ (basic_filebuf::showmanyc): Use it.
+ (basic_filebuf::underflow): Use it.
+ (basic_filebuf::_M_convert_to_external): Use it.
+ (basic_filebuf::seekoff): Use it.
+ (basic_filebuf::imbue): Use it, tweaks.
+ * include/bits/localefwd.h (__check_facet): New.
+ * include/bits/locale_classes.h: Tweaks.
+ * include/bits/locale_facets.tcc: Tweaks.
+ * include/bits/basic_ios.h (basic_ios::_M_check_facet): Remove.
+ _M_fctype to _M_ctype, _M_fnumput to _M_num_put, _M_fnumget to
+ _M_num_get. Change _M_check_facet to __check_facet. Tweaks.
+ * include/bits/basic_ios.tcc: Same.
+ * include/bits/istream.tcc: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/std/std_streambuf.h: Same.
+ * testsuite/27_io/basic_filebuf/imbue/char/2.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/char/3.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/1.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: New.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc: New.
+
+2003-05-12 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/sgetc/char/1.cc: Remove
+ unnecessary includes and unused string literals.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sputc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sputn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1.cc: Likewise.
+
+2003-05-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/fstream.tcc (_M_overflow): Remove unbuffered bits.
+
+2003-05-12 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_M_convert_to_external): Change
+ to return bool, take two less streamsize parameters.
+ * include/bits/fstream.tcc (_M_convert_to_external): Tweak
+ consistently definition.
+ (_M_overflow): Adjust call points.
+
+2003-05-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/basic_filebuf/underflow/10096.cc: Add weak bits.
+
+2003-05-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am: Properly quote /both/ LD_RUN_PATHs.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-05-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite/Makefile.am: Properly quote LD_RUN_PATH.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-05-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR libstdc++/3181
+ * include/c_std/std_cmath.h: #include <bits/cpp_type_traits.h>
+ (acos): Handle integer argument.
+ (asin): Likewise.
+ (atan): Likewise.
+ (atan2): Likewise.
+ (ceil): Likewise.
+ (cos): Likewise.
+ (cosh): Likewise.
+ (exp): Likewise.
+ (fabs): Likewise.
+ (floor): Likewise.
+ (frexp): Likewise.
+ (ldexp): Likewise.
+ (log): Likewise.
+ (log10): Likewise.
+ (sin): Likewise.
+ (sinh): Likewise.
+ (sqrt): Likewise.
+ (tan): Likewise.
+ (tanh): Likewise.
+ * include/bits/cpp_type_traits.h (__are_same<>): New traits.
+ (__enable_if): Likewise.
+ * testsuite/26_numerics/cmath/overloads.C: New test.
+
+2003-05-10 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9027
+ PR libstdc++/9520
+ PR libstdc++/10096
+ * include/bits/fstream.tcc (basic_file::_M_underflow): Add generic
+ implementation, based on old wchar_t specialization, add support
+ for codecvt::in() return value of codecvt_base::noconv, remove
+ _M_file.sys_ungetc() call.
+ * include/std/std_fstream.h (basic_file::underflow,
+ basic_file::uflow, basic_file::_M_underflow): Remove
+ specialization declarations, call _M_underflow from generic versions
+ of underflow and uflow.
+ * src/fstream.cc (basic_file::underflow, basic_file::uflow,
+ basic_file::_M_underflow): Remove specializations.
+ * src/Makefile.am (sources): Remove fstream.cc.
+ * src/Makefile.in: Regenerated.
+ * testsuite/27_io/basic_filebuf/underflow/10096.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/char/1.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/char/9027.cc: New test.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc: New test.
+
+2003-05-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/stdio_filebuf.h (__stdio_filebuf): Remove stack
+ buffer.
+ * config/io/basic_file_stdio.h (__basic_file::xsgetn): Remove
+ unbuffered bits.
+ (__basic_file::xsputn): Same.
+ (__basic_file::seekoff): Same.
+ (__basic_file::seekpos): Same.
+ (__basic_file::showmanyc): Same.
+ * config/io/basic_file_stdio.cc: Same.
+ * include/std/std_fstream.h: Same.
+ * include/bits/fstream.tcc: Same.
+ * src/fstream.cc: Same.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1.cc (test05): Tidy.
+
+2003-05-10 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9520
+ PR libstdc++/9661
+ PR libstdc++/9662
+ * include/ext/stdio_sync_filebuf.h: New file.
+ (basic_stdiobuf): New.
+ * include/Makefile.am (ext_headers): Add ext/stdio_sync_filebuf.h
+ * include/Makefile.in: Regenerate.
+ * include/bits/ios_base.h (Init::_S_create_buffers,
+ Init::_S_destroy_buffers): Remove declarations.
+ * src/globals.cc (buf_cout_sync, buf_cin_sync, buf_cerr_sync,
+ buf_wcout_sync, buf_wcin_sync, buf_wcerr_sync): Define.
+ * src/ios.cc (Init::_S_create_buffers,
+ Init::_S_destroy_buffers): Remove.
+ (Init::Init): Create and use syncronized buffers.
+ (ios_base::sync_with_stdio): Destroy syncronized buffers,
+ create and install unsyncronized buffers.
+ * testsuite/27_io/objects/char/10.cc: New test.
+ * testsuite/27_io/objects/char/9.cc: New test.
+ * testsuite/27_io/objects/char/9661-1.cc: New test.
+ * testsuite/27_io/objects/char/9661-2_xin.cc: New test.
+ * testsuite/27_io/objects/char/9661-2_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/1.cc: New test.
+ * testsuite/27_io/objects/wchar_t/10.cc: New test.
+ * testsuite/27_io/objects/wchar_t/2.cc: New test.
+ * testsuite/27_io/objects/wchar_t/2523-1_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/2523-1_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/2523-2_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/2523-2_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/3045.cc: New test.
+ * testsuite/27_io/objects/wchar_t/3647.cc: New test.
+ * testsuite/27_io/objects/wchar_t/3_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/3_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/4_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/4_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/5.cc: New test.
+ * testsuite/27_io/objects/wchar_t/5268.cc: New test.
+ * testsuite/27_io/objects/wchar_t/5280_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/5280_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/6.cc: New test.
+ * testsuite/27_io/objects/wchar_t/6548_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/6548_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/6648-1_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/6648-1_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/6648-2_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/6648-2_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/7.cc: New test.
+ * testsuite/27_io/objects/wchar_t/7744_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/7744_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/8.cc: New test.
+ * testsuite/27_io/objects/wchar_t/9_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/9_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/9520.cc: New test.
+ * testsuite/27_io/objects/wchar_t/9661-1.cc: New test.
+ * testsuite/27_io/objects/wchar_t/9661-2_xin.cc: New test.
+ * testsuite/27_io/objects/wchar_t/9661-2_xin.in: New.
+ * testsuite/27_io/objects/wchar_t/9662.cc: New test.
+ * testsuite/ext/stdiobuf_char.cc: New test.
+ * testsuite/ext/stdiobuf_wchar_t.cc: New test.
+
+2003-05-10 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/close/char/3.cc: Remove
+ unnecessary includes and unused string literals.
+ * testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Likewise.
+
+2003-05-08 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (setg, setp): Don't touch _M_mode.
+
+2003-05-07 Richard Henderson <rth@redhat.com>
+
+ PR c++/10570
+ * libsupc++/eh_catch.cc (__cxa_begin_catch): Handle foreign exceptions.
+ (__cxa_end_catch): Likewise.
+ * libsupc++/eh_throw.cc (__cxa_rethrow): Likewise. Use
+ _Unwind_Resume_or_Rethrow.
+ * libsupc++/eh_personality.cc (empty_exception_spec): New.
+ (PERSONALITY_FUNCTION): Don't ignore terminate or catch-all
+ for _UA_FORCE_UNWIND. Honor empty filter spec for foreign
+ exceptions. Don't push terminate/unexpected to cxa functions.
+ (__cxa_call_unexpected): Remove foreign exception fixmes.
+
+2003-05-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base/cons: New.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: New.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: New.
+
+2003-05-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_fstream.h (_M_is_indeterminate): Remove.
+ * src/fstream.cc
+ (basic_filebuf<char/wchar_t>::_M_underflow): Simplify: either
+ there is no buffer or __testget == !__testinit.
+
+ * src/fstream.cc
+ (basic_filebuf<char/wchar_t>::_M_underflow): _M_set_determinate()
+ automatically sets, if appropriate, _M_out_cur == _M_in_cur.
+
+ * include/std/std_fstream.h (_M_destroy_pback): Don't set
+ unnecessarily _M_pback_cur_save and _M_pback_end_save.
+
+ * include/std/std_fstream.h (_M_set_determinate): Minor tweak.
+
+ * include/std/std_sstream.h (_M_sync): Minor tweak.
+
+ * include/bits/fstream.tcc (close): No need to call
+ _M_destroy_pback, setting _M_pback_init to false suffices
+ to clean up.
+
+2003-05-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_algo.h: Enums as _S_.
+ * include/bits/stl_tree.h: Same.
+ * include/bits/stl_bvector.h: Same.
+ * include/bits/ios_base.h: Same.
+ * include/bits/stl_alloc.h: Same.
+ * include/ext/stl_hashtable.h: Same.
+ * src/ios.cc: And here.
+
+ * include/std/std_sstream.h: Replace _M_really_sync to _M_sync.
+ * include/bits/sstream.tcc: Same.
+
+ * include/bits/basic_ios.h: Correct spacing for '< ctype'.
+
+ * include/bits/locale_facets.tcc: Replace __temp to __tmp.
+
+ * include/bits/locale_facets.h (__num_base): Remove protected.
+ Use _S_[io]* names for enumerations.
+ (_S_format_int): Remove.
+ * include/bits/locale_facets.tcc: Same.
+ * src/locale.cc: Same.
+
+ * include/std/std_sstream.h (stringbuf::str): Tweak formatting.
+
+2003-05-06 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html (3.10): Add note about mips atomicity.h.
+ * docs/html/faq/index.txt: Regenerated.
+
+2003-05-06 Michael Ritzert <Ritzert@t-online.de>
+ Matt Kraai <kraai@alumni.cmu.edu>
+
+ * include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): Tweak.
+ And retweak.
+
+2003-05-06 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.target (mips*): Use the generic atomicity.h by default.
+
+2003-05-05 Loren J. Rittle <ljrittle@acm.org>
+ (Inspired by an alternate patch from Danny Smith.)
+
+ * include/bits/stl_threads.h (_Atomic_swap): Kill it...
+ (_Swap_lock_struct<>): ...and the horse it rode in on.
+ * src/globals.cc (_Swap_lock_struct<>): Likewise.
+ * include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): New
+ member to support...
+ * include/ext/ropeimpl.h (rope<>::c_str): Follow *all* memory
+ visibility rules related to POSIX threads.
+ * testsuite/thread/pthread7-rope.cc: New test.
+
+2003-05-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/21_strings/basic_string/find/char/3.cc: New
+ file, testing basic_string<char>::find_first_not_of.
+ * testsuite/21_strings/basic_string/find/wchar_t/3.cc:
+ Likewise for basic_string<wchar_t>.
+
+2003-05-03 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/thread/pthread1.cc: Remove special case for FreeBSD.
+
+2003-05-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (CLEANFILES): Remove PCH files in target
+ directory.
+ * include/Makefile.in: Regenerate.
+
+2003-05-02 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (str()): Tidy.
+
+2003-05-02 Nathan Myers <ncm@cantrip.org>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/streambuf.tcc (__copy_streambufs): Rewrote.
+
+2003-05-02 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * include/bits/basic_string.h (swap): Remove redundant template
+ parameters from declaration of non-template member function.
+
+2003-05-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * acconfig.h (_GLIBCPP_USE_NLS): New symbol.
+ * configure.in: Move libintl.h header test...
+ * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): ...to here. Gather all
+ the NLS-related test results into one symbol.
+ * src/functexcept.cc: Use it here.
+ * aclocal.m4, config.h.in, configure: Regenerated.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (overflow): Instead of calling
+ str(), then _M_string.reserve, thus copying the contents
+ of the current buffer two times, just copy the latter in
+ a temporary, then use the 'swap trick'.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (str()): Revert the best of the
+ previous 'improvement', incorrect due to the COW nature of
+ v3 basic_string; simplify.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/streambuf.tcc (__copy_streambufs): Adjust the
+ type of __avail to ptrdiff_t to avoid signed-unsigned warning.
+
+2003-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/abi_check.cc (check_version): Update known versions.
+ Check added symbols for version_name != base version. Add missing
+ symbols to incompatible list.
+
+2003-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_EXPORT_FLAGS): Remove -Winline.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/streambuf.tcc (basic_streambuf::xsgetn):
+ Const-ify some variables.
+ (basic_streambuf::xsputn): Likewise; change the type of some
+ variables to size_t.
+ (__copy_streambufs): Change some variables to size_t.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (str()): Avoid constructing
+ a basic_string temporary not only when it would turn out
+ to be zero-sized but also when identical to the current
+ _M_string buffer.
+
+2003-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/ext/stdio_filebuf.h
+ (stdio_filebuf(int, std::ios_base::openmode, bool, size_t),
+ stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t)):
+ Shorten a bit (-10 lines) by factoring out some code.
+
+2003-04-30 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4: Add bit missing from previous patch.
+ * aclocal.m4, configure: Regenerated.
+
+2003-04-29 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/mainpage.html: Bring up to date.
+ * docs/doxygen/run_doxygen: Cosmetic tweaks. Work around a bug
+ in Doxygen.
+ * docs/doxygen/user.cfg.in: Scanning the precompiled headers
+ breaks everything. Don't scan them.
+ * docs/html/documentation.html: Point to "Write after approval"
+ notes.
+
+2003-04-29 Phil Edwards <pme@gcc.gnu.org>
+
+ * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Search for gettext outside
+ of libc if message translations are being used. Fix info text in
+ xieee_1003.1-2001 case.
+ * aclocal.m4, configure: Regenerate.
+
+2003-04-29 Joel Sherrill <joel.sherrill@OARcorp.com>
+ Loren J. Rittle <ljrittle@acm.org>
+ Martin v. Loewis <martin@v.loewis.de>
+
+ * config/cpu/i386/atomicity.h: New file.
+
+2003-04-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (open): Change to single return.
+
+2003-04-29 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (underflow): Change to single return.
+
+2003-04-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (_M_buf): is currently
+ used only for basic_filebuf, therefore move it there.
+ (basic_streambuf(), ~basic_streambuf()): Adjust.
+ * include/std/std_fstream.h (_M_buf): Moved here.
+ * include/std/std_sstream.h (setbuf): Don't set _M_buf,
+ is actually redundant for basic_stringbuf.
+ (_M_really_sync): Likewise.
+ * include/bits/fstream.tcc (basic_filebuf()): Adjust.
+ * include/bits/sstream.tcc (seekoff): Adjust.
+
+2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/localename.cc: Standardize exception strings.
+ * src/locale.cc: Same.
+ * src/ios.cc: Same.
+ * include/bits/basic_string.tcc: Same.
+ * include/bits/basic_ios.tcc: Same.
+ * include/std/std_bitset.h: Same.
+ * include/ext/ropeimpl.h: Same.
+ * include/bits/stl_vector.h: Same.
+ * include/bits/stl_deque.h: Same.
+ * include/bits/stl_bvector.h: Same.
+ * config/locale/generic/c_locale.cc: Same.
+ * config/locale/gnu/c_locale.cc: Same.
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.
+
+ * testsuite/testsuite_hooks.cc (__gnu_cxx_test): Modify.
+
+2003-04-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (_M_buf_size): is currently
+ used only for basic_filebuf, therefore move it there.
+ (basic_streambuf(), ~basic_streambuf()): Adjust.
+ * include/std/std_fstream.h (_M_buf_size): Moved here.
+ * include/bits/fstream.tcc (basic_filebuf()): Adjust.
+
+2003-04-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/streambuf.tcc (__copy_streambufs): Don't use
+ _M_buf_size (synced input is now correctly dealt with
+ elsewhere); when the output buffer is full don't fall back
+ to a snextc-sputc loop, call overflow instead.
+
+2003-04-28 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (pbackfail): Shorten a bit (6 lines)
+ the innermost 'if' by factoring out some code.
+
+2003-04-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in: Test for libintl.h.
+ * include/bits/c++config: Define __N for everybody.
+ * include/bits/basic_string.h, include/bits/stl_bvector.h,
+ include/bits/stl_deque.h, include/bits/stl_vector.h,
+ include/std/std_bitset.h: Wrap all __throw* text with __N.
+ * po/Makefile.am (pot): New rule, mostly working.
+ * src/functexcept.cc: Call gettext on all __throw* arguments when
+ -fexceptions is in effect.
+ * po/Makefile.in, config.h.in, configure: Regenerate.
+
+2003-04-28 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9523
+ * include/bits/ios_base.h (Init::_S_ios_create,
+ Init::_S_ios_destroy): Remove declarations.
+ (Init::_S_create_buffers,
+ Init::_S_destroy_buffers): Declare
+ * src/ios.cc (Init::_S_ios_create): Remove
+ (Init::_S_create_buffers): Create buffers and add to streams.
+ (Init::_S_ios_destroy): Rename to...
+ (Init::_S_destroy_buffers): this.
+ (Init::Init): Only construct streams once.
+ (Init::~Init): Flush streams, don't destroy them.
+ (ios_base::sync_with_stdio): Don't destroy streams, only buffers.
+ * testsuite/27_io/ios_base/sync_with_stdio/9523.cc: New test.
+ * testsuite/27_io/objects/char/5.cc: New test.
+ * testsuite/27_io/objects/char/5268.cc: Avoid undefined behavior.
+ * testsuite/27_io/objects/char/6.cc: New test.
+ * testsuite/27_io/objects/char/7.cc: New test.
+
+2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/objects/char/8.cc: New test.
+
+2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/codecvt/unicode/char.cc: Remove bom usage.
+ * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Same.
+
+2003-04-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_fstream.h (basic_filebuf): _M_pback_destroy to
+ _M_destroy_pback. _M_pback_create to
+ _M_create_pback. _M_underflow_common to
+ _M_underflow. _M_really_overflow to _M_overflow.
+ * include/bits/fstream.tcc: Same.
+ * src/fstream.cc: Same.
+ * include/std/std_streambuf.h (basic_streambuf): _M_in_cur_move to
+ _M_move_in_cur. _M_out_cur_move to _M_move_out_cur.
+ * include/bits/streambuf.tcc: Same.
+ * include/bits/fstream.tcc: Same.
+ * include/bits/sstream.tcc: Same.
+
+2003-04-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_classes.h (locale::_Impl): Change _M_names
+ from fixed size array.
+ (locale): Change _S_categories as well.
+ Formatting tweaks.
+ * include/bits/locale_facets.tcc: Tweak.
+ * config/locale/gnu/c_locale.cc: Assign _S_categories.
+ * config/locale/generic/c_locale.cc: Same.
+ * src/locale.cc: Tweak.
+ * src/globals.cc: Change facet_name to name_vec, add names_c.
+ * src/localename.cc: Use them.
+ (locale::_Impl::~_Impl): Destroy _M_names.
+ (locale::_Impl::_Impl): Create _M_names.
+
+2003-04-27 Andreas Schwab <schwab@suse.de>
+
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h
+ (__enc_traits): Use __ibom and __ebom instead of ignoring them.
+
+2003-04-27 Nathan Myers <ncm@cantrip.org>
+
+ Move some basic_string members out of line because
+ they are too big to reasonably be inline.
+ * include/bits/basic_string.h
+ (assign(const basic_string&, size_type, size_type),
+ assign(const _CharT*, size_type),
+ insert(size_type, const basic_string&, size_type, size_type),
+ insert(size_type, const _CharT*, size_type),
+ replace(size_type, size_type, const _CharT*, size_type)):
+ Move from here to...
+ * include/bits/basic_string.tcc: ...here.
+
+2003-04-26 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (pbackfail): Shorten a bit (10 lines)
+ the innermost 'if' by factoring out some code.
+
+2003-04-26 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/streambuf.tcc (__copy_streambufs): Don't
+ use in_avail(), simplify.
+
+2003-04-26 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (setbuf): don't set _M_buf_size,
+ in basic_stringbuf it's unused.
+
+ * include/std/std_sstream.h (underflow): consistently use
+ _M_in_cur, not gptr().
+
+2003-04-25 Ranjit Mathew <rmathew@hotmail.com>
+ Phil Edwards <pme@gcc.gnu.org>
+
+ * testsuite_flags.in: Guard against the possibility
+ of having "xgcc" as a part of a folder name in the
+ path to the GCC build folder.
+ * testsuite/Makefile.am: Likewise.
+ * testsuite/Makefile.in: Regenerated.
+
+2003-04-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/10132
+ * include/std/std_fstream.h (basic_filebuf::is_open): Add throw()
+ exception specifications.
+ (basic_filebuf::close): Same.
+ (basic_filebuf::_M_pback_destroy): Same.
+ (basic_filebuf::_M_destroy_internal_buffer): Same.
+ (basic_filebuf): Remove __res_type typedef.
+ * src/fstream.cc: Same.
+ * include/bits/fstream.tcc
+ (basic_filebuf::_M_convert_to_external): Simplify.
+ (basic_filebuf::seekoff): Use has_facet before use_facet.
+ (basic_filebuf::close): Add exception specification of throw().
+ * testsuite/27_io/basic_filebuf/cons: New.
+ * testsuite/27_io/basic_filebuf/cons/wchar_t: New.
+ * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc: New.
+ * testsuite/27_io/basic_filebuf/seekoff/10132-2.cc: New.
+ * testsuite/27_io/basic_filebuf/seekpos/10132-3.cc: New.
+
+2003-04-25 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_classes.h
+ (locale::_S_extra_categories_size): Remove.
+ * src/locale.cc: Remove _S_extra_categories_size.
+ * src/localename.cc: Same.
+ * config/locale/gnu/c_locale.cc: Same.
+ * config/locale/generic/c_locale.cc: Same.
+
+2003-04-24 Richard Sandiford <rsandifo@redhat.com>
+
+ * src/localename.cc (__gnu_cxx::facet_vec): Correct types.
+
+2003-04-24 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/17_intro/howto.html: Update some links.
+ * docs/html/18_support/howto.html: Link doxygen numeric_limits notes.
+ * docs/html/27_io/howto.html: Link doxygen stdio_filebuf notes.
+ * docs/html/ext/howto.html: Link to demangler notes and API.
+ * docs/html/faq/index.html: Remove trailing whitespace.
+ (1.4, 2.4, 3.8, 4.1): Bring up to date.
+ (5.6): Change to a bulleted list.
+
+ * docs/html/faq/index.txt, docs/html/documentation.html,
+ docs/html/17_intro/porting.html: Regenerate.
+
+2003-04-23 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/basic_filebuf/3.cc: _S_pback_size now
+ belongs to basic_filebuf.
+ * testsuite/27_io/basic_fstream/3.cc: Likewise.
+ * testsuite/27_io/basic_ifstream/3.cc: Likewise.
+ * testsuite/27_io/basic_ios/3.cc: Remove _S_pback_size
+ instantiation (now belongs to basic_filebuf).
+ * testsuite/27_io/basic_iostream/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc:
+ _S_pback_size now belongs to basic_filebuf.
+ * testsuite/27_io/basic_istringstream/3.cc: Remove _S_pback_size
+ instantiation (now belongs to basic_filebuf).
+ * testsuite/27_io/basic_ofstream/3.cc: _S_pback_size now
+ belongs to basic_filebuf.
+ * testsuite/27_io/basic_ostream/3.cc: Remove _S_pback_size
+ instantiation (now belongs to basic_filebuf).
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc:
+ _S_pback_size now belongs to basic_filebuf.
+ * testsuite/27_io/basic_ostringstream/3.cc: Remove _S_pback_size
+ instantiation (now belongs to basic_filebuf).
+ * testsuite/27_io/basic_streambuf/3.cc: _S_pback_size now belongs
+ to basic_filebuf.
+ * testsuite/27_io/basic_stringbuf/3.cc: Remove _S_pback_size
+ instantiation (now belongs to basic_filebuf).
+ * testsuite/27_io/basic_stringstream/3.cc: Likewise.
+
+2003-04-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in: Move GLIBCPP_CHECK_PCH before native/cross conditions.
+ * configure: Regenerated.
+
+2003-04-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/generic/c_locale.h (__convert_from_v): Use
+ attribute unused.
+
+2003-04-23 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/ext/howto.html ('LWG Issues'): Add issue 60, partial
+ implementation only.
+ * include/bits/istream.tcc (putback, unget, sync, tellg, seekg):
+ Comment and change to comply with DR 60 and the effect on gcount().
+ * include/std/std_istream.h: Update comments.
+ * testsuite/27_io/basic_istream/putback/char/1.cc (test01): Add
+ comments about reasons for tests. Test sync() against gcount().
+ * testsuite/27_io/basic_istream/seekg/char/2.cc: New file, test
+ for effect on gcount().
+ * testsuite/27_io/basic_istream/tellg/char/2.cc: New file, test
+ for effect on gcount().
+
+2003-04-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/27_io/basic_filebuf/close/char/9964.cc (test_07):
+ Adjust timing.
+
+2003-04-22 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (_S_pback_size, _M_pback,
+ _M_pback_cur_save, _M_pback_end_save, _M_pback_init,
+ _M_pback_create(), _M_pback_destroy()): Move to basic_filebuf.
+ (basic_streambuf::basic_streambuf()): Adjust.
+ * include/std/std_fstream.h (_S_pback_size, _M_pback,
+ _M_pback_cur_save, _M_pback_end_save, _M_pback_init,
+ _M_pback_create(), _M_pback_destroy()): Moved here
+ from basic_streambuf.
+ * include/bits/fstream.tcc (basic_filebuf::basic_filebuf()):
+ Adjust.
+ (basic_filebuf::_S_pback_size): Add declaration.
+ * include/bits/streambuf.tcc (basic_streambuf::_S_pback_size):
+ Remove declaration.
+
+2003-04-21 Paolo Carlini <pcarlini@unitus.it>
+
+ Consistently use _M_in_beg instead of eback(), _M_in_cur
+ instead of gptr(), and so on.
+ * include/bits/fstream.tcc (pbackfail, imbue): Here.
+ * include/bits/sstream.tcc (pbackfail, seekoff, seekpos): Ditto.
+ * include/bits/streambuf.tcc (sbumpc, sputbackc,
+ __copy_streambufs): Ditto.
+ * include/std/std_streambuf.h (sgetc): Ditto.
+
+2003-04-21 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (pbackfail, overflow):
+ Formatting fixes.
+
+2003-04-21 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (uflow()): It's used only by
+ basic_stringbuf (i.e., basic_filebuf provide its own uflow()),
+ therefore do not consider the _M_buf_unified == true case.
+
+ * include/std/std_streambuf.h (sgetc()): Restore __ret variable.
+
+2003-04-20 Paolo Carlini <pcarlini@unitus.it>
+
+ * docs/html/ext/howto.html ('LWG Issues'):
+ Add issues 19, 90, 171, 231, 271.
+
+2003-04-20 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (pbackfail): Remove redundant
+ NULL pointer check from test involving _M_in_*.
+ (overflow, seekoff, seekpos): Const qualify bool variables.
+ * include/std/std_sstream.h (underflow): Remove redundant
+ NULL pointer check from test involving _M_in_*.
+ (_M_really_sync): Const qualify bool variables.
+ * src/fstream.cc (_M_underflow_common): Remove redundant
+ NULL pointer check from test involving _M_in_*, const qualify
+ bool variables.
+
+ * include/std/std_streambuf.h (sgetc): Remove redundant
+ variable.
+
+2003-04-18 Paolo Carlini <pcarlini@unitus.it>
+
+ According to 5.9 para 2 (second bullet) for pointers p, q
+ pointing to the same type, with p == 0 and q == 0, (p < q)
+ is false.
+ * include/bits/fstream.tcc (close, overflow, _M_really_overflow,
+ seekoff): Remove redundant NULL pointer checks from tests
+ involving _M_out_* and _M_in_*, const qualify bool variables.
+ (showmanyc, pbackfail, _M_convert_to_external, imbue): Const
+ qualify bool variables.
+ * include/bits/streambuf.tcc (sbumpc, sputbackc, sungetc, sputc):
+ Remove redundant NULL pointer checks from tests involving
+ _M_out_* and _M_in_*, const qualify bool variables.
+ * include/std/std_fstream.h (sync): Likewise.
+ (_M_is_indeterminate): Const qualify bool variables.
+ * include/std/std_streambuf.h (sgetc, uflow): Remove redundant
+ NULL pointer checks from tests involving _M_out_* and _M_in_*,
+ const qualify bool variables.
+ (_M_in_cur_move, _M_out_cur_move, uflow): Const qualify bool
+ variables.
+
+2003-04-18 Loren J. Rittle <ljrittle@acm.org>
+
+ * include/c_std/std_cmath.h (C99 FP capture): Only undefine said
+ C99 FP macros, if actually captured.
+
+ * docs/html/17_intro/porting.texi (_GLIBCPP_USE_C99_CHECK): New macro.
+ (_GLIBCPP_USE_C99_DYNAMIC): New macro.
+ (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
+ (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
+ * config/os/bsd/freebsd/os_defines.h (_GLIBCPP_USE_C99_CHECK):
+ New macro.
+ (_GLIBCPP_USE_C99_DYNAMIC): New macro.
+ (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
+ (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
+ * include/c_std/std_cstdlib.h: Use new macros.
+ * include/c_std/std_cstdio.h: Use new macros.
+ * include/c_std/std_cwchar.h: Use new macros.
+
+2003-04-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/9555
+ * include/bits/ostream.tcc: Catch all exceptions for formatted
+ output, instead of std::exception and derivatives.
+ * include/bits/istream.tcc: Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc:
+ * testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc:
+ * testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc:
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc:
+ * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
+ * testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc:
+ New.
+
+2003-04-17 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/c++config: Minor cosmetic tweaks.
+
+2003-04-17 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite_flags.in (PCHFLAGS): Find PCH in new home.
+ * include/Makefile.am (pch_input): Find in ${target_builddir}.
+ (pch_output): Rename to...
+ (pch_output_builddir): ..this. Find in ${target_builddir}.
+ (pch_source): Tweak.
+ (pch_build): Key off a built file.
+ (pch_output rule): Rename to...
+ (pch_input rule): ...this. Produce ${pch_output_builddir}
+ instead of ${pch_output}.
+ (install-pch rule): Install ${pch_output_builddir}.
+ * include/Makefile.in: Regenerated.
+
+2003-04-17 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (setp): _M_out_lim, being
+ the end limit of used put area, is set equal to _M_out_beg.
+
+2003-04-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_PCH): New.
+ * aclocal.m4: Regenerated.
+ * configure.in: Remove old demangler bits.
+ Call pch checks.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+ * include/Makefile.am (allstamps): Now allstamped.
+ (allcreated): Define this.
+ (all-local): Use 'em.
+ Conditionally define pch_build, pch_install based on
+ GLIBCPP_BUILD_PCH.
+ (${pch_output}): New rule.
+ (install-pch): New rule.
+ (install-headers): New rule.
+ (install-data-local): Install headers and conditionally pch.
+ * include/Makefile.in: Regenerate.
+ * testsuite_flags.in (--build-cxx): Use pch file.
+
+2003-04-16 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/ext/sgiexts.html: Fix path to stylesheet.
+
+2003-04-15 Benjamin Kosnik <bkoz at redhat dot com>
+ Paolo Carlini <pcarlini at unitus dot it>
+
+ PR libstdc++/9423
+ * docs/html/27_io/howto.html
+ ('The buffering is screwing up my program!'): Explain that
+ opening counts as an I/O operation.
+
+2003-04-15 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/thread/pthread1.cc: Enable for darwin test.
+ * testsuite/thread/pthread2.cc: Same.
+ * testsuite/thread/pthread3.cc: Same.
+ * testsuite/thread/pthread4.cc: Same.
+ * testsuite/thread/pthread5.cc: Same.
+ * testsuite/thread/pthread6.cc: Same.
+
+2003-04-15 Loren J. Rittle <ljrittle@acm.org>
+
+ libstdc++/7680
+ * include/c_std/std_cmath.h (__gnu_cx::__c99_binding): New namespace.
+ Populate it with multiple legal ways to obtain the C99 float
+ transcendentals. Use them instead of direct global reference.
+ (C99 FP capture): Guard usage with _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC.
+ * docs/html/17_intro/porting.texi
+ (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
+ (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
+ (_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC): New macro.
+ * config/os/bsd/freebsd/os_defines.h
+ (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
+ (_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
+ * testsuite/26_numerics/c_math_dynamic.cc: New file.
+
+2003-04-14 Andreas Tobler <toa@pop.agri.ch>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/generic/ctype_inline.h: Fix.
+
+2003-04-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/testsuite_hooks.h
+ (__gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher):
+ Change to try_named_locale.
+ * testsuite/testsuite_hooks.cc (__gnu_cxx_test): Same.
+
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Use
+ try_named_locale.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/7.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/8.cc: Same.
+ * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Same.
+ * testsuite/22_locale/codecvt/length/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/length/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/length/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/length/wchar_t/7.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/out/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/out/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/out/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/out/wchar_t/7.cc: Same.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/4.cc: Same.
+ * testsuite/22_locale/collate/compare/char/1.cc: Same.
+ * testsuite/22_locale/collate/compare/char/2.cc: Same.
+ * testsuite/22_locale/collate/compare/char/3.cc: Same.
+ * testsuite/22_locale/collate/compare/wchar_t/1.cc: Same.
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc: Same.
+ * testsuite/22_locale/collate/compare/wchar_t/3.cc: Same.
+ * testsuite/22_locale/collate/hash/char/2.cc: Same.
+ * testsuite/22_locale/collate/hash/wchar_t/2.cc: Same.
+ * testsuite/22_locale/collate/transform/char/2.cc: Same.
+ * testsuite/22_locale/collate/transform/char/3.cc: Same.
+ * testsuite/22_locale/collate/transform/wchar_t/2.cc: Same.
+ * testsuite/22_locale/collate/transform/wchar_t/3.cc: Same.
+ * testsuite/22_locale/collate_byname/1.cc: Same.
+ * testsuite/22_locale/ctype/is/char/2.cc: Same.
+ * testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
+ * testsuite/22_locale/ctype/narrow/wchar_t/3.cc: Same.
+ * testsuite/22_locale/ctype/widen/wchar_t/2.cc: Same.
+ * testsuite/22_locale/ctype/widen/wchar_t/3.cc: Same.
+ * testsuite/22_locale/facet/2.cc: Same.
+ * testsuite/22_locale/locale/cons/2.cc: Same.
+ * testsuite/22_locale/locale/cons/4.cc: Same.
+ * testsuite/22_locale/locale/cons/5.cc: Same.
+ * testsuite/22_locale/locale/cons/7.cc: Same.
+ * testsuite/22_locale/locale/cons/7222-c.cc: Same.
+ * testsuite/22_locale/locale/cons/7222-env.cc: Same.
+ * testsuite/22_locale/locale/global_locale_objects/2.cc: Same.
+ * testsuite/22_locale/messages/members/char/1.cc: Same.
+ * testsuite/22_locale/messages/members/char/2.cc: Same.
+ * testsuite/22_locale/messages/members/char/3.cc: Same.
+ * testsuite/22_locale/messages_byname/1.cc: Same.
+ * testsuite/22_locale/money_get/get/char/1.cc: Same.
+ * testsuite/22_locale/money_get/get/char/2.cc: Same.
+ * testsuite/22_locale/money_get/get/char/3.cc: Same.
+ * testsuite/22_locale/money_get/get/char/4.cc: Same.
+ * testsuite/22_locale/money_get/get/wchar_t/1.cc: Same.
+ * testsuite/22_locale/money_get/get/wchar_t/2.cc: Same.
+ * testsuite/22_locale/money_get/get/wchar_t/3.cc: Same.
+ * testsuite/22_locale/money_get/get/wchar_t/4.cc: Same.
+ * testsuite/22_locale/money_put/put/char/1.cc: Same.
+ * testsuite/22_locale/money_put/put/char/2.cc: Same.
+ * testsuite/22_locale/money_put/put/char/3.cc: Same.
+ * testsuite/22_locale/money_put/put/wchar_t/1.cc: Same.
+ * testsuite/22_locale/money_put/put/wchar_t/2.cc: Same.
+ * testsuite/22_locale/money_put/put/wchar_t/3.cc: Same.
+ * testsuite/22_locale/moneypunct/members/char/2.cc: Same.
+ * testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Same.
+ * testsuite/22_locale/moneypunct_byname/1.cc: Same.
+ * testsuite/22_locale/num_get/get/char/1.cc: Same.
+ * testsuite/22_locale/num_get/get/char/2.cc: Same.
+ * testsuite/22_locale/num_get/get/char/3.cc: Same.
+ * testsuite/22_locale/num_get/get/char/5.cc: Same.
+ * testsuite/22_locale/num_get/get/char/6.cc: Same.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Same.
+ * testsuite/22_locale/num_get/get/wchar_t/2.cc: Same.
+ * testsuite/22_locale/num_get/get/wchar_t/3.cc: Same.
+ * testsuite/22_locale/num_get/get/wchar_t/5.cc: Same.
+ * testsuite/22_locale/num_get/get/wchar_t/6.cc: Same.
+ * testsuite/22_locale/num_put/put/char/1.cc: Same.
+ * testsuite/22_locale/num_put/put/char/2.cc: Same.
+ * testsuite/22_locale/num_put/put/char/3.cc: Same.
+ * testsuite/22_locale/num_put/put/char/5.cc: Same.
+ * testsuite/22_locale/num_put/put/wchar_t/1.cc: Same.
+ * testsuite/22_locale/num_put/put/wchar_t/2.cc: Same.
+ * testsuite/22_locale/num_put/put/wchar_t/3.cc: Same.
+ * testsuite/22_locale/num_put/put/wchar_t/5.cc: Same.
+ * testsuite/22_locale/numpunct/members/char/1.cc: Same.
+ * testsuite/22_locale/numpunct/members/char/2.cc: Same.
+ * testsuite/22_locale/numpunct/members/wchar_t/1.cc: Same.
+ * testsuite/22_locale/numpunct/members/wchar_t/2.cc: Same.
+ * testsuite/22_locale/numpunct_byname/1.cc: Same.
+ * testsuite/22_locale/numpunct_byname/2.cc: Same.
+ * testsuite/22_locale/time_get/date_order/char/1.cc: Same.
+ * testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_get/get_date/char/1.cc: Same.
+ * testsuite/22_locale/time_get/get_date/char/2.cc: Same.
+ * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Same.
+ * testsuite/22_locale/time_get/get_monthname/char/1.cc: Same.
+ * testsuite/22_locale/time_get/get_monthname/char/2.cc: Same.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Same.
+ * testsuite/22_locale/time_get/get_time/char/1.cc: Same.
+ * testsuite/22_locale/time_get/get_time/char/2.cc: Same.
+ * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Same.
+ * testsuite/22_locale/time_get/get_weekday/char/1.cc: Same.
+ * testsuite/22_locale/time_get/get_weekday/char/2.cc: Same.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Same.
+ * testsuite/22_locale/time_get/get_year/char/1.cc: Same.
+ * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_put/put/char/1.cc: Same.
+ * testsuite/22_locale/time_put/put/char/2.cc: Same.
+ * testsuite/22_locale/time_put/put/char/3.cc: Same.
+ * testsuite/22_locale/time_put/put/char/4.cc: Same.
+ * testsuite/22_locale/time_put/put/char/5.cc: Same.
+ * testsuite/22_locale/time_put/put/char/6.cc: Same.
+ * testsuite/22_locale/time_put/put/char/7.cc: Same.
+ * testsuite/22_locale/time_put/put/char/8.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/1.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/2.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/3.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/4.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/6.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/7.cc: Same.
+ * testsuite/22_locale/time_put/put/wchar_t/8.cc: Same.
+ * testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Same.
+ * testsuite/27_io/basic_ios/copyfmt/char/2.cc: Same.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc: Same.
+ * testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Same.
+ * testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Same.
+
+2003-04-14 Andreas Tobler <toa@pop.agri.ch>
+
+ * configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses
+ solaris includes, not generic.
+
+2003-04-14 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/26_numerics/c99_classification_macros_c.cc: Add XFAIL.
+
+ * include/std/std_bitset.h (_M_do_find_next): Fix -Wall nit.
+ * include/bits/concept_check.h: Fix multi-line comment.
+ * testsuite/17_intro/headers.cc (dg-options): Add -Wall -Wsystem-header
+ when target is *-*-freebsd*.
+
+2003-04-14 Nathan Myers <ncm@cantrip.org>
+ Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9701 (in_avail())
+ * include/std/std_streambuf.h (in_avail): Simplify, in_avail
+ doesn't care if there is anything in some putback cell.
+ * testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc: Add.
+
+ * testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Remove some
+ unused string literals.
+
+2003-04-14 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (basic_filebuf::setbuf): Don't set
+ _M_out_end, _M_set_indeterminate() does it.
+
+2003-04-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * os/hpux/ctype_inline.h: Replace with gnu-linux version.
+
+2003-04-12 David Edelsohn <edelsohn@gnu.org>
+
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc:
+ Change basic_streambuf instantiation to "unsigned char".
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+
+2003-04-12 Paolo Carlini <pcarlini@unitus.it>
+
+ Remove _M_buf_size_opt, use directly _M_buf_size instead.
+ * include/bits/fstream.tcc
+ (basic_filebuf::_M_allocate_internal_buffer, setbuf): Remove
+ references to _M_buf_size_opt.
+ * include/bits/sstream.tcc (basic_stringbuf::overflow): Likewise.
+ * include/bits/streambuf.tcc (__copy_streambufs): Likewise, rename
+ __bufsize to __in_avail and __size_opt to __buf_size.
+ * include/ext/stdio_filebuf.h (stdio_filebuf::stdio_filebuf): Likewise.
+ * include/std/std_sstream.h (_M_stringbuf_init, setbuf): Likewise.
+ * include/std/std_streambuf.h (~basic_streambuf(),
+ basic_streambuf()): Likewise, remove _M_buf_size_opt member.
+ * testsuite/27_io/basic_filebuf/close/char/3.cc: Set _M_buf_size.
+ * testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/snextc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sputc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sputn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1.cc: Likewise.
+
+2003-04-12 Paolo Carlini <pcarlini at unitus dot it>
+
+ * include/ext/stdio_filebuf.h
+ (stdio_filebuf::stdio_filebuf(int, openmode, bool, size_t),
+ stdio_filebuf::stdio_filebuf(__c_file*, openmode, size_t):
+ _M_buf_size_opt == 0 only means "not to use an allocated buffer"
+ since a stack-based buffer is used for small values of the size_t
+ parameter.
+ * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow).
+ If _M_buf_size != 0 flush out the buffer (any kind, stack-based too).
+ * testsuite/ext/stdio_filebuf_2.cc: New testfile.
+
+2003-04-12 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9533
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: New.
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc: Ditto.
+
+2003-04-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/locale/cons/3.cc: Split.
+ * testsuite/22_locale/locale/cons/7222-c.cc: New.
+ * testsuite/22_locale/locale/cons/7222-env.cc: New.
+ Check before trying to create a locale from the environment.
+ * testsuite/27_io/ios_base/state/1.cc (test02): Use "C" locale.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+ Adjust includes.
+
+2003-04-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/ctype/is/char/3.cc (test03): Use the classic
+ locale to construct this hybrid locale, not the global locale.
+
+2003-04-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Add
+ instantiation for AIX.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/25_algorithms/min_max.cc: Same.
+
+2003-04-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * basic_file_stdio.cc (__basic_file<char>::close): Don't flush stream
+ twice. Always set _M_cfile to 0 when stream was open.
+
+2003-04-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ Reshuffle 27_io testsuite.
+ * testsuite/27_io/filebuf.cc,
+ filebuf_members-1.tst, filebuf_members-1.txt, filebuf_members.cc,
+ filebuf_virtuals-1.tst, filebuf_virtuals-1.txt,
+ filebuf_virtuals-2.tst, filebuf_virtuals-3.tst,
+ filebuf_virtuals.cc, fpos.cc, fstream.cc, fstream_members.cc,
+ ifstream.cc, ifstream_members-1.tst, ifstream_members-1.txt,
+ ifstream_members.cc, instantiations.cc, ios.cc,
+ ios_base_callbacks.cc, ios_base_members_static-1.tst,
+ ios_base_members_static.cc, ios_base_storage.cc,
+ ios_base_types.cc, ios_ctor.cc, ios_init.cc,
+ ios_manip_basefield.cc, ios_manip_fmtflags.cc, ios_members.cc,
+ iostream.cc, iostream_members.cc, istream.cc,
+ istream_exception.cc, istream_extractor_char.cc,
+ istream_extractor_other-1.tst, istream_extractor_other-1.txt,
+ istream_extractor_other-2.tst, istream_extractor_other.cc,
+ istream_manip.cc, istream_seeks-1.tst, istream_seeks-1.txt,
+ istream_seeks-2.tst, istream_seeks-3.tst, istream_seeks.cc,
+ istream_sentry.cc, istream_unformatted-1.tst,
+ istream_unformatted-1.txt, istream_unformatted.cc,
+ istringstream.cc, istringstream_members.cc,
+ narrow_stream_objects.cc, ofstream.cc, ofstream_members-1.tst,
+ ofstream_members.cc, ostream.cc, ostream_exception.cc,
+ ostream_fail.cc, ostream_inserter_arith.cc,
+ ostream_inserter_char-1.tst, ostream_inserter_char-1.txt,
+ ostream_inserter_char.cc, ostream_inserter_other-1.tst,
+ ostream_inserter_other-2.tst, ostream_inserter_other.cc,
+ ostream_manip.cc, ostream_seeks-1.tst, ostream_seeks.cc,
+ ostream_sentry.cc, ostream_unformatted.cc, ostringstream.cc,
+ ostringstream_members.cc, standard_manipulators.cc, streambuf.cc,
+ streambuf_members.cc, stringbuf.cc, stringbuf_members.cc,
+ stringbuf_virtuals.cc, stringstream.cc, stringstream_members.cc,
+ wide_stream_objects.cc, istream_extractor_arith/01.cc,
+ istream_extractor_arith/02.cc, istream_extractor_arith/03.cc,
+ istream_extractor_arith/06.cc, istream_extractor_arith/07.cc,
+ istream_extractor_arith/08.cc, istream_extractor_arith/09.cc,
+ istream_extractor_arith/10.cc, istream_extractor_arith/11.cc,
+ istream_extractor_arith/12.cc, istream_extractor_arith/13.cc:
+ Split into...
+ * 27_io/basic_filebuf/1.cc: New.
+ * 27_io/basic_filebuf/2.cc: New.
+ * 27_io/basic_filebuf/3.cc: New.
+ * 27_io/basic_filebuf/4.cc: New.
+ * 27_io/basic_filebuf/close/char/1.cc: New.
+ * 27_io/basic_filebuf/close/char/2.cc: New.
+ * 27_io/basic_filebuf/close/char/3.cc: New.
+ * 27_io/basic_filebuf/close/char/4879.cc: New.
+ * 27_io/basic_filebuf/close/char/9964.cc: New.
+ * 27_io/basic_filebuf/imbue/char/1.cc: New.
+ * 27_io/basic_filebuf/imbue/char/9322.cc: New.
+ * 27_io/basic_filebuf/in_avail/char/1.cc: New.
+ * 27_io/basic_filebuf/is_open/char/1.cc: New.
+ * 27_io/basic_filebuf/open/char/1.cc: New.
+ * 27_io/basic_filebuf/open/char/2.cc: New.
+ * 27_io/basic_filebuf/open/char/3.cc: New.
+ * 27_io/basic_filebuf/open/char/9507.cc: New.
+ * 27_io/basic_filebuf/overflow/char/1.cc: New.
+ * 27_io/basic_filebuf/overflow/char/3599.cc: New.
+ * 27_io/basic_filebuf/overflow/char/9169.cc: New.
+ * 27_io/basic_filebuf/overflow/char/9182-2.cc: New.
+ * 27_io/basic_filebuf/overflow/char/9988.cc: New.
+ * 27_io/basic_filebuf/sbumpc/char/1.cc: New.
+ * 27_io/basic_filebuf/sbumpc/char/9825.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/1.cc: New.
+ * 27_io/basic_filebuf/seekoff/char/2.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/1.cc: New.
+ * 27_io/basic_filebuf/seekpos/char/2.cc: New.
+ * 27_io/basic_filebuf/setbuf/char/1.cc: New.
+ * 27_io/basic_filebuf/setbuf/char/2.cc: New.
+ * 27_io/basic_filebuf/setbuf/char/3.cc: New.
+ * 27_io/basic_filebuf/sgetc/char/1.cc: New.
+ * 27_io/basic_filebuf/sgetn/char/1.cc: New.
+ * 27_io/basic_filebuf/sgetn/char/2.cc: New.
+ * 27_io/basic_filebuf/snextc/char/1.cc: New.
+ * 27_io/basic_filebuf/sputbackc/char/1.cc: New.
+ * 27_io/basic_filebuf/sputbackc/char/9425.cc: New.
+ * 27_io/basic_filebuf/sputc/char/1.cc: New.
+ * 27_io/basic_filebuf/sputc/char/1057.cc: New.
+ * 27_io/basic_filebuf/sputc/char/9701-2.cc: New.
+ * 27_io/basic_filebuf/sputn/char/1.cc: New.
+ * 27_io/basic_filebuf/sputn/char/1057.cc: New.
+ * 27_io/basic_filebuf/sputn/char/9701-1.cc: New.
+ * 27_io/basic_filebuf/sungetc/char/1.cc: New.
+ * 27_io/basic_filebuf/sync/char/1057.cc: New.
+ * 27_io/basic_filebuf/sync/char/9182-1.cc: New.
+ * 27_io/basic_filebuf/underflow/char/10097.cc: New.
+ * 27_io/basic_fstream/1.cc: New.
+ * 27_io/basic_fstream/2.cc: New.
+ * 27_io/basic_fstream/3.cc: New.
+ * 27_io/basic_fstream/4.cc: New.
+ * 27_io/basic_fstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_ifstream/1.cc: New.
+ * 27_io/basic_ifstream/2.cc: New.
+ * 27_io/basic_ifstream/3.cc: New.
+ * 27_io/basic_ifstream/4.cc: New.
+ * 27_io/basic_ifstream/cons/char/1.cc: New.
+ * 27_io/basic_ifstream/open/char/1.cc: New.
+ * 27_io/basic_ifstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_ios/1.cc: New.
+ * 27_io/basic_ios/2.cc: New.
+ * 27_io/basic_ios/3.cc: New.
+ * 27_io/basic_ios/4.cc: New.
+ * 27_io/basic_ios/clear/char/1.cc: New.
+ * 27_io/basic_ios/cons/char/1.cc: New.
+ * 27_io/basic_ios/cons/char/2.cc: New.
+ * 27_io/basic_ios/cons/char/3.cc: New.
+ * 27_io/basic_ios/copyfmt/char/1.cc: New.
+ * 27_io/basic_ios/copyfmt/char/2.cc: New.
+ * 27_io/basic_ios/exceptions/char/1.cc: New.
+ * 27_io/basic_ios/locales/char/1.cc: New.
+ * 27_io/basic_iostream/1.cc: New.
+ * 27_io/basic_iostream/2.cc: New.
+ * 27_io/basic_iostream/3.cc: New.
+ * 27_io/basic_iostream/4.cc: New.
+ * 27_io/basic_istream/1.cc: New.
+ * 27_io/basic_istream/2.cc: New.
+ * 27_io/basic_istream/3.cc: New.
+ * 27_io/basic_istream/4.cc: New.
+ * 27_io/basic_istream/exceptions/char/9561.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/01.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/02.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/03.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/06.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/07.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/08.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/09.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/10.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/11.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/12.cc: New.
+ * 27_io/basic_istream/extractors_arithmetic/char/13.cc: New.
+ * 27_io/basic_istream/extractors_character/char/1.cc: New.
+ * 27_io/basic_istream/extractors_character/char/2.cc: New.
+ * 27_io/basic_istream/extractors_character/char/3.cc: New.
+ * 27_io/basic_istream/extractors_character/char/9826.cc: New.
+ * 27_io/basic_istream/extractors_other/char/1.cc: New.
+ * 27_io/basic_istream/extractors_other/char/2.cc: New.
+ * 27_io/basic_istream/extractors_other/char/3.cc: New.
+ * 27_io/basic_istream/extractors_other/char/9318-in.cc: New.
+ * 27_io/basic_istream/extractors_other/char/9424-in.cc: New.
+ * 27_io/basic_istream/get/char/1.cc: New.
+ * 27_io/basic_istream/get/char/2.cc: New.
+ * 27_io/basic_istream/getline/char/1.cc: New.
+ * 27_io/basic_istream/getline/char/2.cc: New.
+ * 27_io/basic_istream/getline/char/3.cc: New.
+ * 27_io/basic_istream/ignore/char/1.cc: New.
+ * 27_io/basic_istream/ignore/char/6360.cc: New.
+ * 27_io/basic_istream/ignore/char/7220.cc: New.
+ * 27_io/basic_istream/peek/char/1.cc: New.
+ * 27_io/basic_istream/peek/char/6414.cc: New.
+ * 27_io/basic_istream/putback/char/1.cc: New.
+ * 27_io/basic_istream/read/char/1.cc: New.
+ * 27_io/basic_istream/read/char/2.cc: New.
+ * 27_io/basic_istream/read/char/3.cc: New.
+ * 27_io/basic_istream/readsome/char/6746-1.cc: New.
+ * 27_io/basic_istream/readsome/char/6746-2.cc: New.
+ * 27_io/basic_istream/readsome/char/8258.cc: New.
+ * 27_io/basic_istream/seekg/char/2346-fstream.cc: New.
+ * 27_io/basic_istream/seekg/char/2346-sstream.cc: New.
+ * 27_io/basic_istream/seekg/char/8348-1.cc: New.
+ * 27_io/basic_istream/seekg/char/8348-2.cc: New.
+ * 27_io/basic_istream/seekg/char/fstream.cc: New.
+ * 27_io/basic_istream/seekg/char/sstream.cc: New.
+ * 27_io/basic_istream/sentry/char/1.cc: New.
+ * 27_io/basic_istream/sentry/char/2.cc: New.
+ * 27_io/basic_istream/sentry/char/3.cc: New.
+ * 27_io/basic_istream/sentry/char/3983-fstream.cc: New.
+ * 27_io/basic_istream/sentry/char/3983-sstream.cc: New.
+ * 27_io/basic_istream/tellg/char/1.cc: New.
+ * 27_io/basic_istream/tellg/char/8348.cc: New.
+ * 27_io/basic_istream/tellg/char/fstream.cc: New.
+ * 27_io/basic_istream/tellg/char/sstream.cc: New.
+ * 27_io/basic_istream/ws/char/1.cc: New.
+ * 27_io/basic_istringstream/1.cc: New.
+ * 27_io/basic_istringstream/2.cc: New.
+ * 27_io/basic_istringstream/3.cc: New.
+ * 27_io/basic_istringstream/4.cc: New.
+ * 27_io/basic_istringstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_istringstream/str/char/1.cc: New.
+ * 27_io/basic_ofstream/1.cc: New.
+ * 27_io/basic_ofstream/2.cc: New.
+ * 27_io/basic_ofstream/3.cc: New.
+ * 27_io/basic_ofstream/4.cc: New.
+ * 27_io/basic_ofstream/cons/char/2.cc: New.
+ * 27_io/basic_ofstream/open/char/1.cc: New.
+ * 27_io/basic_ofstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_ostream/1.cc: New.
+ * 27_io/basic_ostream/2.cc: New.
+ * 27_io/basic_ostream/3.cc: New.
+ * 27_io/basic_ostream/4.cc: New.
+ * 27_io/basic_ostream/cons/char/9827.cc: New.
+ * 27_io/basic_ostream/endl/char/1.cc: New.
+ * 27_io/basic_ostream/ends/char/1.cc: New.
+ * 27_io/basic_ostream/ends/char/2.cc: New.
+ * 27_io/basic_ostream/exceptions/char/9561.cc: New.
+ * 27_io/basic_ostream/flush/char/1.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/1.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/2.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/3.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/4.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/4402.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/5.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/char/6.cc: New.
+ * 27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/1.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/2.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/3.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/4.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/5.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/6.cc: New.
+ * 27_io/basic_ostream/inserters_character/char/8.cc: New.
+ * 27_io/basic_ostream/inserters_character/wchar_t/7.cc: New.
+ * 27_io/basic_ostream/inserters_character/wchar_t/8.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/1.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/2.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/3.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/4.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/9318-out.cc: New.
+ * 27_io/basic_ostream/inserters_other/char/9424-out.cc: New.
+ * 27_io/basic_ostream/sentry/char/1.cc: New.
+ * 27_io/basic_ostream/sentry/char/2.cc: New.
+ * 27_io/basic_ostream/sentry/char/3983-fstream.cc: New.
+ * 27_io/basic_ostream/sentry/char/3983-sstream.cc: New.
+ * 27_io/basic_ostream/tellp/char/1.cc: New.
+ * 27_io/basic_ostream/tellp/char/2.cc: New.
+ * 27_io/basic_ostringstream/1.cc: New.
+ * 27_io/basic_ostringstream/2.cc: New.
+ * 27_io/basic_ostringstream/3.cc: New.
+ * 27_io/basic_ostringstream/4.cc: New.
+ * 27_io/basic_ostringstream/cons/char/3.cc: New.
+ * 27_io/basic_ostringstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_ostringstream/str/char/1.cc: New.
+ * 27_io/basic_ostringstream/str/char/2.cc: New.
+ * 27_io/basic_streambuf/1.cc: New.
+ * 27_io/basic_streambuf/2.cc: New.
+ * 27_io/basic_streambuf/3.cc: New.
+ * 27_io/basic_streambuf/cons/char/1.cc: New.
+ * 27_io/basic_streambuf/imbue/char/1.cc: New.
+ * 27_io/basic_streambuf/imbue/char/9322.cc: New.
+ * 27_io/basic_streambuf/overflow/char/1.cc: New.
+ * 27_io/basic_streambuf/overflow/char/2.cc: New.
+ * 27_io/basic_streambuf/overflow/char/3599.cc: New.
+ * 27_io/basic_streambuf/sgetc/char/1.cc: New.
+ * 27_io/basic_streambuf/sgetn/char/1.cc: New.
+ * 27_io/basic_streambuf/sputbackc/char/9538.cc: New.
+ * 27_io/basic_streambuf/sputc/char/1057.cc: New.
+ * 27_io/basic_streambuf/sputn/char/1.cc: New.
+ * 27_io/basic_streambuf/sputn/char/1057.cc: New.
+ * 27_io/basic_streambuf/sync/char/1057.cc: New.
+ * 27_io/basic_stringbuf/1.cc: New.
+ * 27_io/basic_stringbuf/2.cc: New.
+ * 27_io/basic_stringbuf/3.cc: New.
+ * 27_io/basic_stringbuf/4.cc: New.
+ * 27_io/basic_stringbuf/5.cc: New.
+ * 27_io/basic_stringbuf/imbue/char/1.cc: New.
+ * 27_io/basic_stringbuf/imbue/char/9322.cc: New.
+ * 27_io/basic_stringbuf/in_avail/char/1.cc: New.
+ * 27_io/basic_stringbuf/overflow/char/2.cc: New.
+ * 27_io/basic_stringbuf/overflow/char/3599.cc: New.
+ * 27_io/basic_stringbuf/overflow/char/9988.cc: New.
+ * 27_io/basic_stringbuf/sbumpc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sbumpc/char/9825.cc: New.
+ * 27_io/basic_stringbuf/seekoff/char/1.cc: New.
+ * 27_io/basic_stringbuf/seekoff/char/2.cc: New.
+ * 27_io/basic_stringbuf/seekpos/char/1.cc: New.
+ * 27_io/basic_stringbuf/seekpos/char/2.cc: New.
+ * 27_io/basic_stringbuf/setbuf/char/1.cc: New.
+ * 27_io/basic_stringbuf/setbuf/char/2.cc: New.
+ * 27_io/basic_stringbuf/setbuf/char/3.cc: New.
+ * 27_io/basic_stringbuf/sgetc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sgetn/char/1.cc: New.
+ * 27_io/basic_stringbuf/snextc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sputbackc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sputbackc/char/9425.cc: New.
+ * 27_io/basic_stringbuf/sputc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sputc/char/1057.cc: New.
+ * 27_io/basic_stringbuf/sputc/char/9404-1.cc: New.
+ * 27_io/basic_stringbuf/sputn/char/1.cc: New.
+ * 27_io/basic_stringbuf/sputn/char/1057.cc: New.
+ * 27_io/basic_stringbuf/sputn/char/9404-2.cc: New.
+ * 27_io/basic_stringbuf/str/char/1.cc: New.
+ * 27_io/basic_stringbuf/str/char/2.cc: New.
+ * 27_io/basic_stringbuf/str/char/3.cc: New.
+ * 27_io/basic_stringbuf/str/char/3955.cc: New.
+ * 27_io/basic_stringbuf/sungetc/char/1.cc: New.
+ * 27_io/basic_stringbuf/sync/char/1057.cc: New.
+ * 27_io/basic_stringstream/1.cc: New.
+ * 27_io/basic_stringstream/2.cc: New.
+ * 27_io/basic_stringstream/3.cc: New.
+ * 27_io/basic_stringstream/4.cc: New.
+ * 27_io/basic_stringstream/rdbuf/char/2832.cc: New.
+ * 27_io/basic_stringstream/str/char/1.cc: New.
+ * 27_io/basic_stringstream/str/char/2.cc: New.
+ * 27_io/basic_stringstream/str/char/3.cc: New.
+ * 27_io/basic_stringstream/str/char/4.cc: New.
+ * 27_io/fpos/1.cc: New.
+ * 27_io/fpos/2.cc: New.
+ * 27_io/fpos/3.cc: New.
+ * 27_io/ios_base/callbacks/1.cc: New.
+ * 27_io/ios_base/state/1.cc: New.
+ * 27_io/ios_base/storage/1.cc: New.
+ * 27_io/ios_base/storage/2.cc: New.
+ * 27_io/ios_base/storage/3.cc: New.
+ * 27_io/ios_base/sync_with_stdio/1.cc: New.
+ * 27_io/ios_base/sync_with_stdio/2.cc: New.
+ * 27_io/manipulators/adjustfield/char/1.cc: New.
+ * 27_io/manipulators/adjustfield/char/2.cc: New.
+ * 27_io/manipulators/basefield/char/1.cc: New.
+ * 27_io/manipulators/standard/char/1.cc: New.
+ * 27_io/manipulators/standard/char/2.cc: New.
+ * 27_io/objects/char/1.cc: New.
+ * 27_io/objects/char/2.cc: New.
+ * 27_io/objects/char/2523-1_xin.cc: New.
+ * 27_io/objects/char/2523-1_xin.in: New.
+ * 27_io/objects/char/2523-2_xin.cc: New.
+ * 27_io/objects/char/2523-2_xin.in: New.
+ * 27_io/objects/char/3045.cc: New.
+ * 27_io/objects/char/3647.cc: New.
+ * 27_io/objects/char/3_xin.cc: New.
+ * 27_io/objects/char/3_xin.in: New.
+ * 27_io/objects/char/4_xin.cc: New.
+ * 27_io/objects/char/4_xin.in: New.
+ * 27_io/objects/char/5268.cc: New.
+ * 27_io/objects/char/5280_xin.cc: New.
+ * 27_io/objects/char/5280_xin.in: New.
+ * 27_io/objects/char/6548_xin.cc: New.
+ * 27_io/objects/char/6548_xin.in: New.
+ * 27_io/objects/char/6648-1_xin.cc: New.
+ * 27_io/objects/char/6648-1_xin.in: New.
+ * 27_io/objects/char/6648-2_xin.cc: New.
+ * 27_io/objects/char/6648-2_xin.in: New.
+ * 27_io/objects/char/7744_xin.cc: New.
+ * 27_io/objects/char/7744_xin.in: New.
+ * 27_io/objects/wchar_t/1.cc: New.
+ * 27_io/types/1.cc: New.
+ * 27_io/types/2.cc: New.
+ * data/filebuf_members-1.tst: New.
+ * data/filebuf_members-1.txt: New.
+ * data/filebuf_virtuals-1.tst: New.
+ * data/filebuf_virtuals-1.txt: New.
+ * data/filebuf_virtuals-2.tst: New.
+ * data/filebuf_virtuals-3.tst: New.
+ * data/ifstream_members-1.tst: New.
+ * data/ifstream_members-1.txt: New.
+ * data/ios_base_members_static-1.tst: New.
+ * data/istream_extractor_other-1.tst: New.
+ * data/istream_extractor_other-1.txt: New.
+ * data/istream_extractor_other-2.tst: New.
+ * data/istream_seeks-1.tst: New.
+ * data/istream_seeks-1.txt: New.
+ * data/istream_seeks-2.tst: New.
+ * data/istream_seeks-3.tst: New.
+ * data/istream_unformatted-1.tst: New.
+ * data/istream_unformatted-1.txt: New.
+ * data/ofstream_members-1.tst: New.
+ * data/ostream_inserter_char-1.tst: New.
+ * data/ostream_inserter_char-1.txt: New.
+ * data/ostream_inserter_other-1.tst: New.
+ * data/ostream_inserter_other-2.tst: New.
+ * data/ostream_seeks-1.tst: New.
+
+2003-04-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/sstream.tcc (basic_stringbuf::seekpos): Remove
+ requirement that __mode must be strict input or output.
+
+ * include/std/std_streambuf.h (basic_streambuf::setp): Set
+ _M_out_lim.
+
+ * include/std/std_sstream.h (basic_strinbuf::str): Zero length
+ output string shouldn't core.
+ (basic_stringbuf::_M_really_sync): Add base argument. Remove rturn
+ type.
+ * include/bits/sstream.tcc: Adjust _M_really_sync bits here.
+
+ * include/bits/istream.tcc (basic_istream::putback): Set gcount to
+ zero.
+
+2003-04-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/data: New directory.
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify
+ to copy files from the testsuite data directory.
+ (libstdc++-v3-list-sourcefiles): Add another test list filter, for
+ testfiles containing _xin, which now means this is an interactive
+ test and should be run with the interactive dejagnu hooks.
+ * testsuite/Makefile.am: Remove testsuite_* files.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-04-09 Zack Weinberg <zack@codesourcery.com>
+
+ * docs/html/install.html: Document complete list of locales
+ required by test suite. Document procedure for installing
+ said locales under Debian. Solicit instructions for other
+ operating systems.
+
+2003-04-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * include/bits/sstream.tcc (overflow): Make sure operands of min
+ and max have the same type.
+
+2003-04-04 Jerry Quinn <jlquinn@optonline.net>
+
+ PR libstdc++/10276
+ * src/ios.cc (ios_base::_M_init): Remove _M_callbacks
+ initialization.
+
+2003-03-31 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_streambuf.h (_M_out_buf_size()): Remove.
+ * include/bits/fstream.tcc (_M_allocate_internal_buffer):
+ Don't set _M_out_end.
+ (basic_filebuf::overflow): Replace _M_out_buf_size() with
+ this->_M_out_cur && this->_M_out_cur < this->_M_out_end.
+ * include/bits/sstream.tcc (basic_stringbuf::overflow):
+ Replace _M_out_buf_size() with this->_M_out_cur < this->_M_out_end;
+ * include/bits/streambuf.tcc (basic_streambuf::sputc):
+ Replace _M_out_buf_size() with _M_out_cur && _M_out_cur < _M_out_end.
+ (basic_streambuf::xsputn): Replace _M_out_buf_size() with
+ _M_out_end - _M_out_cur.
+ (__copy_streambufs): Likewise.
+ * include/std/std_fstream.h (_M_set_determinate): Set
+ _M_out_end here.
+
+2003-03-30 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (basic_filebuf::showmanyc,
+ _M_convert_to_external, _M_really_overflow, seekoff): Fix
+ test for synced buffer.
+ * include/std/std_fstream.h (sync): Likewise.
+ * src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
+ basic_filebuf<wchar_t>::_M_underflow_common): Likewise.
+
+2003-03-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/std_sstream.h (basic_istringstream): Adjust
+ initialization.
+ (basic_ostringstream): Same.
+ (basic_stringstream): Same.
+ * include/std/std_fstream.h (basic_ifstream): Adjust initialization.
+ (basic_ofstream): Same.
+ (basic_fstream): Same.
+ * include/std/std_ostream.h (basic_ostrem): Add protected ctor
+ that does not call init.
+ * include/std/std_istream.h (basic_istream): Same.
+ (basic_iostream): Construct istream, ostream uninitialized, use
+ init to initialize just once. Add protected ctor that does not
+ call init.
+
+2003-03-28 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ PR libstdc++/9533
+ * include/bits/fstream.tcc (basic_filebuf<>::open): Don't
+ call underflow().
+ (basic_filebuf<>::showmanyc): Use the information provided
+ by codecvt and __basic_file<>::showmanyc_helper to implement
+ a non-trivial showmanyc.
+ * config/io/basic_file_stdio.h
+ (__basic_file<>::showmanyc_helper): New, declare.
+ * config/io/basic_file_stdio.cc
+ (__basic_file<>::showmanyc_helper): Define.
+ (__basic_file<>::_M_open_mode): Don't set O_NONBLOCK.
+ (__basic_file<char>::open): Don't call fcntl().
+ * acinclude.m4 (GLIBCPP_CHECK_S_ISREG_OR_S_IFREG,
+ GLIBCPP_CHECK_POLL): New macros.
+ * configure.in: Call here.
+ * acconfig.h: Add #undefs for the corresponding symbols.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+
+2003-03-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/linker-map.gnu: Remove string export restrictions.
+
+2003-03-24 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/21_strings/basic_string/find/char/1.cc: Remove
+ find_first_of, find_last_of and find_last_not_of tests.
+ * testsuite/21_strings/basic_string/find/char/2.cc: find_first_of
+ tests here, new file.
+ * testsuite/21_strings/basic_string/find/wchar_t/1.cc: Likewise,
+ remove wchar_t find_first_of, find_last_of and find_last_not_of tests.
+ * testsuite/21_strings/basic_string/find/wchar_t/2.cc: Likewise,
+ wchar_t find_first_of tests here, new file.
+ * testsuite/21_strings/basic_string/rfind/char/2.cc: find_last_of
+ tests here.
+ * testsuite/21_strings/basic_string/rfind/char/3.cc: find_last_not_of
+ tests here.
+ * testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: likewise,
+ wchar_t find_last_of tests here.
+ * testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: likewise,
+ wchar_t find_last_not_of tests here.
+
+2003-03-22 Loren J. Rittle <ljrittle@acm.org>
+
+ * config/os/hpux/ctype_noninline.h (ctype<char>::classic_table):
+ Correct return value.
+
+2003-03-21 Jerry Quinn <jlquinn@optonline.net>
+
+ PR libstdc++/5730
+ * include/bits/c++config (_GLIBCPP_FAST_MATH): Define.
+ * include/std/std_complex.h (norm): Use faster,
+ less accurate computation for builtin float types under --fast-math.
+
+2003-03-21 Magnus Fromreide <gnats@magfr.user.lysator.liu.se>
+
+ * testsuite/testsuite_hooks.h: Fix warning nits.
+
+2003-03-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add):
+ Only .set mips2 for the o32 ABI.
+
+2003-03-19 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/21_strings/char_traits/requirements/char/1.cc:
+ Test char not wchar_t.
+
+2003-03-18 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/21_strings/basic_string/append/wchar_t/1.cc:
+ Correct size, taking into account sizeof(wchar_t).
+
+2003-03-18 Paolo Carlini <pcarlini@unitus.it>
+
+ Reshuffle 21_strings testsuite.
+ * testsuite/21_strings/append.cc, c_strings.cc, invariants.cc,
+ assign.cc, ctor_copy_dtor.cc, nonmember.cc, capacity.cc,
+ element_access.cc, operations.cc, char_traits_requirements.cc,
+ find.cc, replace.cc, char_traits_typedefs.cc, insert.cc, rfind.cc,
+ compare.cc, inserters_extractors.cc, substr.cc: Split up, add
+ wchar_t tests as follows.
+ * 21_strings/basic_string/append/char/1.cc: New.
+ * 21_strings/basic_string/append/wchar_t/1.cc: New.
+ * 21_strings/basic_string/assign/char/1.cc: New.
+ * 21_strings/basic_string/assign/char/2.cc: New.
+ * 21_strings/basic_string/assign/char/3.cc: New.
+ * 21_strings/basic_string/assign/wchar_t/1.cc: New.
+ * 21_strings/basic_string/assign/wchar_t/2.cc: New.
+ * 21_strings/basic_string/assign/wchar_t/3.cc: New.
+ * 21_strings/basic_string/capacity/1.cc: New.
+ * 21_strings/basic_string/capacity/char/1.cc: New.
+ * 21_strings/basic_string/capacity/char/2.cc: New.
+ * 21_strings/basic_string/capacity/wchar_t/1.cc: New.
+ * 21_strings/basic_string/capacity/wchar_t/2.cc: New.
+ * 21_strings/basic_string/compare/char/1.cc: New.
+ * 21_strings/basic_string/compare/wchar_t/1.cc: New.
+ * 21_strings/basic_string/cons/char/1.cc: New.
+ * 21_strings/basic_string/cons/char/2.cc: New.
+ * 21_strings/basic_string/cons/char/3.cc: New.
+ * 21_strings/basic_string/cons/char/4.cc: New.
+ * 21_strings/basic_string/cons/char/5.cc: New.
+ * 21_strings/basic_string/cons/wchar_t/1.cc: New.
+ * 21_strings/basic_string/cons/wchar_t/2.cc: New.
+ * 21_strings/basic_string/cons/wchar_t/3.cc: New.
+ * 21_strings/basic_string/cons/wchar_t/4.cc: New.
+ * 21_strings/basic_string/cons/wchar_t/5.cc: New.
+ * 21_strings/basic_string/element_access/char/1.cc: New.
+ * 21_strings/basic_string/element_access/char/2.cc: New.
+ * 21_strings/basic_string/element_access/char/3.cc: New.
+ * 21_strings/basic_string/element_access/wchar_t/1.cc: New.
+ * 21_strings/basic_string/element_access/wchar_t/2.cc: New.
+ * 21_strings/basic_string/element_access/wchar_t/3.cc: New.
+ * 21_strings/basic_string/find/char/1.cc: New.
+ * 21_strings/basic_string/find/wchar_t/1.cc: New.
+ * 21_strings/basic_string/insert/char/1.cc: New.
+ * 21_strings/basic_string/insert/char/2.cc: New.
+ * 21_strings/basic_string/insert/wchar_t/1.cc: New.
+ * 21_strings/basic_string/insert/wchar_t/2.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/1.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/4.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/5.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/6.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/7.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/8.cc: New.
+ * 21_strings/basic_string/inserters_extractors/char/9.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/1.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/4.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/5.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/6.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/7.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/8.cc: New.
+ * 21_strings/basic_string/inserters_extractors/wchar_t/9.cc: New.
+ * 21_strings/basic_string/operators/char/1.cc: New.
+ * 21_strings/basic_string/operators/char/2.cc: New.
+ * 21_strings/basic_string/operators/wchar_t/1.cc: New.
+ * 21_strings/basic_string/operators/wchar_t/2.cc: New.
+ * 21_strings/basic_string/replace/char/1.cc: New.
+ * 21_strings/basic_string/replace/char/2.cc: New.
+ * 21_strings/basic_string/replace/char/3.cc: New.
+ * 21_strings/basic_string/replace/char/4.cc: New.
+ * 21_strings/basic_string/replace/char/5.cc: New.
+ * 21_strings/basic_string/replace/wchar_t/1.cc: New.
+ * 21_strings/basic_string/replace/wchar_t/2.cc: New.
+ * 21_strings/basic_string/replace/wchar_t/3.cc: New.
+ * 21_strings/basic_string/replace/wchar_t/4.cc: New.
+ * 21_strings/basic_string/replace/wchar_t/5.cc: New.
+ * 21_strings/basic_string/rfind/char/1.cc: New.
+ * 21_strings/basic_string/rfind/char/2.cc: New.
+ * 21_strings/basic_string/rfind/char/3.cc: New.
+ * 21_strings/basic_string/rfind/wchar_t/1.cc: New.
+ * 21_strings/basic_string/rfind/wchar_t/2.cc: New.
+ * 21_strings/basic_string/rfind/wchar_t/3.cc: New.
+ * 21_strings/basic_string/substr/char/1.cc: New.
+ * 21_strings/basic_string/substr/wchar_t/1.cc: New.
+ * 21_strings/c_strings/char/1.cc: New.
+ * 21_strings/c_strings/char/2.cc: New.
+ * 21_strings/c_strings/wchar_t/1.cc: New.
+ * 21_strings/c_strings/wchar_t/2.cc: New.
+ * 21_strings/char_traits/requirements/char/1.cc: New.
+ * 21_strings/char_traits/requirements/wchar_t/1.cc: New.
+ * 21_strings/char_traits/typedefs/char/1.cc: New.
+
+2003-03-17 Paolo Carlini <pcarlini@unitus.it>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/10097
+ * src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
+ basic_filebuf<wchar_t>::_M_underflow_common):
+ if (gptr() < egptr()) return *gptr().
+ * testsuite/27_io/filebuf_virtuals.cc (test16): Add.
+
+ * testsuite/27_io/filebuf_members.cc (test_04): Minor
+ changes: unlink fifo before making it, fix spelling error.
+
+2003-03-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/Makefile.am (CLEANFILES): Add tmp*.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/27_io/filebuf_members.cc: Consistently name tmp files.
+ Cleanups.
+
+2003-03-17 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9964
+ * include/bits/fstream.tcc (basic_filebuf::close):
+ Always close file, even when write fails.
+ * testsuite/27_io/filebuf_members.cc (test_07): New test.
+
+2003-03-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * libsupc++/Makefile.am (C_COMPILE): Remove.
+ (LTCOMPILE): Likewise.
+ * libsupc++/Makefile.in: Regenerate.
+
+2003-03-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/23_containers/bitset_members.cc: Add test variable.
+ * testsuite/23_containers/map_insert.cc: Same.
+ * testsuite/22_locale/ctype/cons/char/1.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/1.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc: Same.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Same.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
+ * testsuite/27_io/istream_exception.cc: Same.
+ * testsuite/27_io/filebuf_virtuals.cc: Same.
+ * testsuite/27_io/stringbuf_virtuals.cc: Same.
+ * testsuite/27_io/ostream_inserter_arith.cc: Same.
+ * testsuite/26_numerics/valarray_operators.cc: Same.
+ * testsuite/26_numerics/slice.cc: Same.
+ * testsuite/26_numerics/slice_array_assignment.cc: Same.
+ * testsuite/24_iterators/istream_iterator.cc: Same.
+ * mkcheck.in (TESTS_FILE): Use dejagnu-generated file if possible.
+
+2003-03-14 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9581
+ PR libstdc++/9870
+ * config/locale/generic/ctype_members.cc,
+ * config/locale/gnu/ctype_members.cc
+ (ctype<wchar_t>::do_widen(char)): Cast argument to
+ unsigned char before passing to btowc.
+ (ctype<wchar_t>::do_widen(const char*, const char*, wchar_t*)):
+ Convert characters with btowc instead of mbsrtowcs.
+ (ctype<wchar_t>::do_narrow(const wchar_t*, const wchar_t*,
+ char, char*):
+ Convert characters with wctob instead of wcsrtombs.
+ * testsuite/22_locale/ctype/narrow/wchar_t/3.cc: New test.
+ * testsuite/22_locale/ctype/widen/wchar_t/2.cc: New test.
+ * testsuite/22_locale/ctype/widen/wchar_t/3.cc: New test.
+
+2003-03-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/stdc++.h: New.
+ * libsupc++/exception_defines.h (__EXCEPTION_DEFINES_H): Add guard.
+ * include/Makefile.am (stamp-std-precompile): Generate stdc++.h.gch
+ * include/Makefile.in: Regenerate.
+ * testsuite_flags.in (--build-cxx): Add, but don't use PCHFLAGS.
+ (--cxxflags): Put -g -O2 here.
+ * testsuite/libstdc++-v3.dg/dg.exp: Remove -g -O2 here.
+
+2003-03-14 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/testsuite_hooks.h: Suppress runtime exception thrown by
+ missing named locale.
+
+2003-03-14 Andreas Schwab <schwab@suse.de>
+
+ * configure.in: Only append to makefiles that are newly created to
+ avoid multiple multi-do/multi-clean rules.
+ * configure: Rebuilt.
+
+2003-03-13 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/configopts.html, docs/html/documentation.html,
+ docs/html/explanations.html, docs/html/install.html,
+ docs/html/19_diagnostics/howto.html, docs/html/faq/index.html: Fix
+ invalid XHTML and make page header style consistent.
+
+2003-03-12 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Explain memory "leaks" due to allocators.
+ * docs/html/faq/index.txt: Regenerate.
+ * docs/html/debug.html: Add a bit to allocator text and fix XHTML.
+
+2003-03-12 Andreas Schwab <schwab@suse.de>
+
+ * acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in
+ glibcpp_toolexeclibdir.
+ * aclocal.m4, configure: Rebuilt.
+
+2003-03-11 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Update text about location of headers.
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-03-11 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/demangle.h: Prepend accessors of
+ class qualifier with 'get_' in order to fix warnings
+ when compiling with -Wshadow.
+
+2003-03-11 Loren J. Rittle <ljrittle@acm.org>
+
+ * config/os/bsd/freebsd/ctype_inline.h: Support _M_table
+ when so installed.
+ * testsuite/22_locale/ctype/cons/char/1.cc: Fix typo.
+
+ * testsuite/testsuite_hooks.h (run_tests_wrapped_env): Do not
+ report lack of setenv().
+
+2003-03-09 Paolo Carlini <pcarlini@unitus.it>
+
+ * config/io/basic_file_stdio.cc: include <unistd.h>.
+
+2003-03-09 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ PR libstdc++/7744
+ * config/io/basic_file_stdio.h (__basic_file<>::xsgetn, xsputn,
+ seekoff, seekpos): Add a boolean parameter __stdio.
+ * config/io/basic_file_stdio.cc (__basic_file<>::xsgetn, xsputn,
+ seekoff, seekpos): If __stdio == true, use fread (fwrite, fseek/ftell,
+ fseek/ftell, respectively), otherwise read (write, lseek, lseek,
+ respectively).
+ * include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external,
+ _M_really_overflow, seekoff): Use the boolean parameter in the calls.
+ * include/std/std_fstream.h (sync): Likewise.
+ * src/fstream.cc (basic_filebuf<>::_M_underflow_common): Likewise.
+ * src/ios.cc (ios_base::Init::_S_ios_create(bool)): Revert
+ libstdc++/8399 commit involving isatty(0).
+ * acinclude.m4 (GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): Remove.
+ (GLIBCPP_CHECK_UNISTD_SUPPORT): Remove
+ * configure.in: Remove call.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * testsuite/27_io/narrow_stream_objects.cc (test11): Add.
+
+2003-03-09 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9988
+ * include/bits/fstream.tcc (overflow): don't write EOF to file.
+ * testsuite/27_io/filebuf_virtuals.cc (test15): Add.
+
+2003-03-08 Jerry Quinn <jlquinn@optonline.net>
+
+ PR libstdc++/9561
+ * include/bits/basic_ios.h (_M_setstate): New.
+ * include/bits/ostream.tcc (operator<<): Use it.
+ * include/bits/istream.tcc (operator>>): Use it.
+ * include/std/std_ostream.h (operator<<): Make friends.
+ * include/std/std_istream.h (operator>>): Make friends.
+ * testsuite/27_io/ostream_exception.cc,
+ testsuite/27_io/istream_exception.cc: New tests.
+
+2003-03-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc: Fix typo.
+
+2003-03-08 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/26_numerics/c99_classification_macros_c.cc: Tweak test.
+
+ * config/locale/generic/c_locale.cc
+ (locale::facet::_S_create_c_locale): Throw runtime exception when
+ unsupported language is specified.
+ * testsuite/testsuite_hooks.h
+ (run_test_wrapped_generic_locale_exception_catcher): New function.
+ * testsuite/testsuite_hooks.cc (run_tests_wrapped_locale):
+ Suppress runtime exception thrown by generic implementation.
+ (run_tests_wrapped_env): Likewise.
+ (run_test_wrapped_generic_locale_exception_catcher): New function.
+ * testsuite/22_locale/collate/compare/char/1.cc: New test wrap.
+ * testsuite/22_locale/collate/compare/char/2.cc: New test wrap.
+ * testsuite/22_locale/collate/compare/char/3.cc: New test wrap.
+ * testsuite/22_locale/collate/hash/char/2.cc: New test wrap.
+ * testsuite/22_locale/collate/transform/char/2.cc: New test wrap.
+ * testsuite/22_locale/collate/transform/char/3.cc: New test wrap.
+ * testsuite/22_locale/collate_byname/1.cc: New test wrap.
+ * testsuite/22_locale/ctype/is/char/2.cc: New test wrap.
+ * testsuite/22_locale/facet/2.cc: New test wrap.
+ * testsuite/22_locale/locale/cons/4.cc: New test wrap.
+ * testsuite/22_locale/locale/cons/5.cc: New test wrap.
+ * testsuite/22_locale/locale/cons/7.cc: New test wrap.
+ * testsuite/22_locale/messages/members/char/1.cc: New test wrap.
+ * testsuite/22_locale/messages/members/char/2.cc: New test wrap.
+ * testsuite/22_locale/messages/members/char/3.cc: New test wrap.
+ * testsuite/22_locale/messages_byname/1.cc: New test wrap.
+ * testsuite/22_locale/money_get/get/char/1.cc: New test wrap.
+ * testsuite/22_locale/money_get/get/char/2.cc: New test wrap.
+ * testsuite/22_locale/money_get/get/char/3.cc: New test wrap.
+ * testsuite/22_locale/money_get/get/char/4.cc: New test wrap.
+ * testsuite/22_locale/money_put/put/char/1.cc: New test wrap.
+ * testsuite/22_locale/money_put/put/char/2.cc: New test wrap.
+ * testsuite/22_locale/money_put/put/char/3.cc: New test wrap.
+ * testsuite/22_locale/moneypunct/members/char/2.cc: New test wrap.
+ * testsuite/22_locale/moneypunct_byname/1.cc: New test wrap.
+ * testsuite/22_locale/num_get/get/char/1.cc: New test wrap.
+ * testsuite/22_locale/num_get/get/char/2.cc: New test wrap.
+ * testsuite/22_locale/num_get/get/char/3.cc: New test wrap.
+ * testsuite/22_locale/num_get/get/char/5.cc: New test wrap.
+ * testsuite/22_locale/num_get/get/char/6.cc: New test wrap.
+ * testsuite/22_locale/num_put/put/char/1.cc: New test wrap.
+ * testsuite/22_locale/num_put/put/char/2.cc: New test wrap.
+ * testsuite/22_locale/num_put/put/char/3.cc: New test wrap.
+ * testsuite/22_locale/num_put/put/char/5.cc: New test wrap.
+ * testsuite/22_locale/numpunct/members/char/1.cc: New test wrap.
+ * testsuite/22_locale/numpunct/members/char/2.cc: New test wrap.
+ * testsuite/22_locale/numpunct_byname/1.cc: New test wrap.
+ * testsuite/22_locale/numpunct_byname/2.cc: New test wrap.
+ * testsuite/22_locale/time_get/date_order/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_date/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_date/char/2.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_monthname/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_monthname/char/2.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_time/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_time/char/2.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_weekday/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_weekday/char/2.cc: New test wrap.
+ * testsuite/22_locale/time_get/get_year/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/1.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/2.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/3.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/4.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/5.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/6.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/7.cc: New test wrap.
+ * testsuite/22_locale/time_put/put/char/8.cc: New test wrap.
+ * testsuite/27_io/filebuf_virtuals.cc: New test wrap.
+ * testsuite/27_io/ios_members.cc: New test wrap.
+ * testsuite/27_io/ostream_inserter_arith.cc (test02): Make void.
+ New test wrap.
+ * testsuite/27_io/streambuf_members.cc: New test wrap.
+ * testsuite/27_io/stringbuf_virtuals.cc: New test wrap.
+
+2003-03-08 Paolo Carlini <pcarlini@unitus.it>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9424
+ * include/bits/streambuf.tcc (__copy_streambufs): Use
+ sgetn-sputn only when sputn cannot fail, otherwise fall back
+ to safe snextc-sputc.
+ * testsuite/27_io/streambuf_members.cc (test11, test12): Add.
+
+2003-03-08 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.tcc (num_put::do_put(bool)): Use
+ locale cache for truename and falsename.
+
+2003-03-08 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/ios.cc (ios_base::ios_base): Correct order of _M_word and
+ _M_word_size initialization.
+
+2003-03-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/fstream.tcc (_M_convert_to_external):
+ Set __elen to zero if codecvt::out eventually fails.
+
+2003-03-07 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9182
+ * include/bits/fstream.tcc (_M_really_overflow): Check
+ for _M_convert_to_external possible failures.
+ * include/std/std_fstream.h (sync): Check _M_really_overflow
+ return value and return -1 in case of failure.
+ * testsuite/27_io/filebuf_virtuals.cc (test13, test14): Add.
+
+2003-03-07 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9826
+ * include/bits/istream.tcc (operator>>(_CharT*),
+ operator>>(basic_string&), ws): Pass a char_type to __ctype.is.
+ * testsuite/27_io/stringstream.cc (test02): Add.
+
+ * include/bits/istream.tcc (operator>>(_CharT*)):
+ Assign a char_type to *__s.
+
+2003-03-07 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9817
+ * include/bits/locale_facets.tcc
+ (collate::do_compare, collate::do_transform):
+ Handle nul characters in input.
+ * testsuite/22_locale/collate/compare/char/3.cc: New test.
+ * testsuite/22_locale/collate/compare/wchar_t/3.cc: New test.
+ * testsuite/22_locale/collate/transform/char/3.cc: New test.
+ * testsuite/22_locale/collate/transform/wchar_t/3.cc: New test.
+
+2003-03-07 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/streambuf_iterator.h (_M_put): Set _M_failed if
+ sputn fails.
+ * testsuite/27_io/ostream_fail.cc: New test.
+
+2003-03-07 Matthias Klose <doko@debian.org>
+
+ * Makefile.am (AM_MAKEFLAGS): Also pass gxx_include_dir.
+ FLAGS_TO_PASS: Set to AM_MAKEFLAGS
+ * Makefile.in: Regenerate.
+ * libsupc++/Makefile.am: Express glibcppinstalldir in terms
+ of gxx_include_dir.
+ AM_MAKEFLAGS: Pass gxx_include_dir.
+ * libsupc++/Makefile.in: Regenerate.
+
+2003-03-06 Jerry Quinn <jlquinn@optonline.net>
+
+ * testsuite/27_io/ios_base_storage.cc (test02): Set exception
+ mask. Test setting small-numbered pword and iword slots. Test
+ behavior at limit of numeric_limits::max. Check that values are
+ still good after failures.
+
+2003-03-06 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/ios.cc (ios_base::_M_init): Remove _M_word_size.
+ (ios_base::ios_base): Set _M_word, _M_word_size.
+ (ios_base::~ios_base): Remove redundant test.
+ * testsuite/27_io/ios_base_storage.cc (test03): New.
+
+2003-03-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * src/strstream.cc, include/bits/basic_string.tcc: Remove
+ incorrect whitespace added in my previous change.
+
+2003-03-05 Carlo Wood <carlo@alinoe.com>
+
+ * include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added
+ _S_initialized() in order to allow debugging libraries to detect
+ when the std streams are initialized from an overloaded operator
+ new.
+
+2003-03-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libsupc++/demangle.h: Move to..
+ * include/bits/demangle.h: ...here.
+ * src/demangle.cc: Adjust include.
+ * include/Makefile.am (bits_headers): Add.
+ * include/Makefile.in: Regenerate.
+
+2003-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/globals.cc: Clarify comments, remove c_locale_imp_compat.
+
+ * config/linker-map.gnu: Filter typeinfo and vtable info.
+
+2003-03-04 Jerry Quinn <jlquinn@optonline.net>
+
+ * src/ios.cc (ios_base::_M_grow_words): Don't delete _M_word on
+ new failure. Throw exception if badbit and exception mask when ix
+ >= numeric_limits<int>::max().
+
+2003-03-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * src/strstream.cc (strstreambuf::overflow): Make sure operands of
+ min and max have the same type.
+ * include/bits/basic_string.tcc (append, rfind, compare): Likewise.
+
+2003-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (allstamps): Remove stamp-std-precompile.
+ * include/Makefile.in: Regenerate.
+
+2003-03-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/abi_check.cc (report_symbol_info): Add version info.
+
+ * config/linker-map.gnu: Hide more stuff.
+ * include/Makefile.am: Cleanups.
+ * include/Makefile.in: Regenerate.
+
+2003-02-27 Jerry Quinn <jlquinn@optonline.net>
+
+ * config/locale/generic/messages_members.h (messages::messages):
+ Remove name from unused parameter.
+
+2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/Makefile.am (sources): Add demangle.cc.
+ (demangle.o): Add.
+ (demangle.lo): Add.
+ * src/Makefile.in: Regenerate.
+ * libsupc++/Makefile.am: Remove old __cxa_demangle bits.
+ * libsupc++/Makefile.in: Regenerate.
+
+ * testsuite/testsuite_hooks.h
+ (__gnu_cxx_test::verify_demangle): New.
+ * testsuite/testsuite_hooks.cc: Define.
+
+2003-02-27 Carlo Wood <carlo@alinoe.com>
+
+ * src/demangle.cc: New.
+ * libsupc++/demangle.h: New.
+
+2003-02-27 Benjamin Kosnik <bkoz@redhat.com>
+ Carlo Wood <carlo@alinoe.com>
+
+ * testsuite/demangle/abi_examples/01.cc: New.
+ * testsuite/demangle/abi_examples/02.cc: New.
+ * testsuite/demangle/abi_examples/03.cc: New.
+ * testsuite/demangle/abi_examples/04.cc: New.
+ * testsuite/demangle/abi_examples/05.cc: New.
+ * testsuite/demangle/abi_examples/06.cc: New.
+ * testsuite/demangle/abi_examples/07.cc: New.
+ * testsuite/demangle/abi_examples/08.cc: New.
+ * testsuite/demangle/abi_examples/09.cc: New.
+ * testsuite/demangle/abi_examples/10.cc: New.
+ * testsuite/demangle/abi_examples/11.cc: New.
+ * testsuite/demangle/abi_examples/12.cc: New.
+ * testsuite/demangle/abi_examples/13.cc: New.
+ * testsuite/demangle/abi_examples/14.cc: New.
+ * testsuite/demangle/abi_examples/15.cc: New.
+ * testsuite/demangle/abi_examples/16.cc: New.
+ * testsuite/demangle/abi_examples/17.cc: New.
+ * testsuite/demangle/abi_examples/18.cc: New.
+ * testsuite/demangle/abi_examples/19.cc: New.
+ * testsuite/demangle/abi_examples/20.cc: New.
+ * testsuite/demangle/abi_examples/21.cc: New.
+ * testsuite/demangle/abi_examples/22.cc: New.
+ * testsuite/demangle/abi_examples/23.cc: New.
+ * testsuite/demangle/abi_examples/24.cc: New.
+ * testsuite/demangle/abi_examples/25.cc: New.
+ * testsuite/demangle/abi_examples/26.cc: New.
+ * testsuite/demangle/abi_text/01.cc: New.
+ * testsuite/demangle/abi_text/02.cc: New.
+ * testsuite/demangle/abi_text/03.cc: New.
+ * testsuite/demangle/abi_text/04.cc: New.
+ * testsuite/demangle/abi_text/05.cc: New.
+ * testsuite/demangle/abi_text/06.cc: New.
+ * testsuite/demangle/abi_text/07.cc: New.
+ * testsuite/demangle/abi_text/08.cc: New.
+ * testsuite/demangle/abi_text/09.cc: New.
+ * testsuite/demangle/abi_text/10.cc: New.
+ * testsuite/demangle/abi_text/11.cc: New.
+ * testsuite/demangle/abi_text/12.cc: New.
+ * testsuite/demangle/abi_text/13.cc: New.
+ * testsuite/demangle/abi_text/14.cc: New.
+ * testsuite/demangle/regression/3111-1.cc: New.
+ * testsuite/demangle/regression/3111-2.cc: New.
+ * testsuite/demangle/regression/7986-01.cc: New.
+ * testsuite/demangle/regression/7986-02.cc: New.
+ * testsuite/demangle/regression/7986-03.cc: New.
+ * testsuite/demangle/regression/7986-04.cc: New.
+ * testsuite/demangle/regression/7986-05.cc: New.
+ * testsuite/demangle/regression/7986-06.cc: New.
+ * testsuite/demangle/regression/7986-07.cc: New.
+ * testsuite/demangle/regression/7986-08.cc: New.
+ * testsuite/demangle/regression/7986-09.cc: New.
+ * testsuite/demangle/regression/7986-10.cc: New.
+ * testsuite/demangle/regression/7986-11.cc: New.
+ * testsuite/demangle/regression/7986-12.cc: New.
+ * testsuite/demangle/regression/7986.cc: New.
+ * testsuite/demangle/regression/8897.cc: New.
+ * testsuite/demangle/regression/cw-01.cc: New.
+ * testsuite/demangle/regression/cw-02.cc: New.
+ * testsuite/demangle/regression/cw-03.cc: New.
+ * testsuite/demangle/regression/cw-04.cc: New.
+ * testsuite/demangle/regression/cw-05.cc: New.
+ * testsuite/demangle/regression/cw-06.cc: New.
+ * testsuite/demangle/regression/cw-07.cc: New.
+ * testsuite/demangle/regression/cw-08.cc: New.
+ * testsuite/demangle/regression/cw-09.cc: New.
+ * testsuite/demangle/regression/cw-10.cc: New.
+ * testsuite/demangle/regression/cw-11.cc: New.
+ * testsuite/demangle/regression/cw-12.cc: New.
+ * testsuite/demangle/regression/cw-13.cc: New.
+ * testsuite/demangle/regression/cw-14.cc: New.
+ * testsuite/demangle/regression/old.cc: New.
+
+2003-02-25 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/Intro.3: Update with new (proper) names.
+ * docs/doxygen/TODO: Update.
+ * docs/doxygen/run_doxygen: More comments, fix up man pages.
+ Fake entries for standard typedefs.
+ * docs/doxygen/user.cfg.in: Turn INLINE_INHERITED_MEMB back on.
+ * docs/html/documentation.html: Top-level man page is now called
+ C++Intro.
+ * include/std/std_limits.h: Doxygenate.
+
+2003-02-25 Scott Snyder <snyder@fnal.gov>
+
+ PR libstdc++/9811
+ * include/bits/stl_map.h (lower_bound, upper_bound, equal_range):
+ Correct documentation.
+ * include/bits/stl_multimap.h (lower_bound, upper_bound,
+ equal_range): Likewise.
+
+2003-02-24 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9825
+ * src/fstream.cc
+ (basic_filebuf<char/wchar_t>::_M_underflow_common): When
+ __bump is true (uflow), always increment the read pointer
+ (_M_in_cur) before returning successfully.
+ * testsuite/27_io/filebuf_virtuals.cc (test12): Add.
+
+2003-02-24 Paolo Carlini <pcarlini@unitus.it>
+ Nathan Myers <ncm@cantrip.org>
+
+ PR libstdc++/9404, PR libstdc++/9701 (partial)
+ (aka pptr == epptr implies overflow)
+ * include/bits/fstream.tcc (_M_allocate_internal_buffer):
+ Consistently, _M_out_end points to the end of the buffer just
+ created.
+ (overflow): Tweak to use _M_out_buf_size().
+ (_M_convert_to_external): The role of the old _M_out_end is
+ now played by _M_out_lim.
+ (_M_really_overflow): Likewise.
+ (seekoff): Likewise.
+ (setbuf): _M_out_end points to the end of the external buffer.
+ * include/bits/sstream.tcc (overflow): Rewrote, taking into
+ account the resolution of DR 169 (TC).
+ (seekoff): Use _M_string.capacity(); ios_base::end is now _M_out_lim.
+ (seekpos): Use _M_string.capacity(); tweak.
+ * include/bits/streambuf.tcc (sputc, xsputn): Remove comments.
+ * include/std/std_fstream.h (sync): The role of the old
+ _M_out_end is now played by _M_out_lim.
+ (_M_set_indeterminate): Use _M_set_determinate.
+ (_M_set_determinate): _M_out_end is now _M_out_lim.
+ (_M_is_indeterminate): Likewise.
+ * include/std/std_sstream.h (str()): _M_out_end is now _M_out_lim.
+ (_M_stringbuf_init): Don't set _M_buf_size, unused for sstreams,
+ which have the information readily available as _M_string.capacity();
+ for ate and app modes, pass the string size to _M_really_sync.
+ (_M_really_sync): Consistently set _M_out_end and _M_out_lim, to
+ point to the end of the buffer (i.e., epptr) and to the string end,
+ respectively.
+ * include/std/std_streambuf.h: tweak comments, add _M_out_lim,
+ which points to the right limit of the used put area.
+ (_M_out_cur_move): The role of the old _M_out_end is now played
+ by _M_out_lim.
+ (_M_out_buf_size): Simplify: now (when _M_out_cur) return simply
+ _M_out_end - _M_out_cur (i.e., pptr), _very_ close to the letter
+ of the standard.
+ (basic_streambuf()): Initialize _M_out_lim too.
+ * testsuite/27_io/filebuf_virtuals.cc (test10): Trivial tweak.
+ * testsuite/27_io/filebuf_virtuals.cc (test11): Add.
+ * testsuite/27_io/stringbuf_virtuals.cc (test09): Add.
+
+2003-02-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/ios_base_storage.cc (main): Call
+ set_memory_limits.
+
+2003-02-21 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/locale_facets.tcc (_M_convert_float): Replace
+ numpunct facet accesses with data from __locale_cache.
+
+2003-02-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html (3.9): New note, wchar_t on FreeBSD.
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-02-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/linker-map.gnu: Also export locking symbols needed for the
+ generic atomicity.h case.
+
+2003-02-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
+ config.status.
+ * configure: Rebuilt.
+
+2003-02-19 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/sstream.tcc (overflow): According to
+ 27.7.1.3, p5, actual output is performed by sputc(c).
+
+2003-02-19 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/9582
+ * include/bits/stl_alloc.h: Remove all traces of assert().
+
+2003-02-18 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/std/std_sstream.h (str()): the size of the
+ current string may be different from the initial one
+ whenever _M_out_end > _M_out_beg.
+ * testsuite/27_io/stringbuf_members.cc (test07): Add.
+
+2003-02-18 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9582
+ * include/bits/stl_alloc.h (__pool_alloc::allocate): Remove assert.
+
+2003-02-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/basic_ios.tcc (copyfmt): Copy locale data as well.
+ * testsuite/27_io/ios_members.cc (test03): New.
+
+2003-02-17 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/basic_ios.h (basic_ios::_M_cache_locale): Declare.
+ (basic_ios::_M_cache_facets): Move into above.
+ * include/bits/basic_ios.tcc (basic_ios::copyfmt): Rebuild locale
+ cache.
+ (basic_ios::imbue): Force locale cache to be built.
+ (basic_ios::_M_init): Create and initialize locale cache.
+ * include/bits/ios_base.h (__locale_cache_base): Declare.
+ (ios_base::_M_locale_cache): New.
+ (ios_base::_M_cache): Define.
+ * include/bits/locale_facets.h: (__num_base): Fix comment. Add
+ _S_end.
+ (__locale_cache_base,__locale_cache<_CharT>): New classes.
+ (__locale_cache<char>, __locale_cache<wchar_t>): New specializations.
+ * include/bits/locale_facets.tcc (num_put::_M_convert_int): Use locale
+ cache literal string, grouping flag, thousands separator.
+ (__locale_cache<_CharT>::__locale_cache): New.
+ (__locale_cache<_CharT>::_M_init): New.
+ * src/ios.cc: Clear _M_locale_cache in constructor.
+ * src/locale-inst.cc (__locale_cache<char>, __locale_cache<_char_t>):
+ New.
+
+2003-02-17 Paolo Carlini <pcarlini@unitus.it>
+
+ * src/locale-inst.cc: Do not include <cassert>.
+ * src/locale.cc: Likewise.
+
+2003-02-17 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9580
+ * include/std/std_fstream.h: Declare underflow and uflow
+ specializations, change generic definitions to do nothing.
+ * src/fstream.cc: Add underflow and uflow specializations.
+
+2003-02-17 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9169
+ * include/bits/fstream.tcc (_M_convert_to_external):
+ Deal correctly with noconv, as prescribed by 27.8.1.4,p8.
+ * testsuite/27_io/filebuf_virtuals.cc (test10): Add.
+
+2003-02-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config (_GLIBCPP_EXTERN_TEMPLATE): Define.
+ * include/bits/basic_ios.tcc: Guard use of extern template.
+ * include/std/std_iomanip.h: Same.
+ * include/bits/streambuf.tcc: Same.
+ * include/bits/stl_alloc.h: Same.
+ * include/bits/locale_facets.tcc: Same.
+ * include/bits/ostream.tcc: Same.
+ * include/bits/istream.tcc: Same.
+ * include/bits/fstream.tcc: Same.
+ * include/bits/basic_string.tcc: Same.
+
+2003-02-13 Paolo Carlini <pcarlini@unitus.it>
+
+ * include/bits/ostream.tcc (sentry::sentry): Improve
+ performance-wise the fix for libstdc++/9563.
+
+2003-02-12 Phil Edwards <pme@gcc.gnu.org>
+
+ * config/cpu/generic/atomicity.h (_Atomic_add_mutex): Fix declaration.
+ (_GLIBCPP_NEED_GENERIC_MUTEX): Define for this file.
+ (_Atomic_add_mutex_once, __gthread_atomic_add_mutex_once): Declare
+ when we don't have static mutex initialization.
+ (__exchange_and_add): Use _Atomic_add_mutex_once.
+ * src/misc-inst.cc: Definitions of all the above.
+
+2003-02-12 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9563
+ * include/bits/ostream.tcc (sentry::sentry): Check
+ the state of the stream after the preparation.
+ * testsuite/27_io/ostream_sentry.cc (test02): Add.
+
+2003-02-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (stamp-std-precompile): Add rule.
+ * include/Makefile.in: Regenerated.
+
+2003-02-11 Jerry Quinn <jlquinn@optonline.net>
+ Benjamin Kosnik <benjamin@redhat.com>
+
+ * include/bits/locale_facets.h (__num_base): Add _S_atoms_out.
+ Add indexes into this array.
+ (__num_base::_S_atoms): To _S_atoms_in.
+ (num_put::_M_insert): Rename to _M_pad.
+ (num_put::_M_convert_int): Adjust remove __mod, __modl arguments.
+ (num_put::_M_widen_int): Rename to _M_group_int.
+ (num_put::_M_widen_float): Rename to _M_group_float.
+ * include/bits/locale_facets.tcc (__int_to_char): New inline
+ function and adapter functions.
+ (num_put::_M_group_int): Streamline.
+ (num_put::_M_group_float): Streamline.
+ (num_put::_M_convert_int): Remove unused parameter names. Choose
+ large enough buffer for text. Use __int_to_char instead of
+ __convert_from_v. Formatted text is now at the end of the buffer.
+ (num_put::_M_convert_float): Preliminary fixups.
+ * src/locale-inst.cc (__convert_from_v<long long>): Add ifdef.
+ (__int_to_char<unsigned long long>): Same.
+ (__int_to_char<char, unsigned long>): New.
+ (__int_to_char<char, unsigned long long>): New.
+ (__int_to_char<wchar_t, unsigned long>): New.
+ (__int_to_char<wchar_t, unsigned long long>): New.
+
+2003-02-11 Scott Snyder <snyder@fnal.gov>
+
+ PR libstdc++/9659
+ * include/bits/fstream.tcc (seekoff): Avoid operator+
+ for pos_type.
+
+2003-02-11 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9320
+ * include/ext/stdio_filebuf.h
+ (stdio_filebuf(int, std::ios_base::openmode, bool, int_type),
+ stdio_filebuf(std::__c_file*, std::ios_base::openmode, int_type)):
+ Change to take a __size parameter of type size_t, not
+ of type (template parameter dependent) int_type.
+ * src/ios.cc (ios_base::Init::_S_ios_create): Change type of
+ size vars to size_t.
+ * testsuite/ext/stdio_filebuf.cc: Add.
+
+2003-02-11 Paolo Carlini <pcarlini@unitus.it>
+ Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9318
+ * include/bits/streambuf.tcc (__copy_streambufs):
+ Don't conditionalize the copy to __testput.
+ * testsuite/27_io/streambuf_members.cc (test09, test10): Add.
+
+2002-02-11 DJ Delorie <dj@redhat.com>
+
+ * acinclude.m4: Check for native targets that can't link at
+ this point in the build.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2003-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa/atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock):
+ Correct alignment.
+ (__exchange_and_add, __atomic_add): Use PA 2.0 ordered store to reset
+ lock.
+
+2003-02-07 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/27_io/filebuf_virtuals.cc (test08): Fix for
+ unsigned char platforms.
+
+2003-02-06 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9562
+ * include/std/std_istream.h
+ (basic_istream::sentry::operator bool()): Make const.
+ * include/std/std_ostream.h
+ (basic_ostream::sentry::operator bool()): Likewise.
+ * testsuite/27_io/istream_sentry.cc (test03): Add.
+ * testsuite/27_io/ostream_sentry.cc: Add.
+
+2003-02-06 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9548
+ Implement resolution of DR 231 (Ready)
+ * include/bits/locale_facets.h (__num_base::_S_format_float):
+ Change declaration: return void, remove __prec parameter.
+ * src/locale.cc (__num_base::_S_format_float): Implement
+ resolution of DR 231.
+ * include/bits/locale_facets.tcc (num_put::_M_convert_float):
+ Tweak uses. Check for negative precision.
+ * testsuite/22_locale/num_put/put/char/6.cc: Add
+ * testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise.
+
+2003-02-06 Peter Soetens <peter.soetens@mech.kuleuven.ac.be>
+
+ * config/io/basic_file_libio.h: Fixups.
+ * config/io/c_io_libio.h: Same.
+ * libio/Makefile.am: Same.
+ * libio/Makefile.in: Regenerated.
+
+2003-02-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/codecvt/encoding/wchar_t/1.cc (test01):
+ Explicitly use the "C" locale.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/1.cc (test01): Same.
+
+2003-02-06 Petur Runolfsson <peturr02@ru.is>
+
+ DR 75
+ DR 305
+ PR libstdc++/9028 (partial)
+ PR libstdc++/9224
+ PR libstdc++/9246
+ PR libstdc++/9247
+
+ * src/codecvt.cc
+ (codecvt<wchar_t, char, mbstate_t>::do_encoding,
+ codecvt<wchar_t, char, mbstate_t>::do_length,
+ codecvt<wchar_t, char, mbstate_t>::do_max_length):
+ Move...
+ * config/locale/generic/codecvt_members.cc: ...here.
+ * config/locale/gnu/codecvt_members.cc: ...and here.
+
+ * config/locale/generic/codecvt_members.cc,
+ * config/locale/gnu/codecvt_members.cc
+ (codecvt<wchar_t, char, mbstate_t>::do_encoding
+ codecvt<wchar_t, char, mbstate_t>::do_in,
+ codecvt<wchar_t, char, mbstate_t>::do_length,
+ codecvt<wchar_t, char, mbstate_t>::do_max_length,
+ codecvt<wchar_t, char, mbstate_t>::do_out):
+ New implementation that handles stateless encodings,
+ including UTF-8.
+
+ * config/locale/generic/codecvt_members.cc,
+ * config/locale/gnu/codecvt_members.cc,
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h,
+ * include/bits/codecvt.h,
+ * src/codecvt.cc
+ (codecvt::length, codecvt::do_length):
+ Change type of first argument of length and do_length from
+ 'const state_type&' to 'state_type&' according to DR 75.
+
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/1.cc:
+ Cleanup and check for correct return value from encoding
+ for "C" locale.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/in/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/5.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/6.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/7.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/8.cc: New test.
+ * testsuite/22_locale/codecvt/in/wchar_t/9.cc: New test.
+ * testsuite/22_locale/codecvt/length/char/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/length/char/2.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/length/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/5.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/6.cc: New test.
+ * testsuite/22_locale/codecvt/length/wchar_t/7.cc: New test.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/out/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/4.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/5.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/6.cc: New test.
+ * testsuite/22_locale/codecvt/out/wchar_t/7.cc: New test.
+ * testsuite/22_locale/codecvt/unicode/1.cc: New test.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/1.cc: Cleanup.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: New test.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: New test.
+ * testsuite/22_locale/codecvt/unshfit/wchar_t/4.cc: New test.
+
+2003-02-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.tcc (time_put::do_put): Use __write.
+ (money_put::do_put): Same.
+
+2003-02-05 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/bits/ios_base.h (ios_base): Document reserved storage.
+
+ * include/bits/locale_facets.h: (struct __pad): Comment on
+ implementation.
+ (__verify_grouping): Same.
+ (__add_grouping): Same.
+ * include/bits/locale_facets.tcc (__verify_grouping): Move
+ comments to declaration.
+ (__add_grouping): Same.
+
+ * include/bits/locale_facets.tcc:
+ (__write<_CharT, _OutIter>): New function.
+ (__write<_CharT>): New function specialization.
+ (num_put::_M_insert): Remove explicit loop over iterator. Use
+ __write.
+ (num_put::_M_widen_float): Remove __basefield.
+ (num_put::_M_widen_int): Move __basefield to within grouping block.
+
+ * include/bits/streambuf_iterator.h: Include <streambuf>.
+ (ostreambuf_iterator::_M_put): Add.
+
+2003-02-05 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/26_numerics/valarray_name_lookup.cc: Fix typo.
+
+2003-02-04 Nathan Myers <ncm@cantrip.org>
+
+ * testsuite/25_algorithms/min_max.cc (test02): Add.
+
+2003-02-04 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9439, PR libstdc++/9425
+ * config/io/basic_file_stdio.cc
+ (__basic_file<char>::seekoff, seekpos): Return -1L if
+ fseek fails.
+ * include/bits/fstream.tcc (basic_filebuf::seekoff):
+ Check _M_file.seekoff return value; always return
+ pos_type(off_type(-1)) in case of failure.
+ (basic_filebuf::pbackfail): Check this->seekoff return
+ value and return traits_type::eof() in case of failure.
+ * testsuite/27_io/filebuf_virtuals.cc (test09): Add.
+
+2003-02-04 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/std/std_ostream.h (ostream::_M_write): Declare.
+ * ostream.tcc (ostream::_M_write): Define.
+ (basic_ostream::write): Use it.
+ (operator<<(basic_ostream, _CharT)): Ditto.
+ (operator<<(basic_ostream, char)): Ditto.
+ (operator<<(basic_ostream, _CharT*)): Ditto.
+ (operator<<(basic_ostream, char*)): Ditto.
+ (operator<<(basic_ostream, basic_string)): Ditto.
+
+2003-02-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/26_numerics/valarray_name_lookup.cc: Fix.
+
+2002-02-04 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/27_io/howto.html: Link to Dietmar Kuehl's IOStream page,
+ add HTML comment about updating links if numbering changes.
+
+2003-02-04 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9538
+ * include/bits/streambuf.tcc (sputbackc): Access
+ this->gptr()[-1] only if _M_in_beg < _M_in_cur.
+ * testsuite/27_io/filebuf_virtuals.cc (test08): Add.
+
+2003-02-04 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9507
+ * include/bits/fstream.tcc (open): If the 'ate' repositioning
+ operation fails, calls close _and_ returns a null pointer
+ to indicate failure (27.8.1.3,4).
+ * testsuite/27_io/filebuf_members.cc (test_06): Add.
+
+2003-02-04 Petur Runolfsson <peturr02@ru.is>
+
+ * testsuite/27_io/filebuf_members.cc (test_04): Remove exit(0).
+
+2002-02-04 Jonathan Wakely <redi@gcc.gnu.org>
+
+ * docs/html/27_io/howto.html: New section on stdio_filebuf.
+ * docs/html/ext/howto.html: Move stdio_filebuf notes to 27_io.
+ * docs/html/documentation.html: Regenerate.
+
+2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * docs/html/17_intro/porting.texi: Update to GFDL 1.2.
+ * docs/html/17_intro/porting.html: Regenerate.
+
+2003-02-03 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
+ Phil Edwards <pme@gcc.gnu.org>
+
+ * include/std/std_bitset.h: Replace CHAR_BIT with __CHAR_BIT__, use
+ numeric_limits for bits-per-word values.
+ (_Base_bitset::_M_do_count, _Base_bitset<1>::_M_do_count):
+ Use __builtin_popcountl instead.
+ (_Base_bitset::_M_do_find_first, _Base_bitset::_M_do_find_next,
+ _Base_bitset<1>::_M_do_find_first, _Base_bitset<1>::_M_do_find_next):
+ Use __builtin_ctzl instead.
+ (_S_bit_count, _S_first_one): Remove.
+ * config/linker-map.gnu (GLIBCPP_3.4): Remove std::_S_bit_count.
+ * src/Makefile.am (sources): Remove bitset.cc.
+ * src/bitset.cc: Delete file.
+ * src/Makefile.in: Regenerate.
+
+2003-02-03 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/9527, PR libstdc++/8713
+ * docs/html/install.html: Mention glibc version requirement.
+ * docs/html/faq/index.html (3.8): New note, glibc 2.2.5+ is needed
+ with 3.2.1+ (formatting bugfixes).
+ * docs/html/faq/index.txt: Regenerate.
+
+2003-02-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR libstdc++/9234
+ * include/bits/valarray_before.h (_UnBase::operator[]): Apply unary
+ operator.
+
+ * include/bits/valarray_before.h (__not_equal_to): Use != instead
+ of ==.
+
+ * testsuite/26_numerics/valarray_operators.cc: New test.
+
+2003-02-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/html/faq/index.html: Correct link to libg++ information.
+ * docs/html/faq/index.txt: Regenerated.
+
+2003-02-01 Paolo Carlini <pcarlini@unitus.it>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ Const correctness issue:
+ http://gcc.gnu.org/ml/libstdc++/2003-01/msg00370.html
+ * include/bits/locale_classes.h
+ (locale::_Impl::_M_facets): Change type to const facet**.
+ (locale::_Impl::_M_install_facet): Change declaration to
+ take const facet*.
+ (locale::facet::_M_references): Make mutable.
+ (locale::facet::_M_add_reference): Declare const.
+ (locale::facet::_M_remove_reference): Likewise.
+ * include/bits/locale_facets.tcc
+ (use_facet(const locale&)): Tweak for const facet** _M_facets.
+ (has_facet(const locale&)): Likewise.
+ * src/locale.cc
+ (locale::facet::_M_add_reference): Adjust definition.
+ (locale::facet::_M_remove_reference): Likewise.
+ * src/localename.cc
+ (locale::_Impl::_Impl(const _Impl&, size_t)): Tweak for
+ const facet** _M_facets.
+ (locale::_Impl::_Impl(const char*, size_t)): Likewise.
+ (locale::_Impl::_Impl(facet**, size_t, bool)): Likewise.
+ (locale::_Impl::_M_install_facet): Adjust definition to take
+ const facet* and for const facet** _M_facets.
+ * testsuite/22_locale/locale/cons/8.cc: Add.
+
+2003-01-29 Mark Mitchell <mark@codesourcery.com>
+
+ * include/std/std_limits.h (numeric_limits<float>::has_infinity):
+ Use __FLT_HAS_INIFINITY__ to initialize.
+ (numeric_limits<float>::has_quiet_NaN): Likewise.
+ (numeric_limits<double>::has_infinity): Use __DBL_HAS_INIFINITY__
+ to initialize.
+ (numeric_limits<double>::has_quiet_NaN): Likewise.
+ (numeric_limits<long double>::has_infinity): Use
+ __LDBL_HAS_INIFINITY__ to initialize.
+ (numeric_limits<long_double>::has_quiet_NaN): Likewise.
+
+2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9433
+ * libsupc++/tinfo.cc (__vmi_class_type_info::__do_dyncast): Cope
+ with bases which are very ambiguous.
+
+2003-01-28 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * src/Makefile.am (CONFIG_CXXFLAGS): Reverse order of
+ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@.
+ * libsupc++/Makefile.am (CONFIG_CXXFLAGS): Likewise.
+ * src/Makefile.in: Regenerate.
+ * libsupc++/Makefile.in: Regenerate.
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4 (glibcpp_toolexeclibdir): Instead of
+ $(MULTISUBDIR), use `$CC -print-multi-os-directory`, unless
+ version_specific_libs is enabled.
+ * aclocal.m4, configure: Rebuilt.
+
+2003-01-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * include/bits/valarray_meta.h: Remove, split into ...
+ * include/bits/valarray_before.h: ... this, and ...
+ * include/bits/valarray_after.h: ... this.
+ * include/std/std_valarray.h: Adjust.
+ * include/Makefile.am (bits_headers): Adjust.
+ * include/Makefile.in: Regenerate.
+
+2003-01-24 Andreas Schwab <schwab@suse.de>
+
+ * config/linker-map.gnu: Fix for size_t variance.
+
+2003-01-23 Petur Runolfsson <peturr02@ru.is>
+
+ PR libstdc++/9322
+ * include/std/std_streambuf.h
+ (basic_streambuf::basic_streambuf,
+ basic_streambuf::~basic_streambuf,
+ basic_streambuf::getloc, basic_streambuf::imbue):
+ Remove _M_buf_locale_init
+ * include/bits/fstream.tcc (basic_filebuf::imbue): Likewise
+ * testsuite/27_io/filebuf_virtuals.cc (test08): Add.
+ * testsuite/27_io/streambuf_members.cc (test08): Add.
+ * testsuite/27_io/stringbuf_virtuals.cc (test08): Add.
+
+2003-01-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revert include ordering.
+ * config/locale/generic/c_locale.h: Add include guards.
+ * config/locale/gnu/c_locale.h: Same.
+ * include/bits/locale_classes.h: Remove cctype include.
+ * include/std/std_iosfwd.h: Add c++locale.h, cctype includes.
+ * include/std/std_fstream.h: Remove streambuf include.
+ * include/std/std_sstream.h: Remove streambuf include.
+
+2003-01-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in (libtool_VERSION): To 6:0:0.
+ * configure: Regenerated.
+ * config/linker-map.gnu: Clean.
+
+ * src/misc-inst.cc: Remove instantiations.
+
+ * include/bits/stl_alloc.h (__malloc_alloc_template):
+ To __malloc_alloc.
+ (__default_alloc_template): To __pool_alloc.
+ * src/stl-inst.cc: Same.
+ * include/backward/alloc.h: Update.
+ * testsuite/ext/allocators.cc: Update.
+
+ * src/globals.cc (__gnu_cxx): Remove _GLIBCPP_ASM_SYMVER. Should
+ really try to remove these if possible.
+ * src/locale.cc (std): Same.
+
+ * testsuite/abi_check.cc (check_version): Add.
+
+2003-01-22 Benjamin Kosnik <bkoz@redhat.com>
+ Sysoltsev Slawa <Vyatcheslav.Sysoltsev@intel.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR libstdc++/9269
+ * include/std/std_fstream.h (basic_filebuf::uflow): Declare.
+ (basic_filebuf::underflow): Declare.
+ Move definitions.
+
+2003-01-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h: Move non-facet classes requiring
+ <string> to...
+ * include/bits/locale_classes.h: New.
+ * include/bits/Makefile.am (bits_headers_src): Add locale_classes.h.
+ * include/bits/Makefile.in: Regenerate.
+
+ * include/bits/locale_facets.tcc (__convert_from_v): Move to...
+ * config/locale/gnu/c_locale.h: ...here.
+ * config/locale/generic/c_locale.h: Same.
+
+ * include/bits/locale_facets.tcc: Move declarations to...
+ * include/bits/locale_facets.h: ...here.
+ * include/bits/basic_ios.h: Tweak includes accordingly.
+ * include/std/std_sstream.h: Add streambuf include.
+ * include/std/std_fstream.h: Ditto.
+ * include/std/std_locale.h: Add locale_classes.h include.
+ * include/std/std_iosfwd.h: Tweak.
+ * src/concept-inst.cc: Add iterator include.
+
+ * config/linker-map.gnu: Specify __cxa functions, mark __cxa_dyn_*
+ bits as unexported in the future.
+
+2003-01-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ Reshuffle 22_locale testsuite.
+ * 22_locale/(codecvt.cc money_get.cc
+ codecvt_members_char_char.cc money_get_members_char.cc
+ codecvt_members_unicode_char.cc money_get_members_wchar_t.cc
+ codecvt_members_unicode_wchar_t.cc moneypunct_byname.cc
+ codecvt_members_wchar_t_char.cc moneypunct.cc collate_byname.cc
+ moneypunct_members_char.cc collate.cc moneypunct_members_wchar_t.cc
+ collate_members_char.cc money_put.cc collate_members_wchar_t.cc
+ money_put_members_char.cc ctor_copy_dtor.cc
+ money_put_members_wchar_t.cc ctype.cc num_get.cc ctype_is_char.cc
+ num_get_members_char.cc ctype_is_wchar_t.cc num_get_members_wchar_t.cc
+ ctype_members_char.cc numpunct_byname.cc ctype_members_wchar_t.cc
+ numpunct.cc ctype_narrow_char.cc numpunct_members_char.cc
+ ctype_narrow_wchar_t.cc numpunct_members_wchar_t.cc ctype_scan_char.cc
+ num_put.cc ctype_scan_wchar_t.cc num_put_members_char.cc
+ ctype_to_char.cc num_put_members_wchar_t.cc ctype_to_wchar_t.cc
+ operators.cc ctype_widen_char.cc static_members.cc
+ ctype_widen_wchar_t.cc time_get.cc facet.cc time_get_members_char.cc
+ global_templates.cc time_get_members_wchar_t.cc, members.cc,
+ time_put.cc, messages_byname.cc, time_put_members_char.cc,
+ messages.cc, time_put_members_wchar_t.cc, messages_members_char.cc):
+ Split up into individual test cases...
+ * 22_locale/codecvt/1.cc: New.
+ * 22_locale/codecvt/2.cc: New.
+ * 22_locale/codecvt/always_noconv/char/1.cc: New.
+ * 22_locale/codecvt/always_noconv/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/always_noconv/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/always_noconv/wchar_t/1.cc: New.
+ * 22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/encoding/char/1.cc: New.
+ * 22_locale/codecvt/encoding/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/encoding/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/encoding/wchar_t/1.cc: New.
+ * 22_locale/codecvt/encoding/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/in/char/1.cc: New.
+ * 22_locale/codecvt/in/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/in/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/in/wchar_t/1.cc: New.
+ * 22_locale/codecvt/in/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/in/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/length/char/1.cc: New.
+ * 22_locale/codecvt/length/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/length/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/length/wchar_t/1.cc: New.
+ * 22_locale/codecvt/length/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/length/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/max_length/char/1.cc: New.
+ * 22_locale/codecvt/max_length/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/max_length/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/max_length/wchar_t/1.cc: New.
+ * 22_locale/codecvt/max_length/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/out/char/1.cc: New.
+ * 22_locale/codecvt/out/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/out/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/out/wchar_t/1.cc: New.
+ * 22_locale/codecvt/out/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/out/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/codecvt/unicode/char.cc: New.
+ * 22_locale/codecvt/unicode/wchar_t.cc: New.
+ * 22_locale/codecvt/unshift/char/1.cc: New.
+ * 22_locale/codecvt/unshift/char/wrapped_env.cc: New.
+ * 22_locale/codecvt/unshift/char/wrapped_locale.cc: New.
+ * 22_locale/codecvt/unshift/wchar_t/1.cc: New.
+ * 22_locale/codecvt/unshift/wchar_t/wrapped_env.cc: New.
+ * 22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/collate/1.cc: New.
+ * 22_locale/collate/2.cc: New.
+ * 22_locale/collate/compare/char/1.cc: New.
+ * 22_locale/collate/compare/char/2.cc: New.
+ * 22_locale/collate/compare/char/wrapped_env.cc: New.
+ * 22_locale/collate/compare/char/wrapped_locale.cc: New.
+ * 22_locale/collate/compare/wchar_t/1.cc: New.
+ * 22_locale/collate/compare/wchar_t/2.cc: New.
+ * 22_locale/collate/compare/wchar_t/wrapped_env.cc: New.
+ * 22_locale/collate/compare/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/collate/hash/char/1.cc: New.
+ * 22_locale/collate/hash/char/2.cc: New.
+ * 22_locale/collate/hash/char/wrapped_env.cc: New.
+ * 22_locale/collate/hash/char/wrapped_locale.cc: New.
+ * 22_locale/collate/hash/wchar_t/1.cc: New.
+ * 22_locale/collate/hash/wchar_t/2.cc: New.
+ * 22_locale/collate/hash/wchar_t/wrapped_env.cc: New.
+ * 22_locale/collate/hash/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/collate/transform/char/2.cc: New.
+ * 22_locale/collate/transform/char/wrapped_env.cc: New.
+ * 22_locale/collate/transform/char/wrapped_locale.cc: New.
+ * 22_locale/collate/transform/wchar_t/2.cc: New.
+ * 22_locale/collate/transform/wchar_t/wrapped_env.cc: New.
+ * 22_locale/collate/transform/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/collate_byname/1.cc: New.
+ * 22_locale/ctype/1.cc: New.
+ * 22_locale/ctype/2.cc: New.
+ * 22_locale/ctype/cons/char/1.cc: New.
+ * 22_locale/ctype/cons/char/wrapped_env.cc: New.
+ * 22_locale/ctype/cons/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/is/char/1.cc: New.
+ * 22_locale/ctype/is/char/2.cc: New.
+ * 22_locale/ctype/is/char/3.cc: New.
+ * 22_locale/ctype/is/char/wrapped_env.cc: New.
+ * 22_locale/ctype/is/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/is/wchar_t/1.cc: New.
+ * 22_locale/ctype/is/wchar_t/2.cc: New.
+ * 22_locale/ctype/is/wchar_t/wrapped_env.cc: New.
+ * 22_locale/ctype/is/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/ctype/narrow/char/1.cc: New.
+ * 22_locale/ctype/narrow/char/2.cc: New.
+ * 22_locale/ctype/narrow/char/wrapped_env.cc: New.
+ * 22_locale/ctype/narrow/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/narrow/wchar_t/1.cc: New.
+ * 22_locale/ctype/narrow/wchar_t/2.cc: New.
+ * 22_locale/ctype/narrow/wchar_t/wrapped_env.cc: New.
+ * 22_locale/ctype/narrow/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/ctype/scan/char/1.cc: New.
+ * 22_locale/ctype/scan/char/wrapped_env.cc: New.
+ * 22_locale/ctype/scan/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/scan/wchar_t/1.cc: New.
+ * 22_locale/ctype/scan/wchar_t/wrapped_env.cc: New.
+ * 22_locale/ctype/scan/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/ctype/to/char/1.cc: New.
+ * 22_locale/ctype/to/char/wrapped_env.cc: New.
+ * 22_locale/ctype/to/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/to/wchar_t/1.cc: New.
+ * 22_locale/ctype/to/wchar_t/wrapped_env.cc: New.
+ * 22_locale/ctype/to/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/ctype/widen/char/1.cc: New.
+ * 22_locale/ctype/widen/char/wrapped_env.cc: New.
+ * 22_locale/ctype/widen/char/wrapped_locale.cc: New.
+ * 22_locale/ctype/widen/wchar_t/1.cc: New.
+ * 22_locale/ctype/widen/wchar_t/wrapped_env.cc: New.
+ * 22_locale/ctype/widen/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/facet/1.cc: New.
+ * 22_locale/facet/2.cc: New.
+ * 22_locale/global_templates/1.cc: New.
+ * 22_locale/locale/cons/1.cc: New.
+ * 22_locale/locale/cons/2.cc: New.
+ * 22_locale/locale/cons/3.cc: New.
+ * 22_locale/locale/cons/4.cc: New.
+ * 22_locale/locale/cons/5.cc: New.
+ * 22_locale/locale/cons/6.cc: New.
+ * 22_locale/locale/cons/7.cc: New.
+ * 22_locale/locale/global_locale_objects/1.cc: New.
+ * 22_locale/locale/global_locale_objects/2.cc: New.
+ * 22_locale/locale/global_locale_objects/3.cc: New.
+ * 22_locale/locale/operations/1.cc: New.
+ * 22_locale/locale/operations/2.cc: New.
+ * 22_locale/messages/1.cc: New.
+ * 22_locale/messages/2.cc: New.
+ * 22_locale/messages/members/char/1.cc: New.
+ * 22_locale/messages/members/char/2.cc: New.
+ * 22_locale/messages/members/char/3.cc: New.
+ * 22_locale/messages/members/char/wrapped_env.cc: New.
+ * 22_locale/messages/members/char/wrapped_locale.cc: New.
+ * 22_locale/messages_byname/1.cc: New.
+ * 22_locale/money_get/1.cc: New.
+ * 22_locale/money_get/2.cc: New.
+ * 22_locale/money_get/get/char/1.cc: New.
+ * 22_locale/money_get/get/char/2.cc: New.
+ * 22_locale/money_get/get/char/3.cc: New.
+ * 22_locale/money_get/get/char/4.cc: New.
+ * 22_locale/money_get/get/char/5.cc: New.
+ * 22_locale/money_get/get/char/6.cc: New.
+ * 22_locale/money_get/get/char/7.cc: New.
+ * 22_locale/money_get/get/char/8.cc: New.
+ * 22_locale/money_get/get/char/wrapped_env.cc: New.
+ * 22_locale/money_get/get/char/wrapped_locale.cc: New.
+ * 22_locale/money_get/get/wchar_t/1.cc: New.
+ * 22_locale/money_get/get/wchar_t/2.cc: New.
+ * 22_locale/money_get/get/wchar_t/3.cc: New.
+ * 22_locale/money_get/get/wchar_t/4.cc: New.
+ * 22_locale/money_get/get/wchar_t/5.cc: New.
+ * 22_locale/money_get/get/wchar_t/6.cc: New.
+ * 22_locale/money_get/get/wchar_t/7.cc: New.
+ * 22_locale/money_get/get/wchar_t/8.cc: New.
+ * 22_locale/money_get/get/wchar_t/wrapped_env.cc: New.
+ * 22_locale/money_get/get/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/money_put/1.cc: New.
+ * 22_locale/money_put/2.cc: New.
+ * 22_locale/money_put/put/char/1.cc: New.
+ * 22_locale/money_put/put/char/2.cc: New.
+ * 22_locale/money_put/put/char/3.cc: New.
+ * 22_locale/money_put/put/char/4.cc: New.
+ * 22_locale/money_put/put/char/5.cc: New.
+ * 22_locale/money_put/put/char/6.cc: New.
+ * 22_locale/money_put/put/char/wrapped_env.cc: New.
+ * 22_locale/money_put/put/char/wrapped_locale.cc: New.
+ * 22_locale/money_put/put/wchar_t/1.cc: New.
+ * 22_locale/money_put/put/wchar_t/2.cc: New.
+ * 22_locale/money_put/put/wchar_t/3.cc: New.
+ * 22_locale/money_put/put/wchar_t/4.cc: New.
+ * 22_locale/money_put/put/wchar_t/5.cc: New.
+ * 22_locale/money_put/put/wchar_t/6.cc: New.
+ * 22_locale/money_put/put/wchar_t/wrapped_env.cc: New.
+ * 22_locale/money_put/put/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/moneypunct/1.cc: New.
+ * 22_locale/moneypunct/2.cc: New.
+ * 22_locale/moneypunct/3.cc: New.
+ * 22_locale/moneypunct/members/char/1.cc: New.
+ * 22_locale/moneypunct/members/char/2.cc: New.
+ * 22_locale/moneypunct/members/char/wrapped_env.cc: New.
+ * 22_locale/moneypunct/members/char/wrapped_locale.cc: New.
+ * 22_locale/moneypunct/members/wchar_t/1.cc: New.
+ * 22_locale/moneypunct/members/wchar_t/2.cc: New.
+ * 22_locale/moneypunct/members/wchar_t/wrapped_env.cc: New.
+ * 22_locale/moneypunct/members/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/moneypunct_byname/1.cc: New.
+ * 22_locale/num_get/1.cc: New.
+ * 22_locale/num_get/2.cc: New.
+ * 22_locale/num_get/get/char/1.cc: New.
+ * 22_locale/num_get/get/char/2.cc: New.
+ * 22_locale/num_get/get/char/3.cc: New.
+ * 22_locale/num_get/get/char/4.cc: New.
+ * 22_locale/num_get/get/char/5.cc: New.
+ * 22_locale/num_get/get/char/6.cc: New.
+ * 22_locale/num_get/get/char/wrapped_env.cc: New.
+ * 22_locale/num_get/get/char/wrapped_locale.cc: New.
+ * 22_locale/num_get/get/wchar_t/1.cc: New.
+ * 22_locale/num_get/get/wchar_t/2.cc: New.
+ * 22_locale/num_get/get/wchar_t/3.cc: New.
+ * 22_locale/num_get/get/wchar_t/4.cc: New.
+ * 22_locale/num_get/get/wchar_t/5.cc: New.
+ * 22_locale/num_get/get/wchar_t/6.cc: New.
+ * 22_locale/num_get/get/wchar_t/wrapped_env.cc: New.
+ * 22_locale/num_get/get/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/num_put/1.cc: New.
+ * 22_locale/num_put/2.cc: New.
+ * 22_locale/num_put/put/char/1.cc: New.
+ * 22_locale/num_put/put/char/2.cc: New.
+ * 22_locale/num_put/put/char/3.cc: New.
+ * 22_locale/num_put/put/char/4.cc: New.
+ * 22_locale/num_put/put/char/5.cc: New.
+ * 22_locale/num_put/put/char/wrapped_env.cc: New.
+ * 22_locale/num_put/put/char/wrapped_locale.cc: New.
+ * 22_locale/num_put/put/wchar_t/1.cc: New.
+ * 22_locale/num_put/put/wchar_t/2.cc: New.
+ * 22_locale/num_put/put/wchar_t/3.cc: New.
+ * 22_locale/num_put/put/wchar_t/4.cc: New.
+ * 22_locale/num_put/put/wchar_t/5.cc: New.
+ * 22_locale/num_put/put/wchar_t/wrapped_env.cc: New.
+ * 22_locale/num_put/put/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/numpunct/1.cc: New.
+ * 22_locale/numpunct/2.cc: New.
+ * 22_locale/numpunct/members/char/1.cc: New.
+ * 22_locale/numpunct/members/char/2.cc: New.
+ * 22_locale/numpunct/members/char/wrapped_env.cc: New.
+ * 22_locale/numpunct/members/char/wrapped_locale.cc: New.
+ * 22_locale/numpunct/members/wchar_t/1.cc: New.
+ * 22_locale/numpunct/members/wchar_t/2.cc: New.
+ * 22_locale/numpunct/members/wchar_t/wrapped_env.cc: New.
+ * 22_locale/numpunct/members/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/numpunct_byname/1.cc: New.
+ * 22_locale/numpunct_byname/2.cc: New.
+ * 22_locale/time_get/1.cc: New.
+ * 22_locale/time_get/2.cc: New.
+ * 22_locale/time_get/date_order/char/1.cc: New.
+ * 22_locale/time_get/date_order/char/wrapped_env.cc: New.
+ * 22_locale/time_get/date_order/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/date_order/wchar_t/1.cc: New.
+ * 22_locale/time_get/date_order/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/date_order/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_date/char/1.cc: New.
+ * 22_locale/time_get/get_date/char/2.cc: New.
+ * 22_locale/time_get/get_date/char/3.cc: New.
+ * 22_locale/time_get/get_date/char/wrapped_env.cc: New.
+ * 22_locale/time_get/get_date/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_date/wchar_t/1.cc: New.
+ * 22_locale/time_get/get_date/wchar_t/2.cc: New.
+ * 22_locale/time_get/get_date/wchar_t/3.cc: New.
+ * 22_locale/time_get/get_date/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/get_date/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_monthname/char/1.cc: New.
+ * 22_locale/time_get/get_monthname/char/2.cc: New.
+ * 22_locale/time_get/get_monthname/char/3.cc: New.
+ * 22_locale/time_get/get_monthname/char/wrapped_env.cc: New.
+ * 22_locale/time_get/get_monthname/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_monthname/wchar_t/1.cc: New.
+ * 22_locale/time_get/get_monthname/wchar_t/2.cc: New.
+ * 22_locale/time_get/get_monthname/wchar_t/3.cc: New.
+ * 22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_time/char/1.cc: New.
+ * 22_locale/time_get/get_time/char/2.cc: New.
+ * 22_locale/time_get/get_time/char/3.cc: New.
+ * 22_locale/time_get/get_time/char/wrapped_env.cc: New.
+ * 22_locale/time_get/get_time/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_time/wchar_t/1.cc: New.
+ * 22_locale/time_get/get_time/wchar_t/2.cc: New.
+ * 22_locale/time_get/get_time/wchar_t/3.cc: New.
+ * 22_locale/time_get/get_time/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/get_time/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_weekday/char/1.cc: New.
+ * 22_locale/time_get/get_weekday/char/2.cc: New.
+ * 22_locale/time_get/get_weekday/char/3.cc: New.
+ * 22_locale/time_get/get_weekday/char/wrapped_env.cc: New.
+ * 22_locale/time_get/get_weekday/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_weekday/wchar_t/1.cc: New.
+ * 22_locale/time_get/get_weekday/wchar_t/2.cc: New.
+ * 22_locale/time_get/get_weekday/wchar_t/3.cc: New.
+ * 22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_year/char/1.cc: New.
+ * 22_locale/time_get/get_year/char/3.cc: New.
+ * 22_locale/time_get/get_year/char/wrapped_env.cc: New.
+ * 22_locale/time_get/get_year/char/wrapped_locale.cc: New.
+ * 22_locale/time_get/get_year/wchar_t/1.cc: New.
+ * 22_locale/time_get/get_year/wchar_t/3.cc: New.
+ * 22_locale/time_get/get_year/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_get/get_year/wchar_t/wrapped_locale.cc: New.
+ * 22_locale/time_put/1.cc: New.
+ * 22_locale/time_put/2.cc: New.
+ * 22_locale/time_put/put/char/1.cc: New.
+ * 22_locale/time_put/put/char/10.cc: New.
+ * 22_locale/time_put/put/char/2.cc: New.
+ * 22_locale/time_put/put/char/3.cc: New.
+ * 22_locale/time_put/put/char/4.cc: New.
+ * 22_locale/time_put/put/char/5.cc: New.
+ * 22_locale/time_put/put/char/6.cc: New.
+ * 22_locale/time_put/put/char/7.cc: New.
+ * 22_locale/time_put/put/char/8.cc: New.
+ * 22_locale/time_put/put/char/9.cc: New.
+ * 22_locale/time_put/put/char/wrapped_env.cc: New.
+ * 22_locale/time_put/put/char/wrapped_locale.cc: New.
+ * 22_locale/time_put/put/wchar_t/1.cc: New.
+ * 22_locale/time_put/put/wchar_t/10.cc: New.
+ * 22_locale/time_put/put/wchar_t/2.cc: New.
+ * 22_locale/time_put/put/wchar_t/3.cc: New.
+ * 22_locale/time_put/put/wchar_t/4.cc: New.
+ * 22_locale/time_put/put/wchar_t/5.cc: New.
+ * 22_locale/time_put/put/wchar_t/6.cc: New.
+ * 22_locale/time_put/put/wchar_t/7.cc: New.
+ * 22_locale/time_put/put/wchar_t/8.cc: New.
+ * 22_locale/time_put/put/wchar_t/9.cc: New.
+ * 22_locale/time_put/put/wchar_t/wrapped_env.cc: New.
+ * 22_locale/time_put/put/wchar_t/wrapped_locale.cc: New.
+
+2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
+
+ * config/locale/generic/messages_members.h
+ (messages_byname<_CharT>::messages_byname): Use this-> to refer to
+ unqualified members of base clasess.
+
+2003-01-16 Mark Mitchell <mark@codesourcery.com>
+ Jeffrey Oldham <oldham@codesourcery.com>
+
+ * config/locale/gnu/messages_members.h: Use this-> to refer to
+ unqualified members of base clasess.
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Likewise.
+ * include/bits/codecvt.h: Likewise.
+ * include/bits/deque.tcc: Likewise.
+ * include/bits/fstream.tcc: Likewise.
+ * include/bits/istream.tcc: Likewise.
+ * include/bits/list.tcc: Likewise.
+ * include/bits/locale_facets.h: Likewise.
+ * include/bits/ostream.tcc: Likewise.
+ * include/bits/sstream.tcc: Likewise.
+ * include/bits/stl_bvector.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/bits/vector.tcc: Likewise.
+ * include/ext/ropeimpl.h: Likewise.
+ * include/ext/stdio_filebuf.h: Likewise.
+ * include/ext/stl_rope.h: Likewise.
+ * include/std/std_fstream.h: Likewise.
+ * include/std/std_sstream.h: Likewise.
+
+2003-01-15 Phil Edwards <pme@gcc.gnu.org>
+
+ * include/bits/basic_string.tcc (_S_string_copy): Unused, remove.
+
+2003-01-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Substitute
+ GLIBCPP_TEST_WCHAR_T if building wchar_t bits in the library.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (all-local): Add conditional rule to
+ generate testsuite_wchar_t.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/lib/libstdc++-v3-dg.exp
+ (libstdc++-v3-list-sourcefiles): Remove wchar_t files if
+ testsuite_wchar_t is not present in the build directory.
+ * testsuite/libstdc++-v3.dg/dg.exp: Add -g -O2 to DEFAULT_CXXFLAGS.
+ Remove setulimit bits.
+ * testsuite/26_numerics/complex_value.cc: Set to noopts.
+ * testsuite/Makefile.am (CLEANFILES): Add.
+ * testsuite/Makefile.in: Regenerate.
+
+2003-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config/os/hpux/os_defines.h (_GLIBCPP_GTHREAD_USE_WEAK): Define for
+ __hppa__.
+
+2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
+
+ Further conform g++'s __vmi_class_type_info to the C++ ABI
+ specification.
+ * libsupc++/cxxabi.h
+ (__vmi_class_type_info::__flags_masks): Remove enumerations not
+ required by the specification.
+
+2003-01-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ Renames, namespaces for testsuite utilities.
+ * testsuite/testsuite_hooks.h: Put into namespace __gnu_cxx_test.
+ (gnu_allocator_tracker): Rename to allocation_tracker.
+ (gnu_new_allocator): Rename to tracker_alloc.
+ (__set_testsuite_memlimit): Rename to set_memory_limits.
+ (gnu_assignment_operator): Rename to assignment_operator.
+ (gnu_destructor): Rename to destructor.
+ (gnu_copy_tracker): Rename to copy_tracker.
+ (gnu_char, gnu_int, gnu_long): Rename to pod_char, pod_int, pod_long.
+ (run_tests_wrapped_locale): New.
+ (run_tests_wrapped_env): New.
+ * testsuite/testsuite_hooks.cc: Same.
+ (class locale_data): Add.
+ (class enviornment_variable): Add.
+ (class not_found): Add.
+ * testsuite/testsuite_allocator.h: Same.
+ * testsuite/testsuite_allocator.cc: Same.
+ * testsuite/23_containers/deque_ctor.cc
+ (test_copy_ctor_exception_safety): Change gnu_allocator_tracker to
+ allocation_tracker.
+ Change gnu_new_allocator to tracker_alloc.
+ Change gnu_counting_struct to counter.
+ Change gnu_copy_tracker to copy_tracker.
+ Change gnu_copy_constructor to copy_constructor.
+ Change gnu_assignment_operator to assignment_operator.
+ Inject.
+ * testsuite/23_containers/vector_capacity.cc: Same.
+ * testsuite/23_containers/vector_ctor.cc (test01): Same.
+ * testsuite/23_containers/list_modifiers.cc: Change
+ gnu_copy_tracker to copy_tracker.
+ * testsuite/21_strings/ctor_copy_dtor.cc (main): Change
+ __set_testsuite_memlimit to set_memory_limits.
+ * testsuite/21_strings/insert.cc (main): Same.
+ * testsuite/27_io/filebuf.cc: Change gnu_char to pod_char.
+ * testsuite/27_io/stringstream.cc: Same.
+ * testsuite/27_io/stringbuf.cc: Same.
+ * testsuite/27_io/streambuf.cc: Same.
+ * testsuite/27_io/ostream.cc: Same.
+ * testsuite/27_io/istream.cc: Same.
+ * testsuite/27_io/fstream.cc: Same.
+ * testsuite/lib/libstdc++-v3-dg.exp
+ (libstdc++-v3-list-sourcefiles): Additionally handle files two and
+ three levels deeper in glob patterns.
+
+2003-01-11 Phil Edwards <pme@gcc.gnu.org>
+
+ * docs/doxygen/tables.html: Finished now.
+ * docs/doxygen/user.cfg.in: Update to latest version of Doxygen.
+ * include/bits/basic_ios.h (basic_ios::rdbuf): Add example to
+ comments.
+
+ * include/bits/deque.tcc, include/bits/stl_alloc.h,
+ include/bits/stl_deque.h, include/bits/stl_list.h,
+ include/bits/stl_vector.h: Remove _GLIBCPP_DEPRECATED bits scheduled
+ for 3.4 removal.
+
+2003-01-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in: Revert.
+ * configure: Regenerate.
+
+2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * include/Makefile.am (install-data-local): Prepend
+ $(DESTDIR) to destination paths in all (un)installation
+ commands. Use ${c_base_builddir} and ${std_builddir}
+ as destination subdirectories to achieve consistency with
+ preceding mkinstalldirs commands. No effect because both
+ variables contain "." only.
+ * include/Makefile.in: Regenerate.
+
+2003-01-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (stamp-*): Add checks for existing stamps.
+ * include/Makefile.in: Regenerate.
+
+ * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): Correct comment.
+ * aclocal.m4: Regenerate.
+
+ * configure.in: Don't add new multi-do rules every time the
+ directory is reconfigured.
+ * configure: Regenerate.
+
+2003-01-08 Brad Spencer <spencer@infointeractive.com>
+ Nathan Myers <ncm@cantrip.org>
+
+ * src/Makefile.am (stamp-debug): Clean.
+ * src/Makefile.in: Regenerate.
+
+2003-01-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/8707
+ * Makefile.am (distclean-multi): Fix.
+ * Makefile.in: Regenerate.
+
+2003-01-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (messages): Move ctor, dtor
+ definitions to..
+ (__timepunct): Same.
+ * config/locale/gnu/messages_members.h (messages): Add dtor, ctor
+ definitions. Conditionalize for GNU systems.
+ * config/locale/generic/messages_members.h (messages): Add dtor, ctor
+ definitions.
+ * config/locale/gnu/time_members.h (messages): New. Add dtor, ctor
+ definitions. Conditionalize for GNU systems.
+ * config/locale/generic/time_members.h (messages): New. Add dtor, ctor
+ definitions.
+ * include/bits/localefwd.h (locale::facet::_S_c_name): Add.
+ * src/locale.cc: Define.
+ * src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool):
+ Use it.
+ * config/locale/gnu/time_members.h: Use it.
+ * config/locale/gnu/messages_members.h: Use it.
+ * config/linker-map.gnu: Add locale::facets details.
+ * include/Makefile.am (target_headers_extra): Add time_members.h.
+ * include/Makefile.in: Regenerate.
+ * acinclude.m4: Export CTIME_H.
+ * aclocal.m4: Regenerate.
+ * configure: Regnerate.
+
+2003-01-06 Paolo Carlini <pcarlini@unitus.it>
+
+ * src/codecvt.cc
+ (codecvt<char, char, mbstate_t>::do_in, do_out):
+ Tweak parameters to avoid unused parameter warnings.
+
+2003-01-06 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9151
+ * include/bits/locale_facets.cc (num_put::_M_convert_float):
+ Limit __prec to digits10 + 2, not digits10 + 1, taking into
+ account the possibility of %{g,G} conversion specifiers
+ inside _S_format_float.
+ * testsuite/27_io/ostream_inserter_arith.cc (test06): Add.
+
+2003-01-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init,
+ libstdc++-v3-list-sourcefiles): Additionally handle files one
+ level deeper in glob patterns.
+
+ * testsuite/27_io/istream_extractor_arith.cc: Delete, split...
+ * testsuite/27_io/istream_extractor_arith/01.cc,
+ testsuite/27_io/istream_extractor_arith/02.cc,
+ testsuite/27_io/istream_extractor_arith/03.cc,
+ testsuite/27_io/istream_extractor_arith/06.cc,
+ testsuite/27_io/istream_extractor_arith/07.cc,
+ testsuite/27_io/istream_extractor_arith/08.cc,
+ testsuite/27_io/istream_extractor_arith/09.cc,
+ testsuite/27_io/istream_extractor_arith/10.cc,
+ testsuite/27_io/istream_extractor_arith/11.cc,
+ testsuite/27_io/istream_extractor_arith/12.cc,
+ testsuite/27_io/istream_extractor_arith/13.cc: ... to new files.
+ * testsuite/27_io/istream_extractor_arith/12.cc: Add XFAIL for
+ sparc*-*-solaris2*.
+
+2003-01-05 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/9168
+ * src/codecvt.cc
+ (codecvt<char, char, mbstate_t>::do_in, do_out):
+ Implement the resolution of DR19 (TC).
+ * testsuite/22_locale/codecvt_members_char_char.cc
+ (test01): Tweak.
+
+2003-01-02 Jason Merrill <jason@redhat.com>
+
+ * config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
+ *__mem is also an output.
+ * config/cpu/m68k/atomicity.h (__exchange_and_add): Likewise.
diff --git a/contrib/libstdc++/Makefile.am b/contrib/libstdc++/Makefile.am
index 642bdc3..75c799d 100644
--- a/contrib/libstdc++/Makefile.am
+++ b/contrib/libstdc++/Makefile.am
@@ -22,51 +22,40 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-AUTOMAKE_OPTIONS = 1.3 cygnus
-MAINT_CHARSET = latin1
+include $(top_srcdir)/fragment.am
-SUBDIRS = include libio libmath libsupc++ src po testsuite
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-PWD_COMMAND = $${PWDCMD-pwd}
-
-# These two special 'check-script' rules use the bash script 'mkcheck'
-# to do testing. This script is not as portable as the dejagnu test
-# harness, and is thus off by default. It does produce interesting
-# output however, including various performance analysis items like
-# compile time, execution time, and binary size.
-check-script: $(top_builddir)/mkcheck
- -(chmod + $(top_builddir)/mkcheck; \
- cd testsuite; \
- @glibcpp_builddir@/mkcheck 0)
-
-check-script-install: $(top_builddir)/mkcheck
- -(chmod + $(top_builddir)/mkcheck; \
- cd testsuite; \
- @glibcpp_builddir@/mkcheck 1)
+if GLIBCXX_HOSTED
+ # Possibly libmath as well...
+ hosted_source = src po
+endif
+## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
+SUBDIRS = include libmath libsupc++ $(hosted_source) testsuite
# These rules are messy, but are hella worth it.
doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=user $${srcdir} $${builddir})
doxygen-maint:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=maint $${srcdir} $${builddir})
doxygen-man:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=man $${srcdir} $${builddir})
.PHONY: doxygen doxygen-maint doxygen-man
+# Handy forwarding targets.
+check-%:
+ cd testsuite && $(MAKE) $@
+
# Multilib support.
MAKEOVERRIDES=
@@ -147,7 +136,7 @@ AM_MAKEFLAGS = \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
- "WERROR=$(WERROR)"
+ "WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
diff --git a/contrib/libstdc++/Makefile.in b/contrib/libstdc++/Makefile.in
index 4ff8e32..9355471 100644
--- a/contrib/libstdc++/Makefile.in
+++ b/contrib/libstdc++/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,71 +12,52 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
-ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@
-CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
@@ -83,39 +66,73 @@ CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@
+GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@
+GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@
+GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBMATHOBJS = @LIBMATHOBJS@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_MAP = @SYMVER_MAP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
@@ -123,35 +140,86 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
+datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
-glibcpp_CXX = @glibcpp_CXX@
-glibcpp_MOFILES = @glibcpp_MOFILES@
-glibcpp_POFILES = @glibcpp_POFILES@
-glibcpp_basedir = @glibcpp_basedir@
-glibcpp_builddir = @glibcpp_builddir@
-glibcpp_localedir = @glibcpp_localedir@
-glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_srcdir = @glibcpp_srcdir@
-glibcpp_thread_h = @glibcpp_thread_h@
-glibcpp_toolexecdir = @glibcpp_toolexecdir@
-glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
-ifGNUmake = @ifGNUmake@
-libio_la = @libio_la@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+mandir = @mandir@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
-AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
-SUBDIRS = include libio libmath libsupc++ src po testsuite
-
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
+
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
+
+WARN_CXXFLAGS = \
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+@GLIBCXX_HOSTED_TRUE@hosted_source = src po
+SUBDIRS = include libmath libsupc++ $(hosted_source) testsuite
# Multilib support.
MAKEOVERRIDES =
@@ -205,71 +273,84 @@ AM_MAKEFLAGS = \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
- "WERROR=$(WERROR)"
+ "WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = mkcheck testsuite_flags
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
-mkcheck.in testsuite_flags.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+CONFIG_CLEAN_FILES = scripts/check_survey scripts/testsuite_flags
+depcomp =
+am__depfiles_maybe =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
+ $(top_srcdir)/fragment.am ../ABOUT-NLS ../COPYING \
+ ../COPYING.LIB ../ChangeLog ../README ../config.guess \
+ ../config.rpath ../config.sub ../configure ../configure.in \
+ ../install-sh ../ltcf-c.sh ../ltcf-cxx.sh ../ltcf-gcj.sh \
+ ../ltconfig ../ltmain.sh ../missing ../mkinstalldirs ../ylwrap \
+ ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \
+ config.h.in configure configure.ac
+DIST_SUBDIRS = include libmath libsupc++ src po testsuite
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-mostlyclean-hdr:
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
-clean-hdr:
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ touch $(srcdir)/config.h.in
distclean-hdr:
- -rm -f config.h
+ -rm -f config.h stamp-h1
+scripts/check_survey: $(top_builddir)/config.status $(top_srcdir)/scripts/check_survey.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+scripts/testsuite_flags: $(top_builddir)/config.status $(top_srcdir)/scripts/testsuite_flags.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
-maintainer-clean-hdr:
-mkcheck: $(top_builddir)/config.status mkcheck.in
- cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-testsuite_flags: $(top_builddir)/config.status testsuite_flags.in
- cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -277,12 +358,7 @@ testsuite_flags: $(top_builddir)/config.status testsuite_flags.in
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
+$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
@@ -305,11 +381,16 @@ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -325,198 +406,303 @@ tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-mostlyclean-tags:
+ mkid -fID $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
distdir: $(DISTFILES)
- -rm -rf $(distdir)
+ $(am__remove_distdir)
mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ $(mkinstalldirs) $(distdir)/.. $(distdir)/scripts
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
- for subdir in $(SUBDIRS); do \
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
|| exit 1; \
fi; \
done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
+all-am: Makefile all-multi config.h
+installdirs: installdirs-recursive
+installdirs-am:
-install-exec-am:
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am:
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-multi clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-generic clean-libtool mostlyclean-am
-clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+distclean: distclean-multi distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-recursive
- -rm -f config.status
+info: info-recursive
-maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am:
+
+install-exec-am: install-multi
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-multi maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-multi mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info all-recursive-am install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
-
-
-# These two special 'check-script' rules use the bash script 'mkcheck'
-# to do testing. This script is not as portable as the dejagnu test
-# harness, and is thus off by default. It does produce interesting
-# output however, including various performance analysis items like
-# compile time, execution time, and binary size.
-check-script: $(top_builddir)/mkcheck
- -(chmod + $(top_builddir)/mkcheck; \
- cd testsuite; \
- @glibcpp_builddir@/mkcheck 0)
-
-check-script-install: $(top_builddir)/mkcheck
- -(chmod + $(top_builddir)/mkcheck; \
- cd testsuite; \
- @glibcpp_builddir@/mkcheck 1)
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-multi check \
+ check-am clean clean-generic clean-libtool clean-multi \
+ clean-recursive ctags ctags-recursive dist dist-all dist-gzip \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-multi distclean-recursive \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am dvi-recursive info info-am info-recursive install \
+ install-am install-data install-data-am install-data-recursive \
+ install-exec install-exec-am install-exec-recursive \
+ install-info install-info-am install-info-recursive install-man \
+ install-multi install-recursive install-strip installcheck \
+ installcheck-am installdirs installdirs-am \
+ installdirs-recursive maintainer-clean maintainer-clean-generic \
+ maintainer-clean-multi maintainer-clean-recursive mostlyclean \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-multi \
+ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+ ps-recursive tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-info-recursive uninstall-recursive
+
+
+@GLIBCXX_HOSTED_TRUE@ # Possibly libmath as well...
# These rules are messy, but are hella worth it.
doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=user $${srcdir} $${builddir})
doxygen-maint:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=maint $${srcdir} $${builddir})
doxygen-man:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
- /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--mode=man $${srcdir} $${builddir})
.PHONY: doxygen doxygen-maint doxygen-man
+# Handy forwarding targets.
+check-%:
+ cd testsuite && $(MAKE) $@
+
# Multilib support.
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
maintainer-clean-multi
@@ -544,7 +730,6 @@ maintainer-clean-multi:
# All the machinations with string instantiations messes up the
# automake-generated TAGS rule. Make a simple one here.
TAGS: tags-recursive $(LISP)
-
# 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/contrib/libstdc++/README b/contrib/libstdc++/README
index 67c390e..6844909 100644
--- a/contrib/libstdc++/README
+++ b/contrib/libstdc++/README
@@ -54,11 +54,15 @@ It has subdirectories:
Headers that define extensions to the standard library. No
standard header refers to any of them.
+ scripts
+ Scripts that are used during the configure, build, make, or test
+ process.
+
src
Files that are used in constructing the library, but are not
installed.
- testsuites/[thread, 17_* to 27_*]
+ testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]
Test programs are here, and may be used to begin to exercise the
library. Support for "make check" and "make check-install" is
complete, and runs through all the subdirectories here when this
@@ -72,16 +76,13 @@ Other subdirectories contain variant versions of certain files
that are meant to be copied or linked by the configure script.
Currently these are:
+ config/abi
config/cpu
- config/os
config/io
config/locale
+ config/os
-In addition, three subdirectories are convenience libraries:
-
- libio
- Contains the subset of the GNU libio library needed for
- C++. Currently not used.
+In addition, two subdirectories are convenience libraries:
libmath
Support routines needed for C++ math. Only needed if the
diff --git a/contrib/libstdc++/acconfig.h b/contrib/libstdc++/acconfig.h
index 91af8fa..cad2748 100644
--- a/contrib/libstdc++/acconfig.h
+++ b/contrib/libstdc++/acconfig.h
@@ -10,58 +10,61 @@
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
-// Define if GCC supports weak symbols.
-#undef _GLIBCPP_SUPPORTS_WEAK
-
// Include I/O support for 'long long' and 'unsigned long long'.
-#undef _GLIBCPP_USE_LONG_LONG
-
-// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
-#undef _GLIBCPP_USE_C99
+#undef _GLIBCXX_USE_LONG_LONG
// Include support for 'long double'.
-#undef _GLIBCPP_USE_LONG_DOUBLE
+#undef _GLIBCXX_USE_LONG_DOUBLE
-// Include support for shadow headers, ie --enable-cshadow-headers.
-#undef _GLIBCPP_USE_SHADOW_HEADERS
+// Define if C99 math functions (like fpclassify) should be exposed.
+#undef _GLIBCXX_USE_C99_MATH
+
+// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+#undef _GLIBCXX_USE_C99
// Define if code specialized for wchar_t should be used.
-#undef _GLIBCPP_USE_WCHAR_T
+#undef _GLIBCXX_USE_WCHAR_T
-// Define if using setrlimit to limit memory usage during 'make check'.
-#undef _GLIBCPP_MEM_LIMITS
+// Define if using setrlimit to set resource limits during 'make check'.
+#undef _GLIBCXX_RES_LIMITS
// Define to use concept checking code from the boost libraries.
-#undef _GLIBCPP_CONCEPT_CHECKS
-
-// Define if the atan2f function exists.
-#undef _GLIBCPP_HAVE_ATAN2F
-
-// Define if the atan2l function exists.
-#undef _GLIBCPP_HAVE_ATAN2L
-
-// Define if the copysignf function exists.
-#undef _GLIBCPP_HAVE_COPYSIGNF
+#undef _GLIBCXX_CONCEPT_CHECKS
// Define to use symbol versioning in the shared library.
-#undef _GLIBCPP_SYMVER
+#undef _GLIBCXX_SYMVER
// Define symbol versioning in assember directives. If symbol
// versioning is beigng used, and the assembler supports this kind of
// thing, then use it.
-// NB: _GLIBCPP_AT_AT is a hack to work around quoting issues in m4.
-#if _GLIBCPP_SYMVER
- #define _GLIBCPP_ASM_SYMVER(cur, old, version) \
- asm (".symver " #cur "," #old _GLIBCPP_AT_AT #version);
+// NB: _GLIBCXX_AT_AT is a hack to work around quoting issues in m4.
+#if _GLIBCXX_SYMVER
+ #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
+ asm (".symver " #cur "," #old _GLIBCXX_AT_AT #version);
#else
- #define _GLIBCPP_ASM_SYMVER(cur, old, version)
+ #define _GLIBCXX_ASM_SYMVER(cur, old, version)
#endif
+// Define if LFS support is available.
+#undef _GLIBCXX_USE_LFS
+
+// Define if NLS translations are to be used.
+#undef _GLIBCXX_USE_NLS
+
// Define if gthr-default.h exists (meaning that threading support is enabled).
#undef HAVE_GTHR_DEFAULT
-// Define if drand48 exists.
-#undef HAVE_DRAND48
+// Define if the atan2f function exists.
+#undef HAVE_ATAN2F
+
+// Define if the atan2l function exists.
+#undef HAVE_ATAN2L
+
+// Define if the tanl function exists.
+#undef HAVE_TANL
+
+// Define if the copysignf function exists.
+#undef HAVE_COPYSIGNF
// Define if getpagesize exists.
#undef HAVE_GETPAGESIZE
@@ -87,6 +90,9 @@
// Define if you have the expl function.
#undef HAVE_EXPL
+// Define if you have the hypot function.
+#undef HAVE_HYPOT
+
// Define if you have the hypotf function.
#undef HAVE_HYPOTF
@@ -144,6 +150,12 @@
// Define if S_IFREG is available in <sys/stat.h>.
#undef HAVE_S_IFREG
+// Define if writev is available in <sys/uio.h>.
+#undef HAVE_WRITEV
+
+// Define if int64_t is available in <stdint.h>.
+#undef HAVE_INT64_T
+
// Define if LC_MESSAGES is available in <locale.h>.
#undef HAVE_LC_MESSAGES
diff --git a/contrib/libstdc++/acinclude.m4 b/contrib/libstdc++/acinclude.m4
index b47b9fc..f467b60 100644
--- a/contrib/libstdc++/acinclude.m4
+++ b/contrib/libstdc++/acinclude.m4
@@ -1,230 +1,184 @@
-dnl
-dnl Initialize basic configure bits, set toplevel_srcdir for Makefiles.
-dnl
-dnl GLIBCPP_TOPREL_CONFIGURE
-AC_DEFUN(GLIBCPP_TOPREL_CONFIGURE, [
- dnl Default to --enable-multilib (this is also passed by default
- dnl from the ubercommon-top-level configure)
- AC_ARG_ENABLE(multilib,
- [ --enable-multilib build hella library versions (default)],
- [case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
- # When building with srcdir == objdir, links to the source files will
- # be created in directories within the target_subdir. We have to
- # adjust toplevel_srcdir accordingly, so that configure finds
- # install-sh and other auxiliary files that live in the top-level
- # source directory.
- if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
- toprel=".."
- else
- if test "${with_target_subdir}" != "."; then
- toprel="${with_multisrctop}../.."
- else
- toprel="${with_multisrctop}.."
- fi
- fi
- else
- toprel=".."
- fi
- AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
- toplevel_srcdir=\${top_srcdir}/$toprel
- AC_SUBST(toplevel_srcdir)
-])
dnl
-dnl Initialize the rest of the library configury.
+dnl GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
dnl
-dnl GLIBCPP_CONFIGURE
-AC_DEFUN(GLIBCPP_CONFIGURE, [
- # Export build and source directories.
- # These need to be absolute paths, yet at the same time need to
- # canonicalize only relative paths, because then amd will not unmount
- # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
- glibcpp_builddir=`${PWDCMD-pwd}`
- case $srcdir in
- [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
- *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
- esac
- AC_SUBST(glibcpp_builddir)
- AC_SUBST(glibcpp_srcdir)
+dnl Exactly like AM_CONDITIONAL, but delays evaluation of the test until the
+dnl end of configure. This lets tested variables be reassigned, and the
+dnl conditional will depend on the final state of the variable. For a simple
+dnl example of why this is needed, see GLIBCXX_ENABLE_HOSTED.
+dnl
+m4_define([_m4_divert(glibcxx_diversion)], 8000)dnl
+AC_DEFUN([GLIBCXX_CONDITIONAL], [dnl
+ m4_divert_text([glibcxx_diversion],dnl
+ AM_CONDITIONAL([$1],[$2])
+ )dnl
+])dnl
+AC_DEFUN([GLIBCXX_EVALUATE_CONDITIONALS], [m4_undivert([glibcxx_diversion])])dnl
- dnl This is here just to satisfy automake.
- ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
- AC_PROG_AWK
- # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.5x, can also
- # be 'cp -p' if linking isn't available. Uncomment the next line to
- # force a particular method.
- #ac_cv_prog_LN_S='cp -p'
- AC_PROG_LN_S
+dnl
+dnl Check to see what architecture and operating system we are compiling
+dnl for. Also, if architecture- or OS-specific flags are required for
+dnl compilation, pick them up here.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_HOST], [
+ . $glibcxx_srcdir/configure.host
+ AC_MSG_NOTICE([CPU config directory is $cpu_include_dir])
+ AC_MSG_NOTICE([OS config directory is $os_include_dir])
+])
- # We use these options to decide which functions to include.
- AC_ARG_WITH(target-subdir,
- [ --with-target-subdir=SUBDIR
- configuring in a subdirectory])
- AC_ARG_WITH(cross-host,
- [ --with-cross-host=HOST configuring with a cross compiler])
-
- glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
- AC_SUBST(glibcpp_basedir)
-
- # Never versions of autoconf add an underscore to these functions.
- # Prevent future problems ...
- ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
- ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
- ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
- ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
-
- # AC_PROG_CC
- # FIXME: We temporarily define our own version of AC_PROG_CC. This is
- # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
- # are probably using a cross compiler, which will not be able to fully
- # link an executable. This is addressed in later versions of autoconf.
-
- AC_DEFUN(LIB_AC_PROG_CC,
- [AC_BEFORE([$0], [AC_PROG_CPP])dnl
- dnl Fool anybody using AC_PROG_CC.
- AC_PROVIDE([AC_PROG_CC])
- AC_CHECK_PROG(CC, gcc, gcc)
- if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
- fi
- AC_PROG_CC_GNU
+dnl
+dnl Initialize basic configure bits.
+dnl
+dnl Substs:
+dnl multi_basedir
+dnl
+AC_DEFUN([GLIBCXX_TOPREL_CONFIGURE], [
+ # Sets up multi_basedir, which is srcdir/.. plus the usual
+ # "multi_source_toprel_bottom_adjust" lunacy as needed.
+ AM_ENABLE_MULTILIB(, ..)
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- dnl Check whether -g works, even if CFLAGS is set, in case the package
- dnl plays around with CFLAGS (such as to build both debugging and
- dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
+ # The generated code is exactly the same, except that automake's looks in
+ # ".. $srcdir/.." and autoconf's looks in multi_basedir. Apparently other
+ # things are triggered on the presence of the two ...AUX_DIR[S], but I don't
+ # know what they are or what the other differences might be (and they keep
+ # changing anyhow).
+ #
+ # Looking in multi_basedir seems smarter, so actually execute that branch.
+ if false; then
+ # this is for automake
+ AC_CONFIG_AUX_DIR(..)
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ # this is for autoconf
+ AC_CONFIG_AUX_DIRS(${multi_basedir})
fi
- ])
- LIB_AC_PROG_CC
-
- # Likewise for AC_PROG_CXX. We can't just call it directly because g++
- # will try to link in libstdc++.
- AC_DEFUN(LIB_AC_PROG_CXX,
- [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
- dnl Fool anybody using AC_PROG_CXX.
- AC_PROVIDE([AC_PROG_CXX])
- # Use glibcpp_CXX so that we do not cause CXX to be cached with the
- # flags that come in CXX while configuring libstdc++. They're different
- # from those used for all other target libraries. If CXX is set in
- # the environment, respect that here.
- glibcpp_CXX=$CXX
- AC_CHECK_PROGS(glibcpp_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
- AC_SUBST(glibcpp_CXX)
- CXX=$glibcpp_CXX
- test -z "$glibcpp_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
-
- AC_PROG_CXX_GNU
-
- if test $ac_cv_prog_gxx = yes; then
- GXX=yes
- dnl Check whether -g works, even if CXXFLAGS is set, in case the package
- dnl plays around with CXXFLAGS (such as to build both debugging and
- dnl normal versions of a library), tasteless as that idea is.
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=
- AC_PROG_CXX_G
- if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS="$ac_save_CXXFLAGS"
- elif test $ac_cv_prog_cxx_g = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-O2"
- fi
- else
- GXX=
- test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
- fi
- ])
+ dnl XXX Turn this on.
+ dnl AC_LANG_CPLUSPLUS
+])
- LIB_AC_PROG_CXX
+
+dnl
+dnl Initialize the rest of the library configury. At this point we have
+dnl variables like $host.
+dnl
+dnl Sets:
+dnl gcc_version (x.y.z format)
+dnl SUBDIRS
+dnl Substs:
+dnl glibcxx_builddir (absolute path)
+dnl glibcxx_srcdir (absolute path)
+dnl toplevel_srcdir (absolute path)
+dnl with_cross_host
+dnl with_newlib
+dnl with_target_subdir
+dnl plus
+dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
+dnl - default settings for all AM_CONFITIONAL test variables
+dnl - lots of tools, like CC and CXX
+dnl
+AC_DEFUN([GLIBCXX_CONFIGURE], [
+ # Keep these sync'd with the list in Makefile.am. The first provides an
+ # expandable list at autoconf time; the second provides an expandable list
+ # (i.e., shell variable) at configure time.
+ m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src po testsuite])
+ SUBDIRS='glibcxx_SUBDIRS'
+
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ glibcxx_builddir=`${PWDCMD-pwd}`
+ case $srcdir in
+ [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
+ *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
+ toplevel_srcdir=${glibcxx_srcdir}/..
+ AC_SUBST(glibcxx_builddir)
+ AC_SUBST(glibcxx_srcdir)
+ AC_SUBST(toplevel_srcdir)
+
+ # We use these options to decide which functions to include. They are
+ # set from the top level.
+ AC_ARG_WITH([target-subdir],
+ AC_HELP_STRING([--with-target-subdir=SUBDIR],
+ [configuring in a subdirectory]))
+
+ AC_ARG_WITH([cross-host],
+ AC_HELP_STRING([--with-cross-host=HOST],
+ [configuring with a cross compiler]))
+
+ AC_ARG_WITH([newlib],
+ AC_HELP_STRING([--with-newlib],
+ [assume newlib as a system C library]))
+
+ # We're almost certainly being configured before anything else which uses
+ # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
+ # we not cache the value of CXX that we "discover" here, because it's set
+ # to something unique for us and libjava. Other target libraries need to
+ # find CXX for themselves. We yank the rug out from under the normal AC_*
+ # process by sneakily renaming the cache variable. This also lets us debug
+ # the value of "our" CXX in postmortems.
+ #
+ # We must also force CXX to /not/ be a precious variable, otherwise the
+ # wrong (non-multilib-adjusted) value will be used in multilibs. This
+ # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
+ # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
+ # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
+ #
+ # -fno-builtin must be present here so that a non-conflicting form of
+ # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
+
+ m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
+ m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
+ m4_define([_AC_ARG_VAR_PRECIOUS],[])
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-builtin"
+ AC_PROG_CC
+ AC_PROG_CXX
+ CXXFLAGS="$save_CXXFLAGS"
+ m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CXXFLAGS)
# For directory versioning (e.g., headers) and other variables.
AC_MSG_CHECKING([for GCC version number])
- gcc_version=`$glibcpp_CXX -dumpversion`
+ gcc_version=`$CXX -dumpversion`
AC_MSG_RESULT($gcc_version)
- # For some reason, gettext needs this.
- AC_ISC_POSIX
+ # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
+ # available). Uncomment the next line to force a particular method.
+ AC_PROG_LN_S
+ #LN_S='cp -p'
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
- AC_PROG_INSTALL
AM_MAINTAINER_MODE
- # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
- # at least currently, we never actually build a program, so we never
- # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
- # fails, because we are probably configuring with a cross compiler
- # which can't create executables. So we include AC_EXEEXT to keep
- # automake happy, but we don't execute it, since we don't care about
- # the result.
- if false; then
- # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
- # to nothing, so nothing would remain between `then' and `fi' if it
- # were not for the `:' below.
- :
- AC_EXEEXT
- fi
-
- case [$]{glibcpp_basedir} in
- /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
- *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
- esac
-
- # Find platform-specific directories containing configuration info. In
- # addition to possibly modifying the same flags, it also sets up symlinks.
- GLIBCPP_CHECK_TARGET
+ # Set up safe default values for all subsequent AM_CONDITIONAL tests
+ # which are themselves conditionally expanded.
+ ## (Right now, this only matters for enable_wchar_t, but nothing prevents
+ ## other macros from doing the same. This should be automated.) -pme
+ need_libmath=no
+ enable_wchar_t=no
+ #enable_libstdcxx_debug=no
+ #enable_libstdcxx_pch=no
+ #enable_cheaders=c
+ #c_compatibility=no
+ #enable_abi_check=no
+ #enable_symvers=no
+ #enable_hosted_libstdcxx=yes
+
+ # Find platform-specific directories containing configuration info.
+ # Also possibly modify flags used elsewhere, as needed by the platform.
+ GLIBCXX_CHECK_HOST
])
-dnl
-dnl Check to see if g++ can compile this library, and if so, if any version-
-dnl specific precautions need to be taken.
-dnl
-dnl GLIBCPP_CHECK_COMPILER_VERSION
-AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
-if test ! -f stamp-sanity-compiler; then
- AC_MSG_CHECKING([for g++ that will successfully compile libstdc++-v3])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE(, [
- #if __GNUC__ < 3
- not_ok
- #endif
- ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to GCC 3.0 or above]))
- AC_LANG_RESTORE
- AC_MSG_RESULT($gpp_satisfactory)
- touch stamp-sanity-compiler
-fi
-])
+m4_include([linkage.m4])
+m4_include([../config/no-executables.m4])
dnl
@@ -232,18 +186,17 @@ dnl Tests for newer compiler features, or features that are present in newer
dnl compiler versions but not older compiler versions still in use, should
dnl be placed here.
dnl
-dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
-dnl new inlining code or the new system_header pragma will die on -Werror.
-dnl Leave it out by default and use maint-mode to use it.
+dnl Defines:
+dnl WERROR='-Werror' if requested and possible; g++'s that lack the
+dnl new inlining code or the new system_header pragma will die on -Werror.
+dnl Leave it out by default and use maint-mode to use it.
+dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
+dnl compiler supports it and the user has not requested debug mode.
dnl
-dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
-dnl compiler supports it and the user has not requested debug mode.
-dnl
-dnl GLIBCPP_CHECK_COMPILER_FEATURES
-AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
+AC_DEFUN([GLIBCXX_CHECK_COMPILER_FEATURES], [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits previously
- # found in GLIBCPP_CONFIGURE.
+ # found in GLIBCXX_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_test_CXXFLAGS="${CXXFLAGS+set}"
@@ -259,8 +212,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
- AC_TRY_COMPILE(, [int foo;
- ], [ac_fdsections=yes], [ac_fdsections=no])
+ AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
@@ -283,19 +235,25 @@ dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
dnl the native linker is in use, all variables will be defined to something
dnl safe (like an empty string).
dnl
-dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
-dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
-dnl Define LD, with_gnu_ld, and (possibly) glibcpp_gnu_ld_version as
-dnl side-effects of testing.
+dnl Defines:
+dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
+dnl OPT_LDFLAGS='-Wl,-O1' if possible
+dnl LD (as a side effect of testing)
+dnl Sets:
+dnl with_gnu_ld
+dnl glibcxx_gnu_ld_version (possibly)
+dnl
+dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
+dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
dnl
-dnl GLIBCPP_CHECK_LINKER_FEATURES
-AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
+AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
# If we're not using GNU ld, then there's no point in even trying these
# tests. Check for that first. We should have already tested for gld
# by now (in libtool), but require it now just to be safe...
test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
AC_REQUIRE([AC_PROG_LD])
+ AC_REQUIRE([AC_PROG_AWK])
# The name set by libtool depends on the version of libtool. Shame on us
# for depending on an impl detail, but c'est la vie. Older versions used
@@ -318,7 +276,7 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
ldver=`$LD --version 2>/dev/null | head -1 | \
sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
changequote([,])
- glibcpp_gnu_ld_version=`echo $ldver | \
+ glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
# Set --gc-sections.
@@ -332,15 +290,15 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
CFLAGS='-x c++ -Wl,--gc-sections'
# Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
AC_TRY_RUN([
- int main(void)
+ int main(void)
{
try { throw 1; }
catch (...) { };
@@ -370,895 +328,748 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with ONE parameter
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_1
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>
- #ifdef HAVE_IEEEFP_H
- #include <ieeefp.h>
- #endif
- ],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
-])
-
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl 3) if not, see if 1) and 2) for argument prepended with '_'
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
+dnl Check to see if this target can enable the wchar_t parts.
+dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
+dnl must have been previously checked.) By default, wide characters are
+dnl disabled.
dnl
-dnl ASSUMES argument is a math function with ONE parameter
+dnl Defines:
+dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
- GLIBCPP_CHECK_MATH_DECL_1($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
- else
- GLIBCPP_CHECK_MATH_DECL_1(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
+AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ AC_MSG_CHECKING([for mbstate_t])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [mbstate_t teststate;],
+ have_mbstate_t=yes, have_mbstate_t=no)
+ AC_MSG_RESULT($have_mbstate_t)
+ if test x"$have_mbstate_t" = xyes; then
+ AC_DEFINE(HAVE_MBSTATE_T)
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+ AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+ AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [int i = WCHAR_MIN; int j = WCHAR_MAX;],
+ has_wchar_minmax=yes, has_wchar_minmax=no)
+ AC_MSG_RESULT($has_wchar_minmax)
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ AC_MSG_CHECKING([for WEOF])
+ AC_TRY_COMPILE([
+ #include <wchar.h>
+ #include <stddef.h>],
+ [wint_t i = WEOF;],
+ has_weof=yes, has_weof=no)
+ AC_MSG_RESULT($has_weof)
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+ AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
+ [],[ac_wfuncs=no])
+
+ # Checks for names injected into std:: by the c_std headers.
+ AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
+ [],[ac_wfuncs=no])
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+ AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[])
+
+ AC_MSG_CHECKING([for ISO C99 wchar_t support])
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ AC_MSG_RESULT($ac_isoC99_wchar_t)
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
+ AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+ AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
+ [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
+
+ LIBS="$ac_save_LIBS"
+
+ AC_MSG_CHECKING([for XPG2 wchar_t support])
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ AC_MSG_RESULT($ac_XPG2_wchar_t)
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
+ enable_wchar_t=yes
fi
fi
+ AC_MSG_CHECKING([for enabled wchar_t specializations])
+ AC_MSG_RESULT($enable_wchar_t)
])
dnl
-dnl Like GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
-dnl of functions at once. It's an all-or-nothing check -- either
-dnl HAVE_XYZ is defined for each of the functions, or for none of them.
-dnl Doing it this way saves significant configure time.
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1, [
- AC_MSG_CHECKING([for $1 functions])
- AC_CACHE_VAL(glibcpp_cv_func_$2_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ `for x in $3; do echo "$x (0);"; done` ],
- [glibcpp_cv_func_$2_use=yes],
- [glibcpp_cv_func_$2_use=no])
- AC_LANG_RESTORE])
- AC_MSG_RESULT($glibcpp_cv_func_$2_use)
- if test x$glibcpp_cv_func_$2_use = x"yes"; then
- AC_CHECK_FUNCS($3)
- fi
+dnl Check for headers for, and arguments to, the setrlimit() function.
+dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
+dnl
+dnl Defines:
+dnl _GLIBCXX_RES_LIMITS if we can set artificial resource limits
+dnl various HAVE_LIMIT_* for individual limit names
+dnl
+AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [
+ AC_TRY_COMPILE(
+ [#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ ],
+ [ int f = RLIMIT_$1 ; ],
+ [glibcxx_mresult=1], [glibcxx_mresult=0])
+ AC_DEFINE_UNQUOTED(HAVE_LIMIT_$1, $glibcxx_mresult,
+ [Only used in build directory testsuite_hooks.h.])
])
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with TWO parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_2
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_2, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
+AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [
+ setrlimit_have_headers=yes
+ AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
+ [],
+ [setrlimit_have_headers=no])
+ # If don't have the headers, then we can't run the tests now, and we
+ # won't be seeing any of these during testsuite compilation.
+ if test $setrlimit_have_headers = yes; then
+ # Can't do these in a loop, else the resulting syntax is wrong.
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(FSIZE)
+
+ # Check for rlimit, setrlimit.
+ AC_CACHE_VAL(ac_setrlimit, [
+ AC_TRY_COMPILE(
+ [#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ ],
+ [struct rlimit r;
+ setrlimit(0, &r);],
+ [ac_setrlimit=yes], [ac_setrlimit=no])
])
fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
-])
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with TWO parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
- GLIBCPP_CHECK_MATH_DECL_2($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+ AC_MSG_CHECKING([for testsuite resource limits support])
+ if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+ ac_res_limits=yes
+ AC_DEFINE(_GLIBCXX_RES_LIMITS)
else
- GLIBCPP_CHECK_MATH_DECL_2(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
- fi
+ ac_res_limits=no
fi
+ AC_MSG_RESULT($ac_res_limits)
])
dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with THREE parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_3
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_3, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0, 0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
+dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
+dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_S_ISREG_OR_S_IFREG], [
+ AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
+ AC_TRY_LINK(
+ [#include <sys/stat.h>],
+ [struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);],
+ [glibcxx_cv_S_ISREG=yes],
+ [glibcxx_cv_S_ISREG=no])
+ ])
+ AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
+ AC_TRY_LINK(
+ [#include <sys/stat.h>],
+ [struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;],
+ [glibcxx_cv_S_IFREG=yes],
+ [glibcxx_cv_S_IFREG=no])
+ ])
+ if test $glibcxx_cv_S_ISREG = yes; then
+ AC_DEFINE(HAVE_S_ISREG)
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ AC_DEFINE(HAVE_S_IFREG)
fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
])
+
dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with THREE parameters
+dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
- GLIBCPP_CHECK_MATH_DECL_3($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
- else
- GLIBCPP_CHECK_MATH_DECL_3(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
- fi
+AC_DEFUN([GLIBCXX_CHECK_POLL], [
+ AC_CACHE_VAL(glibcxx_cv_POLL, [
+ AC_TRY_LINK(
+ [#include <poll.h>],
+ [struct pollfd pfd[1];
+ pfd[0].events = POLLIN;
+ poll(pfd, 1, 0);],
+ [glibcxx_cv_POLL=yes],
+ [glibcxx_cv_POLL=no])
+ ])
+ if test $glibcxx_cv_POLL = yes; then
+ AC_DEFINE(HAVE_POLL)
fi
])
dnl
-dnl Check to see if the (stdlib function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with TWO parameters
+dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
dnl
-dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ $1(0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_WRITEV], [
+ AC_CACHE_VAL(glibcxx_cv_WRITEV, [
+ AC_TRY_LINK(
+ [#include <sys/uio.h>],
+ [struct iovec iov[2];
+ writev(0, iov, 0);],
+ [glibcxx_cv_WRITEV=yes],
+ [glibcxx_cv_WRITEV=no])
+ ])
+ if test $glibcxx_cv_WRITEV = yes; then
+ AC_DEFINE(HAVE_WRITEV)
fi
])
dnl
-dnl Check to see if the (stdlib function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
+dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a function with THREE parameters
-dnl
-dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ $1(0, 0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_INT64_T], [
+ AC_CACHE_VAL(glibcxx_cv_INT64_T, [
+ AC_TRY_COMPILE(
+ [#include <stdint.h>],
+ [int64_t var;],
+ [glibcxx_cv_INT64_T=yes],
+ [glibcxx_cv_INT64_T=no])
+ ])
+ if test $glibcxx_cv_INT64_T = yes; then
+ AC_DEFINE(HAVE_INT64_T)
fi
])
+
dnl
-dnl Check to see if the (unistd function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a function with ONE parameter
+dnl Check whether LFS support is available.
dnl
-dnl GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <unistd.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_LFS], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_CACHE_VAL(glibcxx_cv_LFS, [
+ AC_TRY_LINK(
+ [#include <unistd.h>
+ #include <stdio.h>
+ ],
+ [FILE* fp;
+ fopen64("t", "w");
+ fseeko64(fp, 0, SEEK_CUR);
+ ftello64(fp);
+ lseek64(1, 0, SEEK_CUR);],
+ [glibcxx_cv_LFS=yes],
+ [glibcxx_cv_LFS=no])
+ ])
+ if test $glibcxx_cv_LFS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_LFS)
fi
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
])
+
dnl
-dnl Because the builtins are picky picky picky about the arguments they take,
-dnl do an explict linkage tests here.
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl Does any necessary configuration of the testsuite directory. Generates
+dnl the testsuite_hooks.h header.
dnl
-dnl argument 1 is name of function to check
+dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
dnl
-dnl ASSUMES argument is a math function with ONE parameter
+dnl Sets:
+dnl enable_abi_check / GLIBCXX_TEST_ABI
+dnl Substs:
+dnl baseline_dir
dnl
-dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_MSG_CHECKING([for $1 linkage])
- if test x${glibcpp_cv_func_$1_link+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
- AC_TRY_LINK([#include <math.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_link)
- if test x$glibcpp_cv_func_$1_link = x"yes"; then
- ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- AC_DEFINE_UNQUOTED(${ac_tr_func})
+AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
+ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
+ # Do checks for resource limit functions.
+ GLIBCXX_CHECK_SETRLIMIT
+
+ # Look for setenv, so that extended locale tests can be performed.
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+
+ if test $enable_symvers = no; then
+ enable_abi_check=no
+ else
+ case "$host" in
+ *-*-cygwin*)
+ enable_abi_check=no ;;
+ *)
+ enable_abi_check=yes ;;
+ esac
fi
+ else
+ # Only build this as native, since automake does not understand
+ # CXX_FOR_BUILD.
+ enable_abi_check=no
fi
-])
+ # Export file names for ABI checking.
+ baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
+ AC_SUBST(baseline_dir)
-dnl
-dnl Check to see what builtin math functions are supported
-dnl
-dnl check for __builtin_abs
-dnl check for __builtin_fabsf
-dnl check for __builtin_fabs
-dnl check for __builtin_fabl
-dnl check for __builtin_labs
-dnl check for __builtin_sqrtf
-dnl check for __builtin_sqrtl
-dnl check for __builtin_sqrt
-dnl check for __builtin_sinf
-dnl check for __builtin_sin
-dnl check for __builtin_sinl
-dnl check for __builtin_cosf
-dnl check for __builtin_cos
-dnl check for __builtin_cosl
-dnl
-dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
- dnl Test for builtin math functions.
- dnl These are made in gcc/c-common.c
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
-
- dnl There is, without a doubt, a more elegant way to have these
- dnl names exported so that they won't be stripped out of acconfig.h by
- dnl autoheader. I leave this as an exercise to somebody less frustrated
- dnl than I.... please email the libstdc++ list if you can figure out a
- dnl more elegant approach (see autoconf/acgen.m4 and specifically
- dnl AC_CHECK_FUNC for things to steal.)
- dummyvar=no
- if test x$dummyvar = x"yes"; then
- AC_DEFINE(HAVE___BUILTIN_ABS)
- AC_DEFINE(HAVE___BUILTIN_LABS)
- AC_DEFINE(HAVE___BUILTIN_COS)
- AC_DEFINE(HAVE___BUILTIN_COSF)
- AC_DEFINE(HAVE___BUILTIN_COSL)
- AC_DEFINE(HAVE___BUILTIN_FABS)
- AC_DEFINE(HAVE___BUILTIN_FABSF)
- AC_DEFINE(HAVE___BUILTIN_FABSL)
- AC_DEFINE(HAVE___BUILTIN_SIN)
- AC_DEFINE(HAVE___BUILTIN_SINF)
- AC_DEFINE(HAVE___BUILTIN_SINL)
- AC_DEFINE(HAVE___BUILTIN_SQRT)
- AC_DEFINE(HAVE___BUILTIN_SQRTF)
- AC_DEFINE(HAVE___BUILTIN_SQRTL)
- fi
+ GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
+ GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
])
+
dnl
-dnl Check to see what the underlying c library is like
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
+dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
dnl
-dnl Define HAVE_STRTOLD if "strtold" is declared and links
-dnl Define HAVE_STRTOF if "strtof" is declared and links
-dnl Define HAVE_DRAND48 if "drand48" is declared and links
+dnl Substs:
+dnl GLIBCXX_INCLUDES
+dnl TOPLEVEL_INCLUDES
dnl
-dnl GLIBCPP_CHECK_STDLIB_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+AC_DEFUN([GLIBCXX_EXPORT_INCLUDES], [
+ # Used for every C++ compile we perform.
+ GLIBCXX_INCLUDES="\
+-I$glibcxx_builddir/include/$host_alias \
+-I$glibcxx_builddir/include \
+-I$glibcxx_srcdir/libsupc++"
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
- AC_CHECK_FUNCS(drand48)
+ # For Canadian crosses, pick this up too.
+ if test $CANADIAN = yes; then
+ GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
+ fi
- CXXFLAGS="$ac_save_CXXFLAGS"
-])
+ # Stuff in the actual top level. Currently only used by libsupc++ to
+ # get unwind* headers from the gcc dir.
+ #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
+ TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
-dnl
-dnl Check to see what the underlying c library is like
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
-dnl
-dnl Define HAVE_ISATTY if "isatty" is declared and links
-dnl
-dnl GLIBCPP_CHECK_UNISTD_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_UNISTD_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
-
- GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1(isatty)
-
- CXXFLAGS="$ac_save_CXXFLAGS"
+ # Now, export this to all the little Makefiles....
+ AC_SUBST(GLIBCXX_INCLUDES)
+ AC_SUBST(TOPLEVEL_INCLUDES)
])
+
dnl
-dnl Check to see what the underlying c library or math library is like.
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
+dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
dnl
-dnl Define HAVE_CARGF etc if "cargf" is found.
+dnl Substs:
+dnl OPTIMIZE_CXXFLAGS
+dnl WARN_FLAGS
dnl
-dnl GLIBCPP_CHECK_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
-
- dnl Check libm
- AC_CHECK_LIB(m, sin, libm="-lm")
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libm"
-
- dnl Check to see if certain C math functions exist.
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypot)
-
- dnl Check to see if basic C math functions have float versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
- float_trig,
- acosf asinf atanf \
- cosf sinf tanf \
- coshf sinhf tanhf)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
- float_round,
- ceilf floorf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
-
- dnl Check to see if basic C math functions have long double versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
- long_double_trig,
- acosl asinl atanl \
- cosl sinl tanl \
- coshl sinhl tanhl)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
- long_double_round,
- ceill floorl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
-
- dnl Some runtimes have these functions with a preceding underscore. Please
- dnl keep this sync'd with the one above. And if you add any new symbol,
- dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
- dnl Check to see if certain C math functions exist.
-
- dnl Check to see if basic C math functions have float versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
- _float_trig,
- _acosf _asinf _atanf \
- _cosf _sinf _tanf \
- _coshf _sinhf _tanhf)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
- _float_round,
- _ceilf _floorf)
-
- dnl Check to see if basic C math functions have long double versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
- _long_double_trig,
- _acosl _asinl _atanl \
- _cosl _sinl _tanl \
- _coshl _sinhl _tanhl)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
- _long_double_round,
- _ceill _floorl)
-
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
+AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
+ # Optimization flags that are probably a good idea for thrill-seekers. Just
+ # uncomment the lines below and make, everything else is ready to go...
+ # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
+ OPTIMIZE_CXXFLAGS=
+ AC_SUBST(OPTIMIZE_CXXFLAGS)
+
+ WARN_FLAGS='-Wall -W -Wwrite-strings -Wcast-qual'
+ AC_SUBST(WARN_FLAGS)
])
dnl
-dnl Check to see if there is native support for complex
+dnl All installation directory information is determined here.
dnl
-dnl Don't compile bits in math/* if native support exits.
+dnl Substs:
+dnl gxx_install_dir
+dnl glibcxx_prefixdir
+dnl glibcxx_toolexecdir
+dnl glibcxx_toolexeclibdir
dnl
-dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
-dnl
-dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
- dnl Check for complex versions of math functions of platform.
- AC_CHECK_LIB(m, main)
- AC_REPLACE_MATHFUNCS(nan copysignf)
-
- dnl For __signbit to signbit conversions.
- AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
- AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"])
+dnl Assumes cross_compiling bits already done, and with_cross_host in
+dnl particular.
+dnl
+AC_DEFUN([GLIBCXX_EXPORT_INSTALL_INFO], [
+ glibcxx_toolexecdir=no
+ glibcxx_toolexeclibdir=no
+ glibcxx_prefixdir=$prefix
+
+ AC_MSG_CHECKING([for gxx-include-dir])
+ AC_ARG_WITH([gxx-include-dir],
+ AC_HELP_STRING([--with-gxx-include-dir=DIR],
+ [installation directory for include files]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
+ no) gxx_include_dir=no ;;
+ *) gxx_include_dir=$withval ;;
+ esac],
+ [gxx_include_dir=no])
+ AC_MSG_RESULT($gxx_include_dir)
+
+ AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+ AC_ARG_ENABLE([version-specific-runtime-libs],
+ AC_HELP_STRING([--enable-version-specific-runtime-libs],
+ [Specify that runtime libraries should be installed in a compiler-specific directory]),
+ [case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+ [version_specific_libs=no])
+ AC_MSG_RESULT($version_specific_libs)
+
+ # Default case for install directory for include files.
+ if test $version_specific_libs = no && test $gxx_include_dir = no; then
+ gxx_include_dir='${prefix}'/include/c++/${gcc_version}
+ fi
- dnl Compile the long double complex functions only if the function
- dnl provides the non-complex long double functions that are needed.
- dnl Currently this includes copysignl, which should be
- dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
- if test x$ac_cv_func_copysignl = x"yes"; then
- AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
+ # Version-specific runtime libs processing.
+ if test $version_specific_libs = yes; then
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected. FIXME: these variables are misnamed, there are
+ # no executables installed in _toolexecdir or _toolexeclibdir.
+ if test x"$gxx_include_dir" = x"no"; then
+ gxx_include_dir='${libdir}/gcc/${host_alias}/'$gcc_version/include/c++
+ fi
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
fi
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
+ # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ if test x"$glibcxx_toolexecdir" = x"no"; then
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/lib'
+ else
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${libdir}'
+ fi
+ multi_os_directory=`$CXX -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
+ esac
fi
- AC_SUBST(LIBMATHOBJS)
- AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
+
+ AC_MSG_CHECKING([for install location])
+ AC_MSG_RESULT($gxx_include_dir)
+
+ AC_SUBST(glibcxx_prefixdir)
+ AC_SUBST(gxx_include_dir)
+ AC_SUBST(glibcxx_toolexecdir)
+ AC_SUBST(glibcxx_toolexeclibdir)
])
-dnl Check to see what architecture and operating system we are compiling
-dnl for. Also, if architecture- or OS-specific flags are required for
-dnl compilation, pick them up here.
-dnl
-dnl GLIBCPP_CHECK_TARGET
-AC_DEFUN(GLIBCPP_CHECK_TARGET, [
- . [$]{glibcpp_basedir}/configure.target
- AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
- AC_MSG_RESULT(OS config directory is $os_include_dir)
+dnl
+dnl GLIBCXX_ENABLE
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
+dnl
+dnl See docs/html/17_intro/configury.html#enable for documentation.
+dnl
+m4_define([GLIBCXX_ENABLE],[dnl
+m4_define([_g_switch],[--enable-$1])dnl
+m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
+ AC_ARG_ENABLE($1,_g_help,
+ m4_bmatch([$5],
+ [^permit ],
+ [[
+ case "$enableval" in
+ m4_bpatsubst([$5],[permit ])) ;;
+ *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
+ dnl Idea for future: generate a URL pointing to
+ dnl "onlinedocs/configopts.html#whatever"
+ esac
+ ]],
+ [^$],
+ [[
+ case "$enableval" in
+ yes|no) ;;
+ *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
+ esac
+ ]],
+ [[$5]]),
+ [enable_]m4_bpatsubst([$1],-,_)[=][$2])
+m4_undefine([_g_switch])dnl
+m4_undefine([_g_help])dnl
])
dnl
-dnl Check to see if this target can enable the wchar_t parts of libstdc++.
-dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
-dnl must have been previously checked.)
+dnl Check for ISO/IEC 9899:1999 "C99" support.
dnl
-dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
-dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl --enable-c99 defines _GLIBCXX_USE_C99
+dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
+dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
dnl
-dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
- dnl Wide characters disabled by default.
- enable_wchar_t=no
+AC_DEFUN([GLIBCXX_ENABLE_C99], [
+ GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
- dnl Test wchar.h for mbstate_t, which is needed for char_traits and
- dnl others even if wchar_t support is not on.
- AC_MSG_CHECKING([for mbstate_t])
- AC_TRY_COMPILE([#include <wchar.h>],
- [mbstate_t teststate;],
- have_mbstate_t=yes, have_mbstate_t=no)
- AC_MSG_RESULT($have_mbstate_t)
- if test x"$have_mbstate_t" = xyes; then
- AC_DEFINE(HAVE_MBSTATE_T)
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ ac_c99_math=yes;
+ AC_MSG_CHECKING([for ISO C99 support in <math.h>])
+ AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [islessgreater(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [isunordered(0.0,0.0);],, [ac_c99_math=no])
+ AC_MSG_RESULT($ac_c99_math)
+
+ if test x"$ac_c99_math" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
- dnl Sanity check for existence of ISO C99 headers for extended encoding.
- AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
- AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
-
- dnl Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- dnl numeric_limits can instantiate type_traits<wchar_t>
- AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
- AC_TRY_COMPILE([#include <wchar.h>],
- [int i = WCHAR_MIN; int j = WCHAR_MAX;],
- has_wchar_minmax=yes, has_wchar_minmax=no)
- AC_MSG_RESULT($has_wchar_minmax)
-
- dnl Test wchar.h for WEOF, which is what we use to determine whether
- dnl to specialize for char_traits<wchar_t> or not.
- AC_MSG_CHECKING([for WEOF])
- AC_TRY_COMPILE([
- #include <wchar.h>
- #include <stddef.h>],
- [wint_t i = WEOF;],
- has_weof=yes, has_weof=no)
- AC_MSG_RESULT($has_weof)
-
- dnl Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
- AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset,, \
- ac_wfuncs=no)
-
- dnl Checks for names injected into std:: by the c_std headers.
- AC_CHECK_FUNCS(btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr,, \
- ac_wfuncs=no)
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ ac_c99_stdio=yes;
+ AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
+ AC_TRY_COMPILE([#include <stdio.h>],
+ [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vscanf("%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsnprintf(fmt, 0, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsscanf(fmt, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_MSG_RESULT($ac_c99_stdio)
- AC_MSG_CHECKING([for ISO C99 wchar_t support])
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- AC_MSG_RESULT($ac_isoC99_wchar_t)
-
- dnl Use iconv for wchar_t to char conversions. As such, check for
- dnl X/Open Portability Guide, version 2 features (XPG2).
- AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
- AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ ac_c99_stdlib=yes;
+ AC_MSG_CHECKING([for lldiv_t declaration])
+ AC_CACHE_VAL(ac_c99_lldiv_t, [
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ lldiv_t mydivt;],
+ [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
+ ])
+ AC_MSG_RESULT($ac_c99_lldiv_t)
- dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
- AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
+ if test x"$ac_c99_lldiv_t" = x"no"; then
+ ac_c99_stdlib=no;
+ fi;
+ AC_MSG_RESULT($ac_c99_stdlib)
- AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
- ac_XPG2funcs=yes, ac_XPG2funcs=no)
-
- LIBS="$ac_save_LIBS"
+ # Check for the existence of <wchar.h> functions used if C99 is enabled.
+ # XXX the wchar.h checks should be rolled into the general C99 bits.
+ ac_c99_wchar=yes;
+ AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
+ AC_MSG_RESULT($ac_c99_wchar)
- AC_MSG_CHECKING([for XPG2 wchar_t support])
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- AC_MSG_RESULT($ac_XPG2_wchar_t)
-
- dnl At the moment, only enable wchar_t specializations if all the
- dnl above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
- enable_wchar_t=yes
- fi
+ AC_MSG_CHECKING([for enabled ISO C99 support])
+ if test x"$ac_c99_math" = x"no" ||
+ test x"$ac_c99_stdio" = x"no" ||
+ test x"$ac_c99_stdlib" = x"no" ||
+ test x"$ac_c99_wchar" = x"no"; then
+ enable_c99=no;
+ fi;
+ AC_MSG_RESULT($enable_c99)
+
+ if test x"$ac_99_math" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
- AC_MSG_CHECKING([for enabled wchar_t specializations])
- AC_MSG_RESULT($enable_wchar_t)
- AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
-])
+ # Option parsed, now set things appropriately
+ if test x"$enable_c99" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99)
+ fi
-dnl
-dnl Check to see if debugging libraries are to be built.
-dnl
-dnl GLIBCPP_ENABLE_DEBUG
-dnl
-dnl --enable-debug
-dnl builds a separate set of debugging libraries in addition to the
-dnl normal (shared, static) libstdc++ binaries.
-dnl
-dnl --disable-debug
-dnl builds only one (non-debug) version of libstdc++.
-dnl
-dnl --enable-debug-flags=FLAGS
-dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
-dnl
-dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
-define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(debug,
-changequote(<<, >>)dnl
-<< --enable-debug build extra debug library [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
-changequote([, ])dnl
-[case "${enableval}" in
- yes) enable_debug=yes ;;
- no) enable_debug=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
- esac],
-enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
-AC_MSG_CHECKING([for additional debug build])
-AC_MSG_RESULT($enable_debug)
-AM_CONDITIONAL(GLIBCPP_BUILD_DEBUG, test "$enable_debug" = yes)
+ AC_LANG_RESTORE
])
-dnl Check for explicit debug flags.
dnl
-dnl GLIBCPP_ENABLE_DEBUG_FLAGS
+dnl Check for what type of C headers to use.
dnl
-dnl --enable-debug-flags='-O1'
-dnl is a general method for passing flags to be used when
-dnl building debug libraries with --enable-debug.
+dnl --enable-cheaders= [does stuff].
+dnl --disable-cheaders [does not do anything, really].
+dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
+dnl Where DEFAULT is either `c' or `c_std'.
dnl
-dnl --disable-debug-flags does nothing.
-dnl + Usage: GLIBCPP_ENABLE_DEBUG_FLAGS(default flags)
-dnl If "default flags" is an empty string (or "none"), the effect is
-dnl the same as --disable or --enable=no.
-AC_DEFUN(GLIBCPP_ENABLE_DEBUG_FLAGS, [dnl
-define([GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
-AC_ARG_ENABLE(debug_flags,
-changequote(<<, >>)dnl
-<< --enable-debug-flags=FLAGS pass compiler FLAGS when building debug
- library;[default=>>GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT],
-changequote([, ])dnl
-[case "${enableval}" in
- none) ;;
- -*) enable_debug_flags="${enableval}" ;;
- *) AC_MSG_ERROR([Unknown argument to extra debugging flags]) ;;
- esac],
-enable_debug_flags=GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT)dnl
-
-dnl Option parsed, now set things appropriately
-case x"$enable_debug" in
- xyes)
- case "$enable_debug_flags" in
- none)
- DEBUG_FLAGS="-g3 -O0";;
- -*) #valid input
- DEBUG_FLAGS="${enableval}"
- esac
- ;;
- xno)
- DEBUG_FLAGS=""
- ;;
-esac
-AC_SUBST(DEBUG_FLAGS)
+AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [
+ GLIBCXX_ENABLE(cheaders,$1,[=KIND],
+ [construct "C" headers for g++], [permit c|c_std])
+ AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
-AC_MSG_CHECKING([for debug build flags])
-AC_MSG_RESULT($DEBUG_FLAGS)
-])
+ C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
-
-dnl
-dnl Check for "unusual" flags to pass to the compiler while building.
-dnl
-dnl GLIBCPP_ENABLE_CXX_FLAGS
-dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
-dnl experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
-dnl Somehow this same set of flags must be passed when [re]building
-dnl libgcc.
-dnl --disable-cxx-flags passes nothing.
-dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
-dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
-dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
-dnl + Usage: GLIBCPP_ENABLE_CXX_FLAGS(default flags)
-dnl If "default flags" is an empty string (or "none"), the effect is
-dnl the same as --disable or --enable=no.
-AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
-define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
-AC_MSG_CHECKING([for extra compiler flags for building])
-AC_ARG_ENABLE(cxx_flags,
-changequote(<<, >>)dnl
-<< --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
- [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
-changequote([, ])dnl
-[case "x$enable_cxx_flags" in
- xyes)
- AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
- xno | xnone | x)
- enable_cxx_flags='' ;;
- *)
- enable_cxx_flags="$enableval" ;;
-esac],
-enable_cxx_flags=GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT)
-
-dnl Run through flags (either default or command-line) and set anything
-dnl extra (e.g., #defines) that must accompany particular g++ options.
-if test -n "$enable_cxx_flags"; then
- for f in $enable_cxx_flags; do
- case "$f" in
- -fhonor-std) ;;
- -*) ;;
- *) # and we're trying to pass /what/ exactly?
- AC_MSG_ERROR([compiler flags start with a -]) ;;
- esac
- done
-fi
-EXTRA_CXX_FLAGS="$enable_cxx_flags"
-AC_MSG_RESULT($EXTRA_CXX_FLAGS)
-AC_SUBST(EXTRA_CXX_FLAGS)
+ AC_SUBST(C_INCLUDE_DIR)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
])
dnl
-dnl Check for which locale library to use: gnu or generic.
+dnl Check for which locale library to use. The choice is mapped to
+dnl a subdirectory of config/locale.
dnl
-dnl GLIBCPP_ENABLE_CLOCALE
-dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
-dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
-dnl
-dnl default is generic
+dnl Default is generic.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
- AC_MSG_CHECKING([for clocale to use])
- AC_ARG_ENABLE(clocale,
- [ --enable-clocale enable model for target locale package.
- --enable-clocale=MODEL use MODEL target-speific locale package. [default=generic]
- ],
- if test x$enable_clocale = xno; then
- enable_clocale=no
- fi,
- enable_clocale=no)
+AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ AC_MSG_CHECKING([for C locale to use])
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+ [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
+
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_clocale = no || test $enable_clocale = yes; then
+ enable_clocale=auto
+ fi
+ # Either a known package, or "auto"
enable_clocale_flag=$enable_clocale
- dnl Probe for locale support if no specific model is specified.
- dnl Default to "generic"
- if test x$enable_clocale_flag = xno; then
+ # Probe for locale support if no specific model is specified.
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
case x${target_os} in
- xlinux* | xgnu*)
- AC_EGREP_CPP([_GLIBCPP_ok], [
+ xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
+ AC_EGREP_CPP([_GLIBCXX_ok], [
#include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- _GLIBCPP_ok
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+ _GLIBCXX_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
- # Test for bugs early in glibc-2.2.x series
- if test x$enable_clocale_flag = xgnu; then
- AC_TRY_RUN([
- #define _GNU_SOURCE 1
- #include <locale.h>
- #include <string.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- extern __typeof(newlocale) __newlocale;
- extern __typeof(duplocale) __duplocale;
- extern __typeof(strcoll_l) __strcoll_l;
- #endif
- int main()
- {
- const char __one[] = "Äuglein Augmen";
- const char __two[] = "Äuglein";
- int i;
- int j;
- __locale_t loc;
- __locale_t loc_dup;
- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
- loc_dup = __duplocale(loc);
- i = __strcoll_l(__one, __two, loc);
- j = __strcoll_l(__one, __two, loc_dup);
- return 0;
- }
- ],
- [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
- [enable_clocale_flag=generic])
- fi
-
- # ... at some point put __strxfrm_l tests in as well.
+ # Test for bugs early in glibc-2.2.x series
+ if test x$enable_clocale_flag = xgnu; then
+ AC_TRY_RUN([
+ #define _GNU_SOURCE 1
+ #include <locale.h>
+ #include <string.h>
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ extern __typeof(newlocale) __newlocale;
+ extern __typeof(duplocale) __duplocale;
+ extern __typeof(strcoll_l) __strcoll_l;
+ #endif
+ int main()
+ {
+ const char __one[] = "Äuglein Augmen";
+ const char __two[] = "Äuglein";
+ int i;
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
+ return 0;
+ }
+ ],
+ [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+ [enable_clocale_flag=generic])
+ fi
+
+ # ... at some point put __strxfrm_l tests in as well.
;;
*)
- enable_clocale_flag=generic
- ;;
+ enable_clocale_flag=generic
+ ;;
esac
fi
- dnl Deal with gettext issues.
- AC_ARG_ENABLE(nls,
- [ --enable-nls use Native Language Support (default)],
- , enable_nls=yes)
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+ # default to on for easier handling.
USE_NLS=no
+ AC_ARG_ENABLE(nls,
+ AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
+ [],
+ [enable_nls=yes])
- dnl Set configure bits for specified locale package
- case x${enable_clocale_flag} in
- xgeneric)
+ # Set configure bits for specified locale package
+ case ${enable_clocale_flag} in
+ generic)
AC_MSG_RESULT(generic)
CLOCALE_H=config/locale/generic/c_locale.h
@@ -1275,7 +1086,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- xgnu)
+ gnu)
AC_MSG_RESULT(gnu)
# Declare intention to use gettext, and add support for specific
@@ -1286,15 +1097,15 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
# Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
- USE_NLS=yes
+ USE_NLS=yes
fi
# Export the build objects.
for ling in $ALL_LINGUAS; do \
- glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
- glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
done
- AC_SUBST(glibcpp_MOFILES)
- AC_SUBST(glibcpp_POFILES)
+ AC_SUBST(glibcxx_MOFILES)
+ AC_SUBST(glibcxx_POFILES)
CLOCALE_H=config/locale/gnu/c_locale.h
CLOCALE_CC=config/locale/gnu/c_locale.cc
@@ -1310,8 +1121,8 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
- xieee_1003.1-2001)
- AC_MSG_RESULT(generic)
+ ieee_1003.1-2001)
+ AC_MSG_RESULT(IEEE 1003.1)
CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
@@ -1327,16 +1138,21 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- *)
- echo "$enable_clocale is an unknown locale package" 1>&2
- exit 1
- ;;
esac
# This is where the testsuite looks for locale catalogs, using the
# -DLOCALEDIR define during testsuite compilation.
- glibcpp_localedir=${glibcpp_builddir}/po/share/locale
- AC_SUBST(glibcpp_localedir)
+ glibcxx_localedir=${glibcxx_builddir}/po/share/locale
+ AC_SUBST(glibcxx_localedir)
+
+ # A standalone libintl (e.g., GNU libintl) may be in use.
+ if test $USE_NLS = yes; then
+ AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
+ AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
+ fi
+ if test $USE_NLS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_NLS)
+ fi
AC_SUBST(USE_NLS)
AC_SUBST(CLOCALE_H)
@@ -1356,463 +1172,150 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl
-dnl Check for which I/O library to use: libio, or something specific.
-dnl
-dnl GLIBCPP_ENABLE_CSTDIO
-dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
-dnl
-dnl default is stdio
-dnl
-AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
- AC_MSG_CHECKING([for cstdio to use])
- AC_ARG_ENABLE(cstdio,
- [ --enable-cstdio enable stdio for target io package.
- --enable-cstdio=LIB use LIB target-speific io package. [default=stdio]
- ],
- if test x$enable_cstdio = xno; then
- enable_cstdio=stdio
- fi,
- enable_cstdio=stdio)
-
- enable_cstdio_flag=$enable_cstdio
-
- dnl Check if a valid I/O package
- case x${enable_cstdio_flag} in
- xlibio)
- CSTDIO_H=config/io/c_io_libio.h
- BASIC_FILE_H=config/io/basic_file_libio.h
- BASIC_FILE_CC=config/io/basic_file_libio.cc
- AC_MSG_RESULT(libio)
-
- # see if we are on a system with libio native (ie, linux)
- AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
-
- # Need to check and see what version of glibc is being used. If
- # it's not glibc-2.2 or higher, then we'll need to go ahead and
- # compile most of libio for linux systems.
- if test x$has_libio = x"yes"; then
- case "$target" in
- *-*-linux*)
- AC_MSG_CHECKING([for glibc version >= 2.2])
- AC_EGREP_CPP([ok], [
- #include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- ok
- #endif
- ], glibc_satisfactory=yes, glibc_satisfactory=no)
- AC_MSG_RESULT($glibc_satisfactory)
- ;;
- esac
-
- # XXX at the moment, admit defeat and force the recompilation
- # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
- glibc_satisfactory=no
-
- if test x$glibc_satisfactory = x"yes"; then
- need_libio=no
- need_wlibio=no
- else
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
-
- else
- # Using libio, but <libio.h> doesn't exist on the target system. . .
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
- ;;
- xstdio | x | xno | xnone | xyes)
- # default
- CSTDIO_H=config/io/c_io_stdio.h
- BASIC_FILE_H=config/io/basic_file_stdio.h
- BASIC_FILE_CC=config/io/basic_file_stdio.cc
- AC_MSG_RESULT(stdio)
-
- # We're not using stdio.
- need_libio=no
- need_wlibio=no
- ;;
- *)
- echo "$enable_cstdio is an unknown io package" 1>&2
- exit 1
- ;;
- esac
- AC_SUBST(CSTDIO_H)
- AC_SUBST(BASIC_FILE_H)
- AC_SUBST(BASIC_FILE_CC)
-
- # 2000-08-04 bkoz hack
- CCODECVT_C=config/io/c_io_libio_codecvt.c
- AC_SUBST(CCODECVT_C)
- # 2000-08-04 bkoz hack
-
- AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
- test "$need_libio" = yes || test "$need_wlibio" = yes)
- AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
- AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
- if test "$need_libio" = yes || test "$need_wlibio" = yes; then
- libio_la=../libio/libio.la
- else
- libio_la=
- fi
- AC_SUBST(libio_la)
-])
-
-
+dnl Check for which std::allocator base class to use. The choice is
+dnl mapped from a subdirectory of include/ext.
dnl
-dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
-dnl We must stage the required headers so that they will be installed
-dnl with the library (unlike libgcc, the STL implementation is provided
-dnl solely within headers). Since we must not inject random user-space
-dnl macro names into user-provided C++ code, we first stage into <file>-in
-dnl and process to <file> with an output command. The reason for a two-
-dnl stage process here is to correctly handle $srcdir!=$objdir without
-dnl having to write complex code (the sed commands to clean the macro
-dnl namespace are complex and fragile enough as it is). We must also
-dnl add a relative path so that -I- is supported properly.
+dnl Default is new.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
- AC_MSG_CHECKING([for thread model used by GCC])
- target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
- AC_MSG_RESULT([$target_thread_file])
-
- if test $target_thread_file != single; then
- AC_DEFINE(HAVE_GTHR_DEFAULT)
- AC_DEFINE(_GLIBCPP_SUPPORTS_WEAK, __GXX_WEAK__)
+AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
+ AC_MSG_CHECKING([for std::allocator base class to use])
+ GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND],
+ [use KIND for target std::allocator base],
+ [permit new|malloc|mt|bitmap|pool|yes|no|auto])
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_libstdcxx_allocator = no || test $enable_libstdcxx_allocator = yes; then
+ enable_libstdcxx_allocator=auto
fi
- glibcpp_thread_h=gthr-$target_thread_file.h
- AC_SUBST(glibcpp_thread_h)
-])
+ # Either a known package, or "auto"
+ enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
+ # Probe for host-specific support if no specific model is specified.
+ # Default to "new".
+ if test $enable_libstdcxx_allocator_flag = auto; then
+ case ${target_os} in
+ *)
+ enable_libstdcxx_allocator_flag=new
+ ;;
+ esac
+ fi
+ AC_MSG_RESULT($enable_libstdcxx_allocator_flag)
+
-dnl
-dnl Check for exception handling support. If an explicit enable/disable
-dnl sjlj exceptions is given, we don't have to detect. Otherwise the
-dnl target may or may not support call frame exceptions.
-dnl
-dnl GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
-dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
-dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
-dnl
-dnl Define _GLIBCPP_SJLJ_EXCEPTIONS if the compiler is configured for it.
-dnl
-AC_DEFUN(GLIBCPP_ENABLE_SJLJ_EXCEPTIONS, [
- AC_MSG_CHECKING([for exception model to use])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_ARG_ENABLE(sjlj-exceptions,
- [ --enable-sjlj-exceptions force use of builtin_setjmp for exceptions],
- [:],
- [dnl Botheration. Now we've got to detect the exception model.
- dnl Link tests against libgcc.a are problematic since -- at least
- dnl as of this writing -- we've not been given proper -L bits for
- dnl single-tree newlib and libgloss.
- dnl
- dnl This is what AC_TRY_COMPILE would do if it didn't delete the
- dnl conftest files before we got a change to grep them first.
- cat > conftest.$ac_ext << EOF
-[#]line __oline__ "configure"
-struct S { ~S(); };
-void bar();
-void foo()
-{
- S s;
- bar();
-}
-EOF
- old_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=-S
- if AC_TRY_EVAL(ac_compile); then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=no
- fi
- fi
- CXXFLAGS="$old_CXXFLAGS"
- rm -f conftest*])
- if test x$enable_sjlj_exceptions = xyes; then
- AC_DEFINE(_GLIBCPP_SJLJ_EXCEPTIONS, 1,
- [Define if the compiler is configured for setjmp/longjmp exceptions.])
- ac_exception_model_name=sjlj
- elif test x$enable_sjlj_exceptions = xno; then
- ac_exception_model_name="call frame"
- else
- AC_MSG_ERROR([unable to detect exception model])
- fi
- AC_LANG_RESTORE
- AC_MSG_RESULT($ac_exception_model_name)
+ # Set configure bits for specified locale package
+ case ${enable_libstdcxx_allocator_flag} in
+ bitmap)
+ ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
+ ;;
+ malloc)
+ ALLOCATOR_H=config/allocator/malloc_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
+ ;;
+ mt)
+ ALLOCATOR_H=config/allocator/mt_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
+ ;;
+ new)
+ ALLOCATOR_H=config/allocator/new_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::new_allocator
+ ;;
+ pool)
+ ALLOCATOR_H=config/allocator/pool_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
+ ;;
+ esac
+
+ AC_SUBST(ALLOCATOR_H)
+ AC_SUBST(ALLOCATOR_NAME)
])
dnl
-dnl Check for libunwind exception handling support. If enabled then
-dnl we assume that the _Unwind_* functions that make up the Unwind ABI
-dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
-dnl libunwind instead of libgcc and that libstdc++ has a dependency
-dnl on libunwind as well as libgcc.
-dnl
-dnl GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
-dnl --enable-libunwind-exceptions forces the use of libunwind.
-dnl --disable-libunwind-exceptions assumes there is no libunwind.
+dnl Check for whether the Boost-derived checks should be turned on.
dnl
-dnl Define _GLIBCPP_LIBUNWIND_EXCEPTIONS if requested.
+dnl --enable-concept-checks turns them on.
+dnl --disable-concept-checks leaves them off.
+dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS, [
- AC_MSG_CHECKING([for use of libunwind])
- AC_ARG_ENABLE(libunwind-exceptions,
- [ --enable-libunwind-exceptions force use of libunwind for exceptions],
- use_libunwind_exceptions=$enableval,
- use_libunwind_exceptions=no)
- AC_MSG_RESULT($use_libunwind_exceptions)
- dnl Option parsed, now set things appropriately
- if test x"$use_libunwind_exceptions" = xyes; then
- LIBUNWIND_FLAG="-lunwind"
- else
- LIBUNWIND_FLAG=""
+AC_DEFUN([GLIBCXX_ENABLE_CONCEPT_CHECKS], [
+ GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
+ if test $enable_concept_checks = yes; then
+ AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
fi
- AC_SUBST(LIBUNWIND_FLAG)
])
+
dnl
-dnl Check for ISO/IEC 9899:1999 "C99" support.
+dnl Check for which I/O library to use: stdio, or something specific.
dnl
-dnl GLIBCPP_ENABLE_C99
-dnl --enable-c99 defines _GLIBCPP_USE_C99
-dnl --disable-c99 leaves _GLIBCPP_USE_C99 undefined
-dnl + Usage: GLIBCPP_ENABLE_C99[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If omitted, it
-dnl defaults to `no'.
-dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
+dnl Default is stdio.
dnl
-dnl GLIBCPP_ENABLE_C99
-AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
- define([GLIBCPP_ENABLE_C99_DEFAULT], ifelse($1, yes, yes, no))dnl
-
- AC_ARG_ENABLE(c99,
- changequote(<<, >>)dnl
- <<--enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
- changequote([, ])dnl
- [case "$enableval" in
- yes) enable_c99=yes ;;
- no) enable_c99=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable C99]) ;;
- esac],
- enable_c99=GLIBCPP_ENABLE_C99_DEFAULT)dnl
-
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
-
- # Check for the existence of <math.h> functions used if C99 is enabled.
- ac_c99_math=yes;
- AC_MSG_CHECKING([for ISO C99 support in <math.h>])
- AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [islessgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isunordered(0.0,0.0);],, [ac_c99_math=no])
- AC_MSG_RESULT($ac_c99_math)
-
- # Check for the existence in <stdio.h> of vscanf, et. al.
- ac_c99_stdio=yes;
- AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
- AC_TRY_COMPILE([#include <stdio.h>],
- [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vscanf("%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsnprintf(fmt, 0, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsscanf(fmt, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_MSG_RESULT($ac_c99_stdio)
+AC_DEFUN([GLIBCXX_ENABLE_CSTDIO], [
+ AC_MSG_CHECKING([for underlying I/O to use])
+ GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
+ [use target-specific I/O package], [permit stdio])
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- ac_c99_stdlib=yes;
- AC_MSG_CHECKING([for lldiv_t declaration])
- AC_CACHE_VAL(ac_c99_lldiv_t, [
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ lldiv_t mydivt;],
- [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
- ])
- AC_MSG_RESULT($ac_c99_lldiv_t)
-
- AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
- if test x"$ac_c99_lldiv_t" = x"no"; then
- ac_c99_stdlib=no;
- fi;
- AC_MSG_RESULT($ac_c99_stdlib)
-
- # Check for the existence of <wchar.h> functions used if C99 is enabled.
- # XXX the wchar.h checks should be rolled into the general C99 bits.
- ac_c99_wchar=yes;
- AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_MSG_RESULT($ac_c99_wchar)
-
- AC_MSG_CHECKING([for enabled ISO C99 support])
- if test x"$ac_c99_math" = x"no" ||
- test x"$ac_c99_stdio" = x"no" ||
- test x"$ac_c99_stdlib" = x"no" ||
- test x"$ac_c99_wchar" = x"no"; then
- enable_c99=no;
- fi;
- AC_MSG_RESULT($enable_c99)
-
- # Option parsed, now set things appropriately
- if test x"$enable_c99" = x"yes"; then
- AC_DEFINE(_GLIBCPP_USE_C99)
- fi
+ # Now that libio has been removed, you can have any color you want as long
+ # as it's black. This is one big no-op until other packages are added, but
+ # showing the framework never hurts.
+ case ${enable_cstdio} in
+ stdio)
+ CSTDIO_H=config/io/c_io_stdio.h
+ BASIC_FILE_H=config/io/basic_file_stdio.h
+ BASIC_FILE_CC=config/io/basic_file_stdio.cc
+ AC_MSG_RESULT(stdio)
+ ;;
+ esac
- AC_LANG_RESTORE
+ AC_SUBST(CSTDIO_H)
+ AC_SUBST(BASIC_FILE_H)
+ AC_SUBST(BASIC_FILE_CC)
])
dnl
-dnl Check for template specializations for the 'long long' type extension.
-dnl The result determines only whether 'long long' I/O is enabled; things
-dnl like numeric_limits<> specializations are always available.
+dnl Check for "unusual" flags to pass to the compiler while building.
dnl
-dnl GLIBCPP_ENABLE_LONG_LONG
-dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
-dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
-dnl + Usage: GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If omitted, it
-dnl defaults to `no'.
-dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
-dnl
-dnl GLIBCPP_ENABLE_LONG_LONG
-AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
- define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
-
- AC_ARG_ENABLE(long-long,
- changequote(<<, >>)dnl
- <<--enable-long-long turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
- changequote([, ])dnl
- [case "$enableval" in
- yes) enable_long_long=yes ;;
- no) enable_long_long=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
- esac],
- enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
-
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
-
- AC_MSG_CHECKING([for enabled long long I/O support])
- # iostreams require strtoll, strtoull to compile
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
-
- # Option parsed, now set things appropriately
- if test x"$enable_long_long" = xyes; then
- AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
+dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
+dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
+dnl --disable-cxx-flags passes nothing.
+dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
+dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
+dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
+dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
+dnl If "default flags" is an empty string, the effect is the same
+dnl as --disable or --enable=no.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_CXX_FLAGS], [dnl
+ AC_MSG_CHECKING([for extra compiler flags for building])
+ GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
+ [pass compiler FLAGS when building library],
+ [case "x$enable_cxx_flags" in
+ xno | x) enable_cxx_flags= ;;
+ x-*) ;;
+ *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
+ esac])
+
+ # Run through flags (either default or command-line) and set anything
+ # extra (e.g., #defines) that must accompany particular g++ options.
+ if test -n "$enable_cxx_flags"; then
+ for f in $enable_cxx_flags; do
+ case "$f" in
+ -fhonor-std) ;;
+ -*) ;;
+ *) # and we're trying to pass /what/ exactly?
+ AC_MSG_ERROR([compiler flags start with a -]) ;;
+ esac
+ done
fi
- AC_MSG_RESULT($enable_long_long)
-
- AC_LANG_RESTORE
-])
-
-
-dnl
-dnl Check for what type of C headers to use.
-dnl
-dnl GLIBCPP_ENABLE_CHEADERS
-dnl --enable-cheaders= [does stuff].
-dnl --disable-cheaders [does not do anything, really].
-dnl + Usage: GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
-dnl Where DEFAULT is either `c' or `c_std'.
-dnl If ommitted, it defaults to `c_std'.
-AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
-define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
-AC_MSG_CHECKING([for c header strategy to use])
-AC_ARG_ENABLE(cheaders,
-changequote(<<, >>)dnl
-<< --enable-cheaders=MODEL construct "C" header files for g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
-changequote([, ])
- [case "$enableval" in
- c)
- enable_cheaders=c
- ;;
- c_std)
- enable_cheaders=c_std
- ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable "C" headers])
- ;;
- esac],
- enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
- AC_MSG_RESULT($enable_cheaders)
-
- dnl Option parsed, now set things appropriately
- case "$enable_cheaders" in
- c_std)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
- ;;
- c)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
- ;;
- esac
- AC_SUBST(C_INCLUDE_DIR)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_C, test "$enable_cheaders" = c)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_C_STD, test "$enable_cheaders" = c_std)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_COMPATIBILITY, test "$c_compatibility" = yes)
+ EXTRA_CXX_FLAGS="$enable_cxx_flags"
+ AC_MSG_RESULT($EXTRA_CXX_FLAGS)
+ AC_SUBST(EXTRA_CXX_FLAGS)
])
@@ -1820,431 +1323,243 @@ dnl
dnl Check for wide character support. Has the same effect as the option
dnl in gcc's configure, but in a form that autoconf can mess with.
dnl
-dnl GLIBCPP_ENABLE_C_MBCHAR
dnl --enable-c-mbchar requests all the wchar_t stuff.
dnl --disable-c-mbchar doesn't.
-dnl + Usage: GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
-define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(c-mbchar,
-changequote(<<, >>)dnl
-<< --enable-c-mbchar enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_c_mbchar=yes ;;
- no) enable_c_mbchar=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
- esac],
-enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
-dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
+dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_C_MBCHAR], [
+ GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
+ # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
])
dnl
-dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
+dnl Check to see if debugging libraries are to be built.
dnl
-dnl TOPLEVEL_INCLUDES
-dnl LIBMATH_INCLUDES
-dnl LIBSUPCXX_INCLUDES
-dnl LIBIO_INCLUDES
+dnl --enable-libstdcxx-debug
+dnl builds a separate set of debugging libraries in addition to the
+dnl normal (shared, static) libstdc++ binaries.
dnl
-dnl GLIBCPP_EXPORT_INCLUDES
-AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
- # Root level of the build directory include sources.
- GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
-
- # Passed down for canadian crosses.
- if test x"$CANADIAN" = xyes; then
- TOPLEVEL_INCLUDES='-I$(includedir)'
- fi
-
- LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
-
- LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
-
- if test x"$need_libio" = xyes; then
- LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
- AC_SUBST(LIBIO_INCLUDES)
- fi
-
- # Now, export this to all the little Makefiles....
- AC_SUBST(GLIBCPP_INCLUDES)
- AC_SUBST(TOPLEVEL_INCLUDES)
- AC_SUBST(LIBMATH_INCLUDES)
- AC_SUBST(LIBSUPCXX_INCLUDES)
+dnl --disable-libstdcxx-debug
+dnl builds only one (non-debug) version of libstdc++.
+dnl
+dnl --enable-libstdcxx-debug-flags=FLAGS
+dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
+dnl
+dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_DEBUG], [
+ AC_MSG_CHECKING([for additional debug build])
+ GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
+ AC_MSG_RESULT($enable_libstdcxx_debug)
+ GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
])
dnl
-dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl Check for explicit debug flags.
dnl
-AC_DEFUN(GLIBCPP_EXPORT_FLAGS, [
- # Optimization flags that are probably a good idea for thrill-seekers. Just
- # uncomment the lines below and make, everything else is ready to go...
- # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
- OPTIMIZE_CXXFLAGS=
- AC_SUBST(OPTIMIZE_CXXFLAGS)
-
- WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
- AC_SUBST(WARN_FLAGS)
-])
-
+dnl --enable-libstdcxx-debug-flags='-O1'
+dnl is a general method for passing flags to be used when
+dnl building debug libraries with --enable-debug.
dnl
-dnl GLIBCPP_EXPORT_INSTALL_INFO
-dnl calculates gxx_install_dir
-dnl exports glibcpp_toolexecdir
-dnl exports glibcpp_toolexeclibdir
-dnl exports glibcpp_prefixdir
+dnl --disable-libstdcxx-debug-flags does nothing.
+dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
+dnl If "default flags" is an empty string, the effect is the same
+dnl as --disable or --enable=no.
dnl
-dnl Assumes cross_compiling bits already done, and with_cross_host in
-dnl particular
-dnl
-dnl GLIBCPP_EXPORT_INSTALL_INFO
-AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
-# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
-# exported correctly in GLIBCPP_CONFIGURE.
-glibcpp_toolexecdir=no
-glibcpp_toolexeclibdir=no
-glibcpp_prefixdir=${prefix}
-
-# Process the option --with-gxx-include-dir=<path to include-files directory>
-AC_MSG_CHECKING([for --with-gxx-include-dir])
-AC_ARG_WITH(gxx-include-dir,
-[ --with-gxx-include-dir the installation directory for include files],
-[case "${withval}" in
- yes)
- AC_MSG_ERROR(Missing directory for --with-gxx-include-dir)
- gxx_include_dir=no
- ;;
- no)
- gxx_include_dir=no
- ;;
- *)
- gxx_include_dir=${withval}
- ;;
-esac], [gxx_include_dir=no])
-AC_MSG_RESULT($gxx_include_dir)
-
-# Process the option "--enable-version-specific-runtime-libs"
-AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
-AC_ARG_ENABLE(version-specific-runtime-libs,
-[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
-[case "$enableval" in
- yes) version_specific_libs=yes ;;
- no) version_specific_libs=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
- esac],
-version_specific_libs=no)dnl
-# Option set, now we can test it.
-AC_MSG_RESULT($version_specific_libs)
-
-# Default case for install directory for include files.
-if test $version_specific_libs = no && test $gxx_include_dir = no; then
- gxx_include_dir='$(prefix)'/include/c++/${gcc_version}
-fi
+AC_DEFUN([GLIBCXX_ENABLE_DEBUG_FLAGS], [
+ GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
+ [pass compiler FLAGS when building debug library],
+ [case "x$enable_libstdcxx_debug_flags" in
+ xno | x) enable_libstdcxx_debug_flags= ;;
+ x-*) ;;
+ *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
+ esac])
-# Version-specific runtime libs processing.
-if test $version_specific_libs = yes; then
- # Need the gcc compiler version to know where to install libraries
- # and header files if --enable-version-specific-runtime-libs option
- # is selected.
- if test x"$gxx_include_dir" = x"no"; then
- gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/c++
- fi
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
-fi
-
-# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
-# Install a library built with a cross compiler in tooldir, not libdir.
-if test x"$glibcpp_toolexecdir" = x"no"; then
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib'
- else
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)'
- fi
- glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
-fi
-
-AC_MSG_CHECKING([for install location])
-AC_MSG_RESULT($gxx_include_dir)
+ # Option parsed, now set things appropriately
+ DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
+ AC_SUBST(DEBUG_FLAGS)
-AC_SUBST(glibcpp_prefixdir)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(glibcpp_toolexecdir)
-AC_SUBST(glibcpp_toolexeclibdir)
+ AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
])
-# Check for functions in math library.
-# Ulrich Drepper <drepper@cygnus.com>, 1998.
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
-AC_DEFUN(AC_REPLACE_MATHFUNCS,
-[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
-
-
-dnl This macro searches for a GNU version of make. If a match is found, the
-dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
-dnl set to "#". This is useful for including a special features in a Makefile,
-dnl which cannot be handled by other versions of make. The variable
-dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
-dnl the empty string otherwise.
-dnl
-dnl Here is an example of its use:
-dnl
-dnl Makefile.in might contain:
-dnl
-dnl # A failsafe way of putting a dependency rule into a makefile
-dnl $(DEPEND):
-dnl $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-dnl
-dnl @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-dnl @ifGNUmake@ include $(DEPEND)
-dnl @ifGNUmake@ endif
-dnl
-dnl Then configure.in would normally contain:
-dnl
-dnl CHECK_GNU_MAKE()
-dnl AC_OUTPUT(Makefile)
-dnl
-dnl Then perhaps to cause gnu make to override any other make, we could do
-dnl something like this (note that GNU make always looks for GNUmakefile first):
-dnl
-dnl if ! test x$_cv_gnu_make_command = x ; then
-dnl mv Makefile GNUmakefile
-dnl echo .DEFAULT: > Makefile ;
-dnl echo \ $_cv_gnu_make_command \$@ >> Makefile;
-dnl fi
-dnl
-dnl Then, if any (well almost any) other make is called, and GNU make also
-dnl exists, then the other make wraps the GNU make.
-dnl
-dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
-dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
-dnl
-dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
-dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
-dnl #### conditional's subshell (" --version" is not a command), using a
-dnl #### different option to grep(1).
-dnl #### -pme
-dnl #### Fixed Bourne shell portability bug (use ${MAKE-make}, not
-dnl #### ${MAKE:-make}).
-dnl #### -msokolov
-AC_DEFUN(
- GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "${MAKE-make}" make gmake gnumake ; do
- if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
- then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty
-dnl string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
+dnl
+dnl Check if the user only wants a freestanding library implementation.
+dnl
+dnl --disable-hosted-libstdcxx will turn off most of the library build,
+dnl installing only the headers required by [17.4.1.3] and the language
+dnl support library. More than that will be built (to keep the Makefiles
+dnl conveniently clean), but not installed.
+dnl
+dnl Sets:
+dnl is_hosted (yes/no)
+dnl
+dnl Defines:
+dnl _GLIBCXX_HOSTED (always defined, either to 1 or 0)
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
+ AC_ARG_ENABLE([hosted-libstdcxx],
+ AC_HELP_STRING([--disable-hosted-libstdcxx],
+ [only build freestanding C++ runtime support]),,
+ [enable_hosted_libstdcxx=yes])
+ if test "$enable_hosted_libstdcxx" = no; then
+ AC_MSG_NOTICE([Only freestanding libraries will be built])
+ is_hosted=no
+ hosted_define=0
+ enable_abi_check=no
+ enable_libstdcxx_pch=no
else
- ifGNUmake='#' ;
+ is_hosted=yes
+ hosted_define=1
fi
- AC_SUBST(ifGNUmake)
+ GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
+ AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
+ [Define to 1 if a full hosted library is built, or 0 if freestanding.])
])
-dnl Check for headers for, and arguments to, the setrlimit() function.
-dnl Used only in testsuite_hooks.h.
-AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT_ancilliary, [
- AC_TRY_COMPILE([#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- ], [ int f = RLIMIT_$1 ; ],
- [glibcpp_mresult=1], [glibcpp_mresult=0])
- AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcpp_mresult,
- [Only used in build directory testsuite_hooks.h.])
-])
-AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT, [
- setrlimit_have_headers=yes
- AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
- [],
- setrlimit_have_headers=no)
- # If don't have the headers, then we can't run the tests now, and we
- # won't be seeing any of these during testsuite compilation.
- if test $setrlimit_have_headers = yes; then
- # Can't do these in a loop, else the resulting syntax is wrong.
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(DATA)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(RSS)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(VMEM)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(AS)
-
- # Check for rlimit, setrlimit.
- AC_CACHE_VAL(ac_setrlimit, [
- AC_TRY_COMPILE([#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- ],
- [ struct rlimit r; setrlimit(0, &r);],
- [ac_setrlimit=yes], [ac_setrlimit=no])
- ])
- fi
-
- AC_MSG_CHECKING([for testsuite memory limit support])
- if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
- ac_mem_limits=yes
- AC_DEFINE(_GLIBCPP_MEM_LIMITS)
- else
- ac_mem_limits=no
+dnl
+dnl Check for template specializations for the 'long long' type extension.
+dnl The result determines only whether 'long long' I/O is enabled; things
+dnl like numeric_limits<> specializations are always available.
+dnl
+dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
+dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
+dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
+ GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
+ if test $enable_long_long = yes; then
+ AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
fi
- AC_MSG_RESULT($ac_mem_limits)
])
dnl
-dnl Does any necessary configuration of the testsuite directory. Generates
-dnl the testsuite_hooks.h header.
-dnl
-dnl GLIBCPP_CONFIGURE_TESTSUITE [no args]
-AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xfalse; then
- # Do checks for memory limit functions.
- GLIBCPP_CHECK_SETRLIMIT
-
- # Look for setenv, so that extended locale tests can be performed.
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+dnl Check to see if building and using a C++ precompiled header can be done.
+dnl
+dnl --enable-libstdcxx-pch=yes
+dnl default, this shows intent to use stdc++.h.gch If it looks like it
+dnl may work, after some light-hearted attempts to puzzle out compiler
+dnl support, flip bits on in include/Makefile.am
+dnl
+dnl --disable-libstdcxx-pch
+dnl turns off attempts to use or build stdc++.h.gch.
+dnl
+dnl Substs:
+dnl glibcxx_PCHFLAGS
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_PCH], [
+ AC_MSG_CHECKING([for enabled PCH])
+ GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
+ AC_MSG_RESULT([$enable_libstdcxx_pch])
+
+ if test $enable_libstdcxx_pch = yes; then
+ AC_CACHE_CHECK([for compiler with PCH support],
+ [glibcxx_cv_prog_CXX_pch],
+ [ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ echo '#include <math.h>' > conftest.h
+ if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
+ -o conftest.h.gch 1>&5 2>&1 &&
+ echo '#error "pch failed"' > conftest.h &&
+ echo '#include "conftest.h"' > conftest.cc &&
+ $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
+ then
+ glibcxx_cv_prog_CXX_pch=yes
+ else
+ glibcxx_cv_prog_CXX_pch=no
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_save_CXXFLAGS
+ AC_LANG_RESTORE
+ ])
+ enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
fi
- # Export file names for ABI checking.
- baseline_dir="${glibcpp_srcdir}/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
- AC_SUBST(baseline_dir)
-
- # Determine if checking the ABI is desirable.
- # Only build this as native, since automake does not understand
- # CXX_FOR_BUILD.
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then
- enable_abi_check=no
+ GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
+ if test $enable_libstdcxx_pch = yes; then
+ glibcxx_PCHFLAGS="-include bits/stdc++.h"
else
- case "$host" in
- *-*-cygwin*)
- enable_abi_check=no ;;
- *)
- enable_abi_check=yes ;;
- esac
+ glibcxx_PCHFLAGS=""
fi
- AM_CONDITIONAL(GLIBCPP_TEST_ABI, test "$enable_abi_check" = yes)
+ AC_SUBST(glibcxx_PCHFLAGS)
])
-sinclude(../libtool.m4)
-dnl The lines below arrange for aclocal not to bring an installed
-dnl libtool.m4 into aclocal.m4, while still arranging for automake to
-dnl add a definition of LIBTOOL to Makefile.in.
-ifelse(,,,[AC_SUBST(LIBTOOL)
-AC_DEFUN([AM_PROG_LIBTOOL])
-AC_DEFUN([AC_LIBTOOL_DLOPEN])
-AC_DEFUN([AC_PROG_LD])
-])
-
dnl
-dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
+dnl Check for exception handling support. If an explicit enable/disable
+dnl sjlj exceptions is given, we don't have to detect. Otherwise the
+dnl target may or may not support call frame exceptions.
dnl
-
-AC_DEFUN(GLIBCPP_CHECK_S_ISREG_OR_S_IFREG, [
- AC_CACHE_VAL(glibcpp_cv_S_ISREG, [
- AC_TRY_LINK([#include <sys/stat.h>],
- [struct stat buffer; fstat(0, &buffer); S_ISREG(buffer.st_mode); ],
- [glibcpp_cv_S_ISREG=yes],
- [glibcpp_cv_S_ISREG=no])
- ])
- AC_CACHE_VAL(glibcpp_cv_S_IFREG, [
- AC_TRY_LINK([#include <sys/stat.h>],
- [struct stat buffer; fstat(0, &buffer); S_IFREG & buffer.st_mode; ],
- [glibcpp_cv_S_IFREG=yes],
- [glibcpp_cv_S_IFREG=no])
- ])
- if test x$glibcpp_cv_S_ISREG = xyes; then
- AC_DEFINE(HAVE_S_ISREG)
- elif test x$glibcpp_cv_S_IFREG = xyes; then
- AC_DEFINE(HAVE_S_IFREG)
- fi
-])
-
+dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
+dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
+dnl Neither one forces an attempt at detection.
dnl
-dnl Check whether poll is available in <poll.h>.
+dnl Defines:
+dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
dnl
-
-AC_DEFUN(GLIBCPP_CHECK_POLL, [
- AC_CACHE_VAL(glibcpp_cv_POLL, [
- AC_TRY_COMPILE([#include <poll.h>],
- [struct pollfd pfd[1]; pfd[0].events = POLLIN; poll(pfd, 1, 0); ],
- [glibcpp_cv_POLL=yes],
- [glibcpp_cv_POLL=no])
- ])
- if test x$glibcpp_cv_POLL = xyes; then
- AC_DEFINE(HAVE_POLL)
- fi
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AC_LC_MESSAGES, [
- AC_CHECK_HEADER(locale.h, [
- AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
- if test $ac_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES)
+AC_DEFUN([GLIBCXX_ENABLE_SJLJ_EXCEPTIONS], [
+ AC_MSG_CHECKING([for exception model to use])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ GLIBCXX_ENABLE(sjlj-exceptions,auto,,
+ [force use of builtin_setjmp for exceptions],
+ [permit yes|no|auto])
+
+ if test $enable_sjlj_exceptions = auto; then
+ # Botheration. Now we've got to detect the exception model. Link tests
+ # against libgcc.a are problematic since we've not been given proper -L
+ # bits for single-tree newlib and libgloss.
+ #
+ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
+ cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+ S s;
+ bar();
+}
+EOF
+ old_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS=-S
+ if AC_TRY_EVAL(ac_compile); then
+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=yes
+ elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
+ fi
fi
- ])
-])
-
+ CXXFLAGS="$old_CXXFLAGS"
+ rm -f conftest*
+ fi
-dnl
-dnl Check for whether the Boost-derived checks should be turned on.
-dnl
-dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
-dnl --enable-concept-checks turns them on.
-dnl --disable-concept-checks leaves them off.
-dnl + Usage: GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
-define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(concept-checks,
-changequote(<<, >>)dnl
-<< --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_concept_checks=yes ;;
- no) enable_concept_checks=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
- esac],
-enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
-dnl Option parsed, now set things appropriately
-if test x"$enable_concept_checks" = xyes; then
- AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
-fi
+ # This is a tad weird, for hysterical raisins. We have to map enable/disable
+ # to two different models.
+ case $enable_sjlj_exceptions in
+ yes)
+ AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
+ [Define if the compiler is configured for setjmp/longjmp exceptions.])
+ ac_exception_model_name=sjlj
+ ;;
+ no)
+ ac_exception_model_name="call frame"
+ ;;
+ *)
+ AC_MSG_ERROR([unable to detect exception model])
+ ;;
+ esac
+ AC_LANG_RESTORE
+ AC_MSG_RESULT($ac_exception_model_name)
])
@@ -2252,36 +1567,28 @@ dnl
dnl Add version tags to symbols in shared library (or not), additionally
dnl marking other symbols as private/local (or not).
dnl
-dnl GLIBCPP_ENABLE_SYMVERS
dnl --enable-symvers=style adds a version script to the linker call when
dnl creating the shared library. The choice of version script is
dnl controlled by 'style'.
dnl --disable-symvers does not.
-dnl + Usage: GLIBCPP_ENABLE_SYMVERS[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'. Passing `yes' tries to choose a default style
-dnl based on linker characteristics. Passing 'no' disables versioning.
-AC_DEFUN(GLIBCPP_ENABLE_SYMVERS, [dnl
-define([GLIBCPP_ENABLE_SYMVERS_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(symvers,
-changequote(<<, >>)dnl
-<< --enable-symvers=style enables symbol versioning of the shared library [default=>>GLIBCPP_ENABLE_SYMVERS_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_symvers=yes ;;
- no) enable_symvers=no ;;
- # other names here, just as sanity checks
- #gnu|sun|etcetera) enable_symvers=$enableval ;;
- gnu) enable_symvers=$enableval ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable symvers]) ;;
- esac],
-enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl
-
-# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
-# don't know enough about $LD to do tricks...
-if test x$enable_shared = xno ||
- test "x$LD" = x ||
- test x$glibcpp_gnu_ld_version = x; then
+dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
+dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
+dnl choose a default style based on linker characteristics. Passing
+dnl 'no' disables versioning.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_SYMVERS], [
+
+GLIBCXX_ENABLE(symvers,$1,[=STYLE],
+ [enables symbol versioning of the shared library],
+ [permit yes|no|gnu])
+
+# If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks...
+AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
+# FIXME The following test is too strict, in theory.
+if test $enable_shared = no ||
+ test "x$LD" = x ||
+ test x$glibcxx_gnu_ld_version = x; then
enable_symvers=no
fi
@@ -2290,60 +1597,148 @@ if test $enable_symvers != no; then
AC_MSG_CHECKING([for shared libgcc])
ac_save_CFLAGS="$CFLAGS"
CFLAGS=' -lgcc_s'
- AC_TRY_LINK(, [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
+ AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
CFLAGS="$ac_save_CFLAGS"
- AC_MSG_RESULT($glibcpp_shared_libgcc)
+ if test $glibcxx_shared_libgcc = no; then
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+changequote(,)dnl
+ glibcxx_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -shared -shared-libgcc -o conftest.so \
+ conftest.c -v 2>&1 >/dev/null \
+ | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
+changequote([,])dnl
+ rm -f conftest.c conftest.so
+ if test x${glibcxx_libgcc_s_suffix+set} = xset; then
+ CFLAGS=" -lgcc_s$glibcxx_libgcc_s_suffix"
+ AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes)
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+ fi
+ AC_MSG_RESULT($glibcxx_shared_libgcc)
fi
-# For GNU ld, we need at least this version. It's 2.12 in the same format
-# as the tested-for version. See GLIBCPP_CHECK_LINKER_FEATURES for more.
-glibcpp_min_gnu_ld_version=21200
+# For GNU ld, we need at least this version. The format is described in
+# GLIBCXX_CHECK_LINKER_FEATURES above.
+glibcxx_min_gnu_ld_version=21400
+# XXXXXXXXXXX glibcxx_gnu_ld_version=21390
-# Check to see if unspecified "yes" value can win, given results
-# above.
-if test $enable_symvers = yes ; then
+# Check to see if unspecified "yes" value can win, given results above.
+# Change "yes" into either "no" or a style name.
+if test $enable_symvers = yes; then
if test $with_gnu_ld = yes &&
- test $glibcpp_shared_libgcc = yes ;
+ test $glibcxx_shared_libgcc = yes;
then
- if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
- enable_symvers=gnu
+ if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
+ enable_symvers=gnu
else
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-shared -Wl,--version-script,conftest.map'
- enable_symvers=no
- changequote(,)
- echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
- changequote([,])
- AC_TRY_LINK([int foo;],, enable_symvers=gnu)
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ # The right tools, the right setup, but too old. Fallbacks?
+ AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
+ AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
+ AC_MSG_WARN(=== You would need to upgrade your binutils to version)
+ AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
+ if test $glibcxx_gnu_ld_version -ge 21200 ; then
+ # Globbing fix is present, proper block support is not.
+ dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
+ dnl enable_symvers=???
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
else
- # this is the suspicious part
- CFLAGS=''
+ # 2.11 or older.
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
fi
- rm -f conftest.map
fi
else
# just fail for now
+ AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
+ AC_MSG_WARN([=== either you are not using a supported linker, or you are])
+ AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
enable_symvers=no
fi
fi
-dnl Everything parsed; figure out what file to use.
+# Everything parsed; figure out what file to use.
case $enable_symvers in
no)
- SYMVER_MAP=config/linker-map.dummy
- ;;
+ SYMVER_MAP=config/linker-map.dummy
+ ;;
gnu)
- SYMVER_MAP=config/linker-map.gnu
- AC_DEFINE(_GLIBCPP_SYMVER)
- ;;
+ SYMVER_MAP=config/linker-map.gnu
+ AC_DEFINE(_GLIBCXX_SYMVER)
+ ;;
esac
AC_SUBST(SYMVER_MAP)
-AM_CONDITIONAL(GLIBCPP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
-AC_MSG_CHECKING([versioning on shared library symbols])
-AC_MSG_RESULT($enable_symvers)
+AC_SUBST(port_specific_symbol_files)
+GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
+AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
+])
+
+
+dnl
+dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
+dnl We must stage the required headers so that they will be installed
+dnl with the library (unlike libgcc, the STL implementation is provided
+dnl solely within headers). Since we must not inject random user-space
+dnl macro names into user-provided C++ code, we first stage into <file>-in
+dnl and process to <file> with an output command. The reason for a two-
+dnl stage process here is to correctly handle $srcdir!=$objdir without
+dnl having to write complex code (the sed commands to clean the macro
+dnl namespace are complex and fragile enough as it is). We must also
+dnl add a relative path so that -I- is supported properly.
+dnl
+dnl Substs:
+dnl glibcxx_thread_h
+dnl
+dnl Defines:
+dnl HAVE_GTHR_DEFAULT
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
+ AC_MSG_CHECKING([for thread model used by GCC])
+ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+ AC_MSG_RESULT([$target_thread_file])
+
+ if test $target_thread_file != single; then
+ AC_DEFINE(HAVE_GTHR_DEFAULT)
+ fi
+
+ glibcxx_thread_h=gthr-$target_thread_file.h
+ AC_SUBST(glibcxx_thread_h)
+])
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+AC_DEFUN([AC_LC_MESSAGES], [
+ AC_CHECK_HEADER(locale.h, [
+ AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
+ if test $ac_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ ])
+])
+
+
+sinclude([../libtool.m4])
+dnl The lines below arrange for aclocal not to bring an installed
+dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+dnl add a definition of LIBTOOL to Makefile.in.
+ifelse(,,,[AC_SUBST(LIBTOOL)
+AC_DEFUN([AM_PROG_LIBTOOL])
+AC_DEFUN([AC_LIBTOOL_DLOPEN])
+AC_DEFUN([AC_PROG_LD])
])
+dnl vim:et:ts=2:sw=2
diff --git a/contrib/libstdc++/aclocal.m4 b/contrib/libstdc++/aclocal.m4
index 3b6757e..d31561c 100644
--- a/contrib/libstdc++/aclocal.m4
+++ b/contrib/libstdc++/aclocal.m4
@@ -1,242 +1,197 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl
-dnl Initialize basic configure bits, set toplevel_srcdir for Makefiles.
-dnl
-dnl GLIBCPP_TOPREL_CONFIGURE
-AC_DEFUN(GLIBCPP_TOPREL_CONFIGURE, [
- dnl Default to --enable-multilib (this is also passed by default
- dnl from the ubercommon-top-level configure)
- AC_ARG_ENABLE(multilib,
- [ --enable-multilib build hella library versions (default)],
- [case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
- # When building with srcdir == objdir, links to the source files will
- # be created in directories within the target_subdir. We have to
- # adjust toplevel_srcdir accordingly, so that configure finds
- # install-sh and other auxiliary files that live in the top-level
- # source directory.
- if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
- toprel=".."
- else
- if test "${with_target_subdir}" != "."; then
- toprel="${with_multisrctop}../.."
- else
- toprel="${with_multisrctop}.."
- fi
- fi
- else
- toprel=".."
- fi
- AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
- toplevel_srcdir=\${top_srcdir}/$toprel
- AC_SUBST(toplevel_srcdir)
-])
+# generated automatically by aclocal 1.7.8 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
dnl
-dnl Initialize the rest of the library configury.
+dnl GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
dnl
-dnl GLIBCPP_CONFIGURE
-AC_DEFUN(GLIBCPP_CONFIGURE, [
- # Export build and source directories.
- # These need to be absolute paths, yet at the same time need to
- # canonicalize only relative paths, because then amd will not unmount
- # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
- glibcpp_builddir=`${PWDCMD-pwd}`
- case $srcdir in
- [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
- *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
- esac
- AC_SUBST(glibcpp_builddir)
- AC_SUBST(glibcpp_srcdir)
+dnl Exactly like AM_CONDITIONAL, but delays evaluation of the test until the
+dnl end of configure. This lets tested variables be reassigned, and the
+dnl conditional will depend on the final state of the variable. For a simple
+dnl example of why this is needed, see GLIBCXX_ENABLE_HOSTED.
+dnl
+m4_define([_m4_divert(glibcxx_diversion)], 8000)dnl
+AC_DEFUN([GLIBCXX_CONDITIONAL], [dnl
+ m4_divert_text([glibcxx_diversion],dnl
+ AM_CONDITIONAL([$1],[$2])
+ )dnl
+])dnl
+AC_DEFUN([GLIBCXX_EVALUATE_CONDITIONALS], [m4_undivert([glibcxx_diversion])])dnl
- dnl This is here just to satisfy automake.
- ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
- AC_PROG_AWK
- # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.5x, can also
- # be 'cp -p' if linking isn't available. Uncomment the next line to
- # force a particular method.
- #ac_cv_prog_LN_S='cp -p'
- AC_PROG_LN_S
+dnl
+dnl Check to see what architecture and operating system we are compiling
+dnl for. Also, if architecture- or OS-specific flags are required for
+dnl compilation, pick them up here.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_HOST], [
+ . $glibcxx_srcdir/configure.host
+ AC_MSG_NOTICE([CPU config directory is $cpu_include_dir])
+ AC_MSG_NOTICE([OS config directory is $os_include_dir])
+])
- # We use these options to decide which functions to include.
- AC_ARG_WITH(target-subdir,
- [ --with-target-subdir=SUBDIR
- configuring in a subdirectory])
- AC_ARG_WITH(cross-host,
- [ --with-cross-host=HOST configuring with a cross compiler])
-
- glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
- AC_SUBST(glibcpp_basedir)
-
- # Never versions of autoconf add an underscore to these functions.
- # Prevent future problems ...
- ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
- ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
- ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
- ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
-
- # AC_PROG_CC
- # FIXME: We temporarily define our own version of AC_PROG_CC. This is
- # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
- # are probably using a cross compiler, which will not be able to fully
- # link an executable. This is addressed in later versions of autoconf.
-
- AC_DEFUN(LIB_AC_PROG_CC,
- [AC_BEFORE([$0], [AC_PROG_CPP])dnl
- dnl Fool anybody using AC_PROG_CC.
- AC_PROVIDE([AC_PROG_CC])
- AC_CHECK_PROG(CC, gcc, gcc)
- if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
- fi
- AC_PROG_CC_GNU
+dnl
+dnl Initialize basic configure bits.
+dnl
+dnl Substs:
+dnl multi_basedir
+dnl
+AC_DEFUN([GLIBCXX_TOPREL_CONFIGURE], [
+ # Sets up multi_basedir, which is srcdir/.. plus the usual
+ # "multi_source_toprel_bottom_adjust" lunacy as needed.
+ AM_ENABLE_MULTILIB(, ..)
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- dnl Check whether -g works, even if CFLAGS is set, in case the package
- dnl plays around with CFLAGS (such as to build both debugging and
- dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
+ # The generated code is exactly the same, except that automake's looks in
+ # ".. $srcdir/.." and autoconf's looks in multi_basedir. Apparently other
+ # things are triggered on the presence of the two ...AUX_DIR[S], but I don't
+ # know what they are or what the other differences might be (and they keep
+ # changing anyhow).
+ #
+ # Looking in multi_basedir seems smarter, so actually execute that branch.
+ if false; then
+ # this is for automake
+ AC_CONFIG_AUX_DIR(..)
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ # this is for autoconf
+ AC_CONFIG_AUX_DIRS(${multi_basedir})
fi
- ])
- LIB_AC_PROG_CC
-
- # Likewise for AC_PROG_CXX. We can't just call it directly because g++
- # will try to link in libstdc++.
- AC_DEFUN(LIB_AC_PROG_CXX,
- [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
- dnl Fool anybody using AC_PROG_CXX.
- AC_PROVIDE([AC_PROG_CXX])
- # Use glibcpp_CXX so that we do not cause CXX to be cached with the
- # flags that come in CXX while configuring libstdc++. They're different
- # from those used for all other target libraries. If CXX is set in
- # the environment, respect that here.
- glibcpp_CXX=$CXX
- AC_CHECK_PROGS(glibcpp_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
- AC_SUBST(glibcpp_CXX)
- CXX=$glibcpp_CXX
- test -z "$glibcpp_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
-
- AC_PROG_CXX_GNU
-
- if test $ac_cv_prog_gxx = yes; then
- GXX=yes
- dnl Check whether -g works, even if CXXFLAGS is set, in case the package
- dnl plays around with CXXFLAGS (such as to build both debugging and
- dnl normal versions of a library), tasteless as that idea is.
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=
- AC_PROG_CXX_G
- if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS="$ac_save_CXXFLAGS"
- elif test $ac_cv_prog_cxx_g = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-O2"
- fi
- else
- GXX=
- test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
- fi
- ])
+ dnl XXX Turn this on.
+ dnl AC_LANG_CPLUSPLUS
+])
+
- LIB_AC_PROG_CXX
+dnl
+dnl Initialize the rest of the library configury. At this point we have
+dnl variables like $host.
+dnl
+dnl Sets:
+dnl gcc_version (x.y.z format)
+dnl SUBDIRS
+dnl Substs:
+dnl glibcxx_builddir (absolute path)
+dnl glibcxx_srcdir (absolute path)
+dnl toplevel_srcdir (absolute path)
+dnl with_cross_host
+dnl with_newlib
+dnl with_target_subdir
+dnl plus
+dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
+dnl - default settings for all AM_CONFITIONAL test variables
+dnl - lots of tools, like CC and CXX
+dnl
+AC_DEFUN([GLIBCXX_CONFIGURE], [
+ # Keep these sync'd with the list in Makefile.am. The first provides an
+ # expandable list at autoconf time; the second provides an expandable list
+ # (i.e., shell variable) at configure time.
+ m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src po testsuite])
+ SUBDIRS='glibcxx_SUBDIRS'
+
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ glibcxx_builddir=`${PWDCMD-pwd}`
+ case $srcdir in
+ [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
+ *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
+ toplevel_srcdir=${glibcxx_srcdir}/..
+ AC_SUBST(glibcxx_builddir)
+ AC_SUBST(glibcxx_srcdir)
+ AC_SUBST(toplevel_srcdir)
+
+ # We use these options to decide which functions to include. They are
+ # set from the top level.
+ AC_ARG_WITH([target-subdir],
+ AC_HELP_STRING([--with-target-subdir=SUBDIR],
+ [configuring in a subdirectory]))
+
+ AC_ARG_WITH([cross-host],
+ AC_HELP_STRING([--with-cross-host=HOST],
+ [configuring with a cross compiler]))
+
+ AC_ARG_WITH([newlib],
+ AC_HELP_STRING([--with-newlib],
+ [assume newlib as a system C library]))
+
+ # We're almost certainly being configured before anything else which uses
+ # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
+ # we not cache the value of CXX that we "discover" here, because it's set
+ # to something unique for us and libjava. Other target libraries need to
+ # find CXX for themselves. We yank the rug out from under the normal AC_*
+ # process by sneakily renaming the cache variable. This also lets us debug
+ # the value of "our" CXX in postmortems.
+ #
+ # We must also force CXX to /not/ be a precious variable, otherwise the
+ # wrong (non-multilib-adjusted) value will be used in multilibs. This
+ # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
+ # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
+ # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
+ #
+ # -fno-builtin must be present here so that a non-conflicting form of
+ # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
+
+ m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
+ m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
+ m4_define([_AC_ARG_VAR_PRECIOUS],[])
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-builtin"
+ AC_PROG_CC
+ AC_PROG_CXX
+ CXXFLAGS="$save_CXXFLAGS"
+ m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CXXFLAGS)
# For directory versioning (e.g., headers) and other variables.
AC_MSG_CHECKING([for GCC version number])
- gcc_version=`$glibcpp_CXX -dumpversion`
+ gcc_version=`$CXX -dumpversion`
AC_MSG_RESULT($gcc_version)
- # For some reason, gettext needs this.
- AC_ISC_POSIX
+ # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
+ # available). Uncomment the next line to force a particular method.
+ AC_PROG_LN_S
+ #LN_S='cp -p'
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
- AC_PROG_INSTALL
AM_MAINTAINER_MODE
- # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
- # at least currently, we never actually build a program, so we never
- # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
- # fails, because we are probably configuring with a cross compiler
- # which can't create executables. So we include AC_EXEEXT to keep
- # automake happy, but we don't execute it, since we don't care about
- # the result.
- if false; then
- # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
- # to nothing, so nothing would remain between `then' and `fi' if it
- # were not for the `:' below.
- :
- AC_EXEEXT
- fi
-
- case [$]{glibcpp_basedir} in
- /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
- *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
- esac
-
- # Find platform-specific directories containing configuration info. In
- # addition to possibly modifying the same flags, it also sets up symlinks.
- GLIBCPP_CHECK_TARGET
+ # Set up safe default values for all subsequent AM_CONDITIONAL tests
+ # which are themselves conditionally expanded.
+ ## (Right now, this only matters for enable_wchar_t, but nothing prevents
+ ## other macros from doing the same. This should be automated.) -pme
+ need_libmath=no
+ enable_wchar_t=no
+ #enable_libstdcxx_debug=no
+ #enable_libstdcxx_pch=no
+ #enable_cheaders=c
+ #c_compatibility=no
+ #enable_abi_check=no
+ #enable_symvers=no
+ #enable_hosted_libstdcxx=yes
+
+ # Find platform-specific directories containing configuration info.
+ # Also possibly modify flags used elsewhere, as needed by the platform.
+ GLIBCXX_CHECK_HOST
])
-dnl
-dnl Check to see if g++ can compile this library, and if so, if any version-
-dnl specific precautions need to be taken.
-dnl
-dnl GLIBCPP_CHECK_COMPILER_VERSION
-AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
-if test ! -f stamp-sanity-compiler; then
- AC_MSG_CHECKING([for g++ that will successfully compile libstdc++-v3])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE(, [
- #if __GNUC__ < 3
- not_ok
- #endif
- ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to GCC 3.0 or above]))
- AC_LANG_RESTORE
- AC_MSG_RESULT($gpp_satisfactory)
- touch stamp-sanity-compiler
-fi
-])
+m4_include([linkage.m4])
+m4_include([../config/no-executables.m4])
dnl
@@ -244,18 +199,17 @@ dnl Tests for newer compiler features, or features that are present in newer
dnl compiler versions but not older compiler versions still in use, should
dnl be placed here.
dnl
-dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
-dnl new inlining code or the new system_header pragma will die on -Werror.
-dnl Leave it out by default and use maint-mode to use it.
-dnl
-dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
-dnl compiler supports it and the user has not requested debug mode.
+dnl Defines:
+dnl WERROR='-Werror' if requested and possible; g++'s that lack the
+dnl new inlining code or the new system_header pragma will die on -Werror.
+dnl Leave it out by default and use maint-mode to use it.
+dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
+dnl compiler supports it and the user has not requested debug mode.
dnl
-dnl GLIBCPP_CHECK_COMPILER_FEATURES
-AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
+AC_DEFUN([GLIBCXX_CHECK_COMPILER_FEATURES], [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits previously
- # found in GLIBCPP_CONFIGURE.
+ # found in GLIBCXX_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_test_CXXFLAGS="${CXXFLAGS+set}"
@@ -271,8 +225,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
- AC_TRY_COMPILE(, [int foo;
- ], [ac_fdsections=yes], [ac_fdsections=no])
+ AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
@@ -295,19 +248,25 @@ dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
dnl the native linker is in use, all variables will be defined to something
dnl safe (like an empty string).
dnl
-dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
-dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
-dnl Define LD, with_gnu_ld, and (possibly) glibcpp_gnu_ld_version as
-dnl side-effects of testing.
+dnl Defines:
+dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
+dnl OPT_LDFLAGS='-Wl,-O1' if possible
+dnl LD (as a side effect of testing)
+dnl Sets:
+dnl with_gnu_ld
+dnl glibcxx_gnu_ld_version (possibly)
+dnl
+dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
+dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
dnl
-dnl GLIBCPP_CHECK_LINKER_FEATURES
-AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
+AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
# If we're not using GNU ld, then there's no point in even trying these
# tests. Check for that first. We should have already tested for gld
# by now (in libtool), but require it now just to be safe...
test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
AC_REQUIRE([AC_PROG_LD])
+ AC_REQUIRE([AC_PROG_AWK])
# The name set by libtool depends on the version of libtool. Shame on us
# for depending on an impl detail, but c'est la vie. Older versions used
@@ -330,7 +289,7 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
ldver=`$LD --version 2>/dev/null | head -1 | \
sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
changequote([,])
- glibcpp_gnu_ld_version=`echo $ldver | \
+ glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
# Set --gc-sections.
@@ -344,15 +303,15 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
CFLAGS='-x c++ -Wl,--gc-sections'
# Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
AC_TRY_RUN([
- int main(void)
+ int main(void)
{
try { throw 1; }
catch (...) { };
@@ -382,895 +341,748 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with ONE parameter
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_1
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>
- #ifdef HAVE_IEEEFP_H
- #include <ieeefp.h>
- #endif
- ],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
-])
-
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl 3) if not, see if 1) and 2) for argument prepended with '_'
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
+dnl Check to see if this target can enable the wchar_t parts.
+dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
+dnl must have been previously checked.) By default, wide characters are
+dnl disabled.
dnl
-dnl ASSUMES argument is a math function with ONE parameter
+dnl Defines:
+dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
- GLIBCPP_CHECK_MATH_DECL_1($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
- else
- GLIBCPP_CHECK_MATH_DECL_1(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
+AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ AC_MSG_CHECKING([for mbstate_t])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [mbstate_t teststate;],
+ have_mbstate_t=yes, have_mbstate_t=no)
+ AC_MSG_RESULT($have_mbstate_t)
+ if test x"$have_mbstate_t" = xyes; then
+ AC_DEFINE(HAVE_MBSTATE_T)
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+ AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+ AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [int i = WCHAR_MIN; int j = WCHAR_MAX;],
+ has_wchar_minmax=yes, has_wchar_minmax=no)
+ AC_MSG_RESULT($has_wchar_minmax)
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ AC_MSG_CHECKING([for WEOF])
+ AC_TRY_COMPILE([
+ #include <wchar.h>
+ #include <stddef.h>],
+ [wint_t i = WEOF;],
+ has_weof=yes, has_weof=no)
+ AC_MSG_RESULT($has_weof)
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+ AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
+ [],[ac_wfuncs=no])
+
+ # Checks for names injected into std:: by the c_std headers.
+ AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
+ [],[ac_wfuncs=no])
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+ AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[])
+
+ AC_MSG_CHECKING([for ISO C99 wchar_t support])
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ AC_MSG_RESULT($ac_isoC99_wchar_t)
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
+ AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+ AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
+ [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
+
+ LIBS="$ac_save_LIBS"
+
+ AC_MSG_CHECKING([for XPG2 wchar_t support])
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ AC_MSG_RESULT($ac_XPG2_wchar_t)
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
+ enable_wchar_t=yes
fi
fi
+ AC_MSG_CHECKING([for enabled wchar_t specializations])
+ AC_MSG_RESULT($enable_wchar_t)
])
dnl
-dnl Like GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
-dnl of functions at once. It's an all-or-nothing check -- either
-dnl HAVE_XYZ is defined for each of the functions, or for none of them.
-dnl Doing it this way saves significant configure time.
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1, [
- AC_MSG_CHECKING([for $1 functions])
- AC_CACHE_VAL(glibcpp_cv_func_$2_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ `for x in $3; do echo "$x (0);"; done` ],
- [glibcpp_cv_func_$2_use=yes],
- [glibcpp_cv_func_$2_use=no])
- AC_LANG_RESTORE])
- AC_MSG_RESULT($glibcpp_cv_func_$2_use)
- if test x$glibcpp_cv_func_$2_use = x"yes"; then
- AC_CHECK_FUNCS($3)
- fi
+dnl Check for headers for, and arguments to, the setrlimit() function.
+dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
+dnl
+dnl Defines:
+dnl _GLIBCXX_RES_LIMITS if we can set artificial resource limits
+dnl various HAVE_LIMIT_* for individual limit names
+dnl
+AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [
+ AC_TRY_COMPILE(
+ [#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ ],
+ [ int f = RLIMIT_$1 ; ],
+ [glibcxx_mresult=1], [glibcxx_mresult=0])
+ AC_DEFINE_UNQUOTED(HAVE_LIMIT_$1, $glibcxx_mresult,
+ [Only used in build directory testsuite_hooks.h.])
])
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with TWO parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_2
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_2, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
+AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [
+ setrlimit_have_headers=yes
+ AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
+ [],
+ [setrlimit_have_headers=no])
+ # If don't have the headers, then we can't run the tests now, and we
+ # won't be seeing any of these during testsuite compilation.
+ if test $setrlimit_have_headers = yes; then
+ # Can't do these in a loop, else the resulting syntax is wrong.
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary(FSIZE)
+
+ # Check for rlimit, setrlimit.
+ AC_CACHE_VAL(ac_setrlimit, [
+ AC_TRY_COMPILE(
+ [#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ ],
+ [struct rlimit r;
+ setrlimit(0, &r);],
+ [ac_setrlimit=yes], [ac_setrlimit=no])
])
fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
-])
-dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with TWO parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
- GLIBCPP_CHECK_MATH_DECL_2($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+ AC_MSG_CHECKING([for testsuite resource limits support])
+ if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+ ac_res_limits=yes
+ AC_DEFINE(_GLIBCXX_RES_LIMITS)
else
- GLIBCPP_CHECK_MATH_DECL_2(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
- fi
+ ac_res_limits=no
fi
+ AC_MSG_RESULT($ac_res_limits)
])
dnl
-dnl Check to see if the (math function) argument passed is
-dnl declared when using the c++ compiler
-dnl ASSUMES argument is a math function with THREE parameters
-dnl
-dnl GLIBCPP_CHECK_MATH_DECL_3
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_3, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0, 0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
+dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
+dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_S_ISREG_OR_S_IFREG], [
+ AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
+ AC_TRY_LINK(
+ [#include <sys/stat.h>],
+ [struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);],
+ [glibcxx_cv_S_ISREG=yes],
+ [glibcxx_cv_S_ISREG=no])
+ ])
+ AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
+ AC_TRY_LINK(
+ [#include <sys/stat.h>],
+ [struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;],
+ [glibcxx_cv_S_IFREG=yes],
+ [glibcxx_cv_S_IFREG=no])
+ ])
+ if test $glibcxx_cv_S_ISREG = yes; then
+ AC_DEFINE(HAVE_S_ISREG)
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ AC_DEFINE(HAVE_S_IFREG)
fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
])
+
dnl
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with THREE parameters
+dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
dnl
-dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
-AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
- GLIBCPP_CHECK_MATH_DECL_3($1)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
- else
- GLIBCPP_CHECK_MATH_DECL_3(_$1)
- if test x$glibcpp_cv_func__$1_use = x"yes"; then
- AC_CHECK_FUNCS(_$1)
- fi
+AC_DEFUN([GLIBCXX_CHECK_POLL], [
+ AC_CACHE_VAL(glibcxx_cv_POLL, [
+ AC_TRY_LINK(
+ [#include <poll.h>],
+ [struct pollfd pfd[1];
+ pfd[0].events = POLLIN;
+ poll(pfd, 1, 0);],
+ [glibcxx_cv_POLL=yes],
+ [glibcxx_cv_POLL=no])
+ ])
+ if test $glibcxx_cv_POLL = yes; then
+ AC_DEFINE(HAVE_POLL)
fi
])
dnl
-dnl Check to see if the (stdlib function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a math function with TWO parameters
+dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
dnl
-dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ $1(0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_WRITEV], [
+ AC_CACHE_VAL(glibcxx_cv_WRITEV, [
+ AC_TRY_LINK(
+ [#include <sys/uio.h>],
+ [struct iovec iov[2];
+ writev(0, iov, 0);],
+ [glibcxx_cv_WRITEV=yes],
+ [glibcxx_cv_WRITEV=no])
+ ])
+ if test $glibcxx_cv_WRITEV = yes; then
+ AC_DEFINE(HAVE_WRITEV)
fi
])
dnl
-dnl Check to see if the (stdlib function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl argument 1 is name of function to check
+dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
dnl
-dnl ASSUMES argument is a function with THREE parameters
-dnl
-dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ $1(0, 0, 0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_INT64_T], [
+ AC_CACHE_VAL(glibcxx_cv_INT64_T, [
+ AC_TRY_COMPILE(
+ [#include <stdint.h>],
+ [int64_t var;],
+ [glibcxx_cv_INT64_T=yes],
+ [glibcxx_cv_INT64_T=no])
+ ])
+ if test $glibcxx_cv_INT64_T = yes; then
+ AC_DEFINE(HAVE_INT64_T)
fi
])
+
dnl
-dnl Check to see if the (unistd function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl argument 1 is name of function to check
-dnl
-dnl ASSUMES argument is a function with ONE parameter
+dnl Check whether LFS support is available.
dnl
-dnl GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <unistd.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_CHECK_FUNCS($1)
+AC_DEFUN([GLIBCXX_CHECK_LFS], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_CACHE_VAL(glibcxx_cv_LFS, [
+ AC_TRY_LINK(
+ [#include <unistd.h>
+ #include <stdio.h>
+ ],
+ [FILE* fp;
+ fopen64("t", "w");
+ fseeko64(fp, 0, SEEK_CUR);
+ ftello64(fp);
+ lseek64(1, 0, SEEK_CUR);],
+ [glibcxx_cv_LFS=yes],
+ [glibcxx_cv_LFS=no])
+ ])
+ if test $glibcxx_cv_LFS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_LFS)
fi
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
])
+
dnl
-dnl Because the builtins are picky picky picky about the arguments they take,
-dnl do an explict linkage tests here.
-dnl Check to see if the (math function) argument passed is
-dnl 1) declared when using the c++ compiler
-dnl 2) has "C" linkage
-dnl
-dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl Does any necessary configuration of the testsuite directory. Generates
+dnl the testsuite_hooks.h header.
dnl
-dnl argument 1 is name of function to check
+dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
dnl
-dnl ASSUMES argument is a math function with ONE parameter
+dnl Sets:
+dnl enable_abi_check / GLIBCXX_TEST_ABI
+dnl Substs:
+dnl baseline_dir
dnl
-dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
-AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
- AC_MSG_CHECKING([for $1 declaration])
- if test x${glibcpp_cv_func_$1_use+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
- AC_LANG_RESTORE
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_use)
- if test x$glibcpp_cv_func_$1_use = x"yes"; then
- AC_MSG_CHECKING([for $1 linkage])
- if test x${glibcpp_cv_func_$1_link+set} != xset; then
- AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
- AC_TRY_LINK([#include <math.h>],
- [ $1(0);],
- [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
- ])
- fi
- AC_MSG_RESULT($glibcpp_cv_func_$1_link)
- if test x$glibcpp_cv_func_$1_link = x"yes"; then
- ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- AC_DEFINE_UNQUOTED(${ac_tr_func})
+AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
+ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
+ # Do checks for resource limit functions.
+ GLIBCXX_CHECK_SETRLIMIT
+
+ # Look for setenv, so that extended locale tests can be performed.
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+
+ if test $enable_symvers = no; then
+ enable_abi_check=no
+ else
+ case "$host" in
+ *-*-cygwin*)
+ enable_abi_check=no ;;
+ *)
+ enable_abi_check=yes ;;
+ esac
fi
+ else
+ # Only build this as native, since automake does not understand
+ # CXX_FOR_BUILD.
+ enable_abi_check=no
fi
-])
+ # Export file names for ABI checking.
+ baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
+ AC_SUBST(baseline_dir)
-dnl
-dnl Check to see what builtin math functions are supported
-dnl
-dnl check for __builtin_abs
-dnl check for __builtin_fabsf
-dnl check for __builtin_fabs
-dnl check for __builtin_fabl
-dnl check for __builtin_labs
-dnl check for __builtin_sqrtf
-dnl check for __builtin_sqrtl
-dnl check for __builtin_sqrt
-dnl check for __builtin_sinf
-dnl check for __builtin_sin
-dnl check for __builtin_sinl
-dnl check for __builtin_cosf
-dnl check for __builtin_cos
-dnl check for __builtin_cosl
-dnl
-dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
- dnl Test for builtin math functions.
- dnl These are made in gcc/c-common.c
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
-
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
-
- dnl There is, without a doubt, a more elegant way to have these
- dnl names exported so that they won't be stripped out of acconfig.h by
- dnl autoheader. I leave this as an exercise to somebody less frustrated
- dnl than I.... please email the libstdc++ list if you can figure out a
- dnl more elegant approach (see autoconf/acgen.m4 and specifically
- dnl AC_CHECK_FUNC for things to steal.)
- dummyvar=no
- if test x$dummyvar = x"yes"; then
- AC_DEFINE(HAVE___BUILTIN_ABS)
- AC_DEFINE(HAVE___BUILTIN_LABS)
- AC_DEFINE(HAVE___BUILTIN_COS)
- AC_DEFINE(HAVE___BUILTIN_COSF)
- AC_DEFINE(HAVE___BUILTIN_COSL)
- AC_DEFINE(HAVE___BUILTIN_FABS)
- AC_DEFINE(HAVE___BUILTIN_FABSF)
- AC_DEFINE(HAVE___BUILTIN_FABSL)
- AC_DEFINE(HAVE___BUILTIN_SIN)
- AC_DEFINE(HAVE___BUILTIN_SINF)
- AC_DEFINE(HAVE___BUILTIN_SINL)
- AC_DEFINE(HAVE___BUILTIN_SQRT)
- AC_DEFINE(HAVE___BUILTIN_SQRTF)
- AC_DEFINE(HAVE___BUILTIN_SQRTL)
- fi
+ GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
+ GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
])
+
dnl
-dnl Check to see what the underlying c library is like
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
+dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
dnl
-dnl Define HAVE_STRTOLD if "strtold" is declared and links
-dnl Define HAVE_STRTOF if "strtof" is declared and links
-dnl Define HAVE_DRAND48 if "drand48" is declared and links
+dnl Substs:
+dnl GLIBCXX_INCLUDES
+dnl TOPLEVEL_INCLUDES
dnl
-dnl GLIBCPP_CHECK_STDLIB_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+AC_DEFUN([GLIBCXX_EXPORT_INCLUDES], [
+ # Used for every C++ compile we perform.
+ GLIBCXX_INCLUDES="\
+-I$glibcxx_builddir/include/$host_alias \
+-I$glibcxx_builddir/include \
+-I$glibcxx_srcdir/libsupc++"
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
- AC_CHECK_FUNCS(drand48)
-
- CXXFLAGS="$ac_save_CXXFLAGS"
-])
+ # For Canadian crosses, pick this up too.
+ if test $CANADIAN = yes; then
+ GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
+ fi
-dnl
-dnl Check to see what the underlying c library is like
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
-dnl
-dnl Define HAVE_ISATTY if "isatty" is declared and links
-dnl
-dnl GLIBCPP_CHECK_UNISTD_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_UNISTD_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+ # Stuff in the actual top level. Currently only used by libsupc++ to
+ # get unwind* headers from the gcc dir.
+ #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
+ TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
- GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1(isatty)
-
- CXXFLAGS="$ac_save_CXXFLAGS"
+ # Now, export this to all the little Makefiles....
+ AC_SUBST(GLIBCXX_INCLUDES)
+ AC_SUBST(TOPLEVEL_INCLUDES)
])
+
dnl
-dnl Check to see what the underlying c library or math library is like.
-dnl These checks need to do two things:
-dnl 1) make sure the name is declared when using the c++ compiler
-dnl 2) make sure the name has "C" linkage
-dnl This might seem like overkill but experience has shown that it's not...
+dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
dnl
-dnl Define HAVE_CARGF etc if "cargf" is found.
+dnl Substs:
+dnl OPTIMIZE_CXXFLAGS
+dnl WARN_FLAGS
dnl
-dnl GLIBCPP_CHECK_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
-
- dnl Check libm
- AC_CHECK_LIB(m, sin, libm="-lm")
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libm"
-
- dnl Check to see if certain C math functions exist.
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypot)
-
- dnl Check to see if basic C math functions have float versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
- float_trig,
- acosf asinf atanf \
- cosf sinf tanf \
- coshf sinhf tanhf)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
- float_round,
- ceilf floorf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
-
- dnl Check to see if basic C math functions have long double versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
- long_double_trig,
- acosl asinl atanl \
- cosl sinl tanl \
- coshl sinhl tanhl)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
- long_double_round,
- ceill floorl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
- GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
-
- dnl Some runtimes have these functions with a preceding underscore. Please
- dnl keep this sync'd with the one above. And if you add any new symbol,
- dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
- dnl Check to see if certain C math functions exist.
-
- dnl Check to see if basic C math functions have float versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
- _float_trig,
- _acosf _asinf _atanf \
- _cosf _sinf _tanf \
- _coshf _sinhf _tanhf)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
- _float_round,
- _ceilf _floorf)
-
- dnl Check to see if basic C math functions have long double versions.
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
- _long_double_trig,
- _acosl _asinl _atanl \
- _cosl _sinl _tanl \
- _coshl _sinhl _tanhl)
- GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
- _long_double_round,
- _ceill _floorl)
-
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
+AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
+ # Optimization flags that are probably a good idea for thrill-seekers. Just
+ # uncomment the lines below and make, everything else is ready to go...
+ # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
+ OPTIMIZE_CXXFLAGS=
+ AC_SUBST(OPTIMIZE_CXXFLAGS)
+
+ WARN_FLAGS='-Wall -W -Wwrite-strings -Wcast-qual'
+ AC_SUBST(WARN_FLAGS)
])
dnl
-dnl Check to see if there is native support for complex
-dnl
-dnl Don't compile bits in math/* if native support exits.
+dnl All installation directory information is determined here.
dnl
-dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
+dnl Substs:
+dnl gxx_install_dir
+dnl glibcxx_prefixdir
+dnl glibcxx_toolexecdir
+dnl glibcxx_toolexeclibdir
dnl
-dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
- dnl Check for complex versions of math functions of platform.
- AC_CHECK_LIB(m, main)
- AC_REPLACE_MATHFUNCS(nan copysignf)
-
- dnl For __signbit to signbit conversions.
- AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
- AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"])
+dnl Assumes cross_compiling bits already done, and with_cross_host in
+dnl particular.
+dnl
+AC_DEFUN([GLIBCXX_EXPORT_INSTALL_INFO], [
+ glibcxx_toolexecdir=no
+ glibcxx_toolexeclibdir=no
+ glibcxx_prefixdir=$prefix
+
+ AC_MSG_CHECKING([for gxx-include-dir])
+ AC_ARG_WITH([gxx-include-dir],
+ AC_HELP_STRING([--with-gxx-include-dir=DIR],
+ [installation directory for include files]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
+ no) gxx_include_dir=no ;;
+ *) gxx_include_dir=$withval ;;
+ esac],
+ [gxx_include_dir=no])
+ AC_MSG_RESULT($gxx_include_dir)
+
+ AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+ AC_ARG_ENABLE([version-specific-runtime-libs],
+ AC_HELP_STRING([--enable-version-specific-runtime-libs],
+ [Specify that runtime libraries should be installed in a compiler-specific directory]),
+ [case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+ [version_specific_libs=no])
+ AC_MSG_RESULT($version_specific_libs)
+
+ # Default case for install directory for include files.
+ if test $version_specific_libs = no && test $gxx_include_dir = no; then
+ gxx_include_dir='${prefix}'/include/c++/${gcc_version}
+ fi
- dnl Compile the long double complex functions only if the function
- dnl provides the non-complex long double functions that are needed.
- dnl Currently this includes copysignl, which should be
- dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
- if test x$ac_cv_func_copysignl = x"yes"; then
- AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
+ # Version-specific runtime libs processing.
+ if test $version_specific_libs = yes; then
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected. FIXME: these variables are misnamed, there are
+ # no executables installed in _toolexecdir or _toolexeclibdir.
+ if test x"$gxx_include_dir" = x"no"; then
+ gxx_include_dir='${libdir}/gcc/${host_alias}/'$gcc_version/include/c++
+ fi
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
fi
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
+ # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ if test x"$glibcxx_toolexecdir" = x"no"; then
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/lib'
+ else
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${libdir}'
+ fi
+ multi_os_directory=`$CXX -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
+ esac
fi
- AC_SUBST(LIBMATHOBJS)
- AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
+
+ AC_MSG_CHECKING([for install location])
+ AC_MSG_RESULT($gxx_include_dir)
+
+ AC_SUBST(glibcxx_prefixdir)
+ AC_SUBST(gxx_include_dir)
+ AC_SUBST(glibcxx_toolexecdir)
+ AC_SUBST(glibcxx_toolexeclibdir)
])
-dnl Check to see what architecture and operating system we are compiling
-dnl for. Also, if architecture- or OS-specific flags are required for
-dnl compilation, pick them up here.
-dnl
-dnl GLIBCPP_CHECK_TARGET
-AC_DEFUN(GLIBCPP_CHECK_TARGET, [
- . [$]{glibcpp_basedir}/configure.target
- AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
- AC_MSG_RESULT(OS config directory is $os_include_dir)
+dnl
+dnl GLIBCXX_ENABLE
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
+dnl
+dnl See docs/html/17_intro/configury.html#enable for documentation.
+dnl
+m4_define([GLIBCXX_ENABLE],[dnl
+m4_define([_g_switch],[--enable-$1])dnl
+m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
+ AC_ARG_ENABLE($1,_g_help,
+ m4_bmatch([$5],
+ [^permit ],
+ [[
+ case "$enableval" in
+ m4_bpatsubst([$5],[permit ])) ;;
+ *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
+ dnl Idea for future: generate a URL pointing to
+ dnl "onlinedocs/configopts.html#whatever"
+ esac
+ ]],
+ [^$],
+ [[
+ case "$enableval" in
+ yes|no) ;;
+ *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
+ esac
+ ]],
+ [[$5]]),
+ [enable_]m4_bpatsubst([$1],-,_)[=][$2])
+m4_undefine([_g_switch])dnl
+m4_undefine([_g_help])dnl
])
dnl
-dnl Check to see if this target can enable the wchar_t parts of libstdc++.
-dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
-dnl must have been previously checked.)
+dnl Check for ISO/IEC 9899:1999 "C99" support.
dnl
-dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
-dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl --enable-c99 defines _GLIBCXX_USE_C99
+dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
+dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
dnl
-dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
-AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
- dnl Wide characters disabled by default.
- enable_wchar_t=no
+AC_DEFUN([GLIBCXX_ENABLE_C99], [
+ GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
- dnl Test wchar.h for mbstate_t, which is needed for char_traits and
- dnl others even if wchar_t support is not on.
- AC_MSG_CHECKING([for mbstate_t])
- AC_TRY_COMPILE([#include <wchar.h>],
- [mbstate_t teststate;],
- have_mbstate_t=yes, have_mbstate_t=no)
- AC_MSG_RESULT($have_mbstate_t)
- if test x"$have_mbstate_t" = xyes; then
- AC_DEFINE(HAVE_MBSTATE_T)
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ ac_c99_math=yes;
+ AC_MSG_CHECKING([for ISO C99 support in <math.h>])
+ AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [islessgreater(0.0,0.0);],, [ac_c99_math=no])
+ AC_TRY_COMPILE([#include <math.h>],
+ [isunordered(0.0,0.0);],, [ac_c99_math=no])
+ AC_MSG_RESULT($ac_c99_math)
+
+ if test x"$ac_c99_math" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
- dnl Sanity check for existence of ISO C99 headers for extended encoding.
- AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
- AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
-
- dnl Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- dnl numeric_limits can instantiate type_traits<wchar_t>
- AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
- AC_TRY_COMPILE([#include <wchar.h>],
- [int i = WCHAR_MIN; int j = WCHAR_MAX;],
- has_wchar_minmax=yes, has_wchar_minmax=no)
- AC_MSG_RESULT($has_wchar_minmax)
-
- dnl Test wchar.h for WEOF, which is what we use to determine whether
- dnl to specialize for char_traits<wchar_t> or not.
- AC_MSG_CHECKING([for WEOF])
- AC_TRY_COMPILE([
- #include <wchar.h>
- #include <stddef.h>],
- [wint_t i = WEOF;],
- has_weof=yes, has_weof=no)
- AC_MSG_RESULT($has_weof)
-
- dnl Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
- AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset,, \
- ac_wfuncs=no)
-
- dnl Checks for names injected into std:: by the c_std headers.
- AC_CHECK_FUNCS(btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr,, \
- ac_wfuncs=no)
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ ac_c99_stdio=yes;
+ AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
+ AC_TRY_COMPILE([#include <stdio.h>],
+ [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vscanf("%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsnprintf(fmt, 0, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_TRY_COMPILE([#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsscanf(fmt, "%i", args);}],
+ [],, [ac_c99_stdio=no])
+ AC_MSG_RESULT($ac_c99_stdio)
- AC_MSG_CHECKING([for ISO C99 wchar_t support])
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- AC_MSG_RESULT($ac_isoC99_wchar_t)
-
- dnl Use iconv for wchar_t to char conversions. As such, check for
- dnl X/Open Portability Guide, version 2 features (XPG2).
- AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
- AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ ac_c99_stdlib=yes;
+ AC_MSG_CHECKING([for lldiv_t declaration])
+ AC_CACHE_VAL(ac_c99_lldiv_t, [
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ lldiv_t mydivt;],
+ [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
+ ])
+ AC_MSG_RESULT($ac_c99_lldiv_t)
- dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
- AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
+ AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
+ if test x"$ac_c99_lldiv_t" = x"no"; then
+ ac_c99_stdlib=no;
+ fi;
+ AC_MSG_RESULT($ac_c99_stdlib)
- AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
- ac_XPG2funcs=yes, ac_XPG2funcs=no)
-
- LIBS="$ac_save_LIBS"
+ # Check for the existence of <wchar.h> functions used if C99 is enabled.
+ # XXX the wchar.h checks should be rolled into the general C99 bits.
+ ac_c99_wchar=yes;
+ AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
+ AC_MSG_RESULT($ac_c99_wchar)
- AC_MSG_CHECKING([for XPG2 wchar_t support])
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- AC_MSG_RESULT($ac_XPG2_wchar_t)
-
- dnl At the moment, only enable wchar_t specializations if all the
- dnl above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
- enable_wchar_t=yes
- fi
+ AC_MSG_CHECKING([for enabled ISO C99 support])
+ if test x"$ac_c99_math" = x"no" ||
+ test x"$ac_c99_stdio" = x"no" ||
+ test x"$ac_c99_stdlib" = x"no" ||
+ test x"$ac_c99_wchar" = x"no"; then
+ enable_c99=no;
+ fi;
+ AC_MSG_RESULT($enable_c99)
+
+ if test x"$ac_99_math" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
- AC_MSG_CHECKING([for enabled wchar_t specializations])
- AC_MSG_RESULT($enable_wchar_t)
- AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
-])
+ # Option parsed, now set things appropriately
+ if test x"$enable_c99" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_C99)
+ fi
-dnl
-dnl Check to see if debugging libraries are to be built.
-dnl
-dnl GLIBCPP_ENABLE_DEBUG
-dnl
-dnl --enable-debug
-dnl builds a separate set of debugging libraries in addition to the
-dnl normal (shared, static) libstdc++ binaries.
-dnl
-dnl --disable-debug
-dnl builds only one (non-debug) version of libstdc++.
-dnl
-dnl --enable-debug-flags=FLAGS
-dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
-dnl
-dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
-define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(debug,
-changequote(<<, >>)dnl
-<< --enable-debug build extra debug library [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
-changequote([, ])dnl
-[case "${enableval}" in
- yes) enable_debug=yes ;;
- no) enable_debug=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
- esac],
-enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
-AC_MSG_CHECKING([for additional debug build])
-AC_MSG_RESULT($enable_debug)
-AM_CONDITIONAL(GLIBCPP_BUILD_DEBUG, test "$enable_debug" = yes)
+ AC_LANG_RESTORE
])
-dnl Check for explicit debug flags.
dnl
-dnl GLIBCPP_ENABLE_DEBUG_FLAGS
+dnl Check for what type of C headers to use.
dnl
-dnl --enable-debug-flags='-O1'
-dnl is a general method for passing flags to be used when
-dnl building debug libraries with --enable-debug.
+dnl --enable-cheaders= [does stuff].
+dnl --disable-cheaders [does not do anything, really].
+dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
+dnl Where DEFAULT is either `c' or `c_std'.
dnl
-dnl --disable-debug-flags does nothing.
-dnl + Usage: GLIBCPP_ENABLE_DEBUG_FLAGS(default flags)
-dnl If "default flags" is an empty string (or "none"), the effect is
-dnl the same as --disable or --enable=no.
-AC_DEFUN(GLIBCPP_ENABLE_DEBUG_FLAGS, [dnl
-define([GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
-AC_ARG_ENABLE(debug_flags,
-changequote(<<, >>)dnl
-<< --enable-debug-flags=FLAGS pass compiler FLAGS when building debug
- library;[default=>>GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT],
-changequote([, ])dnl
-[case "${enableval}" in
- none) ;;
- -*) enable_debug_flags="${enableval}" ;;
- *) AC_MSG_ERROR([Unknown argument to extra debugging flags]) ;;
- esac],
-enable_debug_flags=GLIBCPP_ENABLE_DEBUG_FLAGS_DEFAULT)dnl
-
-dnl Option parsed, now set things appropriately
-case x"$enable_debug" in
- xyes)
- case "$enable_debug_flags" in
- none)
- DEBUG_FLAGS="-g3 -O0";;
- -*) #valid input
- DEBUG_FLAGS="${enableval}"
- esac
- ;;
- xno)
- DEBUG_FLAGS=""
- ;;
-esac
-AC_SUBST(DEBUG_FLAGS)
-
-AC_MSG_CHECKING([for debug build flags])
-AC_MSG_RESULT($DEBUG_FLAGS)
-])
+AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [
+ GLIBCXX_ENABLE(cheaders,$1,[=KIND],
+ [construct "C" headers for g++], [permit c|c_std])
+ AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
+ C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
-dnl
-dnl Check for "unusual" flags to pass to the compiler while building.
-dnl
-dnl GLIBCPP_ENABLE_CXX_FLAGS
-dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
-dnl experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
-dnl Somehow this same set of flags must be passed when [re]building
-dnl libgcc.
-dnl --disable-cxx-flags passes nothing.
-dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
-dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
-dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
-dnl + Usage: GLIBCPP_ENABLE_CXX_FLAGS(default flags)
-dnl If "default flags" is an empty string (or "none"), the effect is
-dnl the same as --disable or --enable=no.
-AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
-define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
-AC_MSG_CHECKING([for extra compiler flags for building])
-AC_ARG_ENABLE(cxx_flags,
-changequote(<<, >>)dnl
-<< --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
- [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
-changequote([, ])dnl
-[case "x$enable_cxx_flags" in
- xyes)
- AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
- xno | xnone | x)
- enable_cxx_flags='' ;;
- *)
- enable_cxx_flags="$enableval" ;;
-esac],
-enable_cxx_flags=GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT)
-
-dnl Run through flags (either default or command-line) and set anything
-dnl extra (e.g., #defines) that must accompany particular g++ options.
-if test -n "$enable_cxx_flags"; then
- for f in $enable_cxx_flags; do
- case "$f" in
- -fhonor-std) ;;
- -*) ;;
- *) # and we're trying to pass /what/ exactly?
- AC_MSG_ERROR([compiler flags start with a -]) ;;
- esac
- done
-fi
-EXTRA_CXX_FLAGS="$enable_cxx_flags"
-AC_MSG_RESULT($EXTRA_CXX_FLAGS)
-AC_SUBST(EXTRA_CXX_FLAGS)
+ AC_SUBST(C_INCLUDE_DIR)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
])
dnl
-dnl Check for which locale library to use: gnu or generic.
+dnl Check for which locale library to use. The choice is mapped to
+dnl a subdirectory of config/locale.
dnl
-dnl GLIBCPP_ENABLE_CLOCALE
-dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
-dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
-dnl
-dnl default is generic
+dnl Default is generic.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
- AC_MSG_CHECKING([for clocale to use])
- AC_ARG_ENABLE(clocale,
- [ --enable-clocale enable model for target locale package.
- --enable-clocale=MODEL use MODEL target-speific locale package. [default=generic]
- ],
- if test x$enable_clocale = xno; then
- enable_clocale=no
- fi,
- enable_clocale=no)
+AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ AC_MSG_CHECKING([for C locale to use])
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+ [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
+
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_clocale = no || test $enable_clocale = yes; then
+ enable_clocale=auto
+ fi
+ # Either a known package, or "auto"
enable_clocale_flag=$enable_clocale
- dnl Probe for locale support if no specific model is specified.
- dnl Default to "generic"
- if test x$enable_clocale_flag = xno; then
+ # Probe for locale support if no specific model is specified.
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
case x${target_os} in
- xlinux* | xgnu*)
- AC_EGREP_CPP([_GLIBCPP_ok], [
+ xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
+ AC_EGREP_CPP([_GLIBCXX_ok], [
#include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- _GLIBCPP_ok
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+ _GLIBCXX_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
- # Test for bugs early in glibc-2.2.x series
- if test x$enable_clocale_flag = xgnu; then
- AC_TRY_RUN([
- #define _GNU_SOURCE 1
- #include <locale.h>
- #include <string.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- extern __typeof(newlocale) __newlocale;
- extern __typeof(duplocale) __duplocale;
- extern __typeof(strcoll_l) __strcoll_l;
- #endif
- int main()
- {
- const char __one[] = "Äuglein Augmen";
- const char __two[] = "Äuglein";
- int i;
- int j;
- __locale_t loc;
- __locale_t loc_dup;
- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
- loc_dup = __duplocale(loc);
- i = __strcoll_l(__one, __two, loc);
- j = __strcoll_l(__one, __two, loc_dup);
- return 0;
- }
- ],
- [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
- [enable_clocale_flag=generic])
- fi
-
- # ... at some point put __strxfrm_l tests in as well.
+ # Test for bugs early in glibc-2.2.x series
+ if test x$enable_clocale_flag = xgnu; then
+ AC_TRY_RUN([
+ #define _GNU_SOURCE 1
+ #include <locale.h>
+ #include <string.h>
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ extern __typeof(newlocale) __newlocale;
+ extern __typeof(duplocale) __duplocale;
+ extern __typeof(strcoll_l) __strcoll_l;
+ #endif
+ int main()
+ {
+ const char __one[] = "Äuglein Augmen";
+ const char __two[] = "Äuglein";
+ int i;
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
+ return 0;
+ }
+ ],
+ [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+ [enable_clocale_flag=generic])
+ fi
+
+ # ... at some point put __strxfrm_l tests in as well.
;;
*)
- enable_clocale_flag=generic
- ;;
+ enable_clocale_flag=generic
+ ;;
esac
fi
- dnl Deal with gettext issues.
- AC_ARG_ENABLE(nls,
- [ --enable-nls use Native Language Support (default)],
- , enable_nls=yes)
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+ # default to on for easier handling.
USE_NLS=no
+ AC_ARG_ENABLE(nls,
+ AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
+ [],
+ [enable_nls=yes])
- dnl Set configure bits for specified locale package
- case x${enable_clocale_flag} in
- xgeneric)
+ # Set configure bits for specified locale package
+ case ${enable_clocale_flag} in
+ generic)
AC_MSG_RESULT(generic)
CLOCALE_H=config/locale/generic/c_locale.h
@@ -1287,7 +1099,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- xgnu)
+ gnu)
AC_MSG_RESULT(gnu)
# Declare intention to use gettext, and add support for specific
@@ -1298,15 +1110,15 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
# Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
- USE_NLS=yes
+ USE_NLS=yes
fi
# Export the build objects.
for ling in $ALL_LINGUAS; do \
- glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
- glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
done
- AC_SUBST(glibcpp_MOFILES)
- AC_SUBST(glibcpp_POFILES)
+ AC_SUBST(glibcxx_MOFILES)
+ AC_SUBST(glibcxx_POFILES)
CLOCALE_H=config/locale/gnu/c_locale.h
CLOCALE_CC=config/locale/gnu/c_locale.cc
@@ -1322,8 +1134,8 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
- xieee_1003.1-2001)
- AC_MSG_RESULT(generic)
+ ieee_1003.1-2001)
+ AC_MSG_RESULT(IEEE 1003.1)
CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
@@ -1339,16 +1151,21 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- *)
- echo "$enable_clocale is an unknown locale package" 1>&2
- exit 1
- ;;
esac
# This is where the testsuite looks for locale catalogs, using the
# -DLOCALEDIR define during testsuite compilation.
- glibcpp_localedir=${glibcpp_builddir}/po/share/locale
- AC_SUBST(glibcpp_localedir)
+ glibcxx_localedir=${glibcxx_builddir}/po/share/locale
+ AC_SUBST(glibcxx_localedir)
+
+ # A standalone libintl (e.g., GNU libintl) may be in use.
+ if test $USE_NLS = yes; then
+ AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
+ AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
+ fi
+ if test $USE_NLS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_NLS)
+ fi
AC_SUBST(USE_NLS)
AC_SUBST(CLOCALE_H)
@@ -1368,463 +1185,150 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl
-dnl Check for which I/O library to use: libio, or something specific.
-dnl
-dnl GLIBCPP_ENABLE_CSTDIO
-dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
-dnl
-dnl default is stdio
-dnl
-AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
- AC_MSG_CHECKING([for cstdio to use])
- AC_ARG_ENABLE(cstdio,
- [ --enable-cstdio enable stdio for target io package.
- --enable-cstdio=LIB use LIB target-speific io package. [default=stdio]
- ],
- if test x$enable_cstdio = xno; then
- enable_cstdio=stdio
- fi,
- enable_cstdio=stdio)
-
- enable_cstdio_flag=$enable_cstdio
-
- dnl Check if a valid I/O package
- case x${enable_cstdio_flag} in
- xlibio)
- CSTDIO_H=config/io/c_io_libio.h
- BASIC_FILE_H=config/io/basic_file_libio.h
- BASIC_FILE_CC=config/io/basic_file_libio.cc
- AC_MSG_RESULT(libio)
-
- # see if we are on a system with libio native (ie, linux)
- AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
-
- # Need to check and see what version of glibc is being used. If
- # it's not glibc-2.2 or higher, then we'll need to go ahead and
- # compile most of libio for linux systems.
- if test x$has_libio = x"yes"; then
- case "$target" in
- *-*-linux*)
- AC_MSG_CHECKING([for glibc version >= 2.2])
- AC_EGREP_CPP([ok], [
- #include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- ok
- #endif
- ], glibc_satisfactory=yes, glibc_satisfactory=no)
- AC_MSG_RESULT($glibc_satisfactory)
- ;;
- esac
-
- # XXX at the moment, admit defeat and force the recompilation
- # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
- glibc_satisfactory=no
-
- if test x$glibc_satisfactory = x"yes"; then
- need_libio=no
- need_wlibio=no
- else
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
-
- else
- # Using libio, but <libio.h> doesn't exist on the target system. . .
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
- ;;
- xstdio | x | xno | xnone | xyes)
- # default
- CSTDIO_H=config/io/c_io_stdio.h
- BASIC_FILE_H=config/io/basic_file_stdio.h
- BASIC_FILE_CC=config/io/basic_file_stdio.cc
- AC_MSG_RESULT(stdio)
-
- # We're not using stdio.
- need_libio=no
- need_wlibio=no
- ;;
- *)
- echo "$enable_cstdio is an unknown io package" 1>&2
- exit 1
- ;;
- esac
- AC_SUBST(CSTDIO_H)
- AC_SUBST(BASIC_FILE_H)
- AC_SUBST(BASIC_FILE_CC)
-
- # 2000-08-04 bkoz hack
- CCODECVT_C=config/io/c_io_libio_codecvt.c
- AC_SUBST(CCODECVT_C)
- # 2000-08-04 bkoz hack
-
- AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
- test "$need_libio" = yes || test "$need_wlibio" = yes)
- AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
- AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
- if test "$need_libio" = yes || test "$need_wlibio" = yes; then
- libio_la=../libio/libio.la
- else
- libio_la=
- fi
- AC_SUBST(libio_la)
-])
-
-
+dnl Check for which std::allocator base class to use. The choice is
+dnl mapped from a subdirectory of include/ext.
dnl
-dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
-dnl We must stage the required headers so that they will be installed
-dnl with the library (unlike libgcc, the STL implementation is provided
-dnl solely within headers). Since we must not inject random user-space
-dnl macro names into user-provided C++ code, we first stage into <file>-in
-dnl and process to <file> with an output command. The reason for a two-
-dnl stage process here is to correctly handle $srcdir!=$objdir without
-dnl having to write complex code (the sed commands to clean the macro
-dnl namespace are complex and fragile enough as it is). We must also
-dnl add a relative path so that -I- is supported properly.
+dnl Default is new.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
- AC_MSG_CHECKING([for thread model used by GCC])
- target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
- AC_MSG_RESULT([$target_thread_file])
-
- if test $target_thread_file != single; then
- AC_DEFINE(HAVE_GTHR_DEFAULT)
- AC_DEFINE(_GLIBCPP_SUPPORTS_WEAK, __GXX_WEAK__)
+AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
+ AC_MSG_CHECKING([for std::allocator base class to use])
+ GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND],
+ [use KIND for target std::allocator base],
+ [permit new|malloc|mt|bitmap|pool|yes|no|auto])
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_libstdcxx_allocator = no || test $enable_libstdcxx_allocator = yes; then
+ enable_libstdcxx_allocator=auto
fi
- glibcpp_thread_h=gthr-$target_thread_file.h
- AC_SUBST(glibcpp_thread_h)
-])
+ # Either a known package, or "auto"
+ enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
+ # Probe for host-specific support if no specific model is specified.
+ # Default to "new".
+ if test $enable_libstdcxx_allocator_flag = auto; then
+ case ${target_os} in
+ *)
+ enable_libstdcxx_allocator_flag=new
+ ;;
+ esac
+ fi
+ AC_MSG_RESULT($enable_libstdcxx_allocator_flag)
+
-dnl
-dnl Check for exception handling support. If an explicit enable/disable
-dnl sjlj exceptions is given, we don't have to detect. Otherwise the
-dnl target may or may not support call frame exceptions.
-dnl
-dnl GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
-dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
-dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
-dnl
-dnl Define _GLIBCPP_SJLJ_EXCEPTIONS if the compiler is configured for it.
-dnl
-AC_DEFUN(GLIBCPP_ENABLE_SJLJ_EXCEPTIONS, [
- AC_MSG_CHECKING([for exception model to use])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_ARG_ENABLE(sjlj-exceptions,
- [ --enable-sjlj-exceptions force use of builtin_setjmp for exceptions],
- [:],
- [dnl Botheration. Now we've got to detect the exception model.
- dnl Link tests against libgcc.a are problematic since -- at least
- dnl as of this writing -- we've not been given proper -L bits for
- dnl single-tree newlib and libgloss.
- dnl
- dnl This is what AC_TRY_COMPILE would do if it didn't delete the
- dnl conftest files before we got a change to grep them first.
- cat > conftest.$ac_ext << EOF
-[#]line __oline__ "configure"
-struct S { ~S(); };
-void bar();
-void foo()
-{
- S s;
- bar();
-}
-EOF
- old_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=-S
- if AC_TRY_EVAL(ac_compile); then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=no
- fi
- fi
- CXXFLAGS="$old_CXXFLAGS"
- rm -f conftest*])
- if test x$enable_sjlj_exceptions = xyes; then
- AC_DEFINE(_GLIBCPP_SJLJ_EXCEPTIONS, 1,
- [Define if the compiler is configured for setjmp/longjmp exceptions.])
- ac_exception_model_name=sjlj
- elif test x$enable_sjlj_exceptions = xno; then
- ac_exception_model_name="call frame"
- else
- AC_MSG_ERROR([unable to detect exception model])
- fi
- AC_LANG_RESTORE
- AC_MSG_RESULT($ac_exception_model_name)
+ # Set configure bits for specified locale package
+ case ${enable_libstdcxx_allocator_flag} in
+ bitmap)
+ ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
+ ;;
+ malloc)
+ ALLOCATOR_H=config/allocator/malloc_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
+ ;;
+ mt)
+ ALLOCATOR_H=config/allocator/mt_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
+ ;;
+ new)
+ ALLOCATOR_H=config/allocator/new_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::new_allocator
+ ;;
+ pool)
+ ALLOCATOR_H=config/allocator/pool_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
+ ;;
+ esac
+
+ AC_SUBST(ALLOCATOR_H)
+ AC_SUBST(ALLOCATOR_NAME)
])
dnl
-dnl Check for libunwind exception handling support. If enabled then
-dnl we assume that the _Unwind_* functions that make up the Unwind ABI
-dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
-dnl libunwind instead of libgcc and that libstdc++ has a dependency
-dnl on libunwind as well as libgcc.
-dnl
-dnl GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
-dnl --enable-libunwind-exceptions forces the use of libunwind.
-dnl --disable-libunwind-exceptions assumes there is no libunwind.
+dnl Check for whether the Boost-derived checks should be turned on.
dnl
-dnl Define _GLIBCPP_LIBUNWIND_EXCEPTIONS if requested.
+dnl --enable-concept-checks turns them on.
+dnl --disable-concept-checks leaves them off.
+dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
dnl
-AC_DEFUN(GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS, [
- AC_MSG_CHECKING([for use of libunwind])
- AC_ARG_ENABLE(libunwind-exceptions,
- [ --enable-libunwind-exceptions force use of libunwind for exceptions],
- use_libunwind_exceptions=$enableval,
- use_libunwind_exceptions=no)
- AC_MSG_RESULT($use_libunwind_exceptions)
- dnl Option parsed, now set things appropriately
- if test x"$use_libunwind_exceptions" = xyes; then
- LIBUNWIND_FLAG="-lunwind"
- else
- LIBUNWIND_FLAG=""
+AC_DEFUN([GLIBCXX_ENABLE_CONCEPT_CHECKS], [
+ GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
+ if test $enable_concept_checks = yes; then
+ AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
fi
- AC_SUBST(LIBUNWIND_FLAG)
])
+
dnl
-dnl Check for ISO/IEC 9899:1999 "C99" support.
+dnl Check for which I/O library to use: stdio, or something specific.
dnl
-dnl GLIBCPP_ENABLE_C99
-dnl --enable-c99 defines _GLIBCPP_USE_C99
-dnl --disable-c99 leaves _GLIBCPP_USE_C99 undefined
-dnl + Usage: GLIBCPP_ENABLE_C99[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If omitted, it
-dnl defaults to `no'.
-dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
+dnl Default is stdio.
dnl
-dnl GLIBCPP_ENABLE_C99
-AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
- define([GLIBCPP_ENABLE_C99_DEFAULT], ifelse($1, yes, yes, no))dnl
-
- AC_ARG_ENABLE(c99,
- changequote(<<, >>)dnl
- <<--enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
- changequote([, ])dnl
- [case "$enableval" in
- yes) enable_c99=yes ;;
- no) enable_c99=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable C99]) ;;
- esac],
- enable_c99=GLIBCPP_ENABLE_C99_DEFAULT)dnl
-
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+AC_DEFUN([GLIBCXX_ENABLE_CSTDIO], [
+ AC_MSG_CHECKING([for underlying I/O to use])
+ GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
+ [use target-specific I/O package], [permit stdio])
- # Check for the existence of <math.h> functions used if C99 is enabled.
- ac_c99_math=yes;
- AC_MSG_CHECKING([for ISO C99 support in <math.h>])
- AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [islessgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isunordered(0.0,0.0);],, [ac_c99_math=no])
- AC_MSG_RESULT($ac_c99_math)
-
- # Check for the existence in <stdio.h> of vscanf, et. al.
- ac_c99_stdio=yes;
- AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
- AC_TRY_COMPILE([#include <stdio.h>],
- [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vscanf("%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsnprintf(fmt, 0, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsscanf(fmt, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_MSG_RESULT($ac_c99_stdio)
-
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- ac_c99_stdlib=yes;
- AC_MSG_CHECKING([for lldiv_t declaration])
- AC_CACHE_VAL(ac_c99_lldiv_t, [
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ lldiv_t mydivt;],
- [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
- ])
- AC_MSG_RESULT($ac_c99_lldiv_t)
-
- AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
- if test x"$ac_c99_lldiv_t" = x"no"; then
- ac_c99_stdlib=no;
- fi;
- AC_MSG_RESULT($ac_c99_stdlib)
-
- # Check for the existence of <wchar.h> functions used if C99 is enabled.
- # XXX the wchar.h checks should be rolled into the general C99 bits.
- ac_c99_wchar=yes;
- AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_MSG_RESULT($ac_c99_wchar)
-
- AC_MSG_CHECKING([for enabled ISO C99 support])
- if test x"$ac_c99_math" = x"no" ||
- test x"$ac_c99_stdio" = x"no" ||
- test x"$ac_c99_stdlib" = x"no" ||
- test x"$ac_c99_wchar" = x"no"; then
- enable_c99=no;
- fi;
- AC_MSG_RESULT($enable_c99)
-
- # Option parsed, now set things appropriately
- if test x"$enable_c99" = x"yes"; then
- AC_DEFINE(_GLIBCPP_USE_C99)
- fi
+ # Now that libio has been removed, you can have any color you want as long
+ # as it's black. This is one big no-op until other packages are added, but
+ # showing the framework never hurts.
+ case ${enable_cstdio} in
+ stdio)
+ CSTDIO_H=config/io/c_io_stdio.h
+ BASIC_FILE_H=config/io/basic_file_stdio.h
+ BASIC_FILE_CC=config/io/basic_file_stdio.cc
+ AC_MSG_RESULT(stdio)
+ ;;
+ esac
- AC_LANG_RESTORE
+ AC_SUBST(CSTDIO_H)
+ AC_SUBST(BASIC_FILE_H)
+ AC_SUBST(BASIC_FILE_CC)
])
dnl
-dnl Check for template specializations for the 'long long' type extension.
-dnl The result determines only whether 'long long' I/O is enabled; things
-dnl like numeric_limits<> specializations are always available.
+dnl Check for "unusual" flags to pass to the compiler while building.
dnl
-dnl GLIBCPP_ENABLE_LONG_LONG
-dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
-dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
-dnl + Usage: GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If omitted, it
-dnl defaults to `no'.
-dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
-dnl
-dnl GLIBCPP_ENABLE_LONG_LONG
-AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
- define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
-
- AC_ARG_ENABLE(long-long,
- changequote(<<, >>)dnl
- <<--enable-long-long turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
- changequote([, ])dnl
- [case "$enableval" in
- yes) enable_long_long=yes ;;
- no) enable_long_long=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
- esac],
- enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
-
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
-
- AC_MSG_CHECKING([for enabled long long I/O support])
- # iostreams require strtoll, strtoull to compile
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
-
- # Option parsed, now set things appropriately
- if test x"$enable_long_long" = xyes; then
- AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
+dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
+dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
+dnl --disable-cxx-flags passes nothing.
+dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
+dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
+dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
+dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
+dnl If "default flags" is an empty string, the effect is the same
+dnl as --disable or --enable=no.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_CXX_FLAGS], [dnl
+ AC_MSG_CHECKING([for extra compiler flags for building])
+ GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
+ [pass compiler FLAGS when building library],
+ [case "x$enable_cxx_flags" in
+ xno | x) enable_cxx_flags= ;;
+ x-*) ;;
+ *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
+ esac])
+
+ # Run through flags (either default or command-line) and set anything
+ # extra (e.g., #defines) that must accompany particular g++ options.
+ if test -n "$enable_cxx_flags"; then
+ for f in $enable_cxx_flags; do
+ case "$f" in
+ -fhonor-std) ;;
+ -*) ;;
+ *) # and we're trying to pass /what/ exactly?
+ AC_MSG_ERROR([compiler flags start with a -]) ;;
+ esac
+ done
fi
- AC_MSG_RESULT($enable_long_long)
- AC_LANG_RESTORE
-])
-
-
-dnl
-dnl Check for what type of C headers to use.
-dnl
-dnl GLIBCPP_ENABLE_CHEADERS
-dnl --enable-cheaders= [does stuff].
-dnl --disable-cheaders [does not do anything, really].
-dnl + Usage: GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
-dnl Where DEFAULT is either `c' or `c_std'.
-dnl If ommitted, it defaults to `c_std'.
-AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
-define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
-AC_MSG_CHECKING([for c header strategy to use])
-AC_ARG_ENABLE(cheaders,
-changequote(<<, >>)dnl
-<< --enable-cheaders=MODEL construct "C" header files for g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
-changequote([, ])
- [case "$enableval" in
- c)
- enable_cheaders=c
- ;;
- c_std)
- enable_cheaders=c_std
- ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable "C" headers])
- ;;
- esac],
- enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
- AC_MSG_RESULT($enable_cheaders)
-
- dnl Option parsed, now set things appropriately
- case "$enable_cheaders" in
- c_std)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
- ;;
- c)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
- ;;
- esac
-
- AC_SUBST(C_INCLUDE_DIR)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_C, test "$enable_cheaders" = c)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_C_STD, test "$enable_cheaders" = c_std)
- AM_CONDITIONAL(GLIBCPP_C_HEADERS_COMPATIBILITY, test "$c_compatibility" = yes)
+ EXTRA_CXX_FLAGS="$enable_cxx_flags"
+ AC_MSG_RESULT($EXTRA_CXX_FLAGS)
+ AC_SUBST(EXTRA_CXX_FLAGS)
])
@@ -1832,384 +1336,376 @@ dnl
dnl Check for wide character support. Has the same effect as the option
dnl in gcc's configure, but in a form that autoconf can mess with.
dnl
-dnl GLIBCPP_ENABLE_C_MBCHAR
dnl --enable-c-mbchar requests all the wchar_t stuff.
dnl --disable-c-mbchar doesn't.
-dnl + Usage: GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
-define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(c-mbchar,
-changequote(<<, >>)dnl
-<< --enable-c-mbchar enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_c_mbchar=yes ;;
- no) enable_c_mbchar=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
- esac],
-enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
-dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
+dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_C_MBCHAR], [
+ GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
+ # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
])
dnl
-dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
+dnl Check to see if debugging libraries are to be built.
dnl
-dnl TOPLEVEL_INCLUDES
-dnl LIBMATH_INCLUDES
-dnl LIBSUPCXX_INCLUDES
-dnl LIBIO_INCLUDES
+dnl --enable-libstdcxx-debug
+dnl builds a separate set of debugging libraries in addition to the
+dnl normal (shared, static) libstdc++ binaries.
dnl
-dnl GLIBCPP_EXPORT_INCLUDES
-AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
- # Root level of the build directory include sources.
- GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
-
- # Passed down for canadian crosses.
- if test x"$CANADIAN" = xyes; then
- TOPLEVEL_INCLUDES='-I$(includedir)'
- fi
-
- LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
-
- LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
-
- if test x"$need_libio" = xyes; then
- LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
- AC_SUBST(LIBIO_INCLUDES)
- fi
-
- # Now, export this to all the little Makefiles....
- AC_SUBST(GLIBCPP_INCLUDES)
- AC_SUBST(TOPLEVEL_INCLUDES)
- AC_SUBST(LIBMATH_INCLUDES)
- AC_SUBST(LIBSUPCXX_INCLUDES)
+dnl --disable-libstdcxx-debug
+dnl builds only one (non-debug) version of libstdc++.
+dnl
+dnl --enable-libstdcxx-debug-flags=FLAGS
+dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
+dnl
+dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_DEBUG], [
+ AC_MSG_CHECKING([for additional debug build])
+ GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
+ AC_MSG_RESULT($enable_libstdcxx_debug)
+ GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
])
dnl
-dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl Check for explicit debug flags.
dnl
-AC_DEFUN(GLIBCPP_EXPORT_FLAGS, [
- # Optimization flags that are probably a good idea for thrill-seekers. Just
- # uncomment the lines below and make, everything else is ready to go...
- # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
- OPTIMIZE_CXXFLAGS=
- AC_SUBST(OPTIMIZE_CXXFLAGS)
-
- WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
- AC_SUBST(WARN_FLAGS)
-])
-
+dnl --enable-libstdcxx-debug-flags='-O1'
+dnl is a general method for passing flags to be used when
+dnl building debug libraries with --enable-debug.
dnl
-dnl GLIBCPP_EXPORT_INSTALL_INFO
-dnl calculates gxx_install_dir
-dnl exports glibcpp_toolexecdir
-dnl exports glibcpp_toolexeclibdir
-dnl exports glibcpp_prefixdir
+dnl --disable-libstdcxx-debug-flags does nothing.
+dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
+dnl If "default flags" is an empty string, the effect is the same
+dnl as --disable or --enable=no.
dnl
-dnl Assumes cross_compiling bits already done, and with_cross_host in
-dnl particular
-dnl
-dnl GLIBCPP_EXPORT_INSTALL_INFO
-AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
-# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
-# exported correctly in GLIBCPP_CONFIGURE.
-glibcpp_toolexecdir=no
-glibcpp_toolexeclibdir=no
-glibcpp_prefixdir=${prefix}
-
-# Process the option --with-gxx-include-dir=<path to include-files directory>
-AC_MSG_CHECKING([for --with-gxx-include-dir])
-AC_ARG_WITH(gxx-include-dir,
-[ --with-gxx-include-dir the installation directory for include files],
-[case "${withval}" in
- yes)
- AC_MSG_ERROR(Missing directory for --with-gxx-include-dir)
- gxx_include_dir=no
- ;;
- no)
- gxx_include_dir=no
- ;;
- *)
- gxx_include_dir=${withval}
- ;;
-esac], [gxx_include_dir=no])
-AC_MSG_RESULT($gxx_include_dir)
+AC_DEFUN([GLIBCXX_ENABLE_DEBUG_FLAGS], [
+ GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
+ [pass compiler FLAGS when building debug library],
+ [case "x$enable_libstdcxx_debug_flags" in
+ xno | x) enable_libstdcxx_debug_flags= ;;
+ x-*) ;;
+ *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
+ esac])
-# Process the option "--enable-version-specific-runtime-libs"
-AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
-AC_ARG_ENABLE(version-specific-runtime-libs,
-[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
-[case "$enableval" in
- yes) version_specific_libs=yes ;;
- no) version_specific_libs=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
- esac],
-version_specific_libs=no)dnl
-# Option set, now we can test it.
-AC_MSG_RESULT($version_specific_libs)
+ # Option parsed, now set things appropriately
+ DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
+ AC_SUBST(DEBUG_FLAGS)
-# Default case for install directory for include files.
-if test $version_specific_libs = no && test $gxx_include_dir = no; then
- gxx_include_dir='$(prefix)'/include/c++/${gcc_version}
-fi
+ AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
+])
-# Version-specific runtime libs processing.
-if test $version_specific_libs = yes; then
- # Need the gcc compiler version to know where to install libraries
- # and header files if --enable-version-specific-runtime-libs option
- # is selected.
- if test x"$gxx_include_dir" = x"no"; then
- gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/c++
- fi
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
-fi
-# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
-# Install a library built with a cross compiler in tooldir, not libdir.
-if test x"$glibcpp_toolexecdir" = x"no"; then
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib'
+dnl
+dnl Check if the user only wants a freestanding library implementation.
+dnl
+dnl --disable-hosted-libstdcxx will turn off most of the library build,
+dnl installing only the headers required by [17.4.1.3] and the language
+dnl support library. More than that will be built (to keep the Makefiles
+dnl conveniently clean), but not installed.
+dnl
+dnl Sets:
+dnl is_hosted (yes/no)
+dnl
+dnl Defines:
+dnl _GLIBCXX_HOSTED (always defined, either to 1 or 0)
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
+ AC_ARG_ENABLE([hosted-libstdcxx],
+ AC_HELP_STRING([--disable-hosted-libstdcxx],
+ [only build freestanding C++ runtime support]),,
+ [enable_hosted_libstdcxx=yes])
+ if test "$enable_hosted_libstdcxx" = no; then
+ AC_MSG_NOTICE([Only freestanding libraries will be built])
+ is_hosted=no
+ hosted_define=0
+ enable_abi_check=no
+ enable_libstdcxx_pch=no
else
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)'
+ is_hosted=yes
+ hosted_define=1
fi
- glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
-fi
+ GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
+ AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
+ [Define to 1 if a full hosted library is built, or 0 if freestanding.])
+])
-AC_MSG_CHECKING([for install location])
-AC_MSG_RESULT($gxx_include_dir)
-AC_SUBST(glibcpp_prefixdir)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(glibcpp_toolexecdir)
-AC_SUBST(glibcpp_toolexeclibdir)
+dnl
+dnl Check for template specializations for the 'long long' type extension.
+dnl The result determines only whether 'long long' I/O is enabled; things
+dnl like numeric_limits<> specializations are always available.
+dnl
+dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
+dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
+dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
+ GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
+ if test $enable_long_long = yes; then
+ AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
+ fi
])
-# Check for functions in math library.
-# Ulrich Drepper <drepper@cygnus.com>, 1998.
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
+dnl
+dnl Check to see if building and using a C++ precompiled header can be done.
+dnl
+dnl --enable-libstdcxx-pch=yes
+dnl default, this shows intent to use stdc++.h.gch If it looks like it
+dnl may work, after some light-hearted attempts to puzzle out compiler
+dnl support, flip bits on in include/Makefile.am
+dnl
+dnl --disable-libstdcxx-pch
+dnl turns off attempts to use or build stdc++.h.gch.
+dnl
+dnl Substs:
+dnl glibcxx_PCHFLAGS
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_PCH], [
+ AC_MSG_CHECKING([for enabled PCH])
+ GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
+ AC_MSG_RESULT([$enable_libstdcxx_pch])
+
+ if test $enable_libstdcxx_pch = yes; then
+ AC_CACHE_CHECK([for compiler with PCH support],
+ [glibcxx_cv_prog_CXX_pch],
+ [ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ echo '#include <math.h>' > conftest.h
+ if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
+ -o conftest.h.gch 1>&5 2>&1 &&
+ echo '#error "pch failed"' > conftest.h &&
+ echo '#include "conftest.h"' > conftest.cc &&
+ $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
+ then
+ glibcxx_cv_prog_CXX_pch=yes
+ else
+ glibcxx_cv_prog_CXX_pch=no
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_save_CXXFLAGS
+ AC_LANG_RESTORE
+ ])
+ enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
+ fi
-dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
-AC_DEFUN(AC_REPLACE_MATHFUNCS,
-[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
-
-
-dnl This macro searches for a GNU version of make. If a match is found, the
-dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
-dnl set to "#". This is useful for including a special features in a Makefile,
-dnl which cannot be handled by other versions of make. The variable
-dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
-dnl the empty string otherwise.
-dnl
-dnl Here is an example of its use:
-dnl
-dnl Makefile.in might contain:
-dnl
-dnl # A failsafe way of putting a dependency rule into a makefile
-dnl $(DEPEND):
-dnl $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-dnl
-dnl @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-dnl @ifGNUmake@ include $(DEPEND)
-dnl @ifGNUmake@ endif
-dnl
-dnl Then configure.in would normally contain:
-dnl
-dnl CHECK_GNU_MAKE()
-dnl AC_OUTPUT(Makefile)
-dnl
-dnl Then perhaps to cause gnu make to override any other make, we could do
-dnl something like this (note that GNU make always looks for GNUmakefile first):
-dnl
-dnl if ! test x$_cv_gnu_make_command = x ; then
-dnl mv Makefile GNUmakefile
-dnl echo .DEFAULT: > Makefile ;
-dnl echo \ $_cv_gnu_make_command \$@ >> Makefile;
-dnl fi
-dnl
-dnl Then, if any (well almost any) other make is called, and GNU make also
-dnl exists, then the other make wraps the GNU make.
-dnl
-dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
-dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
-dnl
-dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
-dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
-dnl #### conditional's subshell (" --version" is not a command), using a
-dnl #### different option to grep(1).
-dnl #### -pme
-dnl #### Fixed Bourne shell portability bug (use ${MAKE-make}, not
-dnl #### ${MAKE:-make}).
-dnl #### -msokolov
-AC_DEFUN(
- GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "${MAKE-make}" make gmake gnumake ; do
- if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
- then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty
-dnl string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
+ GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
+ if test $enable_libstdcxx_pch = yes; then
+ glibcxx_PCHFLAGS="-include bits/stdc++.h"
else
- ifGNUmake='#' ;
+ glibcxx_PCHFLAGS=""
fi
- AC_SUBST(ifGNUmake)
+ AC_SUBST(glibcxx_PCHFLAGS)
])
-dnl Check for headers for, and arguments to, the setrlimit() function.
-dnl Used only in testsuite_hooks.h.
-AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT_ancilliary, [
- AC_TRY_COMPILE([#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- ], [ int f = RLIMIT_$1 ; ],
- [glibcpp_mresult=1], [glibcpp_mresult=0])
- AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcpp_mresult,
- [Only used in build directory testsuite_hooks.h.])
-])
-AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT, [
- setrlimit_have_headers=yes
- AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
- [],
- setrlimit_have_headers=no)
- # If don't have the headers, then we can't run the tests now, and we
- # won't be seeing any of these during testsuite compilation.
- if test $setrlimit_have_headers = yes; then
- # Can't do these in a loop, else the resulting syntax is wrong.
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(DATA)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(RSS)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(VMEM)
- GLIBCPP_CHECK_SETRLIMIT_ancilliary(AS)
-
- # Check for rlimit, setrlimit.
- AC_CACHE_VAL(ac_setrlimit, [
- AC_TRY_COMPILE([#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- ],
- [ struct rlimit r; setrlimit(0, &r);],
- [ac_setrlimit=yes], [ac_setrlimit=no])
- ])
+dnl
+dnl Check for exception handling support. If an explicit enable/disable
+dnl sjlj exceptions is given, we don't have to detect. Otherwise the
+dnl target may or may not support call frame exceptions.
+dnl
+dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
+dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
+dnl Neither one forces an attempt at detection.
+dnl
+dnl Defines:
+dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_SJLJ_EXCEPTIONS], [
+ AC_MSG_CHECKING([for exception model to use])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ GLIBCXX_ENABLE(sjlj-exceptions,auto,,
+ [force use of builtin_setjmp for exceptions],
+ [permit yes|no|auto])
+
+ if test $enable_sjlj_exceptions = auto; then
+ # Botheration. Now we've got to detect the exception model. Link tests
+ # against libgcc.a are problematic since we've not been given proper -L
+ # bits for single-tree newlib and libgloss.
+ #
+ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
+ cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+ S s;
+ bar();
+}
+EOF
+ old_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS=-S
+ if AC_TRY_EVAL(ac_compile); then
+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=yes
+ elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
+ fi
+ fi
+ CXXFLAGS="$old_CXXFLAGS"
+ rm -f conftest*
fi
- AC_MSG_CHECKING([for testsuite memory limit support])
- if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
- ac_mem_limits=yes
- AC_DEFINE(_GLIBCPP_MEM_LIMITS)
- else
- ac_mem_limits=no
- fi
- AC_MSG_RESULT($ac_mem_limits)
+ # This is a tad weird, for hysterical raisins. We have to map enable/disable
+ # to two different models.
+ case $enable_sjlj_exceptions in
+ yes)
+ AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
+ [Define if the compiler is configured for setjmp/longjmp exceptions.])
+ ac_exception_model_name=sjlj
+ ;;
+ no)
+ ac_exception_model_name="call frame"
+ ;;
+ *)
+ AC_MSG_ERROR([unable to detect exception model])
+ ;;
+ esac
+ AC_LANG_RESTORE
+ AC_MSG_RESULT($ac_exception_model_name)
])
dnl
-dnl Does any necessary configuration of the testsuite directory. Generates
-dnl the testsuite_hooks.h header.
+dnl Add version tags to symbols in shared library (or not), additionally
+dnl marking other symbols as private/local (or not).
dnl
-dnl GLIBCPP_CONFIGURE_TESTSUITE [no args]
-AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xfalse; then
- # Do checks for memory limit functions.
- GLIBCPP_CHECK_SETRLIMIT
+dnl --enable-symvers=style adds a version script to the linker call when
+dnl creating the shared library. The choice of version script is
+dnl controlled by 'style'.
+dnl --disable-symvers does not.
+dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
+dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
+dnl choose a default style based on linker characteristics. Passing
+dnl 'no' disables versioning.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_SYMVERS], [
+
+GLIBCXX_ENABLE(symvers,$1,[=STYLE],
+ [enables symbol versioning of the shared library],
+ [permit yes|no|gnu])
+
+# If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks...
+AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
+# FIXME The following test is too strict, in theory.
+if test $enable_shared = no ||
+ test "x$LD" = x ||
+ test x$glibcxx_gnu_ld_version = x; then
+ enable_symvers=no
+fi
- # Look for setenv, so that extended locale tests can be performed.
- GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
- fi
+# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
+if test $enable_symvers != no; then
+ AC_MSG_CHECKING([for shared libgcc])
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=' -lgcc_s'
+ AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
+ CFLAGS="$ac_save_CFLAGS"
+ AC_MSG_RESULT($glibcxx_shared_libgcc)
+fi
- # Export file names for ABI checking.
- baseline_dir="${glibcpp_srcdir}/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
- AC_SUBST(baseline_dir)
+# For GNU ld, we need at least this version. The format is described in
+# GLIBCXX_CHECK_LINKER_FEATURES above.
+glibcxx_min_gnu_ld_version=21400
+# XXXXXXXXXXX glibcxx_gnu_ld_version=21390
- # Determine if checking the ABI is desirable.
- # Only build this as native, since automake does not understand
- # CXX_FOR_BUILD.
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then
- enable_abi_check=no
+# Check to see if unspecified "yes" value can win, given results above.
+# Change "yes" into either "no" or a style name.
+if test $enable_symvers = yes; then
+ if test $with_gnu_ld = yes &&
+ test $glibcxx_shared_libgcc = yes;
+ then
+ if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
+ enable_symvers=gnu
+ else
+ # The right tools, the right setup, but too old. Fallbacks?
+ AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
+ AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
+ AC_MSG_WARN(=== You would need to upgrade your binutils to version)
+ AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
+ if test $glibcxx_gnu_ld_version -ge 21200 ; then
+ # Globbing fix is present, proper block support is not.
+ dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
+ dnl enable_symvers=???
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
+ else
+ # 2.11 or older.
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
+ fi
+ fi
else
- case "$host" in
- *-*-cygwin*)
- enable_abi_check=no ;;
- *)
- enable_abi_check=yes ;;
- esac
+ # just fail for now
+ AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
+ AC_MSG_WARN([=== either you are not using a supported linker, or you are])
+ AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
fi
- AM_CONDITIONAL(GLIBCPP_TEST_ABI, test "$enable_abi_check" = yes)
-])
+fi
+# Everything parsed; figure out what file to use.
+case $enable_symvers in
+ no)
+ SYMVER_MAP=config/linker-map.dummy
+ ;;
+ gnu)
+ SYMVER_MAP=config/linker-map.gnu
+ AC_DEFINE(_GLIBCXX_SYMVER)
+ ;;
+esac
-sinclude(../libtool.m4)
-dnl The lines below arrange for aclocal not to bring an installed
-dnl libtool.m4 into aclocal.m4, while still arranging for automake to
-dnl add a definition of LIBTOOL to Makefile.in.
-ifelse(,,,[AC_SUBST(LIBTOOL)
-AC_DEFUN([AM_PROG_LIBTOOL])
-AC_DEFUN([AC_LIBTOOL_DLOPEN])
-AC_DEFUN([AC_PROG_LD])
+AC_SUBST(SYMVER_MAP)
+AC_SUBST(port_specific_symbol_files)
+GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
+AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
])
+
dnl
-dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
+dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
+dnl We must stage the required headers so that they will be installed
+dnl with the library (unlike libgcc, the STL implementation is provided
+dnl solely within headers). Since we must not inject random user-space
+dnl macro names into user-provided C++ code, we first stage into <file>-in
+dnl and process to <file> with an output command. The reason for a two-
+dnl stage process here is to correctly handle $srcdir!=$objdir without
+dnl having to write complex code (the sed commands to clean the macro
+dnl namespace are complex and fragile enough as it is). We must also
+dnl add a relative path so that -I- is supported properly.
dnl
-
-AC_DEFUN(GLIBCPP_CHECK_S_ISREG_OR_S_IFREG, [
- AC_CACHE_VAL(glibcpp_cv_S_ISREG, [
- AC_TRY_LINK([#include <sys/stat.h>],
- [struct stat buffer; fstat(0, &buffer); S_ISREG(buffer.st_mode); ],
- [glibcpp_cv_S_ISREG=yes],
- [glibcpp_cv_S_ISREG=no])
- ])
- AC_CACHE_VAL(glibcpp_cv_S_IFREG, [
- AC_TRY_LINK([#include <sys/stat.h>],
- [struct stat buffer; fstat(0, &buffer); S_IFREG & buffer.st_mode; ],
- [glibcpp_cv_S_IFREG=yes],
- [glibcpp_cv_S_IFREG=no])
- ])
- if test x$glibcpp_cv_S_ISREG = xyes; then
- AC_DEFINE(HAVE_S_ISREG)
- elif test x$glibcpp_cv_S_IFREG = xyes; then
- AC_DEFINE(HAVE_S_IFREG)
- fi
-])
-
+dnl Substs:
+dnl glibcxx_thread_h
dnl
-dnl Check whether poll is available in <poll.h>.
+dnl Defines:
+dnl HAVE_GTHR_DEFAULT
dnl
+AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
+ AC_MSG_CHECKING([for thread model used by GCC])
+ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+ AC_MSG_RESULT([$target_thread_file])
-AC_DEFUN(GLIBCPP_CHECK_POLL, [
- AC_CACHE_VAL(glibcpp_cv_POLL, [
- AC_TRY_COMPILE([#include <poll.h>],
- [struct pollfd pfd[1]; pfd[0].events = POLLIN; poll(pfd, 1, 0); ],
- [glibcpp_cv_POLL=yes],
- [glibcpp_cv_POLL=no])
- ])
- if test x$glibcpp_cv_POLL = xyes; then
- AC_DEFINE(HAVE_POLL)
+ if test $target_thread_file != single; then
+ AC_DEFINE(HAVE_GTHR_DEFAULT)
fi
+
+ glibcxx_thread_h=gthr-$target_thread_file.h
+ AC_SUBST(glibcxx_thread_h)
])
+
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
@@ -2219,8 +1715,7 @@ AC_DEFUN(GLIBCPP_CHECK_POLL, [
# Please note that the actual code is *not* freely available.
# serial 1
-
-AC_DEFUN(AC_LC_MESSAGES, [
+AC_DEFUN([AC_LC_MESSAGES], [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
@@ -2232,165 +1727,151 @@ AC_DEFUN(AC_LC_MESSAGES, [
])
-dnl
-dnl Check for whether the Boost-derived checks should be turned on.
-dnl
-dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
-dnl --enable-concept-checks turns them on.
-dnl --disable-concept-checks leaves them off.
-dnl + Usage: GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
-define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(concept-checks,
-changequote(<<, >>)dnl
-<< --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_concept_checks=yes ;;
- no) enable_concept_checks=no ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
- esac],
-enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
-dnl Option parsed, now set things appropriately
-if test x"$enable_concept_checks" = xyes; then
- AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
-fi
+sinclude([../libtool.m4])
+dnl The lines below arrange for aclocal not to bring an installed
+dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+dnl add a definition of LIBTOOL to Makefile.in.
+ifelse(,,,[AC_SUBST(LIBTOOL)
+AC_DEFUN([AM_PROG_LIBTOOL])
+AC_DEFUN([AC_LIBTOOL_DLOPEN])
+AC_DEFUN([AC_PROG_LD])
])
+dnl vim:et:ts=2:sw=2
-dnl
-dnl Add version tags to symbols in shared library (or not), additionally
-dnl marking other symbols as private/local (or not).
-dnl
-dnl GLIBCPP_ENABLE_SYMVERS
-dnl --enable-symvers=style adds a version script to the linker call when
-dnl creating the shared library. The choice of version script is
-dnl controlled by 'style'.
-dnl --disable-symvers does not.
-dnl + Usage: GLIBCPP_ENABLE_SYMVERS[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
-dnl defaults to `no'. Passing `yes' tries to choose a default style
-dnl based on linker characteristics. Passing 'no' disables versioning.
-AC_DEFUN(GLIBCPP_ENABLE_SYMVERS, [dnl
-define([GLIBCPP_ENABLE_SYMVERS_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_ARG_ENABLE(symvers,
-changequote(<<, >>)dnl
-<< --enable-symvers=style enables symbol versioning of the shared library [default=>>GLIBCPP_ENABLE_SYMVERS_DEFAULT],
-changequote([, ])dnl
-[case "$enableval" in
- yes) enable_symvers=yes ;;
- no) enable_symvers=no ;;
- # other names here, just as sanity checks
- #gnu|sun|etcetera) enable_symvers=$enableval ;;
- gnu) enable_symvers=$enableval ;;
- *) AC_MSG_ERROR([Unknown argument to enable/disable symvers]) ;;
- esac],
-enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl
+# AM_CONDITIONAL -*- Autoconf -*-
-# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
-# don't know enough about $LD to do tricks...
-if test x$enable_shared = xno ||
- test "x$LD" = x ||
- test x$glibcpp_gnu_ld_version = x; then
- enable_symvers=no
-fi
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
-# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
-if test $enable_symvers != no; then
- AC_MSG_CHECKING([for shared libgcc])
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=' -lgcc_s'
- AC_TRY_LINK(, [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
- CFLAGS="$ac_save_CFLAGS"
- AC_MSG_RESULT($glibcpp_shared_libgcc)
-fi
+# This program 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.
-# For GNU ld, we need at least this version. It's 2.12 in the same format
-# as the tested-for version. See GLIBCPP_CHECK_LINKER_FEATURES for more.
-glibcpp_min_gnu_ld_version=21200
+# This program 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.
-# Check to see if unspecified "yes" value can win, given results
-# above.
-if test $enable_symvers = yes ; then
- if test $with_gnu_ld = yes &&
- test $glibcpp_shared_libgcc = yes ;
- then
- if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
- enable_symvers=gnu
- else
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-shared -Wl,--version-script,conftest.map'
- enable_symvers=no
- changequote(,)
- echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
- changequote([,])
- AC_TRY_LINK([int foo;],, enable_symvers=gnu)
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- rm -f conftest.map
- fi
- else
- # just fail for now
- enable_symvers=no
- fi
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
-dnl Everything parsed; figure out what file to use.
-case $enable_symvers in
- no)
- SYMVER_MAP=config/linker-map.dummy
- ;;
- gnu)
- SYMVER_MAP=config/linker-map.gnu
- AC_DEFINE(_GLIBCPP_SYMVER)
- ;;
-esac
+# Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-AC_SUBST(SYMVER_MAP)
-AM_CONDITIONAL(GLIBCPP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
-AC_MSG_CHECKING([versioning on shared library symbols])
-AC_MSG_RESULT($enable_symvers)
-])
+# This program 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 program 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.
-# isc-posix.m4 serial 2 (gettext-0.11.2)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
-# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+# serial 3
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
+# ---------------------------------------------------
+# Add --enable-multilib to configure.
+AC_DEFUN([AM_ENABLE_MULTILIB],
+[# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[ --enable-multilib build many library versions (default)],
+[case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+ [multilib=yes])
-undefine([AC_ISC_POSIX])
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../$2"
+ else
+ multi_basedir="$srcdir/$with_multisrctop$2"
+ fi
+else
+ multi_basedir="$srcdir/$2"
+fi
+AC_SUBST(multi_basedir)
+
+AC_OUTPUT_COMMANDS([
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" ]m4_default([$1],Makefile)[ "*)
+ ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+ ;;
+esac],
+ [
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"])])dnl
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
-# serial 1
+# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@@ -2400,59 +1881,139 @@ AC_DEFUN([AM_MAINTAINER_MODE],
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
-# Define a conditional.
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
+# Do all the work for Automake. -*- Autoconf -*-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
-# serial 1
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright 2002 Free Software Foundation, Inc.
@@ -2474,37 +2035,103 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
+ [AM_AUTOMAKE_VERSION([1.7.8])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
#
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -2514,7 +2141,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -2523,45 +2150,521 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-rm -f conftest*
AC_MSG_RESULT(yes)])
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
fi
-AC_SUBST($1)])
+])
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
diff --git a/contrib/libstdc++/config.h.in b/contrib/libstdc++/config.h.in
index 4d9dec3..bef3e8c 100644
--- a/contrib/libstdc++/config.h.in
+++ b/contrib/libstdc++/config.h.in
@@ -1,45 +1,71 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+// Defines libstdc++ version.
+#undef PACKAGE
+#undef VERSION
-// Define if GCC supports weak symbols.
-#undef _GLIBCPP_SUPPORTS_WEAK
+// Needed for gettext.
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_STPCPY
// Include I/O support for 'long long' and 'unsigned long long'.
-#undef _GLIBCPP_USE_LONG_LONG
+#undef _GLIBCXX_USE_LONG_LONG
+
+// Include support for 'long double'.
+#undef _GLIBCXX_USE_LONG_DOUBLE
+
+// Define if C99 math functions (like fpclassify) should be exposed.
+#undef _GLIBCXX_USE_C99_MATH
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
-#undef _GLIBCPP_USE_C99
+#undef _GLIBCXX_USE_C99
// Define if code specialized for wchar_t should be used.
-#undef _GLIBCPP_USE_WCHAR_T
+#undef _GLIBCXX_USE_WCHAR_T
-// Define if using setrlimit to limit memory usage during 'make check'.
-#undef _GLIBCPP_MEM_LIMITS
+// Define if using setrlimit to set resource limits during 'make check'.
+#undef _GLIBCXX_RES_LIMITS
// Define to use concept checking code from the boost libraries.
-#undef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCXX_CONCEPT_CHECKS
// Define to use symbol versioning in the shared library.
-#undef _GLIBCPP_SYMVER
+#undef _GLIBCXX_SYMVER
// Define symbol versioning in assember directives. If symbol
// versioning is beigng used, and the assembler supports this kind of
// thing, then use it.
-// NB: _GLIBCPP_AT_AT is a hack to work around quoting issues in m4.
-#if _GLIBCPP_SYMVER
- #define _GLIBCPP_ASM_SYMVER(cur, old, version) \
- asm (".symver " #cur "," #old _GLIBCPP_AT_AT #version);
+// NB: _GLIBCXX_AT_AT is a hack to work around quoting issues in m4.
+#if _GLIBCXX_SYMVER
+ #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
+ asm (".symver " #cur "," #old _GLIBCXX_AT_AT #version);
#else
- #define _GLIBCPP_ASM_SYMVER(cur, old, version)
+ #define _GLIBCXX_ASM_SYMVER(cur, old, version)
#endif
+// Define if LFS support is available.
+#undef _GLIBCXX_USE_LFS
+
+// Define if NLS translations are to be used.
+#undef _GLIBCXX_USE_NLS
+
// Define if gthr-default.h exists (meaning that threading support is enabled).
#undef HAVE_GTHR_DEFAULT
-// Define if drand48 exists.
-#undef HAVE_DRAND48
+// Define if the atan2f function exists.
+#undef HAVE_ATAN2F
+
+// Define if the atan2l function exists.
+#undef HAVE_ATAN2L
+
+// Define if the tanl function exists.
+#undef HAVE_TANL
+
+// Define if the copysignf function exists.
+#undef HAVE_COPYSIGNF
// Define if getpagesize exists.
#undef HAVE_GETPAGESIZE
@@ -65,6 +91,9 @@
// Define if you have the expl function.
#undef HAVE_EXPL
+// Define if you have the hypot function.
+#undef HAVE_HYPOT
+
// Define if you have the hypotf function.
#undef HAVE_HYPOTF
@@ -122,696 +151,741 @@
// Define if S_IFREG is available in <sys/stat.h>.
#undef HAVE_S_IFREG
-// Define if LC_MESSAGES is available in <locale.h>.
-#undef HAVE_LC_MESSAGES
+// Define if writev is available in <sys/uio.h>.
+#undef HAVE_WRITEV
-/* Define if you have the __signbit function. */
-#undef HAVE___SIGNBIT
+// Define if int64_t is available in <stdint.h>.
+#undef HAVE_INT64_T
-/* Define if you have the __signbitf function. */
-#undef HAVE___SIGNBITF
-
-/* Define if you have the __signbitl function. */
-#undef HAVE___SIGNBITL
-
-/* Define if you have the _acosf function. */
-#undef HAVE__ACOSF
-
-/* Define if you have the _acosl function. */
-#undef HAVE__ACOSL
-
-/* Define if you have the _asinf function. */
-#undef HAVE__ASINF
-
-/* Define if you have the _asinl function. */
-#undef HAVE__ASINL
-
-/* Define if you have the _atan2f function. */
-#undef HAVE__ATAN2F
-
-/* Define if you have the _atan2l function. */
-#undef HAVE__ATAN2L
-
-/* Define if you have the _atanf function. */
-#undef HAVE__ATANF
-
-/* Define if you have the _atanl function. */
-#undef HAVE__ATANL
-
-/* Define if you have the _ceilf function. */
-#undef HAVE__CEILF
-
-/* Define if you have the _ceill function. */
-#undef HAVE__CEILL
-
-/* Define if you have the _copysign function. */
-#undef HAVE__COPYSIGN
-
-/* Define if you have the _copysignl function. */
-#undef HAVE__COPYSIGNL
-
-/* Define if you have the _cosf function. */
-#undef HAVE__COSF
-
-/* Define if you have the _coshf function. */
-#undef HAVE__COSHF
-
-/* Define if you have the _coshl function. */
-#undef HAVE__COSHL
-
-/* Define if you have the _cosl function. */
-#undef HAVE__COSL
-
-/* Define if you have the _expf function. */
-#undef HAVE__EXPF
-
-/* Define if you have the _expl function. */
-#undef HAVE__EXPL
-
-/* Define if you have the _fabsf function. */
-#undef HAVE__FABSF
-
-/* Define if you have the _fabsl function. */
-#undef HAVE__FABSL
-
-/* Define if you have the _finite function. */
-#undef HAVE__FINITE
-
-/* Define if you have the _finitef function. */
-#undef HAVE__FINITEF
-
-/* Define if you have the _finitel function. */
-#undef HAVE__FINITEL
-
-/* Define if you have the _floorf function. */
-#undef HAVE__FLOORF
-
-/* Define if you have the _floorl function. */
-#undef HAVE__FLOORL
-
-/* Define if you have the _fmodf function. */
-#undef HAVE__FMODF
-
-/* Define if you have the _fmodl function. */
-#undef HAVE__FMODL
-
-/* Define if you have the _fpclass function. */
-#undef HAVE__FPCLASS
-
-/* Define if you have the _frexpf function. */
-#undef HAVE__FREXPF
-
-/* Define if you have the _frexpl function. */
-#undef HAVE__FREXPL
-
-/* Define if you have the _hypot function. */
-#undef HAVE__HYPOT
-
-/* Define if you have the _hypotf function. */
-#undef HAVE__HYPOTF
-
-/* Define if you have the _hypotl function. */
-#undef HAVE__HYPOTL
-
-/* Define if you have the _isinf function. */
-#undef HAVE__ISINF
-
-/* Define if you have the _isinff function. */
-#undef HAVE__ISINFF
-
-/* Define if you have the _isinfl function. */
-#undef HAVE__ISINFL
-
-/* Define if you have the _isnan function. */
-#undef HAVE__ISNAN
-
-/* Define if you have the _isnanf function. */
-#undef HAVE__ISNANF
-
-/* Define if you have the _isnanl function. */
-#undef HAVE__ISNANL
-
-/* Define if you have the _ldexpf function. */
-#undef HAVE__LDEXPF
-
-/* Define if you have the _ldexpl function. */
-#undef HAVE__LDEXPL
-
-/* Define if you have the _log10f function. */
-#undef HAVE__LOG10F
-
-/* Define if you have the _log10l function. */
-#undef HAVE__LOG10L
-
-/* Define if you have the _logf function. */
-#undef HAVE__LOGF
-
-/* Define if you have the _logl function. */
-#undef HAVE__LOGL
-
-/* Define if you have the _modff function. */
-#undef HAVE__MODFF
-
-/* Define if you have the _modfl function. */
-#undef HAVE__MODFL
-
-/* Define if you have the _powf function. */
-#undef HAVE__POWF
-
-/* Define if you have the _powl function. */
-#undef HAVE__POWL
-
-/* Define if you have the _qfpclass function. */
-#undef HAVE__QFPCLASS
-
-/* Define if you have the _sincos function. */
-#undef HAVE__SINCOS
-
-/* Define if you have the _sincosf function. */
-#undef HAVE__SINCOSF
-
-/* Define if you have the _sincosl function. */
-#undef HAVE__SINCOSL
-
-/* Define if you have the _sinf function. */
-#undef HAVE__SINF
-
-/* Define if you have the _sinhf function. */
-#undef HAVE__SINHF
-
-/* Define if you have the _sinhl function. */
-#undef HAVE__SINHL
-
-/* Define if you have the _sinl function. */
-#undef HAVE__SINL
-
-/* Define if you have the _sqrtf function. */
-#undef HAVE__SQRTF
-
-/* Define if you have the _sqrtl function. */
-#undef HAVE__SQRTL
-
-/* Define if you have the _tanf function. */
-#undef HAVE__TANF
+// Define if LC_MESSAGES is available in <locale.h>.
+#undef HAVE_LC_MESSAGES
-/* Define if you have the _tanhf function. */
-#undef HAVE__TANHF
+// Define if <float.h> exists.
+#undef HAVE_FLOAT_H
-/* Define if you have the _tanhl function. */
-#undef HAVE__TANHL
+// Define if modf is present in <math.h>
+#undef HAVE_MODF
-/* Define if you have the _tanl function. */
-#undef HAVE__TANL
-/* Define if you have the acosf function. */
+/* Define to 1 if you have the `acosf' function. */
#undef HAVE_ACOSF
-/* Define if you have the acosl function. */
+/* Define to 1 if you have the `acosl' function. */
#undef HAVE_ACOSL
-/* Define if you have the asinf function. */
+/* Define to 1 if you have the `asinf' function. */
#undef HAVE_ASINF
-/* Define if you have the asinl function. */
+/* Define to 1 if you have the `asinl' function. */
#undef HAVE_ASINL
-/* Define if you have the atan2f function. */
+/* Define to 1 if you have the `atan2f' function. */
#undef HAVE_ATAN2F
-/* Define if you have the atan2l function. */
+/* Define to 1 if you have the `atan2l' function. */
#undef HAVE_ATAN2L
-/* Define if you have the atanf function. */
+/* Define to 1 if you have the `atanf' function. */
#undef HAVE_ATANF
-/* Define if you have the atanl function. */
+/* Define to 1 if you have the `atanl' function. */
#undef HAVE_ATANL
-/* Define if you have the btowc function. */
+/* Define to 1 if you have the `btowc' function. */
#undef HAVE_BTOWC
-/* Define if you have the ceilf function. */
+/* Define to 1 if you have the `ceilf' function. */
#undef HAVE_CEILF
-/* Define if you have the ceill function. */
+/* Define to 1 if you have the `ceill' function. */
#undef HAVE_CEILL
-/* Define if you have the copysign function. */
+/* Define to 1 if you have the `copysign' function. */
#undef HAVE_COPYSIGN
-/* Define if you have the copysignf function. */
+/* Define to 1 if you have the `copysignf' function. */
#undef HAVE_COPYSIGNF
-/* Define if you have the copysignl function. */
+/* Define to 1 if you have the `copysignl' function. */
#undef HAVE_COPYSIGNL
-/* Define if you have the cosf function. */
+/* Define to 1 if you have the `cosf' function. */
#undef HAVE_COSF
-/* Define if you have the coshf function. */
+/* Define to 1 if you have the `coshf' function. */
#undef HAVE_COSHF
-/* Define if you have the coshl function. */
+/* Define to 1 if you have the `coshl' function. */
#undef HAVE_COSHL
-/* Define if you have the cosl function. */
+/* Define to 1 if you have the `cosl' function. */
#undef HAVE_COSL
-/* Define if you have the drand48 function. */
-#undef HAVE_DRAND48
+/* Define to 1 if you have the <endian.h> header file. */
+#undef HAVE_ENDIAN_H
-/* Define if you have the expf function. */
+/* Define to 1 if you have the `expf' function. */
#undef HAVE_EXPF
-/* Define if you have the expl function. */
+/* Define to 1 if you have the `expl' function. */
#undef HAVE_EXPL
-/* Define if you have the fabsf function. */
+/* Define to 1 if you have the `fabsf' function. */
#undef HAVE_FABSF
-/* Define if you have the fabsl function. */
+/* Define to 1 if you have the `fabsl' function. */
#undef HAVE_FABSL
-/* Define if you have the fgetwc function. */
+/* Define to 1 if you have the `fgetwc' function. */
#undef HAVE_FGETWC
-/* Define if you have the fgetws function. */
+/* Define to 1 if you have the `fgetws' function. */
#undef HAVE_FGETWS
-/* Define if you have the finite function. */
+/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
-/* Define if you have the finitef function. */
+/* Define to 1 if you have the `finitef' function. */
#undef HAVE_FINITEF
-/* Define if you have the finitel function. */
+/* Define to 1 if you have the `finitel' function. */
#undef HAVE_FINITEL
-/* Define if you have the floorf function. */
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `floorf' function. */
#undef HAVE_FLOORF
-/* Define if you have the floorl function. */
+/* Define to 1 if you have the `floorl' function. */
#undef HAVE_FLOORL
-/* Define if you have the fmodf function. */
+/* Define to 1 if you have the `fmodf' function. */
#undef HAVE_FMODF
-/* Define if you have the fmodl function. */
+/* Define to 1 if you have the `fmodl' function. */
#undef HAVE_FMODL
-/* Define if you have the fpclass function. */
+/* Define to 1 if you have the `fpclass' function. */
#undef HAVE_FPCLASS
-/* Define if you have the fputwc function. */
+/* Define to 1 if you have the `fputwc' function. */
#undef HAVE_FPUTWC
-/* Define if you have the fputws function. */
+/* Define to 1 if you have the `fputws' function. */
#undef HAVE_FPUTWS
-/* Define if you have the frexpf function. */
+/* Define to 1 if you have the <fp.h> header file. */
+#undef HAVE_FP_H
+
+/* Define to 1 if you have the `frexpf' function. */
#undef HAVE_FREXPF
-/* Define if you have the frexpl function. */
+/* Define to 1 if you have the `frexpl' function. */
#undef HAVE_FREXPL
-/* Define if you have the fwide function. */
+/* Define to 1 if you have the `fwide' function. */
#undef HAVE_FWIDE
-/* Define if you have the fwprintf function. */
+/* Define to 1 if you have the `fwprintf' function. */
#undef HAVE_FWPRINTF
-/* Define if you have the fwscanf function. */
+/* Define to 1 if you have the `fwscanf' function. */
#undef HAVE_FWSCANF
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the <gconv.h> header file. */
+#undef HAVE_GCONV_H
+
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the getwc function. */
+/* Define to 1 if you have the `getwc' function. */
#undef HAVE_GETWC
-/* Define if you have the getwchar function. */
+/* Define to 1 if you have the `getwchar' function. */
#undef HAVE_GETWCHAR
-/* Define if you have the hypot function. */
+/* Define to 1 if you have the `hypot' function. */
#undef HAVE_HYPOT
-/* Define if you have the hypotf function. */
+/* Define to 1 if you have the `hypotf' function. */
#undef HAVE_HYPOTF
-/* Define if you have the hypotl function. */
+/* Define to 1 if you have the `hypotl' function. */
#undef HAVE_HYPOTL
-/* Define if you have the iconv function. */
+/* Define to 1 if you have the `iconv' function. */
#undef HAVE_ICONV
-/* Define if you have the iconv_close function. */
+/* Define to 1 if you have the `iconv_close' function. */
#undef HAVE_ICONV_CLOSE
-/* Define if you have the iconv_open function. */
+/* Define to 1 if you have the `iconv_open' function. */
#undef HAVE_ICONV_OPEN
-/* Define if you have the isatty function. */
-#undef HAVE_ISATTY
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the isinf function. */
+/* Define to 1 if you have the `isinf' function. */
#undef HAVE_ISINF
-/* Define if you have the isinff function. */
+/* Define to 1 if you have the `isinff' function. */
#undef HAVE_ISINFF
-/* Define if you have the isinfl function. */
+/* Define to 1 if you have the `isinfl' function. */
#undef HAVE_ISINFL
-/* Define if you have the isnan function. */
+/* Define to 1 if you have the `isnan' function. */
#undef HAVE_ISNAN
-/* Define if you have the isnanf function. */
+/* Define to 1 if you have the `isnanf' function. */
#undef HAVE_ISNANF
-/* Define if you have the isnanl function. */
+/* Define to 1 if you have the `isnanl' function. */
#undef HAVE_ISNANL
-/* Define if you have the ldexpf function. */
+/* Define to 1 if you have the `iswblank' function. */
+#undef HAVE_ISWBLANK
+
+/* Define to 1 if you have the `ldexpf' function. */
#undef HAVE_LDEXPF
-/* Define if you have the ldexpl function. */
+/* Define to 1 if you have the `ldexpl' function. */
#undef HAVE_LDEXPL
-/* Define if you have the log10f function. */
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_LIMIT_AS
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_LIMIT_DATA
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_LIMIT_FSIZE
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_LIMIT_RSS
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_LIMIT_VMEM
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if you have the `log10f' function. */
#undef HAVE_LOG10F
-/* Define if you have the log10l function. */
+/* Define to 1 if you have the `log10l' function. */
#undef HAVE_LOG10L
-/* Define if you have the logf function. */
+/* Define to 1 if you have the `logf' function. */
#undef HAVE_LOGF
-/* Define if you have the logl function. */
+/* Define to 1 if you have the `logl' function. */
#undef HAVE_LOGL
-/* Define if you have the mbrlen function. */
+/* Define to 1 if you have the <machine/endian.h> header file. */
+#undef HAVE_MACHINE_ENDIAN_H
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+#undef HAVE_MACHINE_PARAM_H
+
+/* Define to 1 if you have the `mbrlen' function. */
#undef HAVE_MBRLEN
-/* Define if you have the mbrtowc function. */
+/* Define to 1 if you have the `mbrtowc' function. */
#undef HAVE_MBRTOWC
-/* Define if you have the mbsinit function. */
+/* Define to 1 if you have the `mbsinit' function. */
#undef HAVE_MBSINIT
-/* Define if you have the mbsrtowcs function. */
+/* Define to 1 if you have the `mbsrtowcs' function. */
#undef HAVE_MBSRTOWCS
-/* Define if you have the modff function. */
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `modff' function. */
#undef HAVE_MODFF
-/* Define if you have the modfl function. */
+/* Define to 1 if you have the `modfl' function. */
#undef HAVE_MODFL
-/* Define if you have the nan function. */
-#undef HAVE_NAN
+/* Define to 1 if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
-/* Define if you have the nl_langinfo function. */
+/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
-/* Define if you have the powf function. */
+/* Define to 1 if you have the `powf' function. */
#undef HAVE_POWF
-/* Define if you have the powl function. */
+/* Define to 1 if you have the `powl' function. */
#undef HAVE_POWL
-/* Define if you have the putwc function. */
+/* Define to 1 if you have the `putwc' function. */
#undef HAVE_PUTWC
-/* Define if you have the putwchar function. */
+/* Define to 1 if you have the `putwchar' function. */
#undef HAVE_PUTWCHAR
-/* Define if you have the qfpclass function. */
+/* Define to 1 if you have the `qfpclass' function. */
#undef HAVE_QFPCLASS
-/* Define if you have the setenv function. */
+/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
-/* Define if you have the sincos function. */
+/* Define if sigsetjmp is available. */
+#undef HAVE_SIGSETJMP
+
+/* Define to 1 if you have the `sincos' function. */
#undef HAVE_SINCOS
-/* Define if you have the sincosf function. */
+/* Define to 1 if you have the `sincosf' function. */
#undef HAVE_SINCOSF
-/* Define if you have the sincosl function. */
+/* Define to 1 if you have the `sincosl' function. */
#undef HAVE_SINCOSL
-/* Define if you have the sinf function. */
+/* Define to 1 if you have the `sinf' function. */
#undef HAVE_SINF
-/* Define if you have the sinhf function. */
+/* Define to 1 if you have the `sinhf' function. */
#undef HAVE_SINHF
-/* Define if you have the sinhl function. */
+/* Define to 1 if you have the `sinhl' function. */
#undef HAVE_SINHL
-/* Define if you have the sinl function. */
+/* Define to 1 if you have the `sinl' function. */
#undef HAVE_SINL
-/* Define if you have the sqrtf function. */
+/* Define to 1 if you have the `sqrtf' function. */
#undef HAVE_SQRTF
-/* Define if you have the sqrtl function. */
+/* Define to 1 if you have the `sqrtl' function. */
#undef HAVE_SQRTL
-/* Define if you have the strtof function. */
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strtof' function. */
#undef HAVE_STRTOF
-/* Define if you have the strtold function. */
+/* Define to 1 if you have the `strtold' function. */
#undef HAVE_STRTOLD
-/* Define if you have the swprintf function. */
+/* Define to 1 if you have the `swprintf' function. */
#undef HAVE_SWPRINTF
-/* Define if you have the swscanf function. */
+/* Define to 1 if you have the `swscanf' function. */
#undef HAVE_SWSCANF
-/* Define if you have the tanf function. */
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+#undef HAVE_SYS_ISA_DEFS_H
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+#undef HAVE_SYS_MACHINE_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
+/* Define to 1 if you have the `tanf' function. */
#undef HAVE_TANF
-/* Define if you have the tanhf function. */
+/* Define to 1 if you have the `tanhf' function. */
#undef HAVE_TANHF
-/* Define if you have the tanhl function. */
+/* Define to 1 if you have the `tanhl' function. */
#undef HAVE_TANHL
-/* Define if you have the tanl function. */
+/* Define to 1 if you have the `tanl' function. */
#undef HAVE_TANL
-/* Define if you have the ungetwc function. */
+/* Define to 1 if you have the `ungetwc' function. */
#undef HAVE_UNGETWC
-/* Define if you have the vfwprintf function. */
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vfwprintf' function. */
#undef HAVE_VFWPRINTF
-/* Define if you have the vfwscanf function. */
+/* Define to 1 if you have the `vfwscanf' function. */
#undef HAVE_VFWSCANF
-/* Define if you have the vswprintf function. */
+/* Define to 1 if you have the `vswprintf' function. */
#undef HAVE_VSWPRINTF
-/* Define if you have the vswscanf function. */
+/* Define to 1 if you have the `vswscanf' function. */
#undef HAVE_VSWSCANF
-/* Define if you have the vwprintf function. */
+/* Define to 1 if you have the `vwprintf' function. */
#undef HAVE_VWPRINTF
-/* Define if you have the vwscanf function. */
+/* Define to 1 if you have the `vwscanf' function. */
#undef HAVE_VWSCANF
-/* Define if you have the wcrtomb function. */
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
-/* Define if you have the wcscat function. */
+/* Define to 1 if you have the `wcscat' function. */
#undef HAVE_WCSCAT
-/* Define if you have the wcschr function. */
+/* Define to 1 if you have the `wcschr' function. */
#undef HAVE_WCSCHR
-/* Define if you have the wcscmp function. */
+/* Define to 1 if you have the `wcscmp' function. */
#undef HAVE_WCSCMP
-/* Define if you have the wcscoll function. */
+/* Define to 1 if you have the `wcscoll' function. */
#undef HAVE_WCSCOLL
-/* Define if you have the wcscpy function. */
+/* Define to 1 if you have the `wcscpy' function. */
#undef HAVE_WCSCPY
-/* Define if you have the wcscspn function. */
+/* Define to 1 if you have the `wcscspn' function. */
#undef HAVE_WCSCSPN
-/* Define if you have the wcsftime function. */
+/* Define to 1 if you have the `wcsftime' function. */
#undef HAVE_WCSFTIME
-/* Define if you have the wcslen function. */
+/* Define to 1 if you have the `wcslen' function. */
#undef HAVE_WCSLEN
-/* Define if you have the wcsncat function. */
+/* Define to 1 if you have the `wcsncat' function. */
#undef HAVE_WCSNCAT
-/* Define if you have the wcsncmp function. */
+/* Define to 1 if you have the `wcsncmp' function. */
#undef HAVE_WCSNCMP
-/* Define if you have the wcsncpy function. */
+/* Define to 1 if you have the `wcsncpy' function. */
#undef HAVE_WCSNCPY
-/* Define if you have the wcspbrk function. */
+/* Define to 1 if you have the `wcspbrk' function. */
#undef HAVE_WCSPBRK
-/* Define if you have the wcsrchr function. */
+/* Define to 1 if you have the `wcsrchr' function. */
#undef HAVE_WCSRCHR
-/* Define if you have the wcsrtombs function. */
+/* Define to 1 if you have the `wcsrtombs' function. */
#undef HAVE_WCSRTOMBS
-/* Define if you have the wcsspn function. */
+/* Define to 1 if you have the `wcsspn' function. */
#undef HAVE_WCSSPN
-/* Define if you have the wcsstr function. */
+/* Define to 1 if you have the `wcsstr' function. */
#undef HAVE_WCSSTR
-/* Define if you have the wcstod function. */
+/* Define to 1 if you have the `wcstod' function. */
#undef HAVE_WCSTOD
-/* Define if you have the wcstof function. */
+/* Define to 1 if you have the `wcstof' function. */
#undef HAVE_WCSTOF
-/* Define if you have the wcstok function. */
+/* Define to 1 if you have the `wcstok' function. */
#undef HAVE_WCSTOK
-/* Define if you have the wcstol function. */
+/* Define to 1 if you have the `wcstol' function. */
#undef HAVE_WCSTOL
-/* Define if you have the wcstoul function. */
+/* Define to 1 if you have the `wcstoul' function. */
#undef HAVE_WCSTOUL
-/* Define if you have the wcsxfrm function. */
+/* Define to 1 if you have the `wcsxfrm' function. */
#undef HAVE_WCSXFRM
-/* Define if you have the wctob function. */
+/* Define to 1 if you have the `wctob' function. */
#undef HAVE_WCTOB
-/* Define if you have the wmemchr function. */
+/* Define to 1 if you have the <wctype.h> header file. */
+#undef HAVE_WCTYPE_H
+
+/* Define to 1 if you have the `wmemchr' function. */
#undef HAVE_WMEMCHR
-/* Define if you have the wmemcmp function. */
+/* Define to 1 if you have the `wmemcmp' function. */
#undef HAVE_WMEMCMP
-/* Define if you have the wmemcpy function. */
+/* Define to 1 if you have the `wmemcpy' function. */
#undef HAVE_WMEMCPY
-/* Define if you have the wmemmove function. */
+/* Define to 1 if you have the `wmemmove' function. */
#undef HAVE_WMEMMOVE
-/* Define if you have the wmemset function. */
+/* Define to 1 if you have the `wmemset' function. */
#undef HAVE_WMEMSET
-/* Define if you have the wprintf function. */
+/* Define to 1 if you have the `wprintf' function. */
#undef HAVE_WPRINTF
-/* Define if you have the wscanf function. */
+/* Define to 1 if you have the `wscanf' function. */
#undef HAVE_WSCANF
-/* Define if you have the <endian.h> header file. */
-#undef HAVE_ENDIAN_H
+/* Define to 1 if you have the `_acosf' function. */
+#undef HAVE__ACOSF
-/* Define if you have the <float.h> header file. */
-#undef HAVE_FLOAT_H
+/* Define to 1 if you have the `_acosl' function. */
+#undef HAVE__ACOSL
-/* Define if you have the <fp.h> header file. */
-#undef HAVE_FP_H
+/* Define to 1 if you have the `_asinf' function. */
+#undef HAVE__ASINF
-/* Define if you have the <gconv.h> header file. */
-#undef HAVE_GCONV_H
+/* Define to 1 if you have the `_asinl' function. */
+#undef HAVE__ASINL
-/* Define if you have the <ieeefp.h> header file. */
-#undef HAVE_IEEEFP_H
+/* Define to 1 if you have the `_atan2f' function. */
+#undef HAVE__ATAN2F
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `_atan2l' function. */
+#undef HAVE__ATAN2L
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the `_atanf' function. */
+#undef HAVE__ATANF
-/* Define if you have the <machine/endian.h> header file. */
-#undef HAVE_MACHINE_ENDIAN_H
+/* Define to 1 if you have the `_atanl' function. */
+#undef HAVE__ATANL
-/* Define if you have the <machine/param.h> header file. */
-#undef HAVE_MACHINE_PARAM_H
+/* Define to 1 if you have the `_ceilf' function. */
+#undef HAVE__CEILF
-/* Define if you have the <nan.h> header file. */
-#undef HAVE_NAN_H
+/* Define to 1 if you have the `_ceill' function. */
+#undef HAVE__CEILL
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `_copysign' function. */
+#undef HAVE__COPYSIGN
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define to 1 if you have the `_copysignl' function. */
+#undef HAVE__COPYSIGNL
-/* Define if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
+/* Define to 1 if you have the `_cosf' function. */
+#undef HAVE__COSF
-/* Define if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the `_coshf' function. */
+#undef HAVE__COSHF
-/* Define if you have the <sys/isa_defs.h> header file. */
-#undef HAVE_SYS_ISA_DEFS_H
+/* Define to 1 if you have the `_coshl' function. */
+#undef HAVE__COSHL
-/* Define if you have the <sys/machine.h> header file. */
-#undef HAVE_SYS_MACHINE_H
+/* Define to 1 if you have the `_cosl' function. */
+#undef HAVE__COSL
-/* Define if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
+/* Define to 1 if you have the `_expf' function. */
+#undef HAVE__EXPF
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the `_expl' function. */
+#undef HAVE__EXPL
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+/* Define to 1 if you have the `_fabsf' function. */
+#undef HAVE__FABSF
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the `_fabsl' function. */
+#undef HAVE__FABSL
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `_finite' function. */
+#undef HAVE__FINITE
-/* Define if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
+/* Define to 1 if you have the `_finitef' function. */
+#undef HAVE__FINITEF
-/* Define if you have the <wctype.h> header file. */
-#undef HAVE_WCTYPE_H
+/* Define to 1 if you have the `_finitel' function. */
+#undef HAVE__FINITEL
-/* Define if you have the m library (-lm). */
-#undef HAVE_LIBM
+/* Define to 1 if you have the `_floorf' function. */
+#undef HAVE__FLOORF
-/* Name of package */
-#undef PACKAGE
+/* Define to 1 if you have the `_floorl' function. */
+#undef HAVE__FLOORL
-/* Version number of package */
-#undef VERSION
+/* Define to 1 if you have the `_fmodf' function. */
+#undef HAVE__FMODF
-/* Define if the compiler is configured for setjmp/longjmp exceptions. */
-#undef _GLIBCPP_SJLJ_EXCEPTIONS
+/* Define to 1 if you have the `_fmodl' function. */
+#undef HAVE__FMODL
-/* Define if sigsetjmp is available. */
-#undef HAVE_SIGSETJMP
+/* Define to 1 if you have the `_fpclass' function. */
+#undef HAVE__FPCLASS
-/* Only used in build directory testsuite_hooks.h. */
-#undef HAVE_MEMLIMIT_DATA
+/* Define to 1 if you have the `_frexpf' function. */
+#undef HAVE__FREXPF
-/* Only used in build directory testsuite_hooks.h. */
-#undef HAVE_MEMLIMIT_RSS
+/* Define to 1 if you have the `_frexpl' function. */
+#undef HAVE__FREXPL
-/* Only used in build directory testsuite_hooks.h. */
-#undef HAVE_MEMLIMIT_VMEM
+/* Define to 1 if you have the `_hypot' function. */
+#undef HAVE__HYPOT
-/* Only used in build directory testsuite_hooks.h. */
-#undef HAVE_MEMLIMIT_AS
+/* Define to 1 if you have the `_hypotf' function. */
+#undef HAVE__HYPOTF
+
+/* Define to 1 if you have the `_hypotl' function. */
+#undef HAVE__HYPOTL
+
+/* Define to 1 if you have the `_isinf' function. */
+#undef HAVE__ISINF
+
+/* Define to 1 if you have the `_isinff' function. */
+#undef HAVE__ISINFF
+
+/* Define to 1 if you have the `_isinfl' function. */
+#undef HAVE__ISINFL
+
+/* Define to 1 if you have the `_isnan' function. */
+#undef HAVE__ISNAN
+
+/* Define to 1 if you have the `_isnanf' function. */
+#undef HAVE__ISNANF
+
+/* Define to 1 if you have the `_isnanl' function. */
+#undef HAVE__ISNANL
+
+/* Define to 1 if you have the `_ldexpf' function. */
+#undef HAVE__LDEXPF
+
+/* Define to 1 if you have the `_ldexpl' function. */
+#undef HAVE__LDEXPL
+
+/* Define to 1 if you have the `_log10f' function. */
+#undef HAVE__LOG10F
+
+/* Define to 1 if you have the `_log10l' function. */
+#undef HAVE__LOG10L
+
+/* Define to 1 if you have the `_logf' function. */
+#undef HAVE__LOGF
+
+/* Define to 1 if you have the `_logl' function. */
+#undef HAVE__LOGL
+
+/* Define to 1 if you have the `_modff' function. */
+#undef HAVE__MODFF
+
+/* Define to 1 if you have the `_modfl' function. */
+#undef HAVE__MODFL
+
+/* Define to 1 if you have the `_powf' function. */
+#undef HAVE__POWF
+/* Define to 1 if you have the `_powl' function. */
+#undef HAVE__POWL
+
+/* Define to 1 if you have the `_qfpclass' function. */
+#undef HAVE__QFPCLASS
+
+/* Define to 1 if you have the `_sincos' function. */
+#undef HAVE__SINCOS
+
+/* Define to 1 if you have the `_sincosf' function. */
+#undef HAVE__SINCOSF
+
+/* Define to 1 if you have the `_sincosl' function. */
+#undef HAVE__SINCOSL
+
+/* Define to 1 if you have the `_sinf' function. */
+#undef HAVE__SINF
+
+/* Define to 1 if you have the `_sinhf' function. */
+#undef HAVE__SINHF
+
+/* Define to 1 if you have the `_sinhl' function. */
+#undef HAVE__SINHL
+
+/* Define to 1 if you have the `_sinl' function. */
+#undef HAVE__SINL
+
+/* Define to 1 if you have the `_sqrtf' function. */
+#undef HAVE__SQRTF
+
+/* Define to 1 if you have the `_sqrtl' function. */
+#undef HAVE__SQRTL
+
+/* Define to 1 if you have the `_tanf' function. */
+#undef HAVE__TANF
+
+/* Define to 1 if you have the `_tanhf' function. */
+#undef HAVE__TANHF
+
+/* Define to 1 if you have the `_tanhl' function. */
+#undef HAVE__TANHL
+
+/* Define to 1 if you have the `_tanl' function. */
+#undef HAVE__TANL
+
+/* Define to 1 if you have the `__signbit' function. */
+#undef HAVE___SIGNBIT
+
+/* Define to 1 if you have the `__signbitf' function. */
+#undef HAVE___SIGNBITF
+
+/* Define to 1 if you have the `__signbitl' function. */
+#undef HAVE___SIGNBITL
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#undef _GLIBCXX_HOSTED
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+#undef _GLIBCXX_SJLJ_EXCEPTIONS
//
// Systems that have certain non-standard functions prefixed with an
// underscore, we'll handle those here. Must come after config.h.in.
diff --git a/contrib/libstdc++/config/allocator/bitmap_allocator_base.h b/contrib/libstdc++/config/allocator/bitmap_allocator_base.h
new file mode 100644
index 0000000..bf84ae0
--- /dev/null
+++ b/contrib/libstdc++/config/allocator/bitmap_allocator_base.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CXX_ALLOCATOR_H
+#define _CXX_ALLOCATOR_H 1
+
+// Define bitmap_allocator as the base class to std::allocator.
+#include <ext/bitmap_allocator.h>
+#define ___glibcxx_base_allocator __gnu_cxx::bitmap_allocator
+
+#endif
diff --git a/contrib/libstdc++/config/allocator/malloc_allocator_base.h b/contrib/libstdc++/config/allocator/malloc_allocator_base.h
new file mode 100644
index 0000000..4a82ec3
--- /dev/null
+++ b/contrib/libstdc++/config/allocator/malloc_allocator_base.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CXX_ALLOCATOR_H
+#define _CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/malloc_allocator.h>
+#define ___glibcxx_base_allocator __gnu_cxx::malloc_allocator
+
+#endif
diff --git a/contrib/libstdc++/config/allocator/mt_allocator_base.h b/contrib/libstdc++/config/allocator/mt_allocator_base.h
new file mode 100644
index 0000000..52b4421
--- /dev/null
+++ b/contrib/libstdc++/config/allocator/mt_allocator_base.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CXX_ALLOCATOR_H
+#define _CXX_ALLOCATOR_H 1
+
+// Define mt_allocator as the base class to std::allocator.
+#include <ext/mt_allocator.h>
+#define ___glibcxx_base_allocator __gnu_cxx::__mt_alloc
+
+#endif
diff --git a/contrib/libstdc++/config/allocator/new_allocator_base.h b/contrib/libstdc++/config/allocator/new_allocator_base.h
new file mode 100644
index 0000000..442f89c
--- /dev/null
+++ b/contrib/libstdc++/config/allocator/new_allocator_base.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CXX_ALLOCATOR_H
+#define _CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define ___glibcxx_base_allocator __gnu_cxx::new_allocator
+
+#endif
diff --git a/contrib/libstdc++/config/allocator/pool_allocator_base.h b/contrib/libstdc++/config/allocator/pool_allocator_base.h
new file mode 100644
index 0000000..77c74b2
--- /dev/null
+++ b/contrib/libstdc++/config/allocator/pool_allocator_base.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CXX_ALLOCATOR_H
+#define _CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/pool_allocator.h>
+#define ___glibcxx_base_allocator __gnu_cxx::__pool_alloc
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/alpha/atomicity.h b/contrib/libstdc++/config/cpu/alpha/atomicity.h
index 895d87a..4eb311b 100644
--- a/contrib/libstdc++/config/cpu/alpha/atomicity.h
+++ b/contrib/libstdc++/config/cpu/alpha/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: Alpha version -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,23 +27,22 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
/* @@@ With gas we can play nice .subsection games to get the
non-predicted branch pointing forward. But Digital assemblers
don't understand those directives. This isn't a terribly
important issue, so just ignore it. */
-typedef int _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- register int __result, __tmp;
-
- __asm__ __volatile__ (
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register int __result, __tmp;
+
+ __asm__ __volatile__ (
"\n$Lxadd_%=:\n\t"
"ldl_l %0,%3\n\t"
"addl %0,%4,%1\n\t"
@@ -53,16 +52,16 @@ __exchange_and_add (volatile _Atomic_word* __mem, int __val)
: "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
: "m" (*__mem), "r"(__val));
- return __result;
-}
+ return __result;
+ }
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
-{
- register _Atomic_word __result;
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register _Atomic_word __result;
- __asm__ __volatile__ (
+ __asm__ __volatile__ (
"\n$Ladd_%=:\n\t"
"ldl_l %0,%2\n\t"
"addl %0,%3,%0\n\t"
@@ -71,6 +70,6 @@ __atomic_add (volatile _Atomic_word* __mem, int __val)
"mb"
: "=&r"(__result), "=m"(*__mem)
: "m" (*__mem), "r"(__val));
-}
+ }
+} // namespace __gnu_cxx
-#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/cris/atomic_word.h b/contrib/libstdc++/config/cpu/cris/atomic_word.h
new file mode 100644
index 0000000..dd2cf6b
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/cris/atomic_word.h
@@ -0,0 +1,36 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+// This entity must not cross a page boundary.
+typedef int _Atomic_word __attribute__ ((__aligned__ (4)));
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/cris/atomicity.h b/contrib/libstdc++/config/cpu/cris/atomicity.h
index 55c374f..3162f6a 100644
--- a/contrib/libstdc++/config/cpu/cris/atomicity.h
+++ b/contrib/libstdc++/config/cpu/cris/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: CRIS version -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,21 +27,18 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-// This entity must not cross a page boundary.
-typedef int _Atomic_word __attribute__ ((__aligned__ (4)));
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (_Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- int __tmp;
- _Atomic_word __result;
+ _Atomic_word
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ int __tmp;
+ _Atomic_word __result;
#if (__CRIS_arch_version >= 10)
- __asm__ __volatile__ (" clearf \n"
+ __asm__ __volatile__ (" clearf \n"
"0: \n"
" move.d %4,%2 \n"
" move.d [%3],%0 \n"
@@ -52,9 +49,11 @@ __exchange_and_add (_Atomic_word* __mem, int __val)
" clearf \n"
: "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
: "r" (__mem), "g" (__val), "m" (*__mem)
+ /* The memory clobber must stay, regardless of
+ current uses of this function. */
: "memory");
#else
- __asm__ __volatile__ (" move $ccr,$r9 \n"
+ __asm__ __volatile__ (" move $ccr,$r9 \n"
" di \n"
" move.d %4,%2 \n"
" move.d [%3],%0 \n"
@@ -63,17 +62,16 @@ __exchange_and_add (_Atomic_word* __mem, int __val)
" move $r9,$ccr \n"
: "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
: "r" (__mem), "g" (__val), "m" (*__mem)
- : "memory", "r9");
+ : "r9",
+ /* The memory clobber must stay, regardless of
+ current uses of this function. */
+ "memory");
#endif
- return __result;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (_Atomic_word* __mem, int __val)
-{
- __exchange_and_add (__mem, __val);
-}
+ return __result;
+ }
-#endif /* atomicity.h */
+ void
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/generic/atomic_word.h b/contrib/libstdc++/config/cpu/generic/atomic_word.h
new file mode 100644
index 0000000..b46adc2
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/generic/atomic_word.h
@@ -0,0 +1,35 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef int _Atomic_word;
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/generic/atomicity.h b/contrib/libstdc++/config/cpu/generic/atomicity.h
index 829a77c..f30005a 100644
--- a/contrib/libstdc++/config/cpu/generic/atomicity.h
+++ b/contrib/libstdc++/config/cpu/generic/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: Generic version -*- C++ -*-
-// Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,51 +27,30 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
+#include <bits/concurrence.h>
-#include <bits/gthr.h>
-
-#define _GLIBCPP_NEED_GENERIC_MUTEX
-
-typedef int _Atomic_word;
-
-namespace __gnu_cxx
-{
- extern __gthread_mutex_t _Atomic_add_mutex;
-
-#ifndef __GTHREAD_MUTEX_INIT
- extern __gthread_once_t _Atomic_add_mutex_once;
- extern void __gthread_atomic_add_mutex_once();
-#endif
-}
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_internal
{
-#ifndef __GTHREAD_MUTEX_INIT
- __gthread_once (&__gnu_cxx::_Atomic_add_mutex_once,
- __gnu_cxx::__gthread_atomic_add_mutex_once);
-#endif
+ __glibcxx_mutex_define_initialized(atomic_mutex);
+} // namespace __gnu_internal
- _Atomic_word __result;
-
- __gthread_mutex_lock (&__gnu_cxx::_Atomic_add_mutex);
-
- __result = *__mem;
- *__mem += __val;
-
- __gthread_mutex_unlock (&__gnu_cxx::_Atomic_add_mutex);
- return __result;
-}
-
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- (void) __exchange_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ __glibcxx_mutex_lock(__gnu_internal::atomic_mutex);
+ _Atomic_word __result;
+ __result = *__mem;
+ *__mem += __val;
+ __glibcxx_mutex_unlock(__gnu_internal::atomic_mutex);
+ return __result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/hppa/atomicity.h b/contrib/libstdc++/config/cpu/hppa/atomicity.h
index d99ac34..48c8283 100644
--- a/contrib/libstdc++/config/cpu/hppa/atomicity.h
+++ b/contrib/libstdc++/config/cpu/hppa/atomicity.h
@@ -1,90 +1,95 @@
-/* Low-level functions for atomic operations. PA-RISC version. -*- C++ -*-
- Copyright 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+// Low-level functions for atomic operations: PA-RISC version -*- C++ -*-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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.
- The GNU C 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
- Library General Public License for more details.
+// 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 Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+// 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.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
-typedef int _Atomic_word;
+#include <bits/c++config.h>
+#include <bits/atomicity.h>
-template <int __inst>
-struct __Atomicity_lock
+namespace __gnu_cxx
{
- static volatile int _S_atomicity_lock;
-};
+ template<int _Inst>
+ struct _Atomicity_lock
+ {
+ static volatile int _S_atomicity_lock;
+ };
+
+ template<int _Inst>
+ volatile int
+ _Atomicity_lock<_Inst>::_S_atomicity_lock __attribute__ ((aligned (16))) = 1;
-template <int __inst>
-volatile int
-__Atomicity_lock<__inst>::_S_atomicity_lock __attribute__ ((aligned (16))) = 1;
+ // Because of the lack of weak support when using the hpux som
+ // linker, we explicitly instantiate the atomicity lock.
+ template volatile int _Atomicity_lock<0>::_S_atomicity_lock;
-/* Because of the lack of weak support when using the hpux
- som linker, we explicitly instantiate the atomicity lock
- in src/misc-inst.cc when _GLIBCPP_INST_ATOMICITY_LOCK
- is defined. */
-#ifndef _GLIBCPP_INST_ATOMICITY_LOCK
-template volatile int __Atomicity_lock<0>::_S_atomicity_lock;
-#endif
-
-static inline int
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word* __mem, int __val)
-{
- _Atomic_word result;
- int tmp;
- volatile int& lock = __Atomicity_lock<0>::_S_atomicity_lock;
-
- __asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
- "cmpib,<>,n 0,%0,.+20\n\t"
- "ldw 0(%1),%0\n\t"
- "cmpib,= 0,%0,.-4\n\t"
- "nop\n\t"
- "b,n .-20"
- : "=&r" (tmp)
- : "r" (&lock));
-
- result = *__mem;
- *__mem = result + __val;
- /* Reset lock with PA 2.0 "ordered" store. */
- __asm__ __volatile__ ("stw,ma %1,0(%0)"
- : : "r" (&lock), "r" (tmp) : "memory");
- return result;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (_Atomic_word* __mem, int __val)
-{
- int tmp;
- volatile int& lock = __Atomicity_lock<0>::_S_atomicity_lock;
-
- __asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
- "cmpib,<>,n 0,%0,.+20\n\t"
- "ldw 0(%1),%0\n\t"
- "cmpib,= 0,%0,.-4\n\t"
- "nop\n\t"
- "b,n .-20"
- : "=&r" (tmp)
- : "r" (&lock));
-
- *__mem += __val;
- /* Reset lock with PA 2.0 "ordered" store. */
- __asm__ __volatile__ ("stw,ma %1,0(%0)"
- : : "r" (&lock), "r" (tmp) : "memory");
-}
-
-#endif
+ int
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word result;
+ int tmp;
+ volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock;
+
+ __asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
+ "cmpib,<>,n 0,%0,.+20\n\t"
+ "ldw 0(%1),%0\n\t"
+ "cmpib,= 0,%0,.-4\n\t"
+ "nop\n\t"
+ "b,n .-20"
+ : "=&r" (tmp)
+ : "r" (&lock));
+
+ result = *__mem;
+ *__mem = result + __val;
+ /* Reset lock with PA 2.0 "ordered" store. */
+ __asm__ __volatile__ ("stw,ma %1,0(%0)"
+ : : "r" (&lock), "r" (tmp) : "memory");
+ return result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ int tmp;
+ volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock;
+
+ __asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
+ "cmpib,<>,n 0,%0,.+20\n\t"
+ "ldw 0(%1),%0\n\t"
+ "cmpib,= 0,%0,.-4\n\t"
+ "nop\n\t"
+ "b,n .-20"
+ : "=&r" (tmp)
+ : "r" (&lock));
+
+ *__mem += __val;
+ /* Reset lock with PA 2.0 "ordered" store. */
+ __asm__ __volatile__ ("stw,ma %1,0(%0)"
+ : : "r" (&lock), "r" (tmp) : "memory");
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/i386/atomicity.h b/contrib/libstdc++/config/cpu/i386/atomicity.h
index d619dbb..92c03d5 100644
--- a/contrib/libstdc++/config/cpu/i386/atomicity.h
+++ b/contrib/libstdc++/config/cpu/i386/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: x86, x >= 3 version -*- C++ -*-
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,49 +27,48 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-typedef int _Atomic_word;
-
-template <int __inst>
-struct __Atomicity_lock
-{
- static volatile _Atomic_word _S_atomicity_lock;
-};
-
-template <int __inst>
-volatile _Atomic_word __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
-
-template volatile _Atomic_word __Atomicity_lock<0>::_S_atomicity_lock;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- register _Atomic_word __result, __tmp = 1;
-
- /* obtain the atomic exchange/add spin lock */
- do {
- __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}"
- : "+m" (__Atomicity_lock<0>::_S_atomicity_lock),
- "+r" (__tmp));
- } while (__tmp);
-
- __result = *__mem;
- *__mem += __val;
-
- /* release spin lock */
- __Atomicity_lock<0>::_S_atomicity_lock = 0;
-
- return __result;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- __exchange_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
+ template<int __inst>
+ struct _Atomicity_lock
+ {
+ static volatile _Atomic_word _S_atomicity_lock;
+ };
+
+ template<int __inst>
+ volatile _Atomic_word _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
+
+ template volatile _Atomic_word _Atomicity_lock<0>::_S_atomicity_lock;
+
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register _Atomic_word __result, __tmp = 1;
+
+ // Obtain the atomic exchange/add spin lock.
+ do
+ {
+ __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}"
+ : "=m" (_Atomicity_lock<0>::_S_atomicity_lock),
+ "+r" (__tmp)
+ : "m" (_Atomicity_lock<0>::_S_atomicity_lock));
+ }
+ while (__tmp);
+
+ __result = *__mem;
+ *__mem += __val;
+
+ // Release spin lock.
+ _Atomicity_lock<0>::_S_atomicity_lock = 0;
+
+ return __result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/i486/atomicity.h b/contrib/libstdc++/config/cpu/i486/atomicity.h
index 7c65fab..5700bf3 100644
--- a/contrib/libstdc++/config/cpu/i486/atomicity.h
+++ b/contrib/libstdc++/config/cpu/i486/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,31 +27,27 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-typedef int _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- register _Atomic_word __result;
- __asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
- : "=r" (__result), "+m" (*__mem)
- : "0" (__val)
- : "memory");
- return __result;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- __asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
- : "+m" (*__mem) : "ir" (__val) : "memory");
-}
-
-#endif /* atomicity.h */
-
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register _Atomic_word __result;
+ __asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
+ : "=r" (__result), "=m" (*__mem)
+ : "0" (__val), "m" (*__mem));
+ return __result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ __asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
+ : "=m" (*__mem) : "ir" (__val), "m" (*__mem));
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/ia64/atomicity.h b/contrib/libstdc++/config/cpu/ia64/atomicity.h
index e28e149..0c3ab33 100644
--- a/contrib/libstdc++/config/cpu/ia64/atomicity.h
+++ b/contrib/libstdc++/config/cpu/ia64/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: IA64 version -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,25 +27,18 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
-
+#include <bits/atomicity.h>
#include <ia64intrin.h>
-typedef int _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- return __sync_fetch_and_add (__mem, __val);
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- __sync_fetch_and_add (__mem, __val);
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ { return __sync_fetch_and_add(__mem, __val); }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __sync_fetch_and_add(__mem, __val); }
}
-
-#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/m68k/atomicity.h b/contrib/libstdc++/config/cpu/m68k/atomicity.h
index c80e2e3..0e58f3c 100644
--- a/contrib/libstdc++/config/cpu/m68k/atomicity.h
+++ b/contrib/libstdc++/config/cpu/m68k/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: m68k version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,111 +27,107 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
-
-typedef int _Atomic_word;
+#include <bits/atomicity.h>
+namespace __gnu_cxx
+{
#if ( defined(__mc68020__) || defined(__mc68030__) \
|| defined(__mc68040__) || defined(__mc68060__) ) \
&& !defined(__mcpu32__)
-// These variants support compare-and-swap.
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- register _Atomic_word __result = *__mem;
- register _Atomic_word __temp;
- __asm__ __volatile__ ("1: move%.l %0,%1\n\t"
- "add%.l %2,%1\n\t"
- "cas%.l %0,%1,%3\n\t"
- "jne 1b"
- : "=d" (__result), "=&d" (__temp)
- : "d" (__val), "m" (*__mem), "0" (__result)
- : "memory");
- return __result;
-}
+ // These variants support compare-and-swap.
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register _Atomic_word __result = *__mem;
+ register _Atomic_word __temp;
+ __asm__ __volatile__ ("1: move%.l %0,%1\n\t"
+ "add%.l %3,%1\n\t"
+ "cas%.l %0,%1,%2\n\t"
+ "jne 1b"
+ : "=d" (__result), "=&d" (__temp), "=m" (*__mem)
+ : "d" (__val), "0" (__result), "m" (*__mem));
+ return __result;
+ }
#elif defined(__rtems__)
- /*
- * TAS/JBNE is unsafe on systems with strict priority-based scheduling.
- * Disable interrupts, which we can do only from supervisor mode.
- */
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- _Atomic_word __result;
- short __level, __tmpsr;
- __asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
- : "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
-
- __result = *__mem;
- *__mem = __result + __val;
-
- __asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
-
- return __result;
-}
+ // TAS/JBNE is unsafe on systems with strict priority-based scheduling.
+ // Disable interrupts, which we can do only from supervisor mode.
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result;
+ short __level, __tmpsr;
+ __asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
+ : "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
+
+ __result = *__mem;
+ *__mem = __result + __val;
+ __asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
+
+ return __result;
+ }
#else
-
-template <int __inst>
-struct __Atomicity_lock
-{
- static volatile unsigned char _S_atomicity_lock;
-};
-
-template <int __inst>
-volatile unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
-
-template volatile unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- _Atomic_word __result;
-
-// bset with no immediate addressing
-#if defined(__mcf5200__) || defined(__mcf5300__) || defined(__mcf5400__)
- __asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b"
- : /* no outputs */
- : "a"(&__Atomicity_lock<0>::_S_atomicity_lock)
- : "cc", "memory");
-
-// bset with immediate addressing
-#elif defined(__mc68000__)
- __asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b"
- : "+m"(__Atomicity_lock<0>::_S_atomicity_lock)
- : /* none */
- : "cc");
-
-#else // 680x0, cpu32, 5400 support test-and-set.
- __asm__ __volatile__("1: tas %0\n\tjbne 1b"
- : "+m"(__Atomicity_lock<0>::_S_atomicity_lock)
- : /* none */
- : "cc");
+
+ template<int __inst>
+ struct _Atomicity_lock
+ {
+ static volatile unsigned char _S_atomicity_lock;
+ };
+
+ template<int __inst>
+ volatile unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
+
+ template volatile unsigned char _Atomicity_lock<0>::_S_atomicity_lock;
+
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result;
+
+ // bset with no immediate addressing (not SMP-safe)
+#if defined(__mcf5200__) || defined(__mcf5300__)
+ __asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b"
+ : /* no outputs */
+ : "a"(&_Atomicity_lock<0>::_S_atomicity_lock)
+ : "cc", "memory");
+
+ // CPU32 and MCF5400 support test-and-set (SMP-safe).
+#elif defined(__mcpu32__) || defined(__mcf5400__)
+ __asm__ __volatile__("1: tas %0\n\tjbne 1b"
+ : "+m"(_Atomicity_lock<0>::_S_atomicity_lock)
+ : /* none */
+ : "cc");
+
+ // Use bset with immediate addressing for 68000/68010 (not SMP-safe)
+ // NOTE: TAS is available on the 68000, but unsupported by some Amiga
+ // memory controllers.
+#else
+ __asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b"
+ : "+m"(_Atomicity_lock<0>::_S_atomicity_lock)
+ : /* none */
+ : "cc");
#endif
-
- __result = *__mem;
- *__mem = __result + __val;
-
- __Atomicity_lock<0>::_S_atomicity_lock = 0;
-
- return __result;
-}
-
+
+ __result = *__mem;
+ *__mem = __result + __val;
+
+ _Atomicity_lock<0>::_S_atomicity_lock = 0;
+
+ return __result;
+ }
+
#endif /* TAS / BSET */
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
-{
- // Careful: using add.l with a memory destination is not
- // architecturally guaranteed to be atomic.
- (void) __exchange_and_add (__mem, __val);
-}
-
-#endif /* _BITS_ATOMICITY_H */
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ // Careful: using add.l with a memory destination is not
+ // architecturally guaranteed to be atomic.
+ __exchange_and_add(__mem, __val);
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/mips/atomicity.h b/contrib/libstdc++/config/cpu/mips/atomicity.h
index 7bacabd..0871342 100644
--- a/contrib/libstdc++/config/cpu/mips/atomicity.h
+++ b/contrib/libstdc++/config/cpu/mips/atomicity.h
@@ -1,6 +1,6 @@
-// Low-level functions for atomic operations.
+// Low-level functions for atomic operations: MIPS version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,55 +27,55 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-typedef int _Atomic_word;
-
-static inline int
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+namespace __gnu_cxx
{
- int __result, __tmp;
-
- __asm__ __volatile__
- ("/* Inline exchange & add */\n\t"
- "1:\n\t"
- ".set push\n\t"
- ".set mips2\n\t"
- "ll %0,%3\n\t"
- "addu %1,%4,%0\n\t"
- "sc %1,%2\n\t"
- ".set pop\n\t"
- "beqz %1,1b\n\t"
- "/* End exchange & add */"
- : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
- : "m" (*__mem), "r"(__val)
- : "memory");
-
- return __result;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word *__mem, int __val)
-{
- int __result;
-
- __asm__ __volatile__
- ("/* Inline atomic add */\n\t"
- "1:\n\t"
- ".set push\n\t"
- ".set mips2\n\t"
- "ll %0,%2\n\t"
- "addu %0,%3,%0\n\t"
- "sc %0,%1\n\t"
- ".set pop\n\t"
- "beqz %0,1b\n\t"
- "/* End atomic add */"
- : "=&r"(__result), "=m"(*__mem)
- : "m" (*__mem), "r"(__val)
- : "memory");
-}
-
-#endif /* atomicity.h */
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result, __tmp;
+
+ __asm__ __volatile__
+ ("/* Inline exchange & add */\n\t"
+ "1:\n\t"
+ ".set push\n\t"
+#if _MIPS_SIM == _ABIO32
+ ".set mips2\n\t"
+#endif
+ "ll %0,%3\n\t"
+ "addu %1,%4,%0\n\t"
+ "sc %1,%2\n\t"
+ ".set pop\n\t"
+ "beqz %1,1b\n\t"
+ "/* End exchange & add */"
+ : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
+ : "m" (*__mem), "r"(__val));
+
+ return __result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result;
+
+ __asm__ __volatile__
+ ("/* Inline atomic add */\n\t"
+ "1:\n\t"
+ ".set push\n\t"
+#if _MIPS_SIM == _ABIO32
+ ".set mips2\n\t"
+#endif
+ "ll %0,%2\n\t"
+ "addu %0,%3,%0\n\t"
+ "sc %0,%1\n\t"
+ ".set pop\n\t"
+ "beqz %0,1b\n\t"
+ "/* End atomic add */"
+ : "=&r"(__result), "=m"(*__mem)
+ : "m" (*__mem), "r"(__val));
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/powerpc/atomicity.h b/contrib/libstdc++/config/cpu/powerpc/atomicity.h
index b5370fc..7314944 100644
--- a/contrib/libstdc++/config/cpu/powerpc/atomicity.h
+++ b/contrib/libstdc++/config/cpu/powerpc/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: PowerPC version -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,8 +27,7 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
#ifdef __PPC405__
#define _STWCX "sync \n\tstwcx. "
@@ -36,43 +35,42 @@
#define _STWCX "stwcx. "
#endif
-typedef int _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word* __mem, int __val)
-{
- _Atomic_word __tmp, __res;
- __asm__ __volatile__ (
- "/* Inline exchange & add */\n"
- "0:\t"
- "lwarx %0,0,%2 \n\t"
- "add%I3 %1,%0,%3 \n\t"
- _STWCX " %1,0,%2 \n\t"
- "bne- 0b \n\t"
- "/* End exchange & add */"
- : "=&b"(__res), "=&r"(__tmp)
- : "r" (__mem), "Ir"(__val)
- : "cr0", "memory");
- return __res;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word *__mem, int __val)
+namespace __gnu_cxx
{
- _Atomic_word __tmp;
- __asm__ __volatile__ (
- "/* Inline atomic add */\n"
- "0:\t"
- "lwarx %0,0,%1 \n\t"
- "add%I2 %0,%0,%2 \n\t"
- _STWCX " %0,0,%1 \n\t"
- "bne- 0b \n\t"
- "/* End atomic add */"
- : "=&b"(__tmp)
- : "r" (__mem), "Ir"(__val)
- : "cr0", "memory");
-}
-
-#endif /* atomicity.h */
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __tmp, __res;
+ __asm__ __volatile__ (
+ "/* Inline exchange & add */\n"
+ "0:\t"
+ "lwarx %0,0,%3 \n\t"
+ "add%I4 %1,%0,%4 \n\t"
+ _STWCX " %1,0,%3 \n\t"
+ "bne- 0b \n\t"
+ "/* End exchange & add */"
+ : "=&b"(__res), "=&r"(__tmp), "=m" (*__mem)
+ : "r" (__mem), "Ir"(__val), "m" (*__mem)
+ : "cr0");
+ return __res;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __tmp;
+ __asm__ __volatile__ (
+ "/* Inline atomic add */\n"
+ "0:\t"
+ "lwarx %0,0,%2 \n\t"
+ "add%I3 %0,%0,%3 \n\t"
+ _STWCX " %0,0,%2 \n\t"
+ "bne- 0b \n\t"
+ "/* End atomic add */"
+ : "=&b"(__tmp), "=m" (*__mem)
+ : "r" (__mem), "Ir"(__val), "m" (*__mem)
+ : "cr0");
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/s390/atomicity.h b/contrib/libstdc++/config/cpu/s390/atomicity.h
index 331c29a..b979e3a 100644
--- a/contrib/libstdc++/config/cpu/s390/atomicity.h
+++ b/contrib/libstdc++/config/cpu/s390/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: S/390 version -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,34 +27,28 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-typedef int _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- register _Atomic_word __old_val, __new_val;
-
- __asm__ __volatile__ (" l %0,0(%2)\n"
- "0: lr %1,%0\n"
- " ar %1,%3\n"
- " cs %0,%1,0(%2)\n"
- " jl 0b"
- : "=&d" (__old_val), "=&d" (__new_val)
- : "a" (__mem), "d" (__val) : "cc", "memory" );
- return __old_val;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word *__mem, int __val)
+namespace __gnu_cxx
{
- __exchange_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
-
-
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ register _Atomic_word __old_val, __new_val;
+
+ __asm__ __volatile__ (" l %0,0(%3)\n"
+ "0: lr %1,%0\n"
+ " ar %1,%4\n"
+ " cs %0,%1,0(%3)\n"
+ " jl 0b"
+ : "=&d" (__old_val), "=&d" (__new_val), "=m" (*__mem)
+ : "a" (__mem), "d" (__val), "m" (*__mem) : "cc");
+ return __old_val;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/cpu/sparc/atomic_word.h b/contrib/libstdc++/config/cpu/sparc/atomic_word.h
new file mode 100644
index 0000000..941fddd
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/sparc/atomic_word.h
@@ -0,0 +1,39 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+#ifdef __arch64__
+ typedef long _Atomic_word;
+#else
+ typedef int _Atomic_word;
+#endif
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/sparc/atomicity.h b/contrib/libstdc++/config/cpu/sparc/atomicity.h
index 23804db..a39153b 100644
--- a/contrib/libstdc++/config/cpu/sparc/atomicity.h
+++ b/contrib/libstdc++/config/cpu/sparc/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: Sparc version -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,105 +27,99 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
-#ifdef __arch64__
-
-typedef long _Atomic_word;
-
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word *__mem, int __val)
-{
- _Atomic_word __tmp1, __tmp2;
-
- __asm__ __volatile__("1: ldx [%2], %0\n\t"
- " add %0, %3, %1\n\t"
- " casx [%2], %0, %1\n\t"
- " sub %0, %1, %0\n\t"
- " brnz,pn %0, 1b\n\t"
- " nop"
- : "=&r" (__tmp1), "=&r" (__tmp2)
- : "r" (__mem), "r" (__val)
- : "memory");
- return __tmp2;
-}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
+namespace __gnu_cxx
{
- _Atomic_word __tmp1, __tmp2;
-
- __asm__ __volatile__("1: ldx [%2], %0\n\t"
- " add %0, %3, %1\n\t"
- " casx [%2], %0, %1\n\t"
- " sub %0, %1, %0\n\t"
- " brnz,pn %0, 1b\n\t"
- " nop"
- : "=&r" (__tmp1), "=&r" (__tmp2)
- : "r" (__mem), "r" (__val)
- : "memory");
-}
-
+#ifdef __arch64__
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __tmp1, __tmp2;
+ _Atomic_word __val_extended = __val;
+
+ __asm__ __volatile__("1: ldx [%3], %0\n\t"
+ " add %0, %4, %1\n\t"
+ " casx [%3], %0, %1\n\t"
+ " sub %0, %1, %0\n\t"
+ " brnz,pn %0, 1b\n\t"
+ " nop"
+ : "=&r" (__tmp1), "=&r" (__tmp2), "=m" (*__mem)
+ : "r" (__mem), "r" (__val_extended), "m" (*__mem));
+ return __tmp2;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __tmp1, __tmp2;
+ _Atomic_word __val_extended = __val;
+
+ __asm__ __volatile__("1: ldx [%3], %0\n\t"
+ " add %0, %4, %1\n\t"
+ " casx [%3], %0, %1\n\t"
+ " sub %0, %1, %0\n\t"
+ " brnz,pn %0, 1b\n\t"
+ " nop"
+ : "=&r" (__tmp1), "=&r" (__tmp2), "=m" (*__mem)
+ : "r" (__mem), "r" (__val_extended), "m" (*__mem));
+ }
+
#else /* __arch32__ */
-typedef int _Atomic_word;
-
-template <int __inst>
-struct __Atomicity_lock
-{
- static unsigned char _S_atomicity_lock;
-};
-
-template <int __inst>
-unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
-
-template unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
-
-static int
-__attribute__ ((__unused__))
-__exchange_and_add (volatile _Atomic_word* __mem, int __val)
-{
- _Atomic_word __result, __tmp;
-
- __asm__ __volatile__("1: ldstub [%1], %0\n\t"
- " cmp %0, 0\n\t"
- " bne 1b\n\t"
- " nop"
- : "=&r" (__tmp)
- : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
- : "memory");
- __result = *__mem;
- *__mem += __val;
- __asm__ __volatile__("stb %%g0, [%0]"
- : /* no outputs */
- : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
- : "memory");
- return __result;
-}
-
-static void
-__attribute__ ((__unused__))
-__atomic_add (volatile _Atomic_word* __mem, int __val)
-{
- _Atomic_word __tmp;
-
- __asm__ __volatile__("1: ldstub [%1], %0\n\t"
- " cmp %0, 0\n\t"
- " bne 1b\n\t"
- " nop"
- : "=&r" (__tmp)
- : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
- : "memory");
- *__mem += __val;
- __asm__ __volatile__("stb %%g0, [%0]"
- : /* no outputs */
- : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
- : "memory");
-}
-
+ template<int __inst>
+ struct _Atomicity_lock
+ {
+ static unsigned char _S_atomicity_lock;
+ };
+
+ template<int __inst>
+ unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
+
+ template unsigned char _Atomicity_lock<0>::_S_atomicity_lock;
+
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result, __tmp;
+
+ __asm__ __volatile__("1: ldstub [%1], %0\n\t"
+ " cmp %0, 0\n\t"
+ " bne 1b\n\t"
+ " nop"
+ : "=&r" (__tmp)
+ : "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
+ : "memory");
+ __result = *__mem;
+ *__mem += __val;
+ __asm__ __volatile__("stb %%g0, [%0]"
+ : /* no outputs */
+ : "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
+ : "memory");
+ return __result;
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __tmp;
+
+ __asm__ __volatile__("1: ldstub [%1], %0\n\t"
+ " cmp %0, 0\n\t"
+ " bne 1b\n\t"
+ " nop"
+ : "=&r" (__tmp)
+ : "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
+ : "memory");
+ *__mem += __val;
+ __asm__ __volatile__("stb %%g0, [%0]"
+ : /* no outputs */
+ : "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
+ : "memory");
+ }
#endif /* __arch32__ */
-
-#endif /* atomicity.h */
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/io/basic_file_stdio.cc b/contrib/libstdc++/config/io/basic_file_stdio.cc
index 5393a14..a3ed839 100644
--- a/contrib/libstdc++/config/io/basic_file_stdio.cc
+++ b/contrib/libstdc++/config/io/basic_file_stdio.cc
@@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,87 +33,156 @@
#include <bits/basic_file.h>
#include <fcntl.h>
+#include <errno.h>
+
+#ifdef _GLIBCXX_HAVE_POLL
+#include <poll.h>
+#endif
+
+// Pick up ioctl on Solaris 2.8
+#ifdef _GLIBCXX_HAVE_UNISTD_H
#include <unistd.h>
+#endif
-#ifdef _GLIBCPP_HAVE_SYS_IOCTL_H
-#define BSD_COMP /* Get FIONREAD on Solaris2. */
+// Pick up FIONREAD on Solaris 2
+#ifdef _GLIBCXX_HAVE_SYS_IOCTL_H
+#define BSD_COMP
#include <sys/ioctl.h>
#endif
// Pick up FIONREAD on Solaris 2.5.
-#ifdef _GLIBCPP_HAVE_SYS_FILIO_H
+#ifdef _GLIBCXX_HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
-#ifdef _GLIBCPP_HAVE_POLL
-#include <poll.h>
+#ifdef _GLIBCXX_HAVE_SYS_UIO_H
+#include <sys/uio.h>
#endif
-#if defined(_GLIBCPP_HAVE_S_ISREG) || defined(_GLIBCPP_HAVE_S_IFREG)
+#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
# include <sys/stat.h>
-# ifdef _GLIBCPP_HAVE_S_ISREG
-# define _GLIBCPP_ISREG(x) S_ISREG(x)
+# ifdef _GLIBCXX_HAVE_S_ISREG
+# define _GLIBCXX_ISREG(x) S_ISREG(x)
# else
-# define _GLIBCPP_ISREG(x) (((x) & S_IFMT) == S_IFREG)
+# define _GLIBCXX_ISREG(x) (((x) & S_IFMT) == S_IFREG)
# endif
#endif
-namespace std
-{
- // Definitions for __basic_file<char>.
- __basic_file<char>::__basic_file(__c_lock* /*__lock*/)
- : _M_cfile(NULL), _M_cfile_created(false) { }
+#include <limits> // For <off_t>::max() and min()
- __basic_file<char>::~__basic_file()
- { this->close(); }
-
- void
- __basic_file<char>::_M_open_mode(ios_base::openmode __mode, int& __p_mode,
- int&, char* __c_mode)
- {
- bool __testb = __mode & ios_base::binary;
- bool __testi = __mode & ios_base::in;
- bool __testo = __mode & ios_base::out;
- bool __testt = __mode & ios_base::trunc;
- bool __testa = __mode & ios_base::app;
-
- // Set __c_mode for use in fopen.
- // Set __p_mode for use in open.
- if (!__testi && __testo && !__testt && !__testa)
- {
- strcpy(__c_mode, "w");
- __p_mode = (O_WRONLY | O_CREAT);
- }
- if (!__testi && __testo && !__testt && __testa)
+namespace __gnu_internal
+{
+ // Map ios_base::openmode flags to a string for use in fopen().
+ // Table of valid combinations as given in [lib.filebuf.members]/2.
+ static const char*
+ fopen_mode(std::ios_base::openmode mode)
+ {
+ enum
{
- strcpy(__c_mode, "a");
- __p_mode |= O_WRONLY | O_CREAT | O_APPEND;
- }
- if (!__testi && __testo && __testt && !__testa)
+ in = std::ios_base::in,
+ out = std::ios_base::out,
+ trunc = std::ios_base::trunc,
+ app = std::ios_base::app,
+ binary = std::ios_base::binary
+ };
+
+ switch (mode & (in|out|trunc|app|binary))
{
- strcpy(__c_mode, "w");
- __p_mode |= O_WRONLY | O_CREAT | O_TRUNC;
+ case ( out ): return "w";
+ case ( out |app ): return "a";
+ case ( out|trunc ): return "w";
+ case (in ): return "r";
+ case (in|out ): return "r+";
+ case (in|out|trunc ): return "w+";
+
+ case ( out |binary): return "wb";
+ case ( out |app|binary): return "ab";
+ case ( out|trunc |binary): return "wb";
+ case (in |binary): return "rb";
+ case (in|out |binary): return "r+b";
+ case (in|out|trunc |binary): return "w+b";
+
+ default: return 0; // invalid
}
+ }
- if (__testi && !__testo && !__testt && !__testa)
- {
- strcpy(__c_mode, "r");
- __p_mode |= O_RDONLY;
- }
- if (__testi && __testo && !__testt && !__testa)
+ // Wrapper handling partial write.
+ static std::streamsize
+ xwrite(int __fd, const char* __s, std::streamsize __n)
+ {
+ std::streamsize __nleft = __n;
+
+ for (;;)
{
- strcpy(__c_mode, "r+");
- __p_mode |= O_RDWR | O_CREAT;
+ const std::streamsize __ret = write(__fd, __s, __nleft);
+ if (__ret == -1L && errno == EINTR)
+ continue;
+ if (__ret == -1L)
+ break;
+
+ __nleft -= __ret;
+ if (__nleft == 0)
+ break;
+
+ __s += __ret;
}
- if (__testi && __testo && __testt && !__testa)
+
+ return __n - __nleft;
+ }
+
+#ifdef _GLIBCXX_HAVE_WRITEV
+ // Wrapper handling partial writev.
+ static std::streamsize
+ xwritev(int __fd, const char* __s1, std::streamsize __n1,
+ const char* __s2, std::streamsize __n2)
+ {
+ std::streamsize __nleft = __n1 + __n2;
+ std::streamsize __n1_left = __n1;
+
+ struct iovec __iov[2];
+ __iov[1].iov_base = const_cast<char*>(__s2);
+ __iov[1].iov_len = __n2;
+
+ for (;;)
{
- strcpy(__c_mode, "w+");
- __p_mode |= O_RDWR | O_CREAT | O_TRUNC;
+ __iov[0].iov_base = const_cast<char*>(__s1);
+ __iov[0].iov_len = __n1_left;
+
+ const std::streamsize __ret = writev(__fd, __iov, 2);
+ if (__ret == -1L && errno == EINTR)
+ continue;
+ if (__ret == -1L)
+ break;
+
+ __nleft -= __ret;
+ if (__nleft == 0)
+ break;
+
+ const std::streamsize __off = __ret - __n1_left;
+ if (__off >= 0)
+ {
+ __nleft -= xwrite(__fd, __s2 + __off, __n2 - __off);
+ break;
+ }
+
+ __s1 += __ret;
+ __n1_left -= __ret;
}
- if (__testb)
- strcat(__c_mode, "b");
+
+ return __n1 + __n2 - __nleft;
}
-
+#endif
+} // namespace __gnu_internal
+
+namespace std
+{
+ // Definitions for __basic_file<char>.
+ __basic_file<char>::__basic_file(__c_lock* /*__lock*/)
+ : _M_cfile(NULL), _M_cfile_created(false) { }
+
+ __basic_file<char>::~__basic_file()
+ { this->close(); }
+
__basic_file<char>*
__basic_file<char>::sys_open(__c_file* __file, ios_base::openmode)
{
@@ -122,56 +191,41 @@ namespace std
{
_M_cfile = __file;
_M_cfile_created = false;
+ this->sync();
__ret = this;
}
return __ret;
}
__basic_file<char>*
- __basic_file<char>::sys_open(int __fd, ios_base::openmode __mode,
- bool __del)
+ __basic_file<char>::sys_open(int __fd, ios_base::openmode __mode)
{
__basic_file* __ret = NULL;
- int __p_mode = 0;
- int __rw_mode = 0;
- char __c_mode[4];
-
- _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
- if (!this->is_open() && (_M_cfile = fdopen(__fd, __c_mode)))
+ const char* __c_mode = __gnu_internal::fopen_mode(__mode);
+ if (__c_mode && !this->is_open() && (_M_cfile = fdopen(__fd, __c_mode)))
{
- // Iff __del is true, then close will fclose the fd.
- _M_cfile_created = __del;
-
+ char* __buf = NULL;
+ _M_cfile_created = true;
if (__fd == 0)
- setvbuf(_M_cfile, reinterpret_cast<char*>(NULL), _IONBF, 0);
-
+ setvbuf(_M_cfile, __buf, _IONBF, 0);
__ret = this;
}
return __ret;
}
-
- int
- __basic_file<char>::sys_getc()
- { return getc(_M_cfile); }
-
- int
- __basic_file<char>::sys_ungetc(int __c)
- { return ungetc(__c, _M_cfile); }
__basic_file<char>*
__basic_file<char>::open(const char* __name, ios_base::openmode __mode,
int /*__prot*/)
{
__basic_file* __ret = NULL;
- int __p_mode = 0;
- int __rw_mode = 0;
- char __c_mode[4];
-
- _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
-
- if (!this->is_open())
+ const char* __c_mode = __gnu_internal::fopen_mode(__mode);
+ if (__c_mode && !this->is_open())
{
+#ifdef _GLIBCXX_USE_LFS
+ if ((_M_cfile = fopen64(__name, __c_mode)))
+#else
if ((_M_cfile = fopen(__name, __c_mode)))
+#endif
{
_M_cfile_created = true;
__ret = this;
@@ -186,69 +240,92 @@ namespace std
int
__basic_file<char>::fd()
- { return fileno(_M_cfile) ; }
+ { return fileno(_M_cfile); }
+
+ __c_file*
+ __basic_file<char>::file()
+ { return _M_cfile; }
__basic_file<char>*
__basic_file<char>::close()
{
- __basic_file* __retval = static_cast<__basic_file*>(NULL);
+ __basic_file* __ret = static_cast<__basic_file*>(NULL);
if (this->is_open())
{
if (_M_cfile_created)
fclose(_M_cfile);
else
- fflush(_M_cfile);
+ this->sync();
_M_cfile = 0;
- __retval = this;
+ __ret = this;
}
- return __retval;
+ return __ret;
}
streamsize
__basic_file<char>::xsgetn(char* __s, streamsize __n)
- { return fread(__s, 1, __n, _M_cfile); }
-
+ {
+ streamsize __ret;
+ do
+ __ret = read(this->fd(), __s, __n);
+ while (__ret == -1L && errno == EINTR);
+ return __ret;
+ }
+
streamsize
__basic_file<char>::xsputn(const char* __s, streamsize __n)
- { return fwrite(__s, 1, __n, _M_cfile); }
-
- streamoff
- __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way,
- ios_base::openmode /*__mode*/)
- {
- if (!fseek(_M_cfile, __off, __way))
- return ftell(_M_cfile);
- else
- // Fseek failed.
- return -1L;
+ { return __gnu_internal::xwrite(this->fd(), __s, __n); }
+
+ streamsize
+ __basic_file<char>::xsputn_2(const char* __s1, streamsize __n1,
+ const char* __s2, streamsize __n2)
+ {
+ streamsize __ret = 0;
+#ifdef _GLIBCXX_HAVE_WRITEV
+ __ret = __gnu_internal::xwritev(this->fd(), __s1, __n1, __s2, __n2);
+#else
+ if (__n1)
+ __ret = __gnu_internal::xwrite(this->fd(), __s1, __n1);
+
+ if (__ret == __n1)
+ __ret += __gnu_internal::xwrite(this->fd(), __s2, __n2);
+#endif
+ return __ret;
}
streamoff
- __basic_file<char>::seekpos(streamoff __pos, ios_base::openmode /*__mode*/)
- {
- if (!fseek(_M_cfile, __pos, ios_base::beg))
- return ftell(_M_cfile);
- else
- // Fseek failed.
+ __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way)
+ {
+#ifdef _GLIBCXX_USE_LFS
+ return lseek64(this->fd(), __off, __way);
+#else
+ if (__off > std::numeric_limits<off_t>::max()
+ || __off < std::numeric_limits<off_t>::min())
return -1L;
+ return lseek(this->fd(), __off, __way);
+#endif
}
-
+
int
__basic_file<char>::sync()
{ return fflush(_M_cfile); }
streamsize
- __basic_file<char>::showmanyc_helper()
+ __basic_file<char>::showmanyc()
{
#ifdef FIONREAD
// Pipes and sockets.
+#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
+ off_t __num = 0;
+#else
int __num = 0;
+#endif
int __r = ioctl(this->fd(), FIONREAD, &__num);
if (!__r && __num >= 0)
return __num;
#endif
-#ifdef _GLIBCPP_HAVE_POLL
+#ifdef _GLIBCXX_HAVE_POLL
// Cheap test.
struct pollfd __pfd[1];
__pfd[0].fd = this->fd();
@@ -257,12 +334,12 @@ namespace std
return 0;
#endif
-#if defined(_GLIBCPP_HAVE_S_ISREG) || defined(_GLIBCPP_HAVE_S_IFREG)
+#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
// Regular files.
struct stat __buffer;
int __ret = fstat(this->fd(), &__buffer);
- if (!__ret && _GLIBCPP_ISREG(__buffer.st_mode))
- return __buffer.st_size - ftell(_M_cfile);
+ if (!__ret && _GLIBCXX_ISREG(__buffer.st_mode))
+ return __buffer.st_size - lseek(this->fd(), 0, ios_base::cur);
#endif
return 0;
}
diff --git a/contrib/libstdc++/config/io/basic_file_stdio.h b/contrib/libstdc++/config/io/basic_file_stdio.h
index cefd38f..6aa031b 100644
--- a/contrib/libstdc++/config/io/basic_file_stdio.h
+++ b/contrib/libstdc++/config/io/basic_file_stdio.h
@@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,8 +36,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BASIC_FILE
-#define _CPP_BASIC_FILE 1
+#ifndef _BASIC_FILE_STDIO_H
+#define _BASIC_FILE_STDIO_H 1
#pragma GCC system_header
@@ -56,16 +56,13 @@ namespace std
{
// Underlying data source/sink.
__c_file* _M_cfile;
+
// True iff we opened _M_cfile, and thus must close it ourselves.
bool _M_cfile_created;
public:
__basic_file(__c_lock* __lock = 0);
-
- void
- _M_open_mode(ios_base::openmode __mode, int& __p_mode, int& __rw_mode,
- char* __c_mode);
-
+
__basic_file*
open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
@@ -73,13 +70,7 @@ namespace std
sys_open(__c_file* __file, ios_base::openmode);
__basic_file*
- sys_open(int __fd, ios_base::openmode __mode, bool __del);
-
- int
- sys_getc();
-
- int
- sys_ungetc(int);
+ sys_open(int __fd, ios_base::openmode __mode);
__basic_file*
close();
@@ -90,28 +81,30 @@ namespace std
int
fd();
+ __c_file*
+ file();
+
~__basic_file();
streamsize
xsputn(const char* __s, streamsize __n);
streamsize
- xsgetn(char* __s, streamsize __n);
+ xsputn_2(const char* __s1, streamsize __n1,
+ const char* __s2, streamsize __n2);
- streamoff
- seekoff(streamoff __off, ios_base::seekdir __way,
- ios_base::openmode __mode = ios_base::in | ios_base::out);
+ streamsize
+ xsgetn(char* __s, streamsize __n);
streamoff
- seekpos(streamoff __pos,
- ios_base::openmode __mode = ios_base::in | ios_base::out);
+ seekoff(streamoff __off, ios_base::seekdir __way);
int
sync();
streamsize
- showmanyc_helper();
+ showmanyc();
};
} // namespace std
-#endif // _CPP_BASIC_FILE
+#endif
diff --git a/contrib/libstdc++/config/io/c_io_stdio.h b/contrib/libstdc++/config/io/c_io_stdio.h
index 0d11d14..c9ae432 100644
--- a/contrib/libstdc++/config/io/c_io_stdio.h
+++ b/contrib/libstdc++/config/io/c_io_stdio.h
@@ -1,6 +1,6 @@
// underlying io library -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,8 +29,8 @@
// c_io_stdio.h - Defines for using "C" stdio.h
-#ifndef _CPP_IO_STDIO_H
-#define _CPP_IO_STDIO_H 1
+#ifndef _C_IO_STDIO_H
+#define _C_IO_STDIO_H 1
#include <cstdio>
#include <cstddef>
@@ -38,20 +38,12 @@
namespace std
{
-// for fpos.h
- typedef long streamoff;
- typedef ptrdiff_t streamsize; // Signed integral type
-#if _GLIBCPP_USE_WCHAR_T
- typedef ptrdiff_t wstreamsize;
-#endif
- typedef fpos_t __c_streampos;
-
typedef __gthread_mutex_t __c_lock;
-// for basic_file.h
+ // for basic_file.h
typedef FILE __c_file;
-// for ios_base.h
+ // for ios_base.h
struct __ios_flags
{
typedef short __int_type;
@@ -90,4 +82,4 @@ namespace std
};
}
-#endif // _CPP_IO_STDIO_H
+#endif
diff --git a/contrib/libstdc++/config/linker-map.gnu b/contrib/libstdc++/config/linker-map.gnu
index 301867f..02fb094 100644
--- a/contrib/libstdc++/config/linker-map.gnu
+++ b/contrib/libstdc++/config/linker-map.gnu
@@ -1,6 +1,6 @@
-## Linker script for GNU ld 2.11.94+ only.
+## Linker script for GNU ld 2.13.91+ only.
##
-## Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+## Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
##
@@ -20,384 +20,253 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-GLIBCPP_3.2 {
+GLIBCXX_3.4 {
global:
# Names inside the 'extern' block are demangled names.
- # All but the last are terminated with a semicolon.
extern "C++"
{
- std::[A-Za]*;
- std::ba[a-r]*;
- std::basic_[a-h]*;
- std::basic_ifstream*;
- std::basic_istringstream*;
- std::basic_istream*;
- std::basic_iostream*;
- std::basic_[j-r]*;
- std::basic_streambuf*;
- std::basic_stringbuf*;
- std::basic_stringstream*;
- std::basic_[t-z]*;
- std::ba[t-z]*;
- std::b[b-z]*;
- std::c[a-n]*;
- std::co[a-c]*;
- std::codecvt_byname*;
- std::codecvt::[A-Za-b]*;
- std::codecvt::[A-Zd-z]*;
- std::codecvt_c;
- std::codecvt_w;
- std::co[e-z]*;
- std::c[p-z]*;
- std::c_[a-z]*;
- std::[A-Zd-k]*;
+ std::[A-Za-h]*;
+ std::i[a-n]*;
+ std::ios_base::[A-Ha-z]*;
+ std::ios_base::_M_grow_words*;
+ std::ios_base::_M_init*;
+ std::ios_base::Init::[A-Za-z]*;
+ std::ios_base::[J-Za-z]*;
+ std::i[p-z]*;
+ std::[A-Zj-k]*;
std::length_error*;
std::logic_error*;
std::locale::[A-Za-e]*;
std::locale::facet::[A-Za-z]*;
- std::locale::facet::_M*;
- std::locale::facet::_S_c_locale;
+ std::locale::facet::_S_get_c_locale*;
std::locale::facet::_S_clone_c_locale*;
std::locale::facet::_S_create_c_locale*;
std::locale::facet::_S_destroy_c_locale*;
- std::locale::[A-Zg-z]*;
- std::locale::_[A-Ra-z]*;
- std::locale::_S_classic;
- std::locale::_S_global;
- std::locale::_S_num_categories;
+ std::locale::[A-Zg-h]*;
+ std::locale::id::[A-Za-z]*;
+ std::locale::id::_M_id*;
+ std::locale::[A-Zj-z]*;
+ std::locale::_[A-Ha-z]*;
+ std::locale::_Impl::[A-Za-z]*;
+ std::locale::_Impl::_M_[A-Za-z]*;
+ std::locale::_[J-Ra-z]*;
std::locale::_S_normalize_category*;
std::locale::_[T-Za-z]*;
- std::[A-Zm]*;
- std::n[a-t]*;
- std::num_put_[cw];
- std::numeric*;
- std::numpunct*;
- std::num_get*;
- std::num_get_[cw];
- std::n[v-z]*;
- std::ostrstream*;
- std::overflow_error*;
- std::out_of_range*;
- std::[A-Zp-z]*;
+ std::[A-Zm-z]*;
+ std::_List_node_base::hook*;
+ std::_List_node_base::swap*;
+ std::_List_node_base::unhook*;
+ std::_List_node_base::reverse*;
+ std::_List_node_base::transfer*;
std::__throw_*;
- std::__numeric_limits_base*;
std::__timepunct*;
- std::_S_bit_count;
- std::_S_first_one
+ std::__numeric_limits_base*;
+ std::__num_base::_S_format_float*;
+ std::__num_base::_S_format_int*;
+ std::__num_base::_S_atoms_in;
+ std::__num_base::_S_atoms_out;
+ std::__moneypunct_cache*;
+ std::__numpunct_cache*;
+ std::__timepunct_cache*;
+ __gnu_debug::_Safe_iterator_base*;
+ __gnu_debug::_Safe_sequence_base*;
+ __gnu_debug::_Error_formatter*;
+ __gnu_norm::_List_node_base::hook*;
+ __gnu_norm::_List_node_base::swap*;
+ __gnu_norm::_List_node_base::unhook*;
+ __gnu_norm::_List_node_base::reverse*;
+ __gnu_norm::_List_node_base::transfer*
};
# Names not in an 'extern' block are mangled names.
- _ZSt7getline*;
- _ZStrs*;
- _ZNSo*;
- _ZNKSt9basic_ios*;
- _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE15_M_cache_facetsERKSt6locale;
- _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE[A-Z]*;
- _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE[0-9][A-Za-z]*;
- _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE[0-9][0-9][A-Za-z]*;
-
- _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEC*;
- _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED*;
- _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC*;
- _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED*;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE6do_put*;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE3put*;
- _ZNSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE2idE;
-
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE14_M_convert_intI[lmxy]EES3_S3_RSt8ios_basecccT_;
-
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE14_M_convert_intI[lmxy]EES3_S3_RSt8ios_basewccT_;
-
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE16_M_convert_floatI[de]EES3_S3_RSt8ios_baseccT_;
-
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE16_M_convert_floatI[de]EES3_S3_RSt8ios_basewcT_;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE12_M_widen_int*;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE14_M_widen_float*;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE9_M_insert*;
-
- _ZSt9use_facetISt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEEERKT_RKSt6locale;
-
- # __num_base
- _ZNSt10__num_base13_S_format_intERKSt8ios_basePccc;
- _ZNSt10__num_base15_S_format_floatERKSt8ios_basePcc[il];
- _ZNSt10__num_base8_S_atomsE;
-
- # std::string minus binary operator plus
- _ZNKSs*;
- _ZNKSb*;
- _ZNSs[A-Za-z]*;
- _ZNSs[0-9][A-Za-z]*;
- _ZNSs[0-9][0-9][A-Za-z]*;
- _ZNSs[0-9]_[A-Ra-z]*;
- _ZNSs[0-9][0-9]_[A-Ra-z]*;
- _ZNSs12_S_empty_repEv;
- _ZNSs20_S_empty_rep_storageE;
- _ZNSbIwSt11char_traitsIwESaIwEE20_S_empty_rep_storageE;
- _ZNSs12_S_constructE*;
- _ZNSs13_S_copy_charsE*;
- _ZNSbIwSt11char_traitsIwESaIwEE[A-Ra-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[0-9][A-Ra-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[0-9][0-9][A-Ra-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[0-9]_[A-Ra-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[0-9][0-9]_[A-Ra-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_chars*;
- _ZNSbIwSt11char_traitsIwESaIwEE12_S_constructE[jm]wRKS1_;
- _ZNSbIwSt11char_traitsIwESaIwEE12_S_empty_repEv;
- _ZSt24__uninitialized_copy_auxIN9*;
- _ZSt26__uninitialized_fill_n_aux*;
- _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_;
- _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ES3_RKS6_;
- _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_EPKS3_RKS6_;
- _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_ES3_RKS6_;
-
- # std::__basic_file minus showmanyc_helper
- _ZNSt12__basic_fileIcED*;
- _ZNSt12__basic_fileIcEC*;
- _ZNSt12__basic_fileIcE8sys_open*;
- _ZNSt12__basic_fileIcE8sys_getc*;
- _ZNSt12__basic_fileIcE10sys_ungetc*;
- _ZNSt12__basic_fileIcE7seekpos*;
- _ZNSt12__basic_fileIcE7seekoff*;
- _ZNSt12__basic_fileIcE6xsputn*;
- _ZNSt12__basic_fileIcE6xsgetn*;
- _ZNSt12__basic_fileIcE5close*;
- _ZNSt12__basic_fileIcE4sync*;
- _ZNSt12__basic_fileIcE4open*;
- _ZNSt12__basic_fileIcE2fd*;
- _ZNSt12__basic_fileIcE12_M_open_modeE*;
- _ZNKSt12__basic_fileIcE7is_open*;
-
- # std::locale destructors
- _ZNSt6localeD*;
-
- # std::locale::facet destructors
- _ZNSt6locale5facetD*;
-
- # std::codecvt<char> members.
- _ZNKSt7codecvtIcc11__mbstate_tE*;
- # std::codecvt<char>::~codecvt
- _ZNSt7codecvtIcc11__mbstate_tED*;
- # std::codecvt<char>::codecvt(size_t), where size_t variable.
- _ZNSt7codecvtIcc11__mbstate_tEC[12]E[jm];
- # std::codecvt<char>::id
- _ZNSt7codecvtIcc11__mbstate_tE2idE;
-
- # std::codecvt<wchar_t> members.
- _ZNKSt7codecvtIwc11__mbstate_tE*;
- # std::codecvt<wchar_t>::~codecvt
- _ZNSt7codecvtIwc11__mbstate_tED*;
- # std::codecvt<wchar_t>::codecvt(size_t), where size_t variable.
- _ZNSt7codecvtIwc11__mbstate_tEC[12]E[jm];
- # std::codecvt<wchar_t>::id
- _ZNSt7codecvtIwc11__mbstate_tE2idE;
-
- # std::use_facet<codecvt>
- _ZSt9use_facetISt7codecvtIcc11__mbstate_tEERKT_RKSt6locale;
- _ZSt9use_facetISt7codecvtIwc11__mbstate_tEERKT_RKSt6locale;
-
- # std::has_facet*
- _ZSt9has_facet*;
- # std::__default_alloc_template
- _ZNSt24__default_alloc_templateILb1ELi0EE10deallocate*;
- _ZNSt24__default_alloc_templateILb1ELi0EE8allocate*;
- _ZNSt24__default_alloc_templateILb1ELi0EE12_S_free_listE;
- _ZNSt24__default_alloc_templateILb1ELi0EE22_S_node_allocator_lockE;
- _ZNSt24__default_alloc_templateILb1ELi0EE9_S_refillE*;
-
- # std::__default_alloc_template to be removed in the future
- _ZNSt24__default_alloc_templateILb1ELi0EE10reallocateEPv*;
- _ZNSt24__default_alloc_templateILb1ELi0EE11_S_round_upE*;
- _ZNSt24__default_alloc_templateILb1ELi0EE14_S_chunk_allocE*;
- _ZNSt24__default_alloc_templateILb1ELi0EE17_S_freelist_indexE*;
- _ZNSt24__default_alloc_templateILb1ELi0EE11_S_end_freeE;
- _ZNSt24__default_alloc_templateILb1ELi0EE12_S_heap_sizeE;
- _ZNSt24__default_alloc_templateILb1ELi0EE13_S_start_freeE;
- _ZNSt24__default_alloc_templateILb1ELi0EE5_Lock*;
-
- # operator new(unsigned)
- _Znwj;
- # operator new(unsigned, std::nothrow_t const&)
- _ZnwjRKSt9nothrow_t;
- # operator new(unsigned long)
- _Znwm;
- # operator new(unsigned long, std::nothrow_t const&)
- _ZnwmRKSt9nothrow_t;
+ # operator new(size_t)
+ _Znw[jm];
+ # operator new(size_t, std::nothrow_t const&)
+ _Znw[jm]RKSt9nothrow_t;
# operator delete(void*)
_ZdlPv;
# operator delete(void*, std::nothrow_t const&)
_ZdlPvRKSt9nothrow_t;
- # operator new[](unsigned)
- _Znaj;
- # operator new[](unsigned, std::nothrow_t const&)
- _ZnajRKSt9nothrow_t;
- # operator new[](unsigned long)
- _Znam;
- # operator new[](unsigned long, std::nothrow_t const&)
- _ZnamRKSt9nothrow_t;
+ # operator new[](size_t)
+ _Zna[jm];
+ # operator new[](size_t, std::nothrow_t const&)
+ _Zna[jm]RKSt9nothrow_t;
# operator delete[](void*)
_ZdaPv;
# operator delete[](void*, std::nothrow_t const&)
_ZdaPvRKSt9nothrow_t;
- # vtable
+ # std::locale destructors
+ _ZNSt6localeD*;
+
+ # std::locale::facet destructors
+ _ZNSt6locale5facetD*;
+
+ # std::locale::_Impl constructors, destructors
+ _ZNSt6locale5_ImplC*;
+ _ZNSt6locale5_ImplD*;
+
+ # std::ios_base, std::ios_base::Init destructors
+ _ZNSt8ios_baseD*;
+ _ZNSt8ios_base4InitD*;
+
+ # bool has_facet
+ _ZSt9has_facet*;
+
+ # _Rb_tree
+ _ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base;
+ _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base;
+ _ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base;
+ _ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base;
+ _ZSt20_Rb_tree_black_countPKSt18_Rb_tree_node_baseS1_;
+ _ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_;
+ _ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_;
+ _ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS_;
+ _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_;
+
+ # std::__codecvt_abstract_base*
+ _ZNStSt23__codecvt_abstract_base*;
+
+ # std::__basic_file
+ _ZNKSt12__basic_fileIcE7is_openEv;
+ _ZNSt12__basic_fileIcE2fdEv;
+ _ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei;
+ _ZNSt12__basic_fileIcE4syncEv;
+ _ZNSt12__basic_fileIcE5closeEv;
+ _ZNSt12__basic_fileIcE6xsgetn*;
+ _ZNSt12__basic_fileIcE6xsputn*;
+ _ZNSt12__basic_fileIcE7seekoff*;
+ _ZNSt12__basic_fileIcE8sys_openE*St13_Ios_Openmode;
+ _ZNSt12__basic_fileIcE8sys_openEiSt13_Ios_Openmode;
+ _ZNSt12__basic_fileIcE8xsputn_2*;
+ _ZNSt12__basic_fileIcE9showmanycEv;
+ _ZNSt12__basic_fileIcEC*;
+ _ZNSt12__basic_fileIcED*;
+
+ # virtual table
+ _ZTVNSt8ios_base7failureE;
+ _ZTVNSt6locale5facetE;
_ZTVS[a-z];
_ZTVSt[0-9][A-Za-z]*;
_ZTVSt[0-9][0-9][A-Za-z]*;
- _ZTTS[a-z];
- _ZTTSt[0-9][A-Za-z]*;
- _ZTTSt[0-9][0-9][A-Za-z]*;
- _ZTVN9__gnu_cxx*;
- _ZTVNSt6locale5facetE;
_ZTVSt11__timepunctI[cw]E;
- _ZTVNSt8ios_base7failureE;
_ZTVSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTVSt21__ctype_abstract_baseI[cw]E;
- # XXX
- _ZTVN10__cxxabi*;
+ # VTT structure
+ _ZTTS[a-z];
+ _ZTTSt[0-9][A-Za-z]*;
+ _ZTTSt[0-9][0-9][A-Za-z]*;
- # typeinfo
- _ZTI[a-z];
- _ZTIP[a-z];
- _ZTIPK[a-z];
+ # typeinfo structure
_ZTIS[a-z];
+ _ZTINSt8ios_base7failureE;
+ _ZTINSt6locale5facetE;
_ZTISt[0-9][A-Za-z]*;
_ZTISt[0-9][0-9][A-Za-z]*;
- _ZTS[a-z];
+ _ZTISt11__timepunctI[cw]E;
+ _ZTISt10__num_base;
+ _ZTISt21__ctype_abstract_baseI[cw]E;
+ _ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
+ _ZTIN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
+ _ZTIN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
+
+ # typeinfo name
+ _ZTSNSt8ios_base7failureE;
+ _ZTSNSt6locale5facetE;
_ZTSS[a-z];
- _ZTSP[a-z];
- _ZTSPK[a-z];
_ZTSSt[0-9][A-Za-z]*;
_ZTSSt[0-9][0-9][A-Za-z]*;
- _ZTSN9__gnu_cxx*;
- _ZTIN9__gnu_cxx*;
- _ZTINSt8ios_base7failureE;
- _ZTSNSt8ios_base7failureE;
- _ZTINSt6locale5facetE;
- _ZTSNSt6locale5facetE;
- _ZTISt11__timepunctI[cw]E;
_ZTSSt11__timepunctI[cw]E;
_ZTSSt10__num_base;
- _ZTISt10__num_base;
_ZTSSt21__ctype_abstract_baseI[cw]E;
- _ZTISt21__ctype_abstract_baseI[cw]E;
- _ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTSSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
-
- # XXX
- _ZTIN10__cxxabi*;
- _ZTSN10__cxxabi*;
+ _ZTSN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
+ _ZTSN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
# function-scope static objects requires a guard variable.
- _ZGV*;
+ _ZGVNSt*;
# virtual function thunks
- _ZTh*;
- _ZTv*;
- _ZTc*;
+ _ZThn8_NS*;
+ _ZThn16_NS*;
+ _ZTv0_n12_NS*;
+ _ZTv0_n24_NS*;
# std::__convert_to_v
_ZSt14__convert_to_v*;
+ # stub functions from libmath
+ sinf;
+ sinl;
+ sinhf;
+ sinhl;
+ cosf;
+ cosl;
+ coshf;
+ coshl;
+ tanf;
+ tanl;
+ tanhf;
+ tanhl;
+ atan2f;
+ atan2l;
+ expf;
+ expl;
+ hypotf;
+ hypotl;
+ hypot;
+ logf;
+ logl;
+ log10f;
+ log10l;
+ powf;
+ powl;
+ sqrtf;
+ sqrtl;
+ copysignf;
+ __signbit;
+ __signbitf;
+ __signbitl;
+
+ # __gnu_cxx::stdio_sync_filebuf
+ _ZTVN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
+
+ # __gnu_cxx::__atomic_add
+ # __gnu_cxx::__exchange_and_add
+ _ZN9__gnu_cxx12__atomic_add*;
+ _ZN9__gnu_cxx18__exchange_and_add*;
+
+ # DO NOT DELETE THIS LINE. Port-specific symbols, if any, will be here.
+
local:
*;
};
-# Symbols added after GLIBCPP_3.2
-GLIBCPP_3.2.1 {
-
- _ZNSt7codecvtIcc11__mbstate_tEC1EP15__locale_structj;
- _ZNSt7codecvtIcc11__mbstate_tEC2EP15__locale_structj;
- _ZNSt7codecvtIwc11__mbstate_tEC1EP15__locale_structj;
- _ZNSt7codecvtIwc11__mbstate_tEC2EP15__locale_structj;
-
- _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_;
- _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_ERKS6_S8_;
-
- # stub functions from libmath
- sinf;
- sinl;
- sinhf;
- sinhl;
- cosf;
- cosl;
- coshf;
- coshl;
- tanf;
- tanl;
- tanhf;
- tanhl;
- atan2f;
- atan2l;
- expf;
- expl;
- hypotf;
- hypotl;
- hypot;
- logf;
- logl;
- log10f;
- log10l;
- powf;
- powl;
- sqrtf;
- sqrtl;
- copysignf;
- nan;
- __signbit;
- __signbitf;
- __signbitl;
-
-} GLIBCPP_3.2;
-
-GLIBCPP_3.2.2 {
-
- _ZNSt24__default_alloc_templateILb1ELi0EE12_S_force_newE;
-
-} GLIBCPP_3.2.1;
-
-GLIBCPP_3.2.3 {
+GLIBCXX_3.4.1 {
+
+ _ZNSt12__basic_fileIcE4fileEv;
+
+} GLIBCXX_3.4;
+
+GLIBCXX_3.4.2 {
- global:
+ _ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EE4fileEv;
- extern "C++"
- {
- # Needed only when generic cpu's atomicity.h is in use.
- __gnu_cxx::_Atomic_add_mutex;
- __gnu_cxx::_Atomic_add_mutex_once;
- __gnu_cxx::__gthread_atomic_add_mutex_once;
-
- std::__num_base::_S_atoms_in;
- std::__num_base::_S_atoms_out
- };
-
- _ZNKSt7num_putI[wc]St19ostreambuf_iteratorI[wc]St11char_traitsI[wc]EEE6_M_pad*;
-
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE14_M_convert_intI[yxml]EES3_S3_RSt8ios_base[cw]T_;
-
- _ZNKSt7num_putI[wc]St19ostreambuf_iteratorI[wc]St11char_traitsI[wc]EEE14_M_group_float*;
-
- _ZNKSt7num_putI[wc]St19ostreambuf_iteratorI[wc]St11char_traitsI[wc]EEE12_M_group_int*;
-
- # __basic_file::showmanyc_helper
- _ZNSt12__basic_fileIcE16showmanyc_helperEv;
-
-} GLIBCPP_3.2.2;
+ _ZN9__gnu_cxx11__pool_base9_M_refillE[jm];
+ _ZN9__gnu_cxx11__pool_base16_M_get_free_listE[jm];
+ _ZN9__gnu_cxx11__pool_base12_M_get_mutexEv;
+} GLIBCXX_3.4.1;
# Symbols in the support library (libsupc++) have their own tag.
-CXXABI_1.2 {
+CXXABI_1.3 {
global:
__cxa_allocate_exception;
@@ -411,6 +280,9 @@ CXXABI_1.2 {
__cxa_free_exception;
__cxa_get_globals;
__cxa_get_globals_fast;
+ __cxa_guard_abort;
+ __cxa_guard_acquire;
+ __cxa_guard_release;
__cxa_pure_virtual;
__cxa_rethrow;
__cxa_throw;
@@ -428,38 +300,72 @@ CXXABI_1.2 {
__gxx_personality_sj0;
__dynamic_cast;
+ # *_type_info classes, ctor and dtor
+ _ZN10__cxxabiv117__array_type_info*;
+ _ZN10__cxxabiv117__class_type_info*;
+ _ZN10__cxxabiv116__enum_type_info*;
+ _ZN10__cxxabiv120__function_type_info*;
+ _ZN10__cxxabiv123__fundamental_type_info*;
+ _ZN10__cxxabiv117__pbase_type_info*;
+ _ZN10__cxxabiv129__pointer_to_member_type_info*;
+ _ZN10__cxxabiv119__pointer_type_info*;
+ _ZN10__cxxabiv120__si_class_type_info*;
+ _ZN10__cxxabiv121__vmi_class_type_info*;
+
+ # *_type_info classes, member functions
+ _ZNK10__cxxabiv117__class_type_info*;
+ _ZNK10__cxxabiv120__function_type_info*;
+ _ZNK10__cxxabiv117__pbase_type_info*;
+ _ZNK10__cxxabiv129__pointer_to_member_type_info*;
+ _ZNK10__cxxabiv119__pointer_type_info*;
+ _ZNK10__cxxabiv120__si_class_type_info*;
+ _ZNK10__cxxabiv121__vmi_class_type_info*;
+
+ # virtual table
+ _ZTVN10__cxxabiv117__array_type_infoE;
+ _ZTVN10__cxxabiv117__class_type_infoE;
+ _ZTVN10__cxxabiv116__enum_type_infoE;
+ _ZTVN10__cxxabiv120__function_type_infoE;
+ _ZTVN10__cxxabiv123__fundamental_type_infoE;
+ _ZTVN10__cxxabiv117__pbase_type_infoE;
+ _ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTVN10__cxxabiv119__pointer_type_infoE;
+ _ZTVN10__cxxabiv120__si_class_type_infoE;
+ _ZTVN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo structure (and some names)
+ _ZTI[a-z];
+ _ZTIP[a-z];
+ _ZTIPK[a-z];
+ _ZTIN10__cxxabiv117__array_type_infoE;
+ _ZTIN10__cxxabiv117__class_type_infoE;
+ _ZTIN10__cxxabiv116__enum_type_infoE;
+ _ZTIN10__cxxabiv120__function_type_infoE;
+ _ZTIN10__cxxabiv123__fundamental_type_infoE;
+ _ZTIN10__cxxabiv117__pbase_type_infoE;
+ _ZTIN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTIN10__cxxabiv119__pointer_type_infoE;
+ _ZTIN10__cxxabiv120__si_class_type_infoE;
+ _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo name
+ _ZTS[a-z];
+ _ZTSP[a-z];
+ _ZTSPK[a-z];
+ _ZTSN10__cxxabiv117__array_type_infoE;
+ _ZTSN10__cxxabiv117__class_type_infoE;
+ _ZTSN10__cxxabiv116__enum_type_infoE;
+ _ZTSN10__cxxabiv120__function_type_infoE;
+ _ZTSN10__cxxabiv123__fundamental_type_infoE;
+ _ZTSN10__cxxabiv117__pbase_type_infoE;
+ _ZTSN10__cxxabiv129__pointer_to_member_type_infoE;
+ _ZTSN10__cxxabiv119__pointer_type_infoE;
+ _ZTSN10__cxxabiv120__si_class_type_infoE;
+ _ZTSN10__cxxabiv121__vmi_class_type_infoE;
+
# __gnu_cxx::_verbose_terminate_handler()
_ZN9__gnu_cxx27__verbose_terminate_handlerEv;
- # XXX Should not be exported.
- __cxa_dyn_string_append_char;
- __cxa_dyn_string_append_cstr;
- __cxa_dyn_string_append;
- __cxa_dyn_string_clear;
- __cxa_dyn_string_copy_cstr;
- __cxa_dyn_string_copy;
- __cxa_dyn_string_delete;
- __cxa_dyn_string_eq;
- __cxa_dyn_string_init;
- __cxa_dyn_string_insert_char;
- __cxa_dyn_string_insert_cstr;
- __cxa_dyn_string_insert;
- __cxa_dyn_string_new;
- __cxa_dyn_string_prepend_cstr;
- __cxa_dyn_string_prepend;
- __cxa_dyn_string_release;
- __cxa_dyn_string_resize;
- __cxa_dyn_string_substring;
-
local:
*;
};
-
-# Symbols added after CXXABI_1.2
-CXXABI_1.2.1 {
-
- __cxa_guard_acquire;
- __cxa_guard_release;
- __cxa_guard_abort;
-
-} CXXABI_1.2;
diff --git a/contrib/libstdc++/config/locale/generic/c_locale.cc b/contrib/libstdc++/config/locale/generic/c_locale.cc
index 23f7912..730c366 100644
--- a/contrib/libstdc++/config/locale/generic/c_locale.cc
+++ b/contrib/libstdc++/config/locale/generic/c_locale.cc
@@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,9 +33,12 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
+#include <cerrno> // For errno
+#include <cmath> // For isinf, finite, finitef, fabs
+#include <cstdlib> // For strof, strtold
#include <locale>
-#ifdef _GLIBCPP_HAVE_IEEEFP_H
+#ifdef _GLIBCXX_HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
@@ -44,78 +47,8 @@ namespace std
// Specializations for all types used in num_get.
template<>
void
- __convert_to_v(const char* __s, long& __v, ios_base::iostate& __err,
- const __c_locale&, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- long __l = strtol(__s, &__sanity, __base);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __l;
- else
- __err |= ios_base::failbit;
- }
- }
-
- template<>
- void
- __convert_to_v(const char* __s, unsigned long& __v,
- ios_base::iostate& __err, const __c_locale&, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- unsigned long __ul = strtoul(__s, &__sanity, __base);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ul;
- else
- __err |= ios_base::failbit;
- }
- }
-
-#ifdef _GLIBCPP_USE_LONG_LONG
- template<>
- void
- __convert_to_v(const char* __s, long long& __v, ios_base::iostate& __err,
- const __c_locale&, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- long long __ll = strtoll(__s, &__sanity, __base);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ll;
- else
- __err |= ios_base::failbit;
- }
- }
-
- template<>
- void
- __convert_to_v(const char* __s, unsigned long long& __v,
- ios_base::iostate& __err, const __c_locale&, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- unsigned long long __ull = strtoull(__s, &__sanity, __base);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ull;
- else
- __err |= ios_base::failbit;
- }
- }
-#endif
-
- template<>
- void
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale&, int)
+ const __c_locale&)
{
if (!(__err & ios_base::failbit))
{
@@ -124,18 +57,18 @@ namespace std
setlocale(LC_ALL, "C");
char* __sanity;
errno = 0;
-#if defined(_GLIBCPP_USE_C99)
+#if defined(_GLIBCXX_USE_C99)
float __f = strtof(__s, &__sanity);
#else
double __d = strtod(__s, &__sanity);
float __f = static_cast<float>(__d);
-#ifdef _GLIBCPP_HAVE_FINITEF
+#ifdef _GLIBCXX_HAVE_FINITEF
if (!finitef (__f))
errno = ERANGE;
-#elif defined (_GLIBCPP_HAVE_FINITE)
+#elif defined (_GLIBCXX_HAVE_FINITE)
if (!finite (static_cast<double> (__f)))
errno = ERANGE;
-#elif defined (_GLIBCPP_HAVE_ISINF)
+#elif defined (_GLIBCXX_HAVE_ISINF)
if (isinf (static_cast<double> (__f)))
errno = ERANGE;
#else
@@ -143,7 +76,7 @@ namespace std
errno = ERANGE;
#endif
#endif
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __f;
else
__err |= ios_base::failbit;
@@ -155,7 +88,7 @@ namespace std
template<>
void
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale&, int)
+ const __c_locale&)
{
if (!(__err & ios_base::failbit))
{
@@ -165,7 +98,7 @@ namespace std
char* __sanity;
errno = 0;
double __d = strtod(__s, &__sanity);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __d;
else
__err |= ios_base::failbit;
@@ -177,18 +110,18 @@ namespace std
template<>
void
__convert_to_v(const char* __s, long double& __v,
- ios_base::iostate& __err, const __c_locale&, int)
+ ios_base::iostate& __err, const __c_locale&)
{
if (!(__err & ios_base::failbit))
{
// Assumes __s formatted for "C" locale.
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C");
-#if defined(_GLIBCPP_USE_C99)
+#if defined(_GLIBCXX_USE_C99)
char* __sanity;
errno = 0;
long double __ld = strtold(__s, &__sanity);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __ld;
#else
typedef char_traits<char>::int_type int_type;
@@ -197,7 +130,7 @@ namespace std
int __p = sscanf(__s, "%Lf", &__ld);
if (errno == ERANGE)
__p = 0;
-#ifdef _GLIBCPP_HAVE_FINITEL
+#ifdef _GLIBCXX_HAVE_FINITEL
if ((__p == 1) && !finitel (__ld))
__p = 0;
#endif
@@ -212,9 +145,16 @@ namespace std
}
void
- locale::facet::_S_create_c_locale(__c_locale& __cloc, const char*,
+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
__c_locale)
- { __cloc = NULL; }
+ {
+ // Currently, the generic model only supports the "C" locale.
+ // See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
+ __cloc = NULL;
+ if (strcmp(__s, "C"))
+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
+ "name not valid"));
+ }
void
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
@@ -223,9 +163,11 @@ namespace std
__c_locale
locale::facet::_S_clone_c_locale(__c_locale&)
{ return __c_locale(); }
+} // namespace std
- const char* locale::_S_categories[_S_categories_size
- + _S_extra_categories_size] =
+namespace __gnu_cxx
+{
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
{
"LC_CTYPE",
"LC_NUMERIC",
@@ -234,4 +176,9 @@ namespace std
"LC_MONETARY",
"LC_MESSAGES"
};
+}
+
+namespace std
+{
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
} // namespace std
diff --git a/contrib/libstdc++/config/locale/generic/c_locale.h b/contrib/libstdc++/config/locale/generic/c_locale.h
index 1f2accb..9fadcc4 100644
--- a/contrib/libstdc++/config/locale/generic/c_locale.h
+++ b/contrib/libstdc++/config/locale/generic/c_locale.h
@@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,14 +33,16 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
-#ifndef _CPP_BITS_C_LOCALE_H
-#define _CPP_BITS_C_LOCALE_H 1
+#ifndef _C_LOCALE_H
+#define _C_LOCALE_H 1
#pragma GCC system_header
#include <clocale>
+#include <cstring> // get std::strlen
+#include <cstdio> // get std::snprintf or std::sprintf
-#define _GLIBCPP_NUM_CATEGORIES 0
+#define _GLIBCXX_NUM_CATEGORIES 0
namespace std
{
@@ -53,30 +55,29 @@ namespace std
template<typename _Tv>
int
__convert_from_v(char* __out,
- const int __attribute__ ((__unused__)) __size,
+ const int __size __attribute__((__unused__)),
const char* __fmt,
_Tv __v, const __c_locale&, int __prec = -1)
{
- char* __old = setlocale(LC_ALL, NULL);
- char* __sav = static_cast<char*>(malloc(strlen(__old) + 1));
- if (__sav)
- strcpy(__sav, __old);
- setlocale(LC_ALL, "C");
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+ std::strcpy(__sav, __old);
+ std::setlocale(LC_ALL, "C");
int __ret;
-#ifdef _GLIBCPP_USE_C99
+#ifdef _GLIBCXX_USE_C99
if (__prec >= 0)
- __ret = snprintf(__out, __size, __fmt, __prec, __v);
+ __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
else
- __ret = snprintf(__out, __size, __fmt, __v);
+ __ret = std::snprintf(__out, __size, __fmt, __v);
#else
if (__prec >= 0)
- __ret = sprintf(__out, __fmt, __prec, __v);
+ __ret = std::sprintf(__out, __fmt, __prec, __v);
else
- __ret = sprintf(__out, __fmt, __v);
+ __ret = std::sprintf(__out, __fmt, __v);
#endif
- setlocale(LC_ALL, __sav);
- free(__sav);
+ std::setlocale(LC_ALL, __sav);
+ delete [] __sav;
return __ret;
}
}
diff --git a/contrib/libstdc++/config/locale/generic/codecvt_members.cc b/contrib/libstdc++/config/locale/generic/codecvt_members.cc
index ff65dff..8bdc227 100644
--- a/contrib/libstdc++/config/locale/generic/codecvt_members.cc
+++ b/contrib/libstdc++/config/locale/generic/codecvt_members.cc
@@ -38,7 +38,7 @@
namespace std
{
// Specializations.
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_out(state_type& __state, const intern_type* __from,
@@ -46,25 +46,61 @@ namespace std
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
- result __ret = error;
- size_t __len = min(__from_end - __from, __to_end - __to);
- size_t __conv = wcsrtombs(__to, &__from, __len, &__state);
+ result __ret = ok;
+ // The conversion must be done using a temporary destination buffer
+ // since it is not possible to pass the size of the buffer to wcrtomb
+ state_type __tmp_state(__state);
- if (__conv == __len)
- {
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = ok;
- }
- else if (__conv > 0 && __conv < __len)
+ // The conversion must be done by calling wcrtomb in a loop rather
+ // than using wcsrtombs because wcsrtombs assumes that the input is
+ // zero-terminated.
+
+ // Either we can upper bound the total number of external characters to
+ // something smaller than __to_end - __to or the conversion must be done
+ // using a temporary destination buffer since it is not possible to
+ // pass the size of the buffer to wcrtomb
+ if (MB_CUR_MAX * (__from_end - __from) - (__to_end - __to) <= 0)
+ while (__from < __from_end)
+ {
+ const size_t __conv = wcrtomb(__to, *__from, &__tmp_state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ __ret = error;
+ break;
+ }
+ __state = __tmp_state;
+ __to += __conv;
+ __from++;
+ }
+ else
{
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = partial;
+ extern_type __buf[MB_LEN_MAX];
+ while (__from < __from_end && __to < __to_end)
+ {
+ const size_t __conv = wcrtomb(__buf, *__from, &__tmp_state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ __ret = error;
+ break;
+ }
+ else if (__conv > static_cast<size_t>(__to_end - __to))
+ {
+ __ret = partial;
+ break;
+ }
+
+ memcpy(__to, __buf, __conv);
+ __state = __tmp_state;
+ __to += __conv;
+ __from++;
+ }
}
- else
- __ret = error;
-
+
+ if (__ret == ok && __from < __from_end)
+ __ret = partial;
+
+ __from_next = __from;
+ __to_next = __to;
return __ret;
}
@@ -75,25 +111,106 @@ namespace std
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
- result __ret = error;
- size_t __len = min(__from_end - __from, __to_end - __to);
- size_t __conv = mbsrtowcs(__to, &__from, __len, &__state);
+ result __ret = ok;
+ // This temporary state object is neccessary so __state won't be modified
+ // if [__from, __from_end) is a partial multibyte character.
+ state_type __tmp_state(__state);
- if (__conv == __len)
+ // Conversion must be done by calling mbrtowc in a loop rather than
+ // by calling mbsrtowcs because mbsrtowcs assumes that the input
+ // sequence is zero-terminated.
+ while (__from < __from_end && __to < __to_end)
{
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = ok;
+ size_t __conv = mbrtowc(__to, __from, __from_end - __from,
+ &__tmp_state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ __ret = error;
+ break;
+ }
+ else if (__conv == static_cast<size_t>(-2))
+ {
+ // It is unclear what to return in this case (see DR 382).
+ __ret = partial;
+ break;
+ }
+ else if (__conv == 0)
+ {
+ // XXX Probably wrong for stateful encodings
+ __conv = 1;
+ *__to = L'\0';
+ }
+
+ __state = __tmp_state;
+ __to++;
+ __from += __conv;
}
- else if (__conv > 0 && __conv < __len)
+
+ // It is not clear that __from < __from_end implies __ret != ok
+ // (see DR 382).
+ if (__ret == ok && __from < __from_end)
+ __ret = partial;
+
+ __from_next = __from;
+ __to_next = __to;
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_encoding() const throw()
+ {
+ // XXX This implementation assumes that the encoding is
+ // stateless and is either single-byte or variable-width.
+ int __ret = 0;
+ if (MB_CUR_MAX == 1)
+ __ret = 1;
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_max_length() const throw()
+ {
+ // XXX Probably wrong for stateful encodings.
+ int __ret = MB_CUR_MAX;
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_length(state_type& __state, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
+ {
+ int __ret = 0;
+ state_type __tmp_state(__state);
+
+ while (__from < __end && __max)
{
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = partial;
+ size_t __conv = mbrtowc(NULL, __from, __end - __from, &__tmp_state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ // Invalid source character
+ break;
+ }
+ else if (__conv == static_cast<size_t>(-2))
+ {
+ // Remainder of input does not form a complete destination
+ // character.
+ break;
+ }
+ else if (__conv == 0)
+ {
+ // XXX Probably wrong for stateful encodings
+ __conv = 1;
+ }
+
+ __state = __tmp_state;
+ __from += __conv;
+ __ret += __conv;
+ __max--;
}
- else
- __ret = error;
-
+
return __ret;
}
#endif
diff --git a/contrib/libstdc++/config/locale/generic/collate_members.cc b/contrib/libstdc++/config/locale/generic/collate_members.cc
index 93767d9..9547f71 100644
--- a/contrib/libstdc++/config/locale/generic/collate_members.cc
+++ b/contrib/libstdc++/config/locale/generic/collate_members.cc
@@ -53,7 +53,7 @@ namespace std
size_t __n) const
{ return strxfrm(__to, __from, __n); }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
collate<wchar_t>::_M_compare(const wchar_t* __one,
diff --git a/contrib/libstdc++/config/locale/generic/ctype_members.cc b/contrib/libstdc++/config/locale/generic/ctype_members.cc
index 71e810a..af994cb 100644
--- a/contrib/libstdc++/config/locale/generic/ctype_members.cc
+++ b/contrib/libstdc++/config/locale/generic/ctype_members.cc
@@ -1,6 +1,6 @@
// std::ctype implementation details, generic version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -43,11 +43,14 @@ namespace std
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
{
- _S_destroy_c_locale(_M_c_locale_ctype);
- _S_create_c_locale(_M_c_locale_ctype, __s);
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
+ }
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
{
@@ -128,13 +131,16 @@ namespace std
do_is(mask __m, char_type __c) const
{
bool __ret = false;
- const size_t __bitmasksize = 10;
+ // Generically, 15 (instead of 10) since we don't know the numerical
+ // encoding of the various categories in /usr/include/ctype.h.
+ const size_t __bitmasksize = 15;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
- {
- const mask __bit = static_cast<mask>(1 << __bitcur);
- if (__m & __bit)
- __ret |= iswctype(__c, _M_convert_to_wmask(__bit));
- }
+ if (__m & _M_bit[__bitcur]
+ && iswctype(__c, _M_wmask[__bitcur]))
+ {
+ __ret = true;
+ break;
+ }
return __ret;
}
@@ -144,14 +150,13 @@ namespace std
{
for (;__lo < __hi; ++__vec, ++__lo)
{
- const size_t __bitmasksize = 10;
+ // Generically, 15 (instead of 10) since we don't know the numerical
+ // encoding of the various categories in /usr/include/ctype.h.
+ const size_t __bitmasksize = 15;
mask __m = 0;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
- {
- const mask __bit = static_cast<mask>(1 << __bitcur);
- if (iswctype(*__lo, _M_convert_to_wmask(__bit)))
- __m |= __bit;
- }
+ if (iswctype(*__lo, _M_wmask[__bitcur]))
+ __m |= _M_bit[__bitcur];
*__vec = __m;
}
return __hi;
@@ -178,15 +183,18 @@ namespace std
wchar_t
ctype<wchar_t>::
do_widen(char __c) const
- { return btowc(__c); }
+ { return _M_widen[static_cast<unsigned char>(__c)]; }
const char*
ctype<wchar_t>::
do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
- mbstate_t __state;
- memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
+ while (__lo < __hi)
+ {
+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
+ ++__lo;
+ ++__dest;
+ }
return __hi;
}
@@ -194,7 +202,9 @@ namespace std
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
{
- int __c = wctob(__wc);
+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
+ return _M_narrow[__wc];
+ const int __c = wctob(__wc);
return (__c == EOF ? __dfault : static_cast<char>(__c));
}
@@ -203,24 +213,55 @@ namespace std
do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
char* __dest) const
{
- size_t __offset = 0;
- while (true)
+ if (_M_narrow_ok)
+ while (__lo < __hi)
+ {
+ if (*__lo >= 0 && *__lo < 128)
+ *__dest = _M_narrow[*__lo];
+ else
+ {
+ const int __c = wctob(*__lo);
+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
+ }
+ ++__lo;
+ ++__dest;
+ }
+ else
+ while (__lo < __hi)
+ {
+ const int __c = wctob(*__lo);
+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
+ ++__lo;
+ ++__dest;
+ }
+ return __hi;
+ }
+
+ void
+ ctype<wchar_t>::_M_initialize_ctype()
+ {
+ wint_t __i;
+ for (__i = 0; __i < 128; ++__i)
{
- const wchar_t* __start = __lo + __offset;
- size_t __len = __hi - __start;
-
- mbstate_t __state;
- memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- size_t __con = wcsrtombs(__dest + __offset, &__start, __len, &__state);
- if (__con != __len && __start != 0)
- {
- __offset = __start - __lo;
- __dest[__offset++] = __dfault;
- }
- else
+ const int __c = wctob(__i);
+ if (__c == EOF)
break;
+ else
+ _M_narrow[__i] = static_cast<char>(__c);
}
- return __hi;
+ if (__i == 128)
+ _M_narrow_ok = true;
+ else
+ _M_narrow_ok = false;
+ for (size_t __i = 0;
+ __i < sizeof(_M_widen) / sizeof(wint_t); ++__i)
+ _M_widen[__i] = btowc(__i);
+
+ for (size_t __i = 0; __i <= 15; ++__i)
+ {
+ _M_bit[__i] = static_cast<mask>(1 << __i);
+ _M_wmask[__i] = _M_convert_to_wmask(_M_bit[__i]);
+ }
}
-#endif // _GLIBCPP_USE_WCHAR_T
+#endif // _GLIBCXX_USE_WCHAR_T
}
diff --git a/contrib/libstdc++/config/locale/generic/messages_members.cc b/contrib/libstdc++/config/locale/generic/messages_members.cc
index f38f82b..6edca38 100644
--- a/contrib/libstdc++/config/locale/generic/messages_members.cc
+++ b/contrib/libstdc++/config/locale/generic/messages_members.cc
@@ -43,7 +43,7 @@ namespace std
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{ return __dfault; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
diff --git a/contrib/libstdc++/config/locale/generic/messages_members.h b/contrib/libstdc++/config/locale/generic/messages_members.h
index c1c8e4d..4a2ff4a 100644
--- a/contrib/libstdc++/config/locale/generic/messages_members.h
+++ b/contrib/libstdc++/config/locale/generic/messages_members.h
@@ -1,6 +1,6 @@
// std::messages implementation details, generic version -*- C++ -*-
-// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,13 +36,13 @@
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
- : locale::facet(__refs)
- { _M_c_locale_messages = _S_c_locale; }
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
template<typename _CharT>
messages<_CharT>::messages(__c_locale, const char*, size_t __refs)
- : locale::facet(__refs)
- { _M_c_locale_messages = _S_c_locale; }
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
template<typename _CharT>
typename messages<_CharT>::catalog
@@ -76,6 +76,9 @@
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
- _S_destroy_c_locale(_M_c_locale_messages);
- _S_create_c_locale(_M_c_locale_messages, __s);
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
}
diff --git a/contrib/libstdc++/config/locale/generic/monetary_members.cc b/contrib/libstdc++/config/locale/generic/monetary_members.cc
index 1921f46..957a326 100644
--- a/contrib/libstdc++/config/locale/generic/monetary_members.cc
+++ b/contrib/libstdc++/config/locale/generic/monetary_members.cc
@@ -1,6 +1,6 @@
// std::moneypunct implementation details, generic version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -47,58 +47,92 @@ namespace std
void
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*)
{
- // "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
- _M_curr_symbol = "";
- _M_positive_sign = "";
- _M_negative_sign = "";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ // "C" locale.
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<char, true>;
+
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = "";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = "";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = "";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
template<>
void
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*)
{
- // "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
- _M_curr_symbol = "";
- _M_positive_sign = "";
- _M_negative_sign = "";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ // "C" locale.
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<char, false>;
+
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = "";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = "";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = "";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
template<>
moneypunct<char, true>::~moneypunct()
- { }
+ { delete _M_data; }
template<>
moneypunct<char, false>::~moneypunct()
- { }
+ { delete _M_data; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
const char*)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
- _M_curr_symbol = L"";
- _M_positive_sign = L"";
- _M_negative_sign = L"";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<wchar_t, true>;
+
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ {
+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
+ _M_data->_M_atoms[__i] = btowc(uc);
+ }
}
template<>
@@ -107,23 +141,37 @@ namespace std
const char*)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
- _M_curr_symbol = L"";
- _M_positive_sign = L"";
- _M_negative_sign = L"";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<wchar_t, false>;
+
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ {
+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
+ _M_data->_M_atoms[__i] = btowc(uc);
+ }
}
template<>
moneypunct<wchar_t, true>::~moneypunct()
- { }
+ { delete _M_data; }
template<>
moneypunct<wchar_t, false>::~moneypunct()
- { }
+ { delete _M_data; }
#endif
}
diff --git a/contrib/libstdc++/config/locale/generic/numeric_members.cc b/contrib/libstdc++/config/locale/generic/numeric_members.cc
index f942e04..e2afed9 100644
--- a/contrib/libstdc++/config/locale/generic/numeric_members.cc
+++ b/contrib/libstdc++/config/locale/generic/numeric_members.cc
@@ -1,6 +1,6 @@
// std::numpunct implementation details, generic version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,32 +42,70 @@ namespace std
numpunct<char>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
- _M_truename = "true";
- _M_falsename = "false";
+ if (!_M_data)
+ _M_data = new __numpunct_cache<char>;
+
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_use_grouping = false;
+
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+
+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
+
+ for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
+ _M_data->_M_atoms_in[__i] = __num_base::_S_atoms_in[__i];
+
+ _M_data->_M_truename = "true";
+ _M_data->_M_truename_size = strlen(_M_data->_M_truename);
+ _M_data->_M_falsename = "false";
+ _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
}
template<>
numpunct<char>::~numpunct()
- { }
+ { delete _M_data; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
- _M_truename = L"true";
- _M_falsename = L"false";
+ if (!_M_data)
+ _M_data = new __numpunct_cache<wchar_t>;
+
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_use_grouping = false;
+
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+
+ // Use ctype::widen code without the facet...
+ unsigned char uc;
+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
+ {
+ uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
+ _M_data->_M_atoms_out[__i] = btowc(uc);
+ }
+
+ for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
+ {
+ uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__i]);
+ _M_data->_M_atoms_in[__i] = btowc(uc);
+ }
+
+ _M_data->_M_truename = L"true";
+ _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
+ _M_data->_M_falsename = L"false";
+ _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
}
template<>
numpunct<wchar_t>::~numpunct()
- { }
+ { delete _M_data; }
#endif
}
diff --git a/contrib/libstdc++/config/locale/generic/time_members.cc b/contrib/libstdc++/config/locale/generic/time_members.cc
index df43f03..6e2f755 100644
--- a/contrib/libstdc++/config/locale/generic/time_members.cc
+++ b/contrib/libstdc++/config/locale/generic/time_members.cc
@@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -55,65 +55,68 @@ namespace std
void
__timepunct<char>::_M_initialize_timepunct(__c_locale)
{
- // "C" locale
- _M_date_format = "%m/%d/%y";
- _M_date_era_format = "%m/%d/%y";
- _M_time_format = "%H:%M:%S";
- _M_time_era_format = "%H:%M:%S";
- _M_date_time_format = "";
- _M_date_time_era_format = "";
- _M_am = "AM";
- _M_pm = "PM";
- _M_am_pm_format = "";
+ // "C" locale.
+ if (!_M_data)
+ _M_data = new __timepunct_cache<char>;
+
+ _M_data->_M_date_format = "%m/%d/%y";
+ _M_data->_M_date_era_format = "%m/%d/%y";
+ _M_data->_M_time_format = "%H:%M:%S";
+ _M_data->_M_time_era_format = "%H:%M:%S";
+ _M_data->_M_date_time_format = "";
+ _M_data->_M_date_time_era_format = "";
+ _M_data->_M_am = "AM";
+ _M_data->_M_pm = "PM";
+ _M_data->_M_am_pm_format = "";
// Day names, starting with "C"'s Sunday.
- _M_day1 = "Sunday";
- _M_day2 = "Monday";
- _M_day3 = "Tuesday";
- _M_day4 = "Wednesday";
- _M_day5 = "Thursday";
- _M_day6 = "Friday";
- _M_day7 = "Saturday";
+ _M_data->_M_day1 = "Sunday";
+ _M_data->_M_day2 = "Monday";
+ _M_data->_M_day3 = "Tuesday";
+ _M_data->_M_day4 = "Wednesday";
+ _M_data->_M_day5 = "Thursday";
+ _M_data->_M_day6 = "Friday";
+ _M_data->_M_day7 = "Saturday";
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = "Sun";
- _M_day_a2 = "Mon";
- _M_day_a3 = "Tue";
- _M_day_a4 = "Wed";
- _M_day_a5 = "Thu";
- _M_day_a6 = "Fri";
- _M_day_a7 = "Sat";
+ _M_data->_M_aday1 = "Sun";
+ _M_data->_M_aday2 = "Mon";
+ _M_data->_M_aday3 = "Tue";
+ _M_data->_M_aday4 = "Wed";
+ _M_data->_M_aday5 = "Thu";
+ _M_data->_M_aday6 = "Fri";
+ _M_data->_M_aday7 = "Sat";
// Month names, starting with "C"'s January.
- _M_month01 = "January";
- _M_month02 = "February";
- _M_month03 = "March";
- _M_month04 = "April";
- _M_month05 = "May";
- _M_month06 = "June";
- _M_month07 = "July";
- _M_month08 = "August";
- _M_month09 = "September";
- _M_month10 = "October";
- _M_month11 = "November";
- _M_month12 = "December";
+ _M_data->_M_month01 = "January";
+ _M_data->_M_month02 = "February";
+ _M_data->_M_month03 = "March";
+ _M_data->_M_month04 = "April";
+ _M_data->_M_month05 = "May";
+ _M_data->_M_month06 = "June";
+ _M_data->_M_month07 = "July";
+ _M_data->_M_month08 = "August";
+ _M_data->_M_month09 = "September";
+ _M_data->_M_month10 = "October";
+ _M_data->_M_month11 = "November";
+ _M_data->_M_month12 = "December";
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = "Jan";
- _M_month_a02 = "Feb";
- _M_month_a03 = "Mar";
- _M_month_a04 = "Apr";
- _M_month_a05 = "May";
- _M_month_a06 = "Jun";
- _M_month_a07 = "July";
- _M_month_a08 = "Aug";
- _M_month_a09 = "Sep";
- _M_month_a10 = "Oct";
- _M_month_a11 = "Nov";
- _M_month_a12 = "Dec";
+ _M_data->_M_amonth01 = "Jan";
+ _M_data->_M_amonth02 = "Feb";
+ _M_data->_M_amonth03 = "Mar";
+ _M_data->_M_amonth04 = "Apr";
+ _M_data->_M_amonth05 = "May";
+ _M_data->_M_amonth06 = "Jun";
+ _M_data->_M_amonth07 = "Jul";
+ _M_data->_M_amonth08 = "Aug";
+ _M_data->_M_amonth09 = "Sep";
+ _M_data->_M_amonth10 = "Oct";
+ _M_data->_M_amonth11 = "Nov";
+ _M_data->_M_amonth12 = "Dec";
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
__timepunct<wchar_t>::
@@ -131,62 +134,65 @@ namespace std
void
__timepunct<wchar_t>::_M_initialize_timepunct(__c_locale)
{
- // "C" locale
- _M_date_format = L"%m/%d/%y";
- _M_date_era_format = L"%m/%d/%y";
- _M_time_format = L"%H:%M:%S";
- _M_time_era_format = L"%H:%M:%S";
- _M_date_time_format = L"";
- _M_date_time_era_format = L"";
- _M_am = L"AM";
- _M_pm = L"PM";
- _M_am_pm_format = L"";
+ // "C" locale.
+ if (!_M_data)
+ _M_data = new __timepunct_cache<wchar_t>;
+
+ _M_data->_M_date_format = L"%m/%d/%y";
+ _M_data->_M_date_era_format = L"%m/%d/%y";
+ _M_data->_M_time_format = L"%H:%M:%S";
+ _M_data->_M_time_era_format = L"%H:%M:%S";
+ _M_data->_M_date_time_format = L"";
+ _M_data->_M_date_time_era_format = L"";
+ _M_data->_M_am = L"AM";
+ _M_data->_M_pm = L"PM";
+ _M_data->_M_am_pm_format = L"";
// Day names, starting with "C"'s Sunday.
- _M_day1 = L"Sunday";
- _M_day2 = L"Monday";
- _M_day3 = L"Tuesday";
- _M_day4 = L"Wednesday";
- _M_day5 = L"Thursday";
- _M_day6 = L"Friday";
- _M_day7 = L"Saturday";
+ _M_data->_M_day1 = L"Sunday";
+ _M_data->_M_day2 = L"Monday";
+ _M_data->_M_day3 = L"Tuesday";
+ _M_data->_M_day4 = L"Wednesday";
+ _M_data->_M_day5 = L"Thursday";
+ _M_data->_M_day6 = L"Friday";
+ _M_data->_M_day7 = L"Saturday";
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = L"Sun";
- _M_day_a2 = L"Mon";
- _M_day_a3 = L"Tue";
- _M_day_a4 = L"Wed";
- _M_day_a5 = L"Thu";
- _M_day_a6 = L"Fri";
- _M_day_a7 = L"Sat";
+ _M_data->_M_aday1 = L"Sun";
+ _M_data->_M_aday2 = L"Mon";
+ _M_data->_M_aday3 = L"Tue";
+ _M_data->_M_aday4 = L"Wed";
+ _M_data->_M_aday5 = L"Thu";
+ _M_data->_M_aday6 = L"Fri";
+ _M_data->_M_aday7 = L"Sat";
// Month names, starting with "C"'s January.
- _M_month01 = L"January";
- _M_month02 = L"February";
- _M_month03 = L"March";
- _M_month04 = L"April";
- _M_month05 = L"May";
- _M_month06 = L"June";
- _M_month07 = L"July";
- _M_month08 = L"August";
- _M_month09 = L"September";
- _M_month10 = L"October";
- _M_month11 = L"November";
- _M_month12 = L"December";
+ _M_data->_M_month01 = L"January";
+ _M_data->_M_month02 = L"February";
+ _M_data->_M_month03 = L"March";
+ _M_data->_M_month04 = L"April";
+ _M_data->_M_month05 = L"May";
+ _M_data->_M_month06 = L"June";
+ _M_data->_M_month07 = L"July";
+ _M_data->_M_month08 = L"August";
+ _M_data->_M_month09 = L"September";
+ _M_data->_M_month10 = L"October";
+ _M_data->_M_month11 = L"November";
+ _M_data->_M_month12 = L"December";
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = L"Jan";
- _M_month_a02 = L"Feb";
- _M_month_a03 = L"Mar";
- _M_month_a04 = L"Apr";
- _M_month_a05 = L"May";
- _M_month_a06 = L"Jun";
- _M_month_a07 = L"July";
- _M_month_a08 = L"Aug";
- _M_month_a09 = L"Sep";
- _M_month_a10 = L"Oct";
- _M_month_a11 = L"Nov";
- _M_month_a12 = L"Dec";
+ _M_data->_M_amonth01 = L"Jan";
+ _M_data->_M_amonth02 = L"Feb";
+ _M_data->_M_amonth03 = L"Mar";
+ _M_data->_M_amonth04 = L"Apr";
+ _M_data->_M_amonth05 = L"May";
+ _M_data->_M_amonth06 = L"Jun";
+ _M_data->_M_amonth07 = L"Jul";
+ _M_data->_M_amonth08 = L"Aug";
+ _M_data->_M_amonth09 = L"Sep";
+ _M_data->_M_amonth10 = L"Oct";
+ _M_data->_M_amonth11 = L"Nov";
+ _M_data->_M_amonth12 = L"Dec";
}
#endif
}
diff --git a/contrib/libstdc++/config/locale/generic/time_members.h b/contrib/libstdc++/config/locale/generic/time_members.h
index 03c31d1..9801300 100644
--- a/contrib/libstdc++/config/locale/generic/time_members.h
+++ b/contrib/libstdc++/config/locale/generic/time_members.h
@@ -36,26 +36,36 @@
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
- : locale::facet(__refs)
+ : facet(__refs), _M_data(NULL)
{
- _M_name_timepunct = _S_c_name;
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache)
+ {
+ _M_name_timepunct = _S_get_c_name();
_M_initialize_timepunct();
}
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
size_t __refs)
- : locale::facet(__refs)
+ : facet(__refs), _M_data(NULL)
{
- _M_name_timepunct = new char[strlen(__s) + 1];
- strcpy(_M_name_timepunct, __s);
+ char* __tmp = new char[std::strlen(__s) + 1];
+ std::strcpy(__tmp, __s);
+ _M_name_timepunct = __tmp;
_M_initialize_timepunct(__cloc);
}
template<typename _CharT>
__timepunct<_CharT>::~__timepunct()
{
- if (_S_c_name != _M_name_timepunct)
+ if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
+ delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
diff --git a/contrib/libstdc++/config/locale/gnu/c++locale_internal.h b/contrib/libstdc++/config/locale/gnu/c++locale_internal.h
index cfb89b5..8aa5b56 100644
--- a/contrib/libstdc++/config/locale/gnu/c++locale_internal.h
+++ b/contrib/libstdc++/config/locale/gnu/c++locale_internal.h
@@ -1,6 +1,6 @@
// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,10 +40,6 @@ extern "C" __typeof(strftime_l) __strftime_l;
extern "C" __typeof(strtod_l) __strtod_l;
extern "C" __typeof(strtof_l) __strtof_l;
extern "C" __typeof(strtold_l) __strtold_l;
-extern "C" __typeof(strtol_l) __strtol_l;
-extern "C" __typeof(strtoll_l) __strtoll_l;
-extern "C" __typeof(strtoul_l) __strtoul_l;
-extern "C" __typeof(strtoull_l) __strtoull_l;
extern "C" __typeof(strxfrm_l) __strxfrm_l;
extern "C" __typeof(towlower_l) __towlower_l;
extern "C" __typeof(towupper_l) __towupper_l;
diff --git a/contrib/libstdc++/config/locale/gnu/c_locale.cc b/contrib/libstdc++/config/locale/gnu/c_locale.cc
index 065e10a..bf975b9 100644
--- a/contrib/libstdc++/config/locale/gnu/c_locale.cc
+++ b/contrib/libstdc++/config/locale/gnu/c_locale.cc
@@ -33,6 +33,7 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
+#include <cerrno> // For errno
#include <locale>
#include <stdexcept>
#include <langinfo.h>
@@ -42,88 +43,15 @@ namespace std
{
template<>
void
- __convert_to_v(const char* __s, long& __v, ios_base::iostate& __err,
- const __c_locale& __cloc, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- long __l = __strtol_l(__s, &__sanity, __base, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __l;
- else
- __err |= ios_base::failbit;
- }
- }
-
- template<>
- void
- __convert_to_v(const char* __s, unsigned long& __v,
- ios_base::iostate& __err, const __c_locale& __cloc,
- int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- unsigned long __ul = __strtoul_l(__s, &__sanity, __base, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ul;
- else
- __err |= ios_base::failbit;
- }
- }
-
-#ifdef _GLIBCPP_USE_LONG_LONG
- template<>
- void
- __convert_to_v(const char* __s, long long& __v, ios_base::iostate& __err,
- const __c_locale& __cloc, int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- long long __ll = __strtoll_l(__s, &__sanity, __base, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ll;
- else
- __err |= ios_base::failbit;
- }
- }
-
- template<>
- void
- __convert_to_v(const char* __s, unsigned long long& __v,
- ios_base::iostate& __err, const __c_locale& __cloc,
- int __base)
- {
- if (!(__err & ios_base::failbit))
- {
- char* __sanity;
- errno = 0;
- unsigned long long __ull = __strtoull_l(__s, &__sanity, __base,
- __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
- __v = __ull;
- else
- __err |= ios_base::failbit;
- }
- }
-#endif
-
- template<>
- void
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc, int)
+ const __c_locale& __cloc)
{
if (!(__err & ios_base::failbit))
{
char* __sanity;
errno = 0;
float __f = __strtof_l(__s, &__sanity, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __f;
else
__err |= ios_base::failbit;
@@ -133,14 +61,14 @@ namespace std
template<>
void
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc, int)
+ const __c_locale& __cloc)
{
if (!(__err & ios_base::failbit))
{
char* __sanity;
errno = 0;
double __d = __strtod_l(__s, &__sanity, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __d;
else
__err |= ios_base::failbit;
@@ -150,14 +78,14 @@ namespace std
template<>
void
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc, int)
+ const __c_locale& __cloc)
{
if (!(__err & ios_base::failbit))
{
char* __sanity;
errno = 0;
long double __ld = __strtold_l(__s, &__sanity, __cloc);
- if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+ if (__sanity != __s && errno != ERANGE)
__v = __ld;
else
__err |= ios_base::failbit;
@@ -172,23 +100,26 @@ namespace std
if (!__cloc)
{
// This named locale is not supported by the underlying OS.
- __throw_runtime_error("attempt to create locale from unknown name");
+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
+ "name not valid"));
}
}
void
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
{
- if (_S_c_locale != __cloc)
+ if (_S_get_c_locale() != __cloc)
__freelocale(__cloc);
}
__c_locale
locale::facet::_S_clone_c_locale(__c_locale& __cloc)
{ return __duplocale(__cloc); }
+} // namespace std
- const char* locale::_S_categories[_S_categories_size
- + _S_extra_categories_size] =
+namespace __gnu_cxx
+{
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
{
"LC_CTYPE",
"LC_NUMERIC",
@@ -203,4 +134,9 @@ namespace std
"LC_MEASUREMENT",
"LC_IDENTIFICATION"
};
+}
+
+namespace std
+{
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
} // namespace std
diff --git a/contrib/libstdc++/config/locale/gnu/c_locale.h b/contrib/libstdc++/config/locale/gnu/c_locale.h
index 37df3fa..fe899cf 100644
--- a/contrib/libstdc++/config/locale/gnu/c_locale.h
+++ b/contrib/libstdc++/config/locale/gnu/c_locale.h
@@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,19 +33,21 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
-#ifndef _CPP_BITS_C_LOCALE_H
-#define _CPP_BITS_C_LOCALE_H 1
+#ifndef _C_LOCALE_H
+#define _C_LOCALE_H 1
#pragma GCC system_header
+#include <cstring> // get std::strlen
+#include <cstdio> // get std::snprintf or std::sprintf
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
#include <libintl.h> // For messages
-#define _GLIBCPP_C_LOCALE_GNU 1
+#define _GLIBCXX_C_LOCALE_GNU 1
-#define _GLIBCPP_NUM_CATEGORIES 6
+#define _GLIBCXX_NUM_CATEGORIES 6
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
namespace __gnu_cxx
@@ -72,31 +74,30 @@ namespace std
#else
_Tv __v, const __c_locale&, int __prec = -1)
{
- char* __old = setlocale(LC_ALL, NULL);
- char* __sav = static_cast<char*>(malloc(strlen(__old) + 1));
- if (__sav)
- strcpy(__sav, __old);
- setlocale(LC_ALL, "C");
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+ std::strcpy(__sav, __old);
+ std::setlocale(LC_ALL, "C");
#endif
int __ret;
-#ifdef _GLIBCPP_USE_C99
+#ifdef _GLIBCXX_USE_C99
if (__prec >= 0)
- __ret = snprintf(__out, __size, __fmt, __prec, __v);
+ __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
else
- __ret = snprintf(__out, __size, __fmt, __v);
+ __ret = std::snprintf(__out, __size, __fmt, __v);
#else
if (__prec >= 0)
- __ret = sprintf(__out, __fmt, __prec, __v);
+ __ret = std::sprintf(__out, __fmt, __prec, __v);
else
- __ret = sprintf(__out, __fmt, __v);
+ __ret = std::sprintf(__out, __fmt, __v);
#endif
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__gnu_cxx::__uselocale(__old);
#else
- setlocale(LC_ALL, __sav);
- free(__sav);
+ std::setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
return __ret;
}
diff --git a/contrib/libstdc++/config/locale/gnu/codecvt_members.cc b/contrib/libstdc++/config/locale/gnu/codecvt_members.cc
index c3d3e34..3a3e324 100644
--- a/contrib/libstdc++/config/locale/gnu/codecvt_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/codecvt_members.cc
@@ -39,7 +39,7 @@
namespace std
{
// Specializations.
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_out(state_type& __state, const intern_type* __from,
@@ -47,31 +47,71 @@ namespace std
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
- result __ret = error;
- size_t __len = min(__from_end - __from, __to_end - __to);
+ result __ret = ok;
+ state_type __tmp_state(__state);
+
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __c_locale __old = __uselocale(_S_c_locale);
+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
- size_t __conv = wcsrtombs(__to, &__from, __len, &__state);
+
+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
+ // in case we fall back to wcrtomb and then continue, in a loop.
+ // NB: wcsnrtombs is a GNU extension
+ for (__from_next = __from, __to_next = __to;
+ __from_next < __from_end && __to_next < __to_end
+ && __ret == ok;)
+ {
+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
+ __from_end - __from_next);
+ if (!__from_chunk_end)
+ __from_chunk_end = __from_end;
+
+ __from = __from_next;
+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
+ __from_chunk_end - __from_next,
+ __to_end - __to_next, &__state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ // In case of error, in order to stop at the exact place we
+ // have to start again from the beginning with a series of
+ // wcrtomb.
+ for (; __from < __from_next; ++__from)
+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
+ __state = __tmp_state;
+ __ret = error;
+ }
+ else if (__from_next && __from_next < __from_chunk_end)
+ {
+ __to_next += __conv;
+ __ret = partial;
+ }
+ else
+ {
+ __from_next = __from_chunk_end;
+ __to_next += __conv;
+ }
+
+ if (__from_next < __from_end && __ret == ok)
+ {
+ extern_type __buf[MB_LEN_MAX];
+ __tmp_state = __state;
+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
+ if (__conv > static_cast<size_t>(__to_end - __to_next))
+ __ret = partial;
+ else
+ {
+ memcpy(__to_next, __buf, __conv);
+ __state = __tmp_state;
+ __to_next += __conv;
+ ++__from_next;
+ }
+ }
+ }
+
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
- if (__conv == __len)
- {
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = ok;
- }
- else if (__conv > 0 && __conv < __len)
- {
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = partial;
- }
- else
- __ret = error;
-
return __ret;
}
@@ -82,31 +122,184 @@ namespace std
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
- result __ret = error;
- size_t __len = min(__from_end - __from, __to_end - __to);
+ result __ret = ok;
+ state_type __tmp_state(__state);
+
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __c_locale __old = __uselocale(_S_c_locale);
+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
- size_t __conv = mbsrtowcs(__to, &__from, __len, &__state);
+
+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
+ // in case we store a L'\0' and then continue, in a loop.
+ // NB: mbsnrtowcs is a GNU extension
+ for (__from_next = __from, __to_next = __to;
+ __from_next < __from_end && __to_next < __to_end
+ && __ret == ok;)
+ {
+ const extern_type* __from_chunk_end;
+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
+ __from_end
+ - __from_next));
+ if (!__from_chunk_end)
+ __from_chunk_end = __from_end;
+
+ __from = __from_next;
+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
+ __from_chunk_end - __from_next,
+ __to_end - __to_next, &__state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ // In case of error, in order to stop at the exact place we
+ // have to start again from the beginning with a series of
+ // mbrtowc.
+ for (;; ++__to_next, __from += __conv)
+ {
+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
+ &__tmp_state);
+ if (__conv == static_cast<size_t>(-1)
+ || __conv == static_cast<size_t>(-2))
+ break;
+ }
+ __from_next = __from;
+ __state = __tmp_state;
+ __ret = error;
+ }
+ else if (__from_next && __from_next < __from_chunk_end)
+ {
+ // It is unclear what to return in this case (see DR 382).
+ __to_next += __conv;
+ __ret = partial;
+ }
+ else
+ {
+ __from_next = __from_chunk_end;
+ __to_next += __conv;
+ }
+
+ if (__from_next < __from_end && __ret == ok)
+ {
+ if (__to_next < __to_end)
+ {
+ // XXX Probably wrong for stateful encodings
+ __tmp_state = __state;
+ ++__from_next;
+ *__to_next++ = L'\0';
+ }
+ else
+ __ret = partial;
+ }
+ }
+
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
- if (__conv == __len)
- {
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = ok;
- }
- else if (__conv > 0 && __conv < __len)
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_encoding() const throw()
+ {
+ // XXX This implementation assumes that the encoding is
+ // stateless and is either single-byte or variable-width.
+ int __ret = 0;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
+#endif
+ if (MB_CUR_MAX == 1)
+ __ret = 1;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#endif
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_max_length() const throw()
+ {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
+#endif
+ // XXX Probably wrong for stateful encodings.
+ int __ret = MB_CUR_MAX;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#endif
+ return __ret;
+ }
+
+ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_length(state_type& __state, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
+ {
+ int __ret = 0;
+ state_type __tmp_state(__state);
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
+#endif
+
+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
+ // in case we advance past it and then continue, in a loop.
+ // NB: mbsnrtowcs is a GNU extension
+
+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
+ // its fourth parameter (it wouldn't with NULL as first parameter).
+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
+ * __max));
+ while (__from < __end && __max)
{
- __from_next = __from;
- __to_next = __to + __conv;
- __ret = partial;
- }
- else
- __ret = error;
+ const extern_type* __from_chunk_end;
+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
+ __end
+ - __from));
+ if (!__from_chunk_end)
+ __from_chunk_end = __end;
+
+ const extern_type* __tmp_from = __from;
+ size_t __conv = mbsnrtowcs(__to, &__from,
+ __from_chunk_end - __from,
+ __max, &__state);
+ if (__conv == static_cast<size_t>(-1))
+ {
+ // In case of error, in order to stop at the exact place we
+ // have to start again from the beginning with a series of
+ // mbrtowc.
+ for (__from = __tmp_from;; __from += __conv)
+ {
+ __conv = mbrtowc(NULL, __from, __end - __from,
+ &__tmp_state);
+ if (__conv == static_cast<size_t>(-1)
+ || __conv == static_cast<size_t>(-2))
+ break;
+ }
+ __state = __tmp_state;
+ __ret += __from - __tmp_from;
+ break;
+ }
+ if (!__from)
+ __from = __from_chunk_end;
+ __ret += __from - __tmp_from;
+ __max -= __conv;
+
+ if (__from < __end && __max)
+ {
+ // XXX Probably wrong for stateful encodings
+ __tmp_state = __state;
+ ++__from;
+ ++__ret;
+ --__max;
+ }
+ }
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#endif
+
return __ret;
}
#endif
diff --git a/contrib/libstdc++/config/locale/gnu/collate_members.cc b/contrib/libstdc++/config/locale/gnu/collate_members.cc
index 1ac2094..573aa65 100644
--- a/contrib/libstdc++/config/locale/gnu/collate_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/collate_members.cc
@@ -54,7 +54,7 @@ namespace std
size_t __n) const
{ return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
collate<wchar_t>::_M_compare(const wchar_t* __one,
diff --git a/contrib/libstdc++/config/locale/gnu/ctype_members.cc b/contrib/libstdc++/config/locale/gnu/ctype_members.cc
index ee4cc0a..7c53c15 100644
--- a/contrib/libstdc++/config/locale/gnu/ctype_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/ctype_members.cc
@@ -1,6 +1,6 @@
// std::ctype implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -43,15 +43,18 @@ namespace std
template<>
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
- {
- _S_destroy_c_locale(_M_c_locale_ctype);
- _S_create_c_locale(_M_c_locale_ctype, __s);
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = _M_c_locale_ctype->__ctype_b;
+ {
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
+ }
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
{
@@ -95,7 +98,7 @@ namespace std
__ret = 0;
}
return __ret;
- };
+ }
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
@@ -136,12 +139,12 @@ namespace std
bool __ret = false;
const size_t __bitmasksize = 11;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
- {
- const mask __bit = static_cast<mask>(_ISbit(__bitcur));
- if (__m & __bit)
- __ret |= __iswctype_l(__c, _M_convert_to_wmask(__bit),
- _M_c_locale_ctype);
- }
+ if (__m & _M_bit[__bitcur]
+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+ {
+ __ret = true;
+ break;
+ }
return __ret;
}
@@ -149,19 +152,15 @@ namespace std
ctype<wchar_t>::
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
{
- for (;__lo < __hi; ++__vec, ++__lo)
+ for (; __lo < __hi; ++__vec, ++__lo)
{
// Highest bitmask in ctype_base == 10, but extra in "C"
// library for blank.
const size_t __bitmasksize = 11;
mask __m = 0;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
- {
- const mask __bit = static_cast<mask>(_ISbit(__bitcur));
- if (__iswctype_l(*__lo, _M_convert_to_wmask(__bit),
- _M_c_locale_ctype))
- __m |= __bit;
- }
+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
+ __m |= _M_bit[__bitcur];
*__vec = __m;
}
return __hi;
@@ -188,41 +187,31 @@ namespace std
wchar_t
ctype<wchar_t>::
do_widen(char __c) const
- {
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __c_locale __old = __uselocale(_M_c_locale_ctype);
-#endif
- wchar_t __ret = btowc(__c);
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __uselocale(__old);
-#endif
- return __ret;
- }
+ { return _M_widen[static_cast<unsigned char>(__c)]; }
const char*
ctype<wchar_t>::
do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __c_locale __old = __uselocale(_M_c_locale_ctype);
-#endif
- mbstate_t __state;
- memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- __uselocale(__old);
-#endif
+ while (__lo < __hi)
+ {
+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
+ ++__lo;
+ ++__dest;
+ }
return __hi;
}
char
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
- {
+ {
+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
+ return _M_narrow[__wc];
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_ctype);
#endif
- int __c = wctob(__wc);
+ const int __c = wctob(__wc);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
@@ -237,27 +226,64 @@ namespace std
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_ctype);
#endif
- size_t __offset = 0;
- while (true)
+ if (_M_narrow_ok)
+ while (__lo < __hi)
+ {
+ if (*__lo >= 0 && *__lo < 128)
+ *__dest = _M_narrow[*__lo];
+ else
+ {
+ const int __c = wctob(*__lo);
+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
+ }
+ ++__lo;
+ ++__dest;
+ }
+ else
+ while (__lo < __hi)
+ {
+ const int __c = wctob(*__lo);
+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
+ ++__lo;
+ ++__dest;
+ }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#endif
+ return __hi;
+ }
+
+ void
+ ctype<wchar_t>::_M_initialize_ctype()
+ {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __c_locale __old = __uselocale(_M_c_locale_ctype);
+#endif
+ wint_t __i;
+ for (__i = 0; __i < 128; ++__i)
{
- const wchar_t* __start = __lo + __offset;
- size_t __len = __hi - __start;
-
- mbstate_t __state;
- memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- size_t __con = wcsrtombs(__dest + __offset, &__start, __len, &__state);
- if (__con != __len && __start != 0)
- {
- __offset = __start - __lo;
- __dest[__offset++] = __dfault;
- }
- else
+ const int __c = wctob(__i);
+ if (__c == EOF)
break;
+ else
+ _M_narrow[__i] = static_cast<char>(__c);
+ }
+ if (__i == 128)
+ _M_narrow_ok = true;
+ else
+ _M_narrow_ok = false;
+ for (size_t __j = 0;
+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
+ _M_widen[__j] = btowc(__j);
+
+ for (size_t __k = 0; __k <= 11; ++__k)
+ {
+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
- return __hi;
}
-#endif // _GLIBCPP_USE_WCHAR_T
+#endif // _GLIBCXX_USE_WCHAR_T
}
diff --git a/contrib/libstdc++/config/locale/gnu/messages_members.cc b/contrib/libstdc++/config/locale/gnu/messages_members.cc
index fad01df..1aa9c06 100644
--- a/contrib/libstdc++/config/locale/gnu/messages_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/messages_members.cc
@@ -58,7 +58,7 @@ namespace std
#endif
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
diff --git a/contrib/libstdc++/config/locale/gnu/messages_members.h b/contrib/libstdc++/config/locale/gnu/messages_members.h
index d98d8d1..a7cd1cd 100644
--- a/contrib/libstdc++/config/locale/gnu/messages_members.h
+++ b/contrib/libstdc++/config/locale/gnu/messages_members.h
@@ -1,6 +1,6 @@
// std::messages implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,24 +36,19 @@
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
- : locale::facet(__refs)
- {
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- _M_name_messages = _S_c_name;
-#endif
- _M_c_locale_messages = _S_c_locale;
- }
+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
+ _M_name_messages(_S_get_c_name())
+ { }
template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc,
- const char* __s, size_t __refs)
- : locale::facet(__refs)
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+ _M_name_messages(__s)
{
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- _M_name_messages = new char[strlen(__s) + 1];
- strcpy(_M_name_messages, __s);
-#endif
- _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ char* __tmp = new char[std::strlen(__s) + 1];
+ std::strcpy(__tmp, __s);
+ _M_name_messages = __tmp;
}
template<typename _CharT>
@@ -69,10 +64,8 @@
template<typename _CharT>
messages<_CharT>::~messages()
{
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- if (_S_c_name != _M_name_messages)
+ if (_M_name_messages != _S_get_c_name())
delete [] _M_name_messages;
-#endif
_S_destroy_c_locale(_M_c_locale_messages);
}
@@ -97,12 +90,15 @@
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- if (_S_c_name != _M_name_messages)
- delete [] _M_name_messages;
- _M_name_messages = new char[strlen(__s) + 1];
- strcpy(_M_name_messages, __s);
-#endif
- _S_destroy_c_locale(_M_c_locale_messages);
- _S_create_c_locale(_M_c_locale_messages, __s);
+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
+ delete [] this->_M_name_messages;
+ char* __tmp = new char[std::strlen(__s) + 1];
+ std::strcpy(__tmp, __s);
+ this->_M_name_messages = __tmp;
+
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
}
diff --git a/contrib/libstdc++/config/locale/gnu/monetary_members.cc b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
index b3ef13b..38d9c39 100644
--- a/contrib/libstdc++/config/locale/gnu/monetary_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
@@ -1,6 +1,6 @@
// std::moneypunct implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -63,22 +63,21 @@ namespace std
case 0:
case 1:
// 1 The sign precedes the value and symbol.
+ __ret.field[0] = sign;
if (__space)
{
// Pattern starts with sign.
if (__precedes)
{
__ret.field[1] = symbol;
- __ret.field[2] = space;
__ret.field[3] = value;
}
else
{
__ret.field[1] = value;
- __ret.field[2] = space;
__ret.field[3] = symbol;
}
- __ret.field[0] = sign;
+ __ret.field[2] = space;
}
else
{
@@ -93,7 +92,6 @@ namespace std
__ret.field[1] = value;
__ret.field[2] = symbol;
}
- __ret.field[0] = sign;
__ret.field[3] = none;
}
break;
@@ -105,15 +103,14 @@ namespace std
if (__precedes)
{
__ret.field[0] = symbol;
- __ret.field[1] = space;
__ret.field[2] = value;
}
else
{
__ret.field[0] = value;
- __ret.field[1] = space;
__ret.field[2] = symbol;
}
+ __ret.field[1] = space;
__ret.field[3] = sign;
}
else
@@ -135,78 +132,70 @@ namespace std
break;
case 3:
// 3 The sign immediately precedes the symbol.
- if (__space)
+ if (__precedes)
{
- // Have space.
- if (__precedes)
+ __ret.field[0] = sign;
+ __ret.field[1] = symbol;
+ if (__space)
{
- __ret.field[0] = sign;
- __ret.field[1] = symbol;
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
- __ret.field[0] = value;
- __ret.field[1] = space;
- __ret.field[2] = sign;
- __ret.field[3] = symbol;
+ __ret.field[2] = value;
+ __ret.field[3] = none;
}
}
else
{
- // Have none.
- if (__precedes)
+ __ret.field[0] = value;
+ if (__space)
{
- __ret.field[0] = sign;
- __ret.field[1] = symbol;
- __ret.field[2] = value;
+ __ret.field[1] = space;
+ __ret.field[2] = sign;
+ __ret.field[3] = symbol;
}
else
{
- __ret.field[0] = value;
__ret.field[1] = sign;
__ret.field[2] = symbol;
+ __ret.field[3] = none;
}
- __ret.field[3] = none;
}
break;
case 4:
- // 4 The sign immediately follows the symbol.
- if (__space)
+ // 4 The sign immediately follows the symbol.
+ if (__precedes)
{
- // Have space.
- if (__precedes)
+ __ret.field[0] = symbol;
+ __ret.field[1] = sign;
+ if (__space)
{
- __ret.field[0] = symbol;
- __ret.field[1] = sign;
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
- __ret.field[0] = value;
- __ret.field[1] = space;
- __ret.field[2] = symbol;
- __ret.field[3] = sign;
+ __ret.field[2] = value;
+ __ret.field[3] = none;
}
}
else
{
- // Have none.
- if (__precedes)
+ __ret.field[0] = value;
+ if (__space)
{
- __ret.field[0] = symbol;
- __ret.field[1] = sign;
- __ret.field[2] = value;
+ __ret.field[1] = space;
+ __ret.field[2] = symbol;
+ __ret.field[3] = sign;
}
else
{
- __ret.field[0] = value;
__ret.field[1] = symbol;
__ret.field[2] = sign;
+ __ret.field[3] = none;
}
- __ret.field[3] = none;
}
break;
default:
@@ -220,43 +209,63 @@ namespace std
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<char, true>;
+
if (!__cloc)
{
// "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
- _M_curr_symbol = "";
- _M_positive_sign = "";
- _M_negative_sign = "";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = "";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = "";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = "";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
else
{
// Named locale.
- _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
- _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
- _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
- _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
+ __cloc));
+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
+ __cloc));
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
if (!__nposn)
- _M_negative_sign = "()";
+ _M_data->_M_negative_sign = "()";
else
- _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
+ __cloc);
+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
// _Intl == true
- _M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
- _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
+ __cloc));
char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
- _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
+ __pposn);
char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
- _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
+ __nposn);
}
}
@@ -265,55 +274,74 @@ namespace std
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<char, false>;
+
if (!__cloc)
{
// "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
- _M_curr_symbol = "";
- _M_positive_sign = "";
- _M_negative_sign = "";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = "";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = "";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = "";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
else
{
// Named locale.
- _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
- _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
- _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
- _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
+ __cloc));
+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
+ __cloc));
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
if (!__nposn)
- _M_negative_sign = "()";
+ _M_data->_M_negative_sign = "()";
else
- _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
+ __cloc);
+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
// _Intl == false
- _M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
- _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
- _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
+ __pposn);
char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
- _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
+ __nposn);
}
}
template<>
moneypunct<char, true>::~moneypunct()
- { }
+ { delete _M_data; }
template<>
moneypunct<char, false>::~moneypunct()
- { }
+ { delete _M_data; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
@@ -323,18 +351,33 @@ namespace std
const char* __name)
#endif
{
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<wchar_t, true>;
+
if (!__cloc)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
- _M_curr_symbol = L"";
- _M_positive_sign = L"";
- _M_negative_sign = L"";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ // Use ctype::widen code without the facet...
+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ {
+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
+ _M_data->_M_atoms[__i] = btowc(uc);
+ }
}
else
{
@@ -347,64 +390,93 @@ namespace std
setlocale(LC_ALL, __name);
#endif
- _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+ union __s_and_w { const char *__s; unsigned int __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
- _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
- _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
- mbstate_t __state;
- size_t __len = strlen(__cpossign);
- if (__len)
+ wchar_t* __wcs_ps = 0;
+ wchar_t* __wcs_ns = 0;
+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
+ try
{
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__cpossign, __len, &__state);
- _M_positive_sign = __wcs;
- }
- else
- _M_positive_sign = L"";
-
- char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
- __len = strlen(__cnegsign);
- if (!__nposn)
- _M_negative_sign = L"()";
- else if (__len)
- {
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
- _M_negative_sign = __wcs;
+ mbstate_t __state;
+ size_t __len = strlen(__cpossign);
+ if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ __wcs_ps = new wchar_t[__len];
+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
+ _M_data->_M_positive_sign = __wcs_ps;
+ }
+ else
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
+
+ __len = strlen(__cnegsign);
+ if (!__nposn)
+ _M_data->_M_negative_sign = L"()";
+ else if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ __wcs_ns = new wchar_t[__len];
+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
+ _M_data->_M_negative_sign = __wcs_ns;
+ }
+ else
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
+
+ // _Intl == true.
+ __len = strlen(__ccurr);
+ if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ wchar_t* __wcs = new wchar_t[__len];
+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
+ _M_data->_M_curr_symbol = __wcs;
+ }
+ else
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
- else
- _M_negative_sign = L"";
-
- // _Intl == true.
- __len = strlen(__ccurr);
- if (__len)
+ catch (...)
{
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__ccurr, __len, &__state);
- _M_curr_symbol = __wcs;
- }
- else
- _M_curr_symbol = L"";
-
- _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
+ delete _M_data;
+ _M_data = 0;
+ delete __wcs_ps;
+ delete __wcs_ns;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#else
+ setlocale(LC_ALL, __old);
+ free(__old);
+#endif
+ __throw_exception_again;
+ }
+
+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
+ __cloc));
char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
- _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
+ __pposn);
char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
- _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
+ __nposn);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
@@ -416,26 +488,41 @@ namespace std
}
template<>
- void
- moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- const char*)
+ void
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ const char*)
#else
- const char* __name)
+ const char* __name)
#endif
- {
- if (!__cloc)
+ {
+ if (!_M_data)
+ _M_data = new __moneypunct_cache<wchar_t, false>;
+
+ if (!__cloc)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
- _M_curr_symbol = L"";
- _M_positive_sign = L"";
- _M_negative_sign = L"";
- _M_frac_digits = 0;
- _M_pos_format = money_base::_S_default_pattern;
- _M_neg_format = money_base::_S_default_pattern;
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = 0;
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = 0;
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = 0;
+ _M_data->_M_frac_digits = 0;
+ _M_data->_M_pos_format = money_base::_S_default_pattern;
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ // Use ctype::widen code without the facet...
+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
+ {
+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
+ _M_data->_M_atoms[__i] = btowc(uc);
+ }
}
else
{
@@ -448,64 +535,93 @@ namespace std
setlocale(LC_ALL, __name);
#endif
- _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
- _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
- _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ union __s_and_w { const char *__s; unsigned int __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
+
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
- mbstate_t __state;
- size_t __len;
- __len = strlen(__cpossign);
- if (__len)
- {
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__cpossign, __len, &__state);
- _M_positive_sign = __wcs;
+ wchar_t* __wcs_ps = 0;
+ wchar_t* __wcs_ns = 0;
+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
+ try
+ {
+ mbstate_t __state;
+ size_t __len;
+ __len = strlen(__cpossign);
+ if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ __wcs_ps = new wchar_t[__len];
+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
+ _M_data->_M_positive_sign = __wcs_ps;
+ }
+ else
+ _M_data->_M_positive_sign = L"";
+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
+
+ __len = strlen(__cnegsign);
+ if (!__nposn)
+ _M_data->_M_negative_sign = L"()";
+ else if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ __wcs_ns = new wchar_t[__len];
+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
+ _M_data->_M_negative_sign = __wcs_ns;
+ }
+ else
+ _M_data->_M_negative_sign = L"";
+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
+
+ // _Intl == true.
+ __len = strlen(__ccurr);
+ if (__len)
+ {
+ ++__len;
+ memset(&__state, 0, sizeof(mbstate_t));
+ wchar_t* __wcs = new wchar_t[__len];
+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
+ _M_data->_M_curr_symbol = __wcs;
+ }
+ else
+ _M_data->_M_curr_symbol = L"";
+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
- else
- _M_positive_sign = L"";
-
- char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
- __len = strlen(__cnegsign);
- if (!__nposn)
- _M_negative_sign = L"()";
- else if (__len)
- {
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
- _M_negative_sign = __wcs;
- }
- else
- _M_negative_sign = L"";
-
- // _Intl == true.
- __len = strlen(__ccurr);
- if (__len)
+ catch (...)
{
- ++__len;
- memset(&__state, 0, sizeof(mbstate_t));
- wchar_t* __wcs = new wchar_t[__len];
- mbsrtowcs(__wcs, &__ccurr, __len, &__state);
- _M_curr_symbol = __wcs;
+ delete _M_data;
+ _M_data = 0;
+ delete __wcs_ps;
+ delete __wcs_ns;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#else
+ setlocale(LC_ALL, __old);
+ free(__old);
+#endif
+ __throw_exception_again;
}
- else
- _M_curr_symbol = L"";
- _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
- _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
+ __pposn);
char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
- _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
+ __nposn);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
@@ -519,23 +635,27 @@ namespace std
template<>
moneypunct<wchar_t, true>::~moneypunct()
{
- if (wcslen(_M_positive_sign))
- delete [] _M_positive_sign;
- if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
- delete [] _M_negative_sign;
- if (wcslen(_M_curr_symbol))
- delete [] _M_curr_symbol;
+ if (_M_data->_M_positive_sign_size)
+ delete [] _M_data->_M_positive_sign;
+ if (_M_data->_M_negative_sign_size
+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
+ delete [] _M_data->_M_negative_sign;
+ if (_M_data->_M_curr_symbol_size)
+ delete [] _M_data->_M_curr_symbol;
+ delete _M_data;
}
template<>
moneypunct<wchar_t, false>::~moneypunct()
{
- if (wcslen(_M_positive_sign))
- delete [] _M_positive_sign;
- if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
- delete [] _M_negative_sign;
- if (wcslen(_M_curr_symbol))
- delete [] _M_curr_symbol;
+ if (_M_data->_M_positive_sign_size)
+ delete [] _M_data->_M_positive_sign;
+ if (_M_data->_M_negative_sign_size
+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
+ delete [] _M_data->_M_negative_sign;
+ if (_M_data->_M_curr_symbol_size)
+ delete [] _M_data->_M_curr_symbol;
+ delete _M_data;
}
#endif
}
diff --git a/contrib/libstdc++/config/locale/gnu/numeric_members.cc b/contrib/libstdc++/config/locale/gnu/numeric_members.cc
index 1aa0529..20f51c1 100644
--- a/contrib/libstdc++/config/locale/gnu/numeric_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/numeric_members.cc
@@ -1,6 +1,6 @@
// std::numpunct implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,66 +42,120 @@ namespace std
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
{
+ if (!_M_data)
+ _M_data = new __numpunct_cache<char>;
+
if (!__cloc)
{
// "C" locale
- _M_decimal_point = '.';
- _M_thousands_sep = ',';
- _M_grouping = "";
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_use_grouping = false;
+
+ _M_data->_M_decimal_point = '.';
+ _M_data->_M_thousands_sep = ',';
+
+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
+
+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
}
else
{
// Named locale.
- _M_decimal_point = *(__nl_langinfo_l(RADIXCHAR, __cloc));
- _M_thousands_sep = *(__nl_langinfo_l(THOUSEP, __cloc));
- // Check for NUL, which implies no grouping.
- if (_M_thousands_sep == '\0')
- _M_grouping = "";
+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
+ __cloc));
+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
+ __cloc));
+
+ // Check for NULL, which implies no grouping.
+ if (_M_data->_M_thousands_sep == '\0')
+ _M_data->_M_grouping = "";
else
- _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
}
+
// NB: There is no way to extact this info from posix locales.
// _M_truename = __nl_langinfo_l(YESSTR, __cloc);
- _M_truename = "true";
+ _M_data->_M_truename = "true";
+ _M_data->_M_truename_size = strlen(_M_data->_M_truename);
// _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
- _M_falsename = "false";
+ _M_data->_M_falsename = "false";
+ _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
}
template<>
numpunct<char>::~numpunct()
- { }
+ { delete _M_data; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
{
+ if (!_M_data)
+ _M_data = new __numpunct_cache<wchar_t>;
+
if (!__cloc)
{
// "C" locale
- _M_decimal_point = L'.';
- _M_thousands_sep = L',';
- _M_grouping = "";
+ _M_data->_M_grouping = "";
+ _M_data->_M_grouping_size = 0;
+ _M_data->_M_use_grouping = false;
+
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __c_locale __old = __uselocale(_S_get_c_locale());
+#endif
+ // Use ctype::widen code without the facet...
+ unsigned char uc;
+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
+ {
+ uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
+ _M_data->_M_atoms_out[__i] = btowc(uc);
+ }
+
+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
+ {
+ uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
+ _M_data->_M_atoms_in[__j] = btowc(uc);
+ }
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#endif
}
else
{
// Named locale.
- _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
- _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
- if (_M_thousands_sep == L'\0')
- _M_grouping = "";
+ union __s_and_w { const char *__s; unsigned int __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _M_data->_M_grouping = "";
else
- _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
}
+
// NB: There is no way to extact this info from posix locales.
// _M_truename = __nl_langinfo_l(YESSTR, __cloc);
- _M_truename = L"true";
+ _M_data->_M_truename = L"true";
+ _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
// _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
- _M_falsename = L"false";
+ _M_data->_M_falsename = L"false";
+ _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
}
template<>
numpunct<wchar_t>::~numpunct()
- { }
+ { delete _M_data; }
#endif
}
diff --git a/contrib/libstdc++/config/locale/gnu/time_members.cc b/contrib/libstdc++/config/locale/gnu/time_members.cc
index db590ef..a8e9687 100644
--- a/contrib/libstdc++/config/locale/gnu/time_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/time_members.cc
@@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -60,130 +60,133 @@ namespace std
void
__timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
{
+ if (!_M_data)
+ _M_data = new __timepunct_cache<char>;
+
if (!__cloc)
{
// "C" locale
- _M_c_locale_timepunct = _S_c_locale;
-
- _M_date_format = "%m/%d/%y";
- _M_date_era_format = "%m/%d/%y";
- _M_time_format = "%H:%M:%S";
- _M_time_era_format = "%H:%M:%S";
- _M_date_time_format = "";
- _M_date_time_era_format = "";
- _M_am = "AM";
- _M_pm = "PM";
- _M_am_pm_format = "";
+ _M_c_locale_timepunct = _S_get_c_locale();
+
+ _M_data->_M_date_format = "%m/%d/%y";
+ _M_data->_M_date_era_format = "%m/%d/%y";
+ _M_data->_M_time_format = "%H:%M:%S";
+ _M_data->_M_time_era_format = "%H:%M:%S";
+ _M_data->_M_date_time_format = "";
+ _M_data->_M_date_time_era_format = "";
+ _M_data->_M_am = "AM";
+ _M_data->_M_pm = "PM";
+ _M_data->_M_am_pm_format = "";
// Day names, starting with "C"'s Sunday.
- _M_day1 = "Sunday";
- _M_day2 = "Monday";
- _M_day3 = "Tuesday";
- _M_day4 = "Wednesday";
- _M_day5 = "Thursday";
- _M_day6 = "Friday";
- _M_day7 = "Saturday";
+ _M_data->_M_day1 = "Sunday";
+ _M_data->_M_day2 = "Monday";
+ _M_data->_M_day3 = "Tuesday";
+ _M_data->_M_day4 = "Wednesday";
+ _M_data->_M_day5 = "Thursday";
+ _M_data->_M_day6 = "Friday";
+ _M_data->_M_day7 = "Saturday";
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = "Sun";
- _M_day_a2 = "Mon";
- _M_day_a3 = "Tue";
- _M_day_a4 = "Wed";
- _M_day_a5 = "Thu";
- _M_day_a6 = "Fri";
- _M_day_a7 = "Sat";
+ _M_data->_M_aday1 = "Sun";
+ _M_data->_M_aday2 = "Mon";
+ _M_data->_M_aday3 = "Tue";
+ _M_data->_M_aday4 = "Wed";
+ _M_data->_M_aday5 = "Thu";
+ _M_data->_M_aday6 = "Fri";
+ _M_data->_M_aday7 = "Sat";
// Month names, starting with "C"'s January.
- _M_month01 = "January";
- _M_month02 = "February";
- _M_month03 = "March";
- _M_month04 = "April";
- _M_month05 = "May";
- _M_month06 = "June";
- _M_month07 = "July";
- _M_month08 = "August";
- _M_month09 = "September";
- _M_month10 = "October";
- _M_month11 = "November";
- _M_month12 = "December";
+ _M_data->_M_month01 = "January";
+ _M_data->_M_month02 = "February";
+ _M_data->_M_month03 = "March";
+ _M_data->_M_month04 = "April";
+ _M_data->_M_month05 = "May";
+ _M_data->_M_month06 = "June";
+ _M_data->_M_month07 = "July";
+ _M_data->_M_month08 = "August";
+ _M_data->_M_month09 = "September";
+ _M_data->_M_month10 = "October";
+ _M_data->_M_month11 = "November";
+ _M_data->_M_month12 = "December";
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = "Jan";
- _M_month_a02 = "Feb";
- _M_month_a03 = "Mar";
- _M_month_a04 = "Apr";
- _M_month_a05 = "May";
- _M_month_a06 = "Jun";
- _M_month_a07 = "July";
- _M_month_a08 = "Aug";
- _M_month_a09 = "Sep";
- _M_month_a10 = "Oct";
- _M_month_a11 = "Nov";
- _M_month_a12 = "Dec";
+ _M_data->_M_amonth01 = "Jan";
+ _M_data->_M_amonth02 = "Feb";
+ _M_data->_M_amonth03 = "Mar";
+ _M_data->_M_amonth04 = "Apr";
+ _M_data->_M_amonth05 = "May";
+ _M_data->_M_amonth06 = "Jun";
+ _M_data->_M_amonth07 = "Jul";
+ _M_data->_M_amonth08 = "Aug";
+ _M_data->_M_amonth09 = "Sep";
+ _M_data->_M_amonth10 = "Oct";
+ _M_data->_M_amonth11 = "Nov";
+ _M_data->_M_amonth12 = "Dec";
}
else
{
_M_c_locale_timepunct = _S_clone_c_locale(__cloc);
- _M_date_format = __nl_langinfo_l(D_FMT, __cloc);
- _M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
- _M_time_format = __nl_langinfo_l(T_FMT, __cloc);
- _M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
- _M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
- _M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
- _M_am = __nl_langinfo_l(AM_STR, __cloc);
- _M_pm = __nl_langinfo_l(PM_STR, __cloc);
- _M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
// Day names, starting with "C"'s Sunday.
- _M_day1 = __nl_langinfo_l(DAY_1, __cloc);
- _M_day2 = __nl_langinfo_l(DAY_2, __cloc);
- _M_day3 = __nl_langinfo_l(DAY_3, __cloc);
- _M_day4 = __nl_langinfo_l(DAY_4, __cloc);
- _M_day5 = __nl_langinfo_l(DAY_5, __cloc);
- _M_day6 = __nl_langinfo_l(DAY_6, __cloc);
- _M_day7 = __nl_langinfo_l(DAY_7, __cloc);
+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = __nl_langinfo_l(ABDAY_1, __cloc);
- _M_day_a2 = __nl_langinfo_l(ABDAY_2, __cloc);
- _M_day_a3 = __nl_langinfo_l(ABDAY_3, __cloc);
- _M_day_a4 = __nl_langinfo_l(ABDAY_4, __cloc);
- _M_day_a5 = __nl_langinfo_l(ABDAY_5, __cloc);
- _M_day_a6 = __nl_langinfo_l(ABDAY_6, __cloc);
- _M_day_a7 = __nl_langinfo_l(ABDAY_7, __cloc);
+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
// Month names, starting with "C"'s January.
- _M_month01 = __nl_langinfo_l(MON_1, __cloc);
- _M_month02 = __nl_langinfo_l(MON_2, __cloc);
- _M_month03 = __nl_langinfo_l(MON_3, __cloc);
- _M_month04 = __nl_langinfo_l(MON_4, __cloc);
- _M_month05 = __nl_langinfo_l(MON_5, __cloc);
- _M_month06 = __nl_langinfo_l(MON_6, __cloc);
- _M_month07 = __nl_langinfo_l(MON_7, __cloc);
- _M_month08 = __nl_langinfo_l(MON_8, __cloc);
- _M_month09 = __nl_langinfo_l(MON_9, __cloc);
- _M_month10 = __nl_langinfo_l(MON_10, __cloc);
- _M_month11 = __nl_langinfo_l(MON_11, __cloc);
- _M_month12 = __nl_langinfo_l(MON_12, __cloc);
+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = __nl_langinfo_l(ABMON_1, __cloc);
- _M_month_a02 = __nl_langinfo_l(ABMON_2, __cloc);
- _M_month_a03 = __nl_langinfo_l(ABMON_3, __cloc);
- _M_month_a04 = __nl_langinfo_l(ABMON_4, __cloc);
- _M_month_a05 = __nl_langinfo_l(ABMON_5, __cloc);
- _M_month_a06 = __nl_langinfo_l(ABMON_6, __cloc);
- _M_month_a07 = __nl_langinfo_l(ABMON_7, __cloc);
- _M_month_a08 = __nl_langinfo_l(ABMON_8, __cloc);
- _M_month_a09 = __nl_langinfo_l(ABMON_9, __cloc);
- _M_month_a10 = __nl_langinfo_l(ABMON_10, __cloc);
- _M_month_a11 = __nl_langinfo_l(ABMON_11, __cloc);
- _M_month_a12 = __nl_langinfo_l(ABMON_12, __cloc);
+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
}
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
__timepunct<wchar_t>::
@@ -205,126 +208,129 @@ namespace std
void
__timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
{
+ if (!_M_data)
+ _M_data = new __timepunct_cache<wchar_t>;
+
if (!__cloc)
{
// "C" locale
- _M_c_locale_timepunct = _S_c_locale;
-
- _M_date_format = L"%m/%d/%y";
- _M_date_era_format = L"%m/%d/%y";
- _M_time_format = L"%H:%M:%S";
- _M_time_era_format = L"%H:%M:%S";
- _M_date_time_format = L"";
- _M_date_time_era_format = L"";
- _M_am = L"AM";
- _M_pm = L"PM";
- _M_am_pm_format = L"";
+ _M_c_locale_timepunct = _S_get_c_locale();
+
+ _M_data->_M_date_format = L"%m/%d/%y";
+ _M_data->_M_date_era_format = L"%m/%d/%y";
+ _M_data->_M_time_format = L"%H:%M:%S";
+ _M_data->_M_time_era_format = L"%H:%M:%S";
+ _M_data->_M_date_time_format = L"";
+ _M_data->_M_date_time_era_format = L"";
+ _M_data->_M_am = L"AM";
+ _M_data->_M_pm = L"PM";
+ _M_data->_M_am_pm_format = L"";
// Day names, starting with "C"'s Sunday.
- _M_day1 = L"Sunday";
- _M_day2 = L"Monday";
- _M_day3 = L"Tuesday";
- _M_day4 = L"Wednesday";
- _M_day5 = L"Thursday";
- _M_day6 = L"Friday";
- _M_day7 = L"Saturday";
+ _M_data->_M_day1 = L"Sunday";
+ _M_data->_M_day2 = L"Monday";
+ _M_data->_M_day3 = L"Tuesday";
+ _M_data->_M_day4 = L"Wednesday";
+ _M_data->_M_day5 = L"Thursday";
+ _M_data->_M_day6 = L"Friday";
+ _M_data->_M_day7 = L"Saturday";
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = L"Sun";
- _M_day_a2 = L"Mon";
- _M_day_a3 = L"Tue";
- _M_day_a4 = L"Wed";
- _M_day_a5 = L"Thu";
- _M_day_a6 = L"Fri";
- _M_day_a7 = L"Sat";
+ _M_data->_M_aday1 = L"Sun";
+ _M_data->_M_aday2 = L"Mon";
+ _M_data->_M_aday3 = L"Tue";
+ _M_data->_M_aday4 = L"Wed";
+ _M_data->_M_aday5 = L"Thu";
+ _M_data->_M_aday6 = L"Fri";
+ _M_data->_M_aday7 = L"Sat";
// Month names, starting with "C"'s January.
- _M_month01 = L"January";
- _M_month02 = L"February";
- _M_month03 = L"March";
- _M_month04 = L"April";
- _M_month05 = L"May";
- _M_month06 = L"June";
- _M_month07 = L"July";
- _M_month08 = L"August";
- _M_month09 = L"September";
- _M_month10 = L"October";
- _M_month11 = L"November";
- _M_month12 = L"December";
+ _M_data->_M_month01 = L"January";
+ _M_data->_M_month02 = L"February";
+ _M_data->_M_month03 = L"March";
+ _M_data->_M_month04 = L"April";
+ _M_data->_M_month05 = L"May";
+ _M_data->_M_month06 = L"June";
+ _M_data->_M_month07 = L"July";
+ _M_data->_M_month08 = L"August";
+ _M_data->_M_month09 = L"September";
+ _M_data->_M_month10 = L"October";
+ _M_data->_M_month11 = L"November";
+ _M_data->_M_month12 = L"December";
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = L"Jan";
- _M_month_a02 = L"Feb";
- _M_month_a03 = L"Mar";
- _M_month_a04 = L"Apr";
- _M_month_a05 = L"May";
- _M_month_a06 = L"Jun";
- _M_month_a07 = L"July";
- _M_month_a08 = L"Aug";
- _M_month_a09 = L"Sep";
- _M_month_a10 = L"Oct";
- _M_month_a11 = L"Nov";
- _M_month_a12 = L"Dec";
+ _M_data->_M_amonth01 = L"Jan";
+ _M_data->_M_amonth02 = L"Feb";
+ _M_data->_M_amonth03 = L"Mar";
+ _M_data->_M_amonth04 = L"Apr";
+ _M_data->_M_amonth05 = L"May";
+ _M_data->_M_amonth06 = L"Jun";
+ _M_data->_M_amonth07 = L"Jul";
+ _M_data->_M_amonth08 = L"Aug";
+ _M_data->_M_amonth09 = L"Sep";
+ _M_data->_M_amonth10 = L"Oct";
+ _M_data->_M_amonth11 = L"Nov";
+ _M_data->_M_amonth12 = L"Dec";
}
else
{
_M_c_locale_timepunct = _S_clone_c_locale(__cloc);
- _M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
- _M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
- _M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
- _M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
- _M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
- _M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
- _M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
- _M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
- _M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
+ _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
+ _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
+ _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
+ _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
+ _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
+ _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
+ _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
+ _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
+ _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
// Day names, starting with "C"'s Sunday.
- _M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
- _M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
- _M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
- _M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
- _M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
- _M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
- _M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
+ _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
+ _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
+ _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
+ _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
+ _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
+ _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
+ _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
// Abbreviated day names, starting with "C"'s Sun.
- _M_day_a1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
- _M_day_a2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
- _M_day_a3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
- _M_day_a4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
- _M_day_a5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
- _M_day_a6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
- _M_day_a7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
+ _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
+ _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
+ _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
+ _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
+ _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
+ _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
+ _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
// Month names, starting with "C"'s January.
- _M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
- _M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
- _M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
- _M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
- _M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
- _M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
- _M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
- _M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
- _M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
- _M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
- _M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
- _M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
+ _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
+ _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
+ _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
+ _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
+ _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
+ _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
+ _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
+ _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
+ _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
+ _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
+ _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
+ _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
// Abbreviated month names, starting with "C"'s Jan.
- _M_month_a01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
- _M_month_a02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
- _M_month_a03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
- _M_month_a04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
- _M_month_a05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
- _M_month_a06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
- _M_month_a07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
- _M_month_a08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
- _M_month_a09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
- _M_month_a10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
- _M_month_a11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
- _M_month_a12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
+ _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
+ _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
+ _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
+ _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
+ _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
+ _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
+ _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
+ _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
+ _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
+ _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
+ _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
+ _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
}
}
#endif
diff --git a/contrib/libstdc++/config/locale/gnu/time_members.h b/contrib/libstdc++/config/locale/gnu/time_members.h
index 2ea2410..9cb3594 100644
--- a/contrib/libstdc++/config/locale/gnu/time_members.h
+++ b/contrib/libstdc++/config/locale/gnu/time_members.h
@@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,33 +36,33 @@
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
- : locale::facet(__refs)
- {
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- _M_name_timepunct = _S_c_name;
-#endif
- _M_initialize_timepunct();
- }
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
+ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
template<typename _CharT>
- __timepunct<_CharT>::__timepunct(__c_locale __cloc,
- const char* __s,
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
size_t __refs)
- : locale::facet(__refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+ _M_name_timepunct(__s)
{
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- _M_name_timepunct = new char[strlen(__s) + 1];
- strcpy(_M_name_timepunct, __s);
-#endif
+ char* __tmp = new char[std::strlen(__s) + 1];
+ std::strcpy(__tmp, __s);
+ _M_name_timepunct = __tmp;
_M_initialize_timepunct(__cloc);
}
template<typename _CharT>
__timepunct<_CharT>::~__timepunct()
{
-#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
- if (_S_c_name != _M_name_timepunct)
+ if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
-#endif
+ delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc
index 0a89aee..3419355 100644
--- a/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc
@@ -61,7 +61,7 @@ namespace std
_M_falsename = "false";
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
@@ -91,7 +91,7 @@ namespace std
_M_neg_format = money_base::_S_default_pattern;
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale)
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h b/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h
index 0cbfb2a..ef0923d 100644
--- a/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h
@@ -1,6 +1,6 @@
// Locale support (codecvt) -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,8 +36,8 @@
// Written by Benjamin Kosnik <bkoz@cygnus.com>
// XXX
- // Define this here to codecvt.cc can have _S_max_size definition.
-#define _GLIBCPP_USE___ENC_TRAITS 1
+ // Define this here so codecvt.cc can have _S_max_size definition.
+#define _GLIBCXX_USE___ENC_TRAITS 1
// Extension to use icov for dealing with character encodings,
// including conversions and comparisons between various character
@@ -81,10 +81,11 @@
explicit __enc_traits(const char* __int, const char* __ext,
int __ibom = 0, int __ebom = 0)
- : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(__ebom), _M_int_bom(__ibom)
{
strncpy(_M_int_enc, __int, _S_max_size);
strncpy(_M_ext_enc, __ext, _S_max_size);
+ _M_init();
}
// 21.1.2 traits typedefs
@@ -92,12 +93,17 @@
// typedef STATE_T state_type
// requires: state_type shall meet the requirements of
// CopyConstructible types (20.1.3)
+ // NB: This does not preseve the actual state of the conversion
+ // descriptor member, but it does duplicate the encoding
+ // information.
__enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
{
strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
+ _M_destroy();
+ _M_init();
}
// Need assignment operator as well.
@@ -106,21 +112,15 @@
{
strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
- _M_in_desc = 0;
- _M_out_desc = 0;
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
+ _M_destroy();
+ _M_init();
return *this;
}
~__enc_traits()
- {
- __desc_type __err = reinterpret_cast<iconv_t>(-1);
- if (_M_in_desc && _M_in_desc != __err)
- iconv_close(_M_in_desc);
- if (_M_out_desc && _M_out_desc != __err)
- iconv_close(_M_out_desc);
- }
+ { _M_destroy(); }
void
_M_init()
@@ -130,13 +130,31 @@
{
_M_in_desc = iconv_open(_M_int_enc, _M_ext_enc);
if (_M_in_desc == __err)
- __throw_runtime_error("creating iconv input descriptor failed.");
+ __throw_runtime_error(__N("__enc_traits::_M_init "
+ "creating iconv input descriptor failed"));
}
if (!_M_out_desc)
{
_M_out_desc = iconv_open(_M_ext_enc, _M_int_enc);
if (_M_out_desc == __err)
- __throw_runtime_error("creating iconv output descriptor failed.");
+ __throw_runtime_error(__N("__enc_traits::_M_init "
+ "creating iconv output descriptor failed"));
+ }
+ }
+
+ void
+ _M_destroy()
+ {
+ const __desc_type __err = reinterpret_cast<iconv_t>(-1);
+ if (_M_in_desc && _M_in_desc != __err)
+ {
+ iconv_close(_M_in_desc);
+ _M_in_desc = 0;
+ }
+ if (_M_out_desc && _M_out_desc != __err)
+ {
+ iconv_close(_M_out_desc);
+ _M_out_desc = 0;
}
}
@@ -171,7 +189,7 @@
const char*
_M_get_external_enc()
- { return _M_ext_enc; }
+ { return _M_ext_enc; }
};
// Partial specialization
@@ -230,7 +248,7 @@
do_always_noconv() const throw();
virtual int
- do_length(const state_type&, const extern_type* __from,
+ do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
virtual int
@@ -447,15 +465,15 @@
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
- do_length(const state_type&, const extern_type* __from,
+ do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const
- { return min(__max, static_cast<size_t>(__end - __from)); }
+ { return std::min(__max, static_cast<size_t>(__end - __from)); }
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 74. Garbled text for codecvt::do_max_length
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 74. Garbled text for codecvt::do_max_length
template<typename _InternT, typename _ExternT>
int
codecvt<_InternT, _ExternT, __enc_traits>::
do_max_length() const throw()
{ return 1; }
-#endif
+
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc
index aaf07a2..b37209f 100644
--- a/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc
@@ -47,7 +47,7 @@ namespace std
return string(catgets(__nlc, __setid, __msgid, __dfault.c_str()));
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
diff --git a/contrib/libstdc++/config/os/aix/atomicity.h b/contrib/libstdc++/config/os/aix/atomicity.h
index af4fa5a..dad8aae 100644
--- a/contrib/libstdc++/config/os/aix/atomicity.h
+++ b/contrib/libstdc++/config/os/aix/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: AIX version -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,33 +27,35 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
/* We cannot use the cpu/powerpc/bits/atomicity.h inline assembly
definitions for these operations since they depend on operations
that are not available on the original POWER architecture. AIX
still runs on the POWER architecture, so it would be incorrect to
- assume the existence of these instructions. */
+ assume the existence of these instructions.
-/* This should match the type pointed to by atomic_p in
- <sys/atomic_op.h>. */
-typedef int _Atomic_word;
+ The definition of _Atomic_word must match the type pointed to by
+ atomic_p in <sys/atomic_op.h>. */
-#include <sys/atomic_op.h>
-
-static inline int
-__attribute__ ((__unused__))
-__exchange_and_add (atomic_p __mem, int __val)
+extern "C"
{
- return fetch_and_add (__mem, __val);
+#include <sys/atomic_op.h>
}
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (atomic_p __mem, int __val)
+namespace __gnu_cxx
{
- (void) fetch_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add (volatile _Atomic_word* __mem, int __val)
+ {
+ return ::fetch_and_add (const_cast<atomic_p>(__mem), __val);
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add (volatile _Atomic_word* __mem, int __val)
+ {
+ (void) ::fetch_and_add (const_cast<atomic_p>(__mem), __val);
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/os/aix/ctype_base.h b/contrib/libstdc++/config/os/aix/ctype_base.h
index ed41440..adcd1ce 100644
--- a/contrib/libstdc++/config/os/aix/ctype_base.h
+++ b/contrib/libstdc++/config/os/aix/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 1999 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,8 +48,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/aix/ctype_noninline.h b/contrib/libstdc++/config/os/aix/ctype_noninline.h
index 7cf919a..edd8d82 100644
--- a/contrib/libstdc++/config/os/aix/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/aix/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/aix/os_defines.h b/contrib/libstdc++/config/os/aix/os_defines.h
index 6e4dbda..7888fa7 100644
--- a/contrib/libstdc++/config/os/aix/os_defines.h
+++ b/contrib/libstdc++/config/os/aix/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h b/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
index 98b6265..f44a7c7 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -52,7 +52,7 @@
static const mask xdigit = _CTYPE_X;
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
- static const mask graph = _CTYPE_G;
+ static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P;
static const mask cntrl = _CTYPE_C;
static const mask punct = _CTYPE_P;
static const mask alnum = _CTYPE_A | _CTYPE_D;
@@ -65,7 +65,7 @@
static const mask xdigit = _X;
static const mask space = _S;
static const mask print = _R;
- static const mask graph = _G;
+ static const mask graph = _A | _D | _P;
static const mask cntrl = _C;
static const mask punct = _P;
static const mask alnum = _A | _D;
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
index 0e108fd..ec5b575 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h b/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
index 55040a7..1e46712 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
@@ -28,17 +28,17 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
-#define _GLIBCPP_USE_C99_CHECK 1
-#define _GLIBCPP_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
-#define _GLIBCPP_USE_C99_LONG_LONG_CHECK 1
-#define _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC (_GLIBCPP_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
-#define _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1
-#define _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE
+#define _GLIBCXX_USE_C99_CHECK 1
+#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
+#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
+#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
+#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1
+#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE
#endif
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
index 80138cb..70bf41c 100644
--- a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,21 +32,35 @@
//
// Information as gleaned from /usr/include/ctype.h
-
+
+ extern "C" const u_int8_t _C_ctype_[];
+
const ctype_base::mask*
ctype<char>::classic_table() throw()
- { return 0; }
+ { return _C_ctype_ + 1; }
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h b/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
index 03f760f..a7f2530 100644
--- a/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
+++ b/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/djgpp/ctype_base.h b/contrib/libstdc++/config/os/djgpp/ctype_base.h
index 018e20e..778847c 100644
--- a/contrib/libstdc++/config/os/djgpp/ctype_base.h
+++ b/contrib/libstdc++/config/os/djgpp/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -49,8 +49,8 @@
static const mask digit = __dj_ISDIGIT; // Numeric
static const mask punct = __dj_ISPUNCT; // Punctuation
static const mask xdigit = __dj_ISXDIGIT; // Hexadecimal numeric
- static const mask alnum = __dj_ISALPHA; // Alphanumeric
- static const mask graph = __dj_ISGRAPH; // Graphical
+ static const mask alnum = __dj_ISALPHA | __dj_ISDIGIT; // Alphanumeric
+ static const mask graph = __dj_ISALPHA | __dj_ISDIGIT | __dj_ISPUNCT; // Graphical
};
diff --git a/contrib/libstdc++/config/os/djgpp/ctype_noninline.h b/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
index 0ec0f84..eda2679 100644
--- a/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
_M_table(__table ? __table : __dj_ctype_flags)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
_M_table(__table ? __table : __dj_ctype_flags)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/djgpp/os_defines.h b/contrib/libstdc++/config/os/djgpp/os_defines.h
index ce0bf24..5a43c06 100644
--- a/contrib/libstdc++/config/os/djgpp/os_defines.h
+++ b/contrib/libstdc++/config/os/djgpp/os_defines.h
@@ -28,8 +28,8 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/generic/ctype_base.h b/contrib/libstdc++/config/os/generic/ctype_base.h
index 564093d..03fccce 100644
--- a/contrib/libstdc++/config/os/generic/ctype_base.h
+++ b/contrib/libstdc++/config/os/generic/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,10 +48,10 @@
static const mask xdigit = 1 << 4;
static const mask space = 1 << 5;
static const mask print = 1 << 6;
- static const mask graph = 1 << 7;
+ static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct
static const mask cntrl = 1 << 8;
static const mask punct = 1 << 9;
- static const mask alnum = 1 << 10;
+ static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit
};
diff --git a/contrib/libstdc++/config/os/generic/ctype_inline.h b/contrib/libstdc++/config/os/generic/ctype_inline.h
index 0da0c7c..5f24fe6 100644
--- a/contrib/libstdc++/config/os/generic/ctype_inline.h
+++ b/contrib/libstdc++/config/os/generic/ctype_inline.h
@@ -49,16 +49,14 @@
return _M_table[static_cast<unsigned char>(__c)] & __m;
else
{
- bool __ret = true;
- bool __any_match = false;
- const size_t __bitmasksize = 10;
+ bool __ret = false;
+ const size_t __bitmasksize = 15;
size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
- for (;__ret && __bitcur <= __bitmasksize; ++__bitcur)
+ for (; __bitcur <= __bitmasksize; ++__bitcur)
{
- mask __bit = static_cast<mask>(1 << __bitcur);
+ const mask __bit = static_cast<mask>(1 << __bitcur);
if (__m & __bit)
{
- __any_match = true;
bool __testis;
switch (__bit)
{
@@ -99,10 +97,10 @@
__testis = false;
break;
}
- __ret &= __testis;
+ __ret |= __testis;
}
}
- return __ret & __any_match;
+ return __ret;
}
}
@@ -116,7 +114,7 @@
else
{
// Highest bitmask in ctype_base == 10.
- const size_t __bitmasksize = 10;
+ const size_t __bitmasksize = 15;
for (;__low < __high; ++__vec, ++__low)
{
mask __m = 0;
@@ -124,7 +122,7 @@
size_t __i = 0;
for (;__i <= __bitmasksize; ++__i)
{
- mask __bit = static_cast<mask>(1 << __i);
+ const mask __bit = static_cast<mask>(1 << __i);
if (this->is(__bit, *__low))
__m |= __bit;
}
diff --git a/contrib/libstdc++/config/os/generic/ctype_noninline.h b/contrib/libstdc++/config/os/generic/ctype_noninline.h
index d07dc8b..e30348e 100644
--- a/contrib/libstdc++/config/os/generic/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/generic/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/generic/os_defines.h b/contrib/libstdc++/config/os/generic/os_defines.h
index 143c07e..303049b 100644
--- a/contrib/libstdc++/config/os/generic/os_defines.h
+++ b/contrib/libstdc++/config/os/generic/os_defines.h
@@ -28,8 +28,8 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/gnu-linux/ctype_base.h b/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
index a431f97..fc27a3f 100644
--- a/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
+++ b/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,8 +49,8 @@
static const mask xdigit = _ISxdigit;
static const mask space = _ISspace;
static const mask print = _ISprint;
- static const mask graph = _ISgraph;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
static const mask cntrl = _IScntrl;
static const mask punct = _ISpunct;
- static const mask alnum = _ISalnum;
+ static const mask alnum = _ISalpha | _ISdigit;
};
diff --git a/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h b/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
index 8f06d13..925a5d0 100644
--- a/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,13 +34,10 @@
// Information as gleaned from /usr/include/ctype.h
-#if _GLIBCPP_C_LOCALE_GNU
+#if _GLIBCXX_C_LOCALE_GNU
const ctype_base::mask*
ctype<char>::classic_table() throw()
- {
- locale::classic();
- return _S_c_locale->__ctype_b;
- }
+ { return _S_get_c_locale()->__ctype_b; }
#else
const ctype_base::mask*
ctype<char>::classic_table() throw()
@@ -59,20 +56,24 @@
}
#endif
-#if _GLIBCPP_C_LOCALE_GNU
+#if _GLIBCXX_C_LOCALE_GNU
ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)),
+ _M_del(__table != 0 && __del),
+ _M_toupper(_M_c_locale_ctype->__ctype_toupper),
+ _M_tolower(_M_c_locale_ctype->__ctype_tolower),
+ _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
+ _M_widen_ok(0), _M_narrow_ok(0)
{
- _M_c_locale_ctype = _S_clone_c_locale(__cloc);
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#else
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
{
char* __old=strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "C");
@@ -87,22 +88,27 @@
#endif
setlocale(LC_CTYPE, __old);
free(__old);
- _M_c_locale_ctype = _S_c_locale;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#endif
-#if _GLIBCPP_C_LOCALE_GNU
- ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
- __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+#if _GLIBCXX_C_LOCALE_GNU
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del),
+ _M_toupper(_M_c_locale_ctype->__ctype_toupper),
+ _M_tolower(_M_c_locale_ctype->__ctype_tolower),
+ _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
+ _M_widen_ok(0), _M_narrow_ok(0)
{
- _M_c_locale_ctype = _S_c_locale;
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#else
- ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
- __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
{
char* __old=strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "C");
@@ -117,7 +123,8 @@
#endif
setlocale(LC_CTYPE, __old);
free(__old);
- _M_c_locale_ctype = _S_c_locale;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#endif
diff --git a/contrib/libstdc++/config/os/gnu-linux/os_defines.h b/contrib/libstdc++/config/os/gnu-linux/os_defines.h
index 21ea296..0e0194a 100644
--- a/contrib/libstdc++/config/os/gnu-linux/os_defines.h
+++ b/contrib/libstdc++/config/os/gnu-linux/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for GNU/Linux -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -38,30 +38,8 @@
#include <features.h>
-#if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
-
-// The types __off_t and __off64_t are not defined through <sys/types.h>
-// as _G_config assumes. For libc5 and glibc 2.0 instead use
-// <gnu/types.h> and the old name for __off64_t.
-#include <gnu/types.h>
-typedef __loff_t __off64_t;
-
-// These systems have declarations mismatching those in libio.h by
-// omitting throw qualifiers. Cleanest way out is to not provide
-// throw-qualifiers at all. Defining it as empty here will make libio.h
-// not define it.
-#undef __THROW
-#define __THROW
-
-// Tell Glibc not to try to provide its own inline versions of
-// some math functions. Those cause assembly-time clashes with
-// our definitions.
-#define __NO_MATH_INLINES
-
-#endif
-
-#if defined __GLIBC__ && __GLIBC__ >= 2
// We must not see the optimized string functions GNU libc defines.
+#if defined __GLIBC__ && __GLIBC__ >= 2
#define __NO_STRING_INLINES
#endif
diff --git a/contrib/libstdc++/config/os/hpux/ctype_base.h b/contrib/libstdc++/config/os/hpux/ctype_base.h
index f2f6ad0..53bbe23 100644
--- a/contrib/libstdc++/config/os/hpux/ctype_base.h
+++ b/contrib/libstdc++/config/os/hpux/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,8 +48,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/hpux/ctype_noninline.h b/contrib/libstdc++/config/os/hpux/ctype_noninline.h
index a85bc9c..00e338b 100644
--- a/contrib/libstdc++/config/os/hpux/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/hpux/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : (const mask *) __SB_masks)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : (const mask *) __SB_masks)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/hpux/os_defines.h b/contrib/libstdc++/config/os/hpux/os_defines.h
index 6414b41..6cba739 100644
--- a/contrib/libstdc++/config/os/hpux/os_defines.h
+++ b/contrib/libstdc++/config/os/hpux/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for HPUX -*- C++ -*-
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -58,7 +58,7 @@
unconditionally, which makes intmax_t and uintmax_t long long
types.
- We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
+ We also force _GLIBCXX_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
namespace std
{
@@ -75,12 +75,12 @@ namespace std
#endif
}
-#define _GLIBCPP_USE_LONG_LONG 1
+#define _GLIBCXX_USE_LONG_LONG 1
// HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit
// mode. We need to pad the vtable structure to achieve this.
#if !defined(_LP64) && defined (__ia64__)
-#define _GLIBCPP_VTABLE_PADDING 8
+#define _GLIBCXX_VTABLE_PADDING 8
typedef long int __padding_type;
#endif
@@ -91,16 +91,9 @@ typedef long int __padding_type;
#define _LIBUNWIND_STD_ABI 1
#endif
-/* We need explicit instantiation of the atomicity lock on HPPA if
- there is no weak support. */
-#if !defined(_GLIBCPP_SUPPORTS_WEAK) && defined (__hppa__)
-#define _GLIBCPP_INST_ATOMICITY_LOCK 1
-#endif
-
/* Don't use pragma weak in gthread headers. HP-UX rejects programs
with unsatisfied external references even if all of those references
are weak; gthread relies on such unsatisfied references being resolved
to null pointers when weak symbol support is on. */
-#define _GLIBCPP_GTHREAD_USE_WEAK 0
-
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
#endif
diff --git a/contrib/libstdc++/config/os/irix/atomic_word.h b/contrib/libstdc++/config/os/irix/atomic_word.h
new file mode 100644
index 0000000..68b8101
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/atomic_word.h
@@ -0,0 +1,35 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef long _Atomic_word;
+
+#endif
diff --git a/contrib/libstdc++/config/os/irix/atomicity.h b/contrib/libstdc++/config/os/irix/atomicity.h
new file mode 100644
index 0000000..83e9e02
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/atomicity.h
@@ -0,0 +1,42 @@
+// Low-level functions for atomic operations: IRIX version -*- C++ -*-
+
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <mutex.h>
+#include <bits/atomicity.h>
+
+namespace __gnu_cxx
+{
+ _Atomic_word
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ { return (_Atomic_word) test_then_add((unsigned long*) const_cast<_Atomic_word*>(__mem), __val); }
+
+ void
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
index 3cb29b6..2aeb50c 100644
--- a/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h b/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
index 1d7f968..87556f8 100644
--- a/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
+++ b/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h b/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
index 08557d1..d4d2003 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,8 +48,8 @@
static const mask xdigit = _ISxdigit;
static const mask space = _ISspace;
static const mask print = _ISprint;
- static const mask graph = _ISgraph;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
static const mask cntrl = _IScntrl;
static const mask punct = _ISpunct;
- static const mask alnum = _ISalnum;
+ static const mask alnum = _ISalpha | _ISdigit;
};
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
index 009e611..8fdf95e 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
@@ -39,18 +39,28 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h b/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
index 838b747..6b0174b 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -51,5 +51,8 @@
// GCC does not use thunks on IRIX.
#define _G_USING_THUNKS 0
+// FINOREAD takes an "off_t *" as argument.
+#define _GLIBCXX_FIONREAD_TAKES_OFF_T
+
#endif
diff --git a/contrib/libstdc++/config/os/mingw32/ctype_noninline.h b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
index 998547c..e493d40 100644
--- a/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
@@ -43,16 +43,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/mingw32/os_defines.h b/contrib/libstdc++/config/os/mingw32/os_defines.h
index 5c99e09..38fd3c7 100644
--- a/contrib/libstdc++/config/os/mingw32/os_defines.h
+++ b/contrib/libstdc++/config/os/mingw32/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -28,10 +28,21 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-# define _GLIBCPP_OS_DEFINES
+#ifndef _GLIBCXX_OS_DEFINES
+# define _GLIBCXX_OS_DEFINES
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+// Define as 0, if you want, to enable inlining of gthread functions.
+// By default, don't pollute libstdc++ with win32api names.
+#if !defined (__GTHREAD_HIDE_WIN32API)
+# define __GTHREAD_HIDE_WIN32API 1
+#endif
+
+// Don't let win32api windef.h define min and max as macros
+// if included after stl_algobase.h.
+#undef NOMINMAX
+#define NOMINMAX 1
+
#endif
diff --git a/contrib/libstdc++/config/os/newlib/ctype_noninline.h b/contrib/libstdc++/config/os/newlib/ctype_noninline.h
index b511c4a..d0cce94 100644
--- a/contrib/libstdc++/config/os/newlib/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/newlib/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/newlib/os_defines.h b/contrib/libstdc++/config/os/newlib/os_defines.h
index 1277661..3b19787 100644
--- a/contrib/libstdc++/config/os/newlib/os_defines.h
+++ b/contrib/libstdc++/config/os/newlib/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h b/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
index cf34bd4..2eef13a 100644
--- a/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
@@ -39,14 +39,24 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h b/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
index 23cf097..929331c 100644
--- a/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
+++ b/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
index a3c27b0..a808636 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
index a9be0bf..7e5a14e 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
index 5f8d10a..c1447e6 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -49,8 +49,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
index f65cfe7..694901a 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
index aa9ecd6..29d6cf5 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
index 9b8bddc..22be358 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -50,8 +50,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
index c8b11a9..d4917f0 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
index cf53fa4..9131aa6 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/tpf/ctype_base.h b/contrib/libstdc++/config/os/tpf/ctype_base.h
new file mode 100644
index 0000000..0461f3a
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef unsigned short mask;
+ static const mask upper = _ISupper;
+ static const mask lower = _ISlower;
+ static const mask alpha = _ISalpha;
+ static const mask digit = _ISdigit;
+ static const mask xdigit = _ISxdigit;
+ static const mask space = _ISspace;
+ static const mask print = _ISprint;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
+ static const mask cntrl = _IScntrl;
+ static const mask punct = _ISpunct;
+ static const mask alnum = _ISalpha | _ISdigit;
+ };
diff --git a/contrib/libstdc++/config/os/tpf/ctype_inline.h b/contrib/libstdc++/config/os/tpf/ctype_inline.h
new file mode 100644
index 0000000..3f2f32d
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+ ++__low;
+ return __low;
+ }
diff --git a/contrib/libstdc++/config/os/tpf/ctype_noninline.h b/contrib/libstdc++/config/os/tpf/ctype_noninline.h
new file mode 100644
index 0000000..3735b56
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_noninline.h
@@ -0,0 +1,103 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ {
+ const ctype_base::mask* __ret;
+ char* __old = strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ __ret = *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ return __ret;
+ }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del)
+ {
+ char* __old=strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ _M_toupper = *__ctype_toupper_loc();
+ _M_tolower = *__ctype_tolower_loc();
+ _M_table = __table ? __table : *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ _M_c_locale_ctype = _S_get_c_locale();
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del)
+ {
+ char* __old=strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ _M_toupper = *__ctype_toupper_loc();
+ _M_tolower = *__ctype_tolower_loc();
+ _M_table = __table ? __table : *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ _M_c_locale_ctype = _S_get_c_locale();
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ { return _M_toupper[static_cast<unsigned char>(__c)]; }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = _M_toupper[static_cast<unsigned char>(*__low)];
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ { return _M_tolower[static_cast<unsigned char>(__c)]; }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = _M_tolower[static_cast<unsigned char>(*__low)];
+ ++__low;
+ }
+ return __high;
+ }
diff --git a/contrib/libstdc++/config/os/tpf/os_defines.h b/contrib/libstdc++/config/os/tpf/os_defines.h
new file mode 100644
index 0000000..40ee13a
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/os_defines.h
@@ -0,0 +1,45 @@
+// Specific definitions for TPF -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+// TPF is a big endian OS, let it be known here.
+#define _BIG_ENDIAN 1
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+// We must not see the optimized string functions GNU libc defines.
+#define __NO_STRING_INLINES
+
+#endif
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_base.h b/contrib/libstdc++/config/os/vxworks/ctype_base.h
new file mode 100644
index 0000000..2a34561
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_base.h
@@ -0,0 +1,59 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information extracted from target/h/ctype.h.
+
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const unsigned char* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef unsigned char mask;
+ static const mask upper = _C_UPPER;
+ static const mask lower = _C_LOWER;
+ static const mask alpha = _C_UPPER | _C_LOWER;
+ static const mask digit = _C_NUMBER;
+ static const mask xdigit = _C_HEX_NUMBER;
+ static const mask space = _C_WHITE_SPACE | _C_CONTROL;
+ static const mask print = (_C_UPPER | _C_LOWER | _C_NUMBER
+ | _C_WHITE_SPACE | _C_PUNCT);
+ static const mask graph = _C_UPPER | _C_LOWER | _C_NUMBER | _C_PUNCT;
+ static const mask cntrl = _C_CONTROL;
+ static const mask punct = _C_PUNCT;
+ static const mask alnum = _C_UPPER | _C_LOWER | _C_NUMBER;
+ };
+
+
+
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_inline.h b/contrib/libstdc++/config/os/vxworks/ctype_inline.h
new file mode 100644
index 0000000..f5cc78b
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from target/h/ctype.h
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return __ctype[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = __ctype[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && !(__ctype[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && (__ctype[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_noninline.h b/contrib/libstdc++/config/os/vxworks/ctype_noninline.h
new file mode 100644
index 0000000..acf91a4
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_noninline.h
@@ -0,0 +1,91 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+// Information as gleaned from target/h/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return __ctype; }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ { return __toupper(__c); }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = __toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ { return __tolower(__c); }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = __tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
diff --git a/contrib/libstdc++/config/os/vxworks/os_defines.h b/contrib/libstdc++/config/os/vxworks/os_defines.h
new file mode 100644
index 0000000..c5f04ff
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/os_defines.h
@@ -0,0 +1,37 @@
+// Specific definitions for VxWorks -*- C++ -*-
+
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+
+#ifndef _GLIBCPP_OS_DEFINES
+#define _GLIBCPP_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
diff --git a/contrib/libstdc++/config/os/windiss/ctype_noninline.h b/contrib/libstdc++/config/os/windiss/ctype_noninline.h
index 0d34695..cf75ddf 100644
--- a/contrib/libstdc++/config/os/windiss/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/windiss/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table == 0 ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table == 0 ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/windiss/os_defines.h b/contrib/libstdc++/config/os/windiss/os_defines.h
index dd8b008..136733e 100644
--- a/contrib/libstdc++/config/os/windiss/os_defines.h
+++ b/contrib/libstdc++/config/os/windiss/os_defines.h
@@ -28,10 +28,11 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+#define __C9X__ 1 // for sinf etc
#endif
diff --git a/contrib/libstdc++/configure b/contrib/libstdc++/configure
index fd8b11e..b5911ae 100755
--- a/contrib/libstdc++/configure
+++ b/contrib/libstdc++/configure
@@ -1,86 +1,324 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.57 for package-unused version-unused.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
-# Defaults:
-ac_help=
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build hella library versions (default)"
-ac_help="$ac_help
- --with-target-subdir=SUBDIR
- configuring in a subdirectory"
-ac_help="$ac_help
- --with-cross-host=HOST configuring with a cross compiler"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-cstdio enable stdio for target io package.
- --enable-cstdio=LIB use LIB target-speific io package. [default=stdio]
- "
-ac_help="$ac_help
- --enable-clocale enable model for target locale package.
- --enable-clocale=MODEL use MODEL target-speific locale package. [default=generic]
- "
-ac_help="$ac_help
- --enable-nls use Native Language Support (default)"
-ac_help="$ac_help
- --enable-cheaders=MODEL construct "C" header files for g++ [default=c_std]"
-ac_help="$ac_help
- --enable-c-mbchar enable multibyte (wide) characters [default=yes]"
-ac_help="$ac_help
- --enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=yes]"
-ac_help="$ac_help
- --enable-long-long turns on 'long long' [default=yes]"
-ac_help="$ac_help
- --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
-ac_help="$ac_help
- --enable-libunwind-exceptions force use of libunwind for exceptions"
-ac_help="$ac_help
- --enable-concept-checks use Boost-derived template checks [default=no]"
-ac_help="$ac_help
- --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
- [default=]"
-ac_help="$ac_help
- --enable-debug build extra debug library [default=no]"
-ac_help="$ac_help
- --enable-debug-flags=FLAGS pass compiler FLAGS when building debug
- library;[default=none]"
-ac_help="$ac_help
- --enable-symvers=style enables symbol versioning of the shared library [default=yes]"
-ac_help="$ac_help
- --with-gxx-include-dir the installation directory for include files"
-ac_help="$ac_help
- --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory "
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='package-unused'
+PACKAGE_TARNAME='libstdc++'
+PACKAGE_VERSION='version-unused'
+PACKAGE_STRING='package-unused version-unused'
+PACKAGE_BUGREPORT=''
+
+ac_unique_file="src/ios.cc"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -89,10 +327,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -106,17 +349,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -124,59 +359,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -185,95 +420,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -282,19 +469,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -308,26 +495,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -344,7 +531,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -354,7 +541,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -365,58 +552,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -427,99 +613,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=src/ios.cc
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -529,13 +726,492 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures package-unused version-unused to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of package-unused version-unused:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-shared=PKGS build shared libraries default=yes
+ --enable-static=PKGS build static libraries default=yes
+ --enable-fast-install=PKGS optimize for fast installation default=yes
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-hosted-libstdcxx
+ only build freestanding C++ runtime support
+ --enable-sjlj-exceptions
+ force use of builtin_setjmp for exceptions
+ [default=auto]
+ --enable-libstdcxx-pch build pre-compiled libstdc++ headers
+ [default=$is_hosted]
+ --enable-cstdio=PACKAGE use target-specific I/O package
+ [default=stdio]
+ --enable-clocale[=MODEL]
+ use MODEL for target locale package
+ [default=auto]
+ --enable-nls use Native Language Support (default)
+ --enable-libstdcxx-allocator=KIND
+ use KIND for target std::allocator base
+ [default=auto]
+ --enable-cheaders=KIND construct "C" headers for g++
+ [default=$c_model]
+ --enable-c-mbchar enable multibyte (wide) characters
+ [default=yes]
+ --enable-c99 turns on ISO/IEC 9899:1999 support
+ [default=yes]
+ --enable-long-long enables I/O support for 'long long'
+ [default=yes]
+ --enable-concept-checks use Boost-derived template checks [default=no]
+ --enable-libstdcxx-debug-flags=FLAGS
+ pass compiler FLAGS when building debug library
+ [default="-g3 -O0"]
+ --enable-libstdcxx-debug
+ build extra debug library [default=no]
+ --enable-cxx-flags=FLAGS
+ pass compiler FLAGS when building library
+ [default=]
+ --enable-symvers=STYLE enables symbol versioning of the shared library
+ [default=yes]
+ --enable-version-specific-runtime-libs
+ Specify that runtime libraries should be installed
+ in a compiler-specific directory
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-target-subdir=SUBDIR
+ configuring in a subdirectory
+ --with-cross-host=HOST configuring with a cross compiler
+ --with-newlib assume newlib as a system C library
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-gxx-include-dir=DIR
+ installation directory for include files
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+package-unused configure version-unused
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by package-unused $as_me version-unused, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -546,87 +1222,175 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is
# exported. Only used at the end of this file.
-ORIGINAL_LD_FOR_MULTILIBS=$LD
-
-PACKAGE=libstdc++
+### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=5:5:0
+libtool_VERSION=6:2:0
+# Find the rest of the source tree framework.
- # Check whether --enable-multilib or --disable-multilib was given.
+ # Sets up multi_basedir, which is srcdir/.. plus the usual
+ # "multi_source_toprel_bottom_adjust" lunacy as needed.
+ # Default to --enable-multilib
+# Check whether --enable-multilib or --disable-multilib was given.
if test "${enable_multilib+set}" = set; then
enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
+ case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5
+echo "$as_me: error: bad value $enableval for multilib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
else
multilib=yes
-fi
+fi;
- # When building with srcdir == objdir, links to the source files will
- # be created in directories within the target_subdir. We have to
- # adjust toplevel_srcdir accordingly, so that configure finds
- # install-sh and other auxiliary files that live in the top-level
- # source directory.
- if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
- toprel=".."
- else
- if test "${with_target_subdir}" != "."; then
- toprel="${with_multisrctop}../.."
- else
- toprel="${with_multisrctop}.."
- fi
- fi
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../.."
else
- toprel=".."
+ multi_basedir="$srcdir/$with_multisrctop.."
fi
- ac_aux_dir=
-for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
+else
+ multi_basedir="$srcdir/.."
+fi
+
+
+ ac_config_commands="$ac_config_commands default-1"
+
+
+ # The generated code is exactly the same, except that automake's looks in
+ # ".. $srcdir/.." and autoconf's looks in multi_basedir. Apparently other
+ # things are triggered on the presence of the two ...AUX_DIR[S], but I don't
+ # know what they are or what the other differences might be (and they keep
+ # changing anyhow).
+ #
+ # Looking in multi_basedir seems smarter, so actually execute that branch.
+ if false; then
+ # this is for automake
+ ac_aux_dir=
+for ac_dir in .. $srcdir/..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -635,24 +1399,57 @@ for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+ else
+ # this is for autoconf
+ ac_aux_dir=
+for ac_dir in ${multi_basedir}; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ${multi_basedir}" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ${multi_basedir}" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+ fi
- toplevel_srcdir=\${top_srcdir}/$toprel
-
# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
#
# You will slowly go insane if you do not grok the following fact: when
# building v3 as part of the compiler, the top-level /target/ becomes the
-# library's /host/. `configure' then causes --target to default to --host,
+# library's /host/. configure then causes --target to default to --host,
# exactly like any other package using autoconf. Therefore, 'target' and
# 'host' will always be the same. This makes sense both for native and
# cross compilers, just think about it for a little while. :-)
@@ -660,774 +1457,2048 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Also, if v3 is being configured as part of a cross compiler, the top-level
# configure script will pass the "real" host as $with_cross_host.
#
-# AC 2.5x sets target_alias iff the user specified --target, but we use it
-# everywhere, so we set it here just to be sure. In AC 2.13
-# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
+# Do not delete or change the following two lines. For why, see
+# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+target_alias=${target_alias-$host_alias}
+
+# Handy for debugging:
+#AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
+
+if test "$build" != "$host"; then
+ # We are being configured with some form of cross compiler.
+ GLIBCXX_IS_NATIVE=false
+
+else
+ GLIBCXX_IS_NATIVE=true
+fi
+
+# Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the
+# following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
+# 1.x: minimum required version
+# no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch
+# of other PACKAGE_* variables will, however, and there's nothing
+# we can do about that; they come from AC_INIT).
+# foreign: we don't follow the normal rules for GNU packages (no COPYING
+# file in the top srcdir, etc, etc), so stop complaining.
+# no-dependencies: turns off auto dependency generation (just for now)
+# -Wall: turns on all automake warnings...
+# -Wno-portability: ...except this one, since GNU make is now required.
+am__api_version="1.7"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
esac
+done
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:695: checking host system type" >&5
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:716: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:734: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
-target_alias=${target_alias-$target}
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
-# Runs configure.target, finds CC, CXX and assorted other critical bits.
-# Must run this before the GLIBCPP_ENABLE_* macros below.
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
else
- ac_tool_prefix=
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:768: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 773 "configure"
-#include "confdefs.h"
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-int main() {
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftest*
-rm -f conftest*
+rm -f conftest.make
fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:801: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
else
- cat > conftest.$ac_ext <<EOF
-#line 806 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
+ am__leading_dot=_
fi
-rm -f conftest*
-rm -f conftest*
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
- # Export build and source directories.
- # These need to be absolute paths, yet at the same time need to
- # canonicalize only relative paths, because then amd will not unmount
- # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
- glibcpp_builddir=`${PWDCMD-pwd}`
- case $srcdir in
- \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;;
- *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
- esac
-
-
-
+# Define the identity of the package.
+ PACKAGE='libstdc++'
+ VERSION='version-unused'
- for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:849: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$AWK" && break
-done
-
- # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.5x, can also
- # be 'cp -p' if linking isn't available. Uncomment the next line to
- # force a particular method.
- #ac_cv_prog_LN_S='cp -p'
- echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:883: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- ac_cv_prog_LN_S=ln
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
+
+ STRIP=$ac_ct_STRIP
else
- echo "$ac_t""no" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+# Runs configure.host, finds CC, CXX, and assorted other critical bits. Sets
+# up critical shell variables.
+ # Keep these sync'd with the list in Makefile.am. The first provides an
+ # expandable list at autoconf time; the second provides an expandable list
+ # (i.e., shell variable) at configure time.
- # We use these options to decide which functions to include.
- # Check whether --with-target-subdir or --without-target-subdir was given.
+ SUBDIRS='include libmath libsupc++ src po testsuite'
+
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ glibcxx_builddir=`${PWDCMD-pwd}`
+ case $srcdir in
+ \\/$* | ?:\\/*) glibcxx_srcdir=${srcdir} ;;
+ *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
+ toplevel_srcdir=${glibcxx_srcdir}/..
+
+
+
+
+ # We use these options to decide which functions to include. They are
+ # set from the top level.
+
+# Check whether --with-target-subdir or --without-target-subdir was given.
if test "${with_target_subdir+set}" = set; then
withval="$with_target_subdir"
- :
-fi
- # Check whether --with-cross-host or --without-cross-host was given.
+fi;
+
+
+# Check whether --with-cross-host or --without-cross-host was given.
if test "${with_cross_host+set}" = set; then
withval="$with_cross_host"
- :
-fi
+
+fi;
- glibcpp_basedir=$srcdir/$toprel/./libstdc++-v3
-
+# Check whether --with-newlib or --without-newlib was given.
+if test "${with_newlib+set}" = set; then
+ withval="$with_newlib"
- # Never versions of autoconf add an underscore to these functions.
- # Prevent future problems ...
-
-
-
-
+fi;
+
+ # We're almost certainly being configured before anything else which uses
+ # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
+ # we not cache the value of CXX that we "discover" here, because it's set
+ # to something unique for us and libjava. Other target libraries need to
+ # find CXX for themselves. We yank the rug out from under the normal AC_*
+ # process by sneakily renaming the cache variable. This also lets us debug
+ # the value of "our" CXX in postmortems.
+ #
+ # We must also force CXX to /not/ be a precious variable, otherwise the
+ # wrong (non-multilib-adjusted) value will be used in multilibs. This
+ # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
+ # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
+ # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
+ #
+ # -fno-builtin must be present here so that a non-conflicting form of
+ # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
- # AC_PROG_CC
- # FIXME: We temporarily define our own version of AC_PROG_CC. This is
- # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
- # are probably using a cross compiler, which will not be able to fully
- # link an executable. This is addressed in later versions of autoconf.
-
-
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-builtin"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:940: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:970: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1019: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
- ac_cv_prog_gcc=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ test -n "$ac_ct_CC" && break
+done
- if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1043: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# FIXME: Cleanup?
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ gcc_no_link=no
+else
+ gcc_no_link=yes
+fi
+
+if test x$gcc_no_link = xyes; then
+ # Setting cross_compile will disable run tests; it will
+ # also disable AC_CHECK_FILE but that's generally
+ # correct if we can't link.
+ cross_compiling=yes
+ EXEEXT=
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- ac_cv_prog_cc_g=no
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
fi
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ CFLAGS=
fi
-
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
- # Likewise for AC_PROG_CXX. We can't just call it directly because g++
- # will try to link in libstdc++.
-
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
-
- # Use glibcpp_CXX so that we do not cause CXX to be cached with the
- # flags that come in CXX while configuring libstdc++. They're different
- # from those used for all other target libraries. If CXX is set in
- # the environment, respect that here.
- glibcpp_CXX=$CXX
- for ac_prog in $CCC c++ g++ gcc CC cxx cc++
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1086: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_glibcpp_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$glibcpp_CXX"; then
- ac_cv_prog_glibcpp_CXX="$glibcpp_CXX" # Let the user override the test.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_glibcpp_CXX="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
-glibcpp_CXX="$ac_cv_prog_glibcpp_CXX"
-if test -n "$glibcpp_CXX"; then
- echo "$ac_t""$glibcpp_CXX" 1>&6
+
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-test -n "$glibcpp_CXX" && break
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${glibcxx_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ glibcxx_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ glibcxx_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
-test -n "$glibcpp_CXX" || glibcpp_CXX="gcc"
-
- CXX=$glibcpp_CXX
- test -z "$glibcpp_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
+fi
+fi
+CXX=$glibcxx_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
- echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1121: checking whether we are using GNU C++" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.C <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gxx=yes
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
- ac_cv_prog_gxx=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+ test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+ CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- if test $ac_cv_prog_gxx = yes; then
- GXX=yes
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=
- echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1145: checking whether ${CXX-g++} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.cc
-if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cxx_g=yes
else
- ac_cv_prog_cxx_g=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_prog_cxx_g=no
fi
-
-echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
- if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS="$ac_save_CXXFLAGS"
- elif test $ac_cv_prog_cxx_g = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-O2"
- fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
else
- GXX=
- test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+ CXXFLAGS="-g"
fi
-
-
- # For directory versioning (e.g., headers) and other variables.
- echo $ac_n "checking for GCC version number""... $ac_c" 1>&6
-echo "configure:1175: checking for GCC version number" >&5
- gcc_version=`$glibcpp_CXX -dumpversion`
- echo "$ac_t""$gcc_version" 1>&6
-
- # For some reason, gettext needs this.
-
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1182: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1190 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
-
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:1201: \"$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"
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ CXXFLAGS="$save_CXXFLAGS"
+
+
+
+
+ # For directory versioning (e.g., headers) and other variables.
+ echo "$as_me:$LINENO: checking for GCC version number" >&5
+echo $ECHO_N "checking for GCC version number... $ECHO_C" >&6
+ gcc_version=`$CXX -dumpversion`
+ echo "$as_me:$LINENO: result: $gcc_version" >&5
+echo "${ECHO_T}$gcc_version" >&6
+
+ # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
+ # available). Uncomment the next line to force a particular method.
+ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
-
-
+ #LN_S='cp -p'
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1227: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS"; then
ac_cv_prog_AS="$AS" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS="$ac_cv_prog_AS"
+AS=$ac_cv_prog_AS
if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
+ echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AS="as"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+echo "${ECHO_T}$ac_ct_AS" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ AS=$ac_ct_AS
+else
+ AS="$ac_cv_prog_AS"
+fi
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1259: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1291: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1323: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib-not-found-in-path-error"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="ranlib-not-found-in-path-error"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB="ranlib-not-found-in-path-error"
-fi
-fi
-
- # Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1367: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1421: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -1436,245 +3507,37 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
- # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
- # at least currently, we never actually build a program, so we never
- # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
- # fails, because we are probably configuring with a cross compiler
- # which can't create executables. So we include AC_EXEEXT to keep
- # automake happy, but we don't execute it, since we don't care about
- # the result.
- if false; then
- # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
- # to nothing, so nothing would remain between `then' and `fi' if it
- # were not for the `:' below.
- :
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1459: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.$ac_ext | *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
- fi
-
- case ${glibcpp_basedir} in
- /* | A-Za-z:\\/*) libgcj_flagbasedir=${glibcpp_basedir} ;;
- *) glibcpp_flagbasedir='$(top_builddir)/'${glibcpp_basedir} ;;
- esac
-
- # Find platform-specific directories containing configuration info. In
- # addition to possibly modifying the same flags, it also sets up symlinks.
-
- . ${glibcpp_basedir}/configure.target
- echo "$ac_t""CPU config directory is $cpu_include_dir" 1>&6
- echo "$ac_t""OS config directory is $os_include_dir" 1>&6
-
-
-
-am__api_version="1.4"
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1507: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1564: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=$PACKAGE
-
-VERSION=$gcc_version
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1610: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1623: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1636: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
+ MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1649: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1662: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
+ # Set up safe default values for all subsequent AM_CONDITIONAL tests
+ # which are themselves conditionally expanded.
+ ## (Right now, this only matters for enable_wchar_t, but nothing prevents
+ ## other macros from doing the same. This should be automated.) -pme
+ need_libmath=no
+ enable_wchar_t=no
+ #enable_libstdcxx_debug=no
+ #enable_libstdcxx_pch=no
+ #enable_cheaders=c
+ #c_compatibility=no
+ #enable_abi_check=no
+ #enable_symvers=no
+ #enable_hosted_libstdcxx=yes
+ # Find platform-specific directories containing configuration info.
+ # Also possibly modify flags used elsewhere, as needed by the platform.
+ . $glibcxx_srcdir/configure.host
+ { echo "$as_me:$LINENO: CPU config directory is $cpu_include_dir" >&5
+echo "$as_me: CPU config directory is $cpu_include_dir" >&6;}
+ { echo "$as_me:$LINENO: OS config directory is $os_include_dir" >&5
+echo "$as_me: OS config directory is $os_include_dir" >&6;}
+#AC_MSG_NOTICE([====== Starting libtool configuration])
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
@@ -1697,8 +3560,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=yes
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
@@ -1720,8 +3582,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1743,7 +3604,7 @@ no) enable_fast_install=no ;;
esac
else
enable_fast_install=yes
-fi
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1751,13 +3612,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1761: checking for ld used by GCC" >&5
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1786,14 +3646,14 @@ echo "configure:1761: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1791: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1794: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
@@ -1819,15 +3679,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1829: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -1836,27 +3700,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1846: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_ld_reload_flag='-r'
fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1858: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -1889,12 +3753,13 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1896: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -1931,6 +3796,7 @@ cygwin* | mingw* |pw32*)
;;
darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
@@ -1941,6 +3807,7 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
freebsd* )
@@ -2002,7 +3869,7 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+ alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
@@ -2059,34 +3926,14 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2069: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+
+
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
@@ -2094,10 +3941,10 @@ ac_objext=$ac_cv_objext
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2099: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -2149,17 +3996,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2161: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
/*)
@@ -2211,9 +4060,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -2225,138 +4076,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2232: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2264: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2299: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP="$ac_cv_prog_STRIP"
+STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2331: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -2367,25 +4244,24 @@ test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-libtool_flags="$libtool_flags --enable-dlopen"
+
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
- :
-fi
+fi;
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
-fi
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2394,8 +4270,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2398 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 4273 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2428,7 +4308,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2444,7 +4328,11 @@ ia64-*-hpux*)
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
case $host in
@@ -2487,47 +4375,69 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2492: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
+
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- cat > conftest.$ac_ext <<EOF
-#line 2505 "configure"
-#include "confdefs.h"
-
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
lt_cv_cc_needs_belf=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
@@ -2537,99 +4447,63 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
esac
-echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:2542: checking how to run the C++ preprocessor" >&5
-if test -z "$CXXCPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- CXXCPP="${CXX-g++} -E"
- cat > conftest.$ac_ext <<EOF
-#line 2555 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2560: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CXXCPP=/lib/cpp
-fi
-rm -f conftest*
- ac_cv_prog_CXXCPP="$CXXCPP"
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-fi
-fi
-CXXCPP="$ac_cv_prog_CXXCPP"
-echo "$ac_t""$CXXCPP" 1>&6
-
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
@@ -2639,15 +4513,26 @@ objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
+echo "$as_me: error: libtool configure failed" >&2;}
+ { (exit 1); exit 1; }; }
# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
fi
@@ -2661,6 +4546,236 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
@@ -2675,7 +4790,9 @@ deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
+|| { { echo "$as_me:$LINENO: error: libtool tag configuration failed" >&5
+echo "$as_me: error: libtool tag configuration failed" >&2;}
+ { (exit 1); exit 1; }; }
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
@@ -2683,410 +4800,861 @@ CFLAGS="$lt_save_CFLAGS"
# clobbered by the next message.
exec 5>>./config.log
-
-
-
-
-# Check for c++ or library specific bits that don't require linking.
-#GLIBCPP_CHECK_COMPILER_VERSION
-echo $ac_n "checking for GNU make""... $ac_c" 1>&6
-echo "configure:2698: checking for GNU make" >&5
-if eval "test \"`echo '$''{'_cv_gnu_make_command'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+#AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
+
+# Possibly disable most of the library.
+## XXX Consider skipping unncessary tests altogether in this case, rather
+## than just ignoring the results. Faster /and/ more correct, win win.
+
+ # Check whether --enable-hosted-libstdcxx or --disable-hosted-libstdcxx was given.
+if test "${enable_hosted_libstdcxx+set}" = set; then
+ enableval="$enable_hosted_libstdcxx"
+
+else
+ enable_hosted_libstdcxx=yes
+fi;
+ if test "$enable_hosted_libstdcxx" = no; then
+ { echo "$as_me:$LINENO: Only freestanding libraries will be built" >&5
+echo "$as_me: Only freestanding libraries will be built" >&6;}
+ is_hosted=no
+ hosted_define=0
+ enable_abi_check=no
+ enable_libstdcxx_pch=no
+ else
+ is_hosted=yes
+ hosted_define=1
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define _GLIBCXX_HOSTED $hosted_define
+_ACEOF
+
+
+
+# Check for support bits and g++ features that don't require linking.
+
+ echo "$as_me:$LINENO: checking for exception model to use" >&5
+echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
+if test "${enable_sjlj_exceptions+set}" = set; then
+ enableval="$enable_sjlj_exceptions"
+
+ case "$enableval" in
+ yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable sjlj-exceptions" >&5
+echo "$as_me: error: Unknown argument to enable/disable sjlj-exceptions" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
- _cv_gnu_make_command='' ;
- for a in "${MAKE-make}" make gmake gnumake ; do
- if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
- then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
-
+ enable_sjlj_exceptions=auto
+fi;
+
+
+ if test $enable_sjlj_exceptions = auto; then
+ # Botheration. Now we've got to detect the exception model. Link tests
+ # against libgcc.a are problematic since we've not been given proper -L
+ # bits for single-tree newlib and libgloss.
+ #
+ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
+ cat > conftest.$ac_ext << EOF
+#line 4877 "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+ S s;
+ bar();
+}
+EOF
+ old_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS=-S
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=yes
+ elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
+ fi
+ fi
+ CXXFLAGS="$old_CXXFLAGS"
+ rm -f conftest*
+ fi
+
+ # This is a tad weird, for hysterical raisins. We have to map enable/disable
+ # to two different models.
+ case $enable_sjlj_exceptions in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_SJLJ_EXCEPTIONS 1
+_ACEOF
+
+ ac_exception_model_name=sjlj
+ ;;
+ no)
+ ac_exception_model_name="call frame"
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unable to detect exception model" >&5
+echo "$as_me: error: unable to detect exception model" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ echo "$as_me:$LINENO: result: $ac_exception_model_name" >&5
+echo "${ECHO_T}$ac_exception_model_name" >&6
+
+
+ echo "$as_me:$LINENO: checking for enabled PCH" >&5
+echo $ECHO_N "checking for enabled PCH... $ECHO_C" >&6
+ # Check whether --enable-libstdcxx-pch or --disable-libstdcxx-pch was given.
+if test "${enable_libstdcxx_pch+set}" = set; then
+ enableval="$enable_libstdcxx_pch"
+
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable libstdcxx-pch must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable libstdcxx-pch must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
+else
+ enable_libstdcxx_pch=$is_hosted
+fi;
+
+ echo "$as_me:$LINENO: result: $enable_libstdcxx_pch" >&5
+echo "${ECHO_T}$enable_libstdcxx_pch" >&6
+
+ if test $enable_libstdcxx_pch = yes; then
+ echo "$as_me:$LINENO: checking for compiler with PCH support" >&5
+echo $ECHO_N "checking for compiler with PCH support... $ECHO_C" >&6
+if test "${glibcxx_cv_prog_CXX_pch+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ echo '#include <math.h>' > conftest.h
+ if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
+ -o conftest.h.gch 1>&5 2>&1 &&
+ echo '#error "pch failed"' > conftest.h &&
+ echo '#include "conftest.h"' > conftest.cc &&
+ $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
+ then
+ glibcxx_cv_prog_CXX_pch=yes
+ else
+ glibcxx_cv_prog_CXX_pch=no
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_save_CXXFLAGS
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
+echo "$as_me:$LINENO: result: $glibcxx_cv_prog_CXX_pch" >&5
+echo "${ECHO_T}$glibcxx_cv_prog_CXX_pch" >&6
+ enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
+ fi
+
-echo "$ac_t""$_cv_gnu_make_command" 1>&6 ;
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
+ if test $enable_libstdcxx_pch = yes; then
+ glibcxx_PCHFLAGS="-include bits/stdc++.h"
else
- ifGNUmake='#' ;
+ glibcxx_PCHFLAGS=""
fi
-
-# Enable all the variable C++ stuff. C_MBCHAR must come early.
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2724: checking how to run the C preprocessor" >&5
+
+# Enable all the variable C++ runtime options.
+# NB: C_MBCHAR must come early.
+
+ echo "$as_me:$LINENO: checking for underlying I/O to use" >&5
+echo $ECHO_N "checking for underlying I/O to use... $ECHO_C" >&6
+ # Check whether --enable-cstdio or --disable-cstdio was given.
+if test "${enable_cstdio+set}" = set; then
+ enableval="$enable_cstdio"
+
+ case "$enableval" in
+ stdio) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable cstdio" >&5
+echo "$as_me: error: Unknown argument to enable/disable cstdio" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
+else
+ enable_cstdio=stdio
+fi;
+
+
+ # Now that libio has been removed, you can have any color you want as long
+ # as it's black. This is one big no-op until other packages are added, but
+ # showing the framework never hurts.
+ case ${enable_cstdio} in
+ stdio)
+ CSTDIO_H=config/io/c_io_stdio.h
+ BASIC_FILE_H=config/io/basic_file_stdio.h
+ BASIC_FILE_CC=config/io/basic_file_stdio.cc
+ echo "$as_me:$LINENO: result: stdio" >&5
+echo "${ECHO_T}stdio" >&6
+ ;;
+ esac
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2745: \"$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
- :
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2762: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2773 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$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
- :
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-echo "$ac_t""$CPP" 1>&6
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
- echo $ac_n "checking for cstdio to use""... $ac_c" 1>&6
-echo "configure:2805: checking for cstdio to use" >&5
- # Check whether --enable-cstdio or --disable-cstdio was given.
-if test "${enable_cstdio+set}" = set; then
- enableval="$enable_cstdio"
- if test x$enable_cstdio = xno; then
- enable_cstdio=stdio
- fi
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- enable_cstdio=stdio
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- enable_cstdio_flag=$enable_cstdio
- case x${enable_cstdio_flag} in
- xlibio)
- CSTDIO_H=config/io/c_io_libio.h
- BASIC_FILE_H=config/io/basic_file_libio.h
- BASIC_FILE_CC=config/io/basic_file_libio.cc
- echo "$ac_t""libio" 1>&6
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
- # see if we are on a system with libio native (ie, linux)
- ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libio.h""... $ac_c" 1>&6
-echo "configure:2829: checking for libio.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2834 "configure"
-#include "confdefs.h"
-#include <libio.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2839: \"$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"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
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"
+ ac_cv_header_stdc=no
fi
rm -f conftest*
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- has_libio=yes
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
else
- echo "$ac_t""no" 1>&6
-has_libio=no
+ ac_cv_header_stdc=no
fi
+rm -f conftest*
+fi
- # Need to check and see what version of glibc is being used. If
- # it's not glibc-2.2 or higher, then we'll need to go ahead and
- # compile most of libio for linux systems.
- if test x$has_libio = x"yes"; then
- case "$target" in
- *-*-linux*)
- echo $ac_n "checking for glibc version >= 2.2""... $ac_c" 1>&6
-echo "configure:2869: checking for glibc version >= 2.2" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2871 "configure"
-#include "confdefs.h"
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
- #include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- ok
- #endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "ok" >/dev/null 2>&1; then
- rm -rf conftest*
- glibc_satisfactory=yes
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- rm -rf conftest*
- glibc_satisfactory=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
- echo "$ac_t""$glibc_satisfactory" 1>&6
- ;;
- esac
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
- # XXX at the moment, admit defeat and force the recompilation
- # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
- glibc_satisfactory=no
-
- if test x$glibc_satisfactory = x"yes"; then
- need_libio=no
- need_wlibio=no
- else
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
+fi
- else
- # Using libio, but <libio.h> doesn't exist on the target system. . .
- need_libio=yes
- # bkoz XXX need to add checks to enable this
- # pme XXX here's a first pass at such a check
- if test x$enable_c_mbchar != xno; then
- need_wlibio=yes
- else
- need_wlibio=no
- fi
- fi
- ;;
- xstdio | x | xno | xnone | xyes)
- # default
- CSTDIO_H=config/io/c_io_stdio.h
- BASIC_FILE_H=config/io/basic_file_stdio.h
- BASIC_FILE_CC=config/io/basic_file_stdio.cc
- echo "$ac_t""stdio" 1>&6
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
- # We're not using stdio.
- need_libio=no
- need_wlibio=no
- ;;
- *)
- echo "$enable_cstdio is an unknown io package" 1>&2
- exit 1
- ;;
- esac
-
-
-
- # 2000-08-04 bkoz hack
- CCODECVT_C=config/io/c_io_libio_codecvt.c
-
- # 2000-08-04 bkoz hack
-
-if test "$need_libio" = yes || test "$need_wlibio" = yes; then
- GLIBCPP_BUILD_LIBIO_TRUE=
- GLIBCPP_BUILD_LIBIO_FALSE='#'
-else
- GLIBCPP_BUILD_LIBIO_TRUE='#'
- GLIBCPP_BUILD_LIBIO_FALSE=
-fi
-
-if test "$need_libio" = yes; then
- GLIBCPP_NEED_LIBIO_TRUE=
- GLIBCPP_NEED_LIBIO_FALSE='#'
-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=
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
- if test "$need_libio" = yes || test "$need_wlibio" = yes; then
- libio_la=../libio/libio.la
- else
- libio_la=
- fi
-
+
+done
+
- echo $ac_n "checking for clocale to use""... $ac_c" 1>&6
-echo "configure:2985: checking for clocale to use" >&5
- # Check whether --enable-clocale or --disable-clocale was given.
+ echo "$as_me:$LINENO: checking for C locale to use" >&5
+echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6
+ # Check whether --enable-clocale or --disable-clocale was given.
if test "${enable_clocale+set}" = set; then
enableval="$enable_clocale"
- if test x$enable_clocale = xno; then
- enable_clocale=no
- fi
+
+ case "$enableval" in
+ generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
+echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
- enable_clocale=no
-fi
+ enable_clocale=auto
+fi;
+
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_clocale = no || test $enable_clocale = yes; then
+ enable_clocale=auto
+ fi
+ # Either a known package, or "auto"
enable_clocale_flag=$enable_clocale
- if test x$enable_clocale_flag = xno; then
+ # Probe for locale support if no specific model is specified.
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
case x${target_os} in
- xlinux* | xgnu*)
- cat > conftest.$ac_ext <<EOF
-#line 3003 "configure"
-#include "confdefs.h"
+ xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <features.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- _GLIBCPP_ok
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+ _GLIBCXX_ok
#endif
-
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "_GLIBCPP_ok" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "_GLIBCXX_ok" >/dev/null 2>&1; then
enable_clocale_flag=gnu
else
- rm -rf conftest*
enable_clocale_flag=generic
fi
rm -f conftest*
- # Test for bugs early in glibc-2.2.x series
- if test x$enable_clocale_flag = xgnu; then
- if test "$cross_compiling" = yes; then
+ # Test for bugs early in glibc-2.2.x series
+ if test x$enable_clocale_flag = xgnu; then
+ if test "$cross_compiling" = yes; then
enable_clocale_flag=generic
else
- cat > conftest.$ac_ext <<EOF
-#line 3029 "configure"
-#include "confdefs.h"
-
- #define _GNU_SOURCE 1
- #include <locale.h>
- #include <string.h>
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
- extern __typeof(newlocale) __newlocale;
- extern __typeof(duplocale) __duplocale;
- extern __typeof(strcoll_l) __strcoll_l;
- #endif
- int main()
- {
- const char __one[] = "Äuglein Augmen";
- const char __two[] = "Äuglein";
- int i;
- int j;
- __locale_t loc;
- __locale_t loc_dup;
- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
- loc_dup = __duplocale(loc);
- i = __strcoll_l(__one, __two, loc);
- j = __strcoll_l(__one, __two, loc_dup);
- return 0;
- }
-
-EOF
-if { (eval echo configure:3056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #define _GNU_SOURCE 1
+ #include <locale.h>
+ #include <string.h>
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ extern __typeof(newlocale) __newlocale;
+ extern __typeof(duplocale) __duplocale;
+ extern __typeof(strcoll_l) __strcoll_l;
+ #endif
+ int main()
+ {
+ const char __one[] = "Äuglein Augmen";
+ const char __two[] = "Äuglein";
+ int i;
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
enable_clocale_flag=gnu
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- enable_clocale_flag=generic
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+enable_clocale_flag=generic
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ fi
- fi
-
- # ... at some point put __strxfrm_l tests in as well.
+ # ... at some point put __strxfrm_l tests in as well.
;;
*)
- enable_clocale_flag=generic
- ;;
+ enable_clocale_flag=generic
+ ;;
esac
fi
- # Check whether --enable-nls or --disable-nls was given.
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+ # default to on for easier handling.
+ USE_NLS=no
+ # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
- :
+
else
enable_nls=yes
-fi
+fi;
- USE_NLS=no
-
- case x${enable_clocale_flag} in
- xgeneric)
- echo "$ac_t""generic" 1>&6
+ # Set configure bits for specified locale package
+ case ${enable_clocale_flag} in
+ generic)
+ echo "$as_me:$LINENO: result: generic" >&5
+echo "${ECHO_T}generic" >&6
CLOCALE_H=config/locale/generic/c_locale.h
CLOCALE_CC=config/locale/generic/c_locale.cc
@@ -3102,8 +5670,9 @@ fi
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- xgnu)
- echo "$ac_t""gnu" 1>&6
+ gnu)
+ echo "$as_me:$LINENO: result: gnu" >&5
+echo "${ECHO_T}gnu" >&6
# Declare intention to use gettext, and add support for specific
# languages.
@@ -3113,44 +5682,50 @@ fi
# Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3118: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$check_msgfmt"; then
ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_check_msgfmt="yes"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_check_msgfmt="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
fi
fi
-check_msgfmt="$ac_cv_prog_check_msgfmt"
+check_msgfmt=$ac_cv_prog_check_msgfmt
if test -n "$check_msgfmt"; then
- echo "$ac_t""$check_msgfmt" 1>&6
+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
+echo "${ECHO_T}$check_msgfmt" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
- USE_NLS=yes
+ USE_NLS=yes
fi
# Export the build objects.
for ling in $ALL_LINGUAS; do \
- glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
- glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
done
-
-
+
+
CLOCALE_H=config/locale/gnu/c_locale.h
CLOCALE_CC=config/locale/gnu/c_locale.cc
@@ -3166,8 +5741,9 @@ fi
CTIME_CC=config/locale/gnu/time_members.cc
CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
;;
- xieee_1003.1-2001)
- echo "$ac_t""generic" 1>&6
+ ieee_1003.1-2001)
+ echo "$as_me:$LINENO: result: IEEE 1003.1" >&5
+echo "${ECHO_T}IEEE 1003.1" >&6
CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
@@ -3183,1089 +5759,1928 @@ fi
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
- *)
- echo "$enable_clocale is an unknown locale package" 1>&2
- exit 1
- ;;
esac
# This is where the testsuite looks for locale catalogs, using the
# -DLOCALEDIR define during testsuite compilation.
- glibcpp_localedir=${glibcpp_builddir}/po/share/locale
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-echo $ac_n "checking for c header strategy to use""... $ac_c" 1>&6
-echo "configure:3214: checking for c header strategy to use" >&5
-# Check whether --enable-cheaders or --disable-cheaders was given.
-if test "${enable_cheaders+set}" = set; then
- enableval="$enable_cheaders"
-
- case "$enableval" in
- c)
- enable_cheaders=c
- ;;
- c_std)
- enable_cheaders=c_std
- ;;
- *) { echo "configure: error: Unknown argument to enable/disable "C" headers" 1>&2; exit 1; }
- ;;
- esac
+ glibcxx_localedir=${glibcxx_builddir}/po/share/locale
+
+
+ # A standalone libintl (e.g., GNU libintl) may be in use.
+ if test $USE_NLS = yes; then
+
+for ac_header in libintl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- enable_cheaders=c_std
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- echo "$ac_t""$enable_cheaders" 1>&6
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
- case "$enable_cheaders" in
- c_std)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
- ;;
- c)
- C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
- ;;
- esac
+else
+ USE_NLS=no
+fi
-
-
+done
-if test "$enable_cheaders" = c; then
- GLIBCPP_C_HEADERS_C_TRUE=
- GLIBCPP_C_HEADERS_C_FALSE='#'
-else
- GLIBCPP_C_HEADERS_C_TRUE='#'
- GLIBCPP_C_HEADERS_C_FALSE=
+ echo "$as_me:$LINENO: checking for library containing gettext" >&5
+echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
+if test "${ac_cv_search_gettext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gettext=no
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettext ();
+int
+main ()
+{
+gettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_gettext="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gettext" = no; then
+ for ac_lib in intl; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettext ();
+int
+main ()
+{
+gettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_gettext="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
-
+echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
+echo "${ECHO_T}$ac_cv_search_gettext" >&6
+if test "$ac_cv_search_gettext" != no; then
+ test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
-if test "$enable_cheaders" = c_std; then
- GLIBCPP_C_HEADERS_C_STD_TRUE=
- GLIBCPP_C_HEADERS_C_STD_FALSE='#'
else
- GLIBCPP_C_HEADERS_C_STD_TRUE='#'
- GLIBCPP_C_HEADERS_C_STD_FALSE=
+ USE_NLS=no
fi
-
-if test "$c_compatibility" = yes; then
- GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE=
- GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE='#'
+ fi
+ if test $USE_NLS = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_NLS 1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for std::allocator base class to use" >&5
+echo $ECHO_N "checking for std::allocator base class to use... $ECHO_C" >&6
+ # Check whether --enable-libstdcxx-allocator or --disable-libstdcxx-allocator was given.
+if test "${enable_libstdcxx_allocator+set}" = set; then
+ enableval="$enable_libstdcxx_allocator"
+
+ case "$enableval" in
+ new|malloc|mt|bitmap|pool|yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable libstdcxx-allocator" >&5
+echo "$as_me: error: Unknown argument to enable/disable libstdcxx-allocator" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
- GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE='#'
- GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE=
-fi
+ enable_libstdcxx_allocator=auto
+fi;
+
+ # If they didn't use this option switch, or if they specified --enable
+ # with no specific model, we'll have to look for one. If they
+ # specified --disable (???), do likewise.
+ if test $enable_libstdcxx_allocator = no || test $enable_libstdcxx_allocator = yes; then
+ enable_libstdcxx_allocator=auto
+ fi
+
+ # Either a known package, or "auto"
+ enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
+
+ # Probe for host-specific support if no specific model is specified.
+ # Default to "new".
+ if test $enable_libstdcxx_allocator_flag = auto; then
+ case ${target_os} in
+ *)
+ enable_libstdcxx_allocator_flag=new
+ ;;
+ esac
+ fi
+ echo "$as_me:$LINENO: result: $enable_libstdcxx_allocator_flag" >&5
+echo "${ECHO_T}$enable_libstdcxx_allocator_flag" >&6
+
+
+ # Set configure bits for specified locale package
+ case ${enable_libstdcxx_allocator_flag} in
+ bitmap)
+ ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
+ ;;
+ malloc)
+ ALLOCATOR_H=config/allocator/malloc_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
+ ;;
+ mt)
+ ALLOCATOR_H=config/allocator/mt_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
+ ;;
+ new)
+ ALLOCATOR_H=config/allocator/new_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::new_allocator
+ ;;
+ pool)
+ ALLOCATOR_H=config/allocator/pool_allocator_base.h
+ ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
+ ;;
+ esac
+
-# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
+
+
+
+ # Check whether --enable-cheaders or --disable-cheaders was given.
+if test "${enable_cheaders+set}" = set; then
+ enableval="$enable_cheaders"
+
+ case "$enableval" in
+ c|c_std) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable cheaders" >&5
+echo "$as_me: error: Unknown argument to enable/disable cheaders" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
+else
+ enable_cheaders=$c_model
+fi;
+
+ { echo "$as_me:$LINENO: \"C\" header strategy set to $enable_cheaders" >&5
+echo "$as_me: \"C\" header strategy set to $enable_cheaders" >&6;}
+
+ C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
+
+
+
+
+
+
+ # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
if test "${enable_c_mbchar+set}" = set; then
enableval="$enable_c_mbchar"
- case "$enableval" in
- yes) enable_c_mbchar=yes ;;
- no) enable_c_mbchar=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable c-mbchar" 1>&2; exit 1; } ;;
- esac
+
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable c-mbchar must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable c-mbchar must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
enable_c_mbchar=yes
-fi
+fi;
+
+ # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
+
-
- # Check whether --enable-c99 or --disable-c99 was given.
+
+ # Check whether --enable-c99 or --disable-c99 was given.
if test "${enable_c99+set}" = set; then
enableval="$enable_c99"
- case "$enableval" in
- yes) enable_c99=yes ;;
- no) enable_c99=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable C99" 1>&2; exit 1; } ;;
- esac
+
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable c99 must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable c99 must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
enable_c99=yes
-fi
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+fi;
+
+
+
+
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Check for the existence of <math.h> functions used if C99 is enabled.
ac_c99_math=yes;
- echo $ac_n "checking for ISO C99 support in <math.h>""... $ac_c" 1>&6
-echo "configure:3310: checking for ISO C99 support in <math.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 3312 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for ISO C99 support in <math.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
fpclassify(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3329 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isfinite(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3346 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isinf(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3363 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isnan(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3380 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isnormal(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3397 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
signbit(0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3414 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isgreater(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3431 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isgreaterequal(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3448 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isless(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3465 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
islessequal(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3482 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
islessgreater(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3499 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
isunordered(0.0,0.0);
-; return 0; }
-EOF
-if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_math=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
fi
-rm -f conftest*
- echo "$ac_t""$ac_c99_math" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_c99_math" >&5
+echo "${ECHO_T}$ac_c99_math" >&6
+
+ if test x"$ac_c99_math" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_MATH 1
+_ACEOF
+
+ fi
# Check for the existence in <stdio.h> of vscanf, et. al.
ac_c99_stdio=yes;
- echo $ac_n "checking for ISO C99 support in <stdio.h>""... $ac_c" 1>&6
-echo "configure:3520: checking for ISO C99 support in <stdio.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 3522 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for ISO C99 support in <stdio.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <stdio.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
-int main() {
+int
+main ()
+{
snprintf("12", 0, "%i");
-; return 0; }
-EOF
-if { (eval echo configure:3529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdio=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3539 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);}
-int main() {
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);}
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdio=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3560 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vscanf("%i", args);}
-int main() {
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vscanf("%i", args);}
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdio=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3581 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsnprintf(fmt, 0, "%i", args);}
-int main() {
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsnprintf(fmt, 0, "%i", args);}
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdio=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsscanf(fmt, "%i", args);}
-int main() {
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {va_list args; va_start(args, fmt);
+ vsscanf(fmt, "%i", args);}
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdio=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
fi
-rm -f conftest*
- echo "$ac_t""$ac_c99_stdio" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_c99_stdio" >&5
+echo "${ECHO_T}$ac_c99_stdio" >&6
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
ac_c99_stdlib=yes;
- echo $ac_n "checking for lldiv_t declaration""... $ac_c" 1>&6
-echo "configure:3627: checking for lldiv_t declaration" >&5
- if eval "test \"`echo '$''{'ac_c99_lldiv_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 3633 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for lldiv_t declaration" >&5
+echo $ECHO_N "checking for lldiv_t declaration... $ECHO_C" >&6
+ if test "${ac_c99_lldiv_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
lldiv_t mydivt;
-; return 0; }
-EOF
-if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_c99_lldiv_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_lldiv_t=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_lldiv_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
+
fi
- echo "$ac_t""$ac_c99_lldiv_t" 1>&6
+ echo "$as_me:$LINENO: result: $ac_c99_lldiv_t" >&5
+echo "${ECHO_T}$ac_c99_lldiv_t" >&6
- echo $ac_n "checking for ISO C99 support in <stdlib.h>""... $ac_c" 1>&6
-echo "configure:3656: checking for ISO C99 support in <stdlib.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for ISO C99 support in <stdlib.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <stdlib.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
char* tmp; strtof("gnu", &tmp);
-; return 0; }
-EOF
-if { (eval echo configure:3665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3675 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
char* tmp; strtold("gnu", &tmp);
-; return 0; }
-EOF
-if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3692 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
llabs(10);
-; return 0; }
-EOF
-if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3709 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
lldiv(10,1);
-; return 0; }
-EOF
-if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3726 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
atoll("10");
-; return 0; }
-EOF
-if { (eval echo configure:3733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3743 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
_Exit(0);
-; return 0; }
-EOF
-if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_stdlib=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x"$ac_c99_lldiv_t" = x"no"; then
- ac_c99_stdlib=no;
- fi;
- echo "$ac_t""$ac_c99_stdlib" 1>&6
+ ac_c99_stdlib=no;
+ fi;
+ echo "$as_me:$LINENO: result: $ac_c99_stdlib" >&5
+echo "${ECHO_T}$ac_c99_stdlib" >&6
# Check for the existence of <wchar.h> functions used if C99 is enabled.
# XXX the wchar.h checks should be rolled into the general C99 bits.
ac_c99_wchar=yes;
- echo $ac_n "checking for additional ISO C99 support in <wchar.h>""... $ac_c" 1>&6
-echo "configure:3768: checking for additional ISO C99 support in <wchar.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 3770 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for additional ISO C99 support in <wchar.h>" >&5
+echo $ECHO_N "checking for additional ISO C99 support in <wchar.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
wcstold(L"10.0", NULL);
-; return 0; }
-EOF
-if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_wchar=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_wchar=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3787 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
wcstoll(L"10", NULL, 10);
-; return 0; }
-EOF
-if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_wchar=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_wchar=no
fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3804 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
wcstoull(L"10", NULL, 10);
-; return 0; }
-EOF
-if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_c99_wchar=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_wchar=no
fi
-rm -f conftest*
- echo "$ac_t""$ac_c99_wchar" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_c99_wchar" >&5
+echo "${ECHO_T}$ac_c99_wchar" >&6
- echo $ac_n "checking for enabled ISO C99 support""... $ac_c" 1>&6
-echo "configure:3823: checking for enabled ISO C99 support" >&5
+ echo "$as_me:$LINENO: checking for enabled ISO C99 support" >&5
+echo $ECHO_N "checking for enabled ISO C99 support... $ECHO_C" >&6
if test x"$ac_c99_math" = x"no" ||
test x"$ac_c99_stdio" = x"no" ||
test x"$ac_c99_stdlib" = x"no" ||
test x"$ac_c99_wchar" = x"no"; then
- enable_c99=no;
- fi;
- echo "$ac_t""$enable_c99" 1>&6
+ enable_c99=no;
+ fi;
+ echo "$as_me:$LINENO: result: $enable_c99" >&5
+echo "${ECHO_T}$enable_c99" >&6
+
+ if test x"$ac_99_math" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_MATH 1
+_ACEOF
+
+ fi
# Option parsed, now set things appropriately
if test x"$enable_c99" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_C99 1
-EOF
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99 1
+_ACEOF
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
- # Check whether --enable-long-long or --disable-long-long was given.
+ # Check whether --enable-long-long or --disable-long-long was given.
if test "${enable_long_long+set}" = set; then
enableval="$enable_long_long"
- case "$enableval" in
- yes) enable_long_long=yes ;;
- no) enable_long_long=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable long long" 1>&2; exit 1; } ;;
- esac
+
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable long-long must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable long-long must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
enable_long_long=yes
-fi
+fi;
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ if test $enable_long_long = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_LONG_LONG 1
+_ACEOF
+ fi
- echo $ac_n "checking for enabled long long I/O support""... $ac_c" 1>&6
-echo "configure:3871: checking for enabled long long I/O support" >&5
- # iostreams require strtoll, strtoull to compile
- cat > conftest.$ac_ext <<EOF
-#line 3874 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char* tmp; strtoll("gnu", &tmp, 10);
-; return 0; }
-EOF
-if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- enable_long_long=no
-fi
-rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#line 3891 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char* tmp; strtoull("gnu", &tmp, 10);
-; return 0; }
-EOF
-if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- enable_long_long=no
-fi
-rm -f conftest*
- # Option parsed, now set things appropriately
- if test x"$enable_long_long" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_LONG_LONG 1
-EOF
+ echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
+echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
+ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+ echo "$as_me:$LINENO: result: $target_thread_file" >&5
+echo "${ECHO_T}$target_thread_file" >&6
- fi
- echo "$ac_t""$enable_long_long" 1>&6
+ if test $target_thread_file != single; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTHR_DEFAULT 1
+_ACEOF
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ fi
+ glibcxx_thread_h=gthr-$target_thread_file.h
- echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
-echo "configure:3927: checking for thread model used by GCC" >&5
- target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
- echo "$ac_t""$target_thread_file" 1>&6
- if test $target_thread_file != single; then
- cat >> confdefs.h <<\EOF
-#define HAVE_GTHR_DEFAULT 1
-EOF
+ # Check whether --enable-concept-checks or --disable-concept-checks was given.
+if test "${enable_concept_checks+set}" = set; then
+ enableval="$enable_concept_checks"
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_SUPPORTS_WEAK __GXX_WEAK__
-EOF
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable concept-checks must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable concept-checks must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
- fi
+else
+ enable_concept_checks=no
+fi;
- glibcpp_thread_h=gthr-$target_thread_file.h
-
+ if test $enable_concept_checks = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_CONCEPT_CHECKS 1
+_ACEOF
+ fi
- echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
-echo "configure:3947: checking for exception model to use" >&5
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
-if test "${enable_sjlj_exceptions+set}" = set; then
- enableval="$enable_sjlj_exceptions"
- :
+ # Check whether --enable-libstdcxx-debug-flags or --disable-libstdcxx-debug-flags was given.
+if test "${enable_libstdcxx_debug_flags+set}" = set; then
+ enableval="$enable_libstdcxx_debug_flags"
+ case "x$enable_libstdcxx_debug_flags" in
+ xno | x) enable_libstdcxx_debug_flags= ;;
+ x-*) ;;
+ *) { { echo "$as_me:$LINENO: error: --enable-libstdcxx-debug-flags needs compiler flags as arguments" >&5
+echo "$as_me: error: --enable-libstdcxx-debug-flags needs compiler flags as arguments" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
else
- cat > conftest.$ac_ext << EOF
-#line 3962 "configure"
-struct S { ~S(); };
-void bar();
-void foo()
-{
- S s;
- bar();
-}
-EOF
- old_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=-S
- if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
- enable_sjlj_exceptions=no
- fi
- fi
- CXXFLAGS="$old_CXXFLAGS"
- rm -f conftest*
-fi
+ enable_libstdcxx_debug_flags="-g3 -O0"
+fi;
- if test x$enable_sjlj_exceptions = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_SJLJ_EXCEPTIONS 1
-EOF
- ac_exception_model_name=sjlj
- elif test x$enable_sjlj_exceptions = xno; then
- ac_exception_model_name="call frame"
- else
- { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
- fi
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ # Option parsed, now set things appropriately
+ DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
- echo "$ac_t""$ac_exception_model_name" 1>&6
+ { echo "$as_me:$LINENO: Debug build flags set to $DEBUG_FLAGS" >&5
+echo "$as_me: Debug build flags set to $DEBUG_FLAGS" >&6;}
- echo $ac_n "checking for use of libunwind""... $ac_c" 1>&6
-echo "configure:4006: checking for use of libunwind" >&5
- # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
-if test "${enable_libunwind_exceptions+set}" = set; then
- enableval="$enable_libunwind_exceptions"
- use_libunwind_exceptions=$enableval
-else
- use_libunwind_exceptions=no
-fi
- echo "$ac_t""$use_libunwind_exceptions" 1>&6
- if test x"$use_libunwind_exceptions" = xyes; then
- LIBUNWIND_FLAG="-lunwind"
- else
- LIBUNWIND_FLAG=""
- fi
-
+ echo "$as_me:$LINENO: checking for additional debug build" >&5
+echo $ECHO_N "checking for additional debug build... $ECHO_C" >&6
+ # Check whether --enable-libstdcxx-debug or --disable-libstdcxx-debug was given.
+if test "${enable_libstdcxx_debug+set}" = set; then
+ enableval="$enable_libstdcxx_debug"
+
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable libstdcxx-debug must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable libstdcxx-debug must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
-# Check whether --enable-concept-checks or --disable-concept-checks was given.
-if test "${enable_concept_checks+set}" = set; then
- enableval="$enable_concept_checks"
- case "$enableval" in
- yes) enable_concept_checks=yes ;;
- no) enable_concept_checks=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable concept checks" 1>&2; exit 1; } ;;
- esac
else
- enable_concept_checks=no
-fi
-if test x"$enable_concept_checks" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_CONCEPT_CHECKS 1
-EOF
+ enable_libstdcxx_debug=no
+fi;
-fi
+ echo "$as_me:$LINENO: result: $enable_libstdcxx_debug" >&5
+echo "${ECHO_T}$enable_libstdcxx_debug" >&6
-echo $ac_n "checking for extra compiler flags for building""... $ac_c" 1>&6
-echo "configure:4042: checking for extra compiler flags for building" >&5
-# Check whether --enable-cxx_flags or --disable-cxx_flags was given.
+
+ echo "$as_me:$LINENO: checking for extra compiler flags for building" >&5
+echo $ECHO_N "checking for extra compiler flags for building... $ECHO_C" >&6
+ # Check whether --enable-cxx-flags or --disable-cxx-flags was given.
if test "${enable_cxx_flags+set}" = set; then
enableval="$enable_cxx_flags"
case "x$enable_cxx_flags" in
- xyes)
- { echo "configure: error: --enable-cxx-flags needs compiler flags as arguments" 1>&2; exit 1; } ;;
- xno | xnone | x)
- enable_cxx_flags='' ;;
- *)
- enable_cxx_flags="$enableval" ;;
-esac
+ xno | x) enable_cxx_flags= ;;
+ x-*) ;;
+ *) { { echo "$as_me:$LINENO: error: --enable-cxx-flags needs compiler flags as arguments" >&5
+echo "$as_me: error: --enable-cxx-flags needs compiler flags as arguments" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
else
enable_cxx_flags=
-fi
+fi;
+
+
+ # Run through flags (either default or command-line) and set anything
+ # extra (e.g., #defines) that must accompany particular g++ options.
+ if test -n "$enable_cxx_flags"; then
+ for f in $enable_cxx_flags; do
+ case "$f" in
+ -fhonor-std) ;;
+ -*) ;;
+ *) # and we're trying to pass /what/ exactly?
+ { { echo "$as_me:$LINENO: error: compiler flags start with a -" >&5
+echo "$as_me: error: compiler flags start with a -" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ done
+ fi
+ EXTRA_CXX_FLAGS="$enable_cxx_flags"
+ echo "$as_me:$LINENO: result: $EXTRA_CXX_FLAGS" >&5
+echo "${ECHO_T}$EXTRA_CXX_FLAGS" >&6
-if test -n "$enable_cxx_flags"; then
- for f in $enable_cxx_flags; do
- case "$f" in
- -fhonor-std) ;;
- -*) ;;
- *) # and we're trying to pass /what/ exactly?
- { echo "configure: error: compiler flags start with a -" 1>&2; exit 1; } ;;
- esac
- done
-fi
-EXTRA_CXX_FLAGS="$enable_cxx_flags"
-echo "$ac_t""$EXTRA_CXX_FLAGS" 1>&6
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
- enableval="$enable_debug"
- case "${enableval}" in
- yes) enable_debug=yes ;;
- no) enable_debug=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable extra debugging" 1>&2; exit 1; } ;;
- esac
-else
- enable_debug=no
+# No surprises, no surprises...
+if test $atomicity_dir = cpu/generic ; then
+ { echo "$as_me:$LINENO: WARNING: No native atomic operations are provided for this platform." >&5
+echo "$as_me: WARNING: No native atomic operations are provided for this platform." >&2;}
+ if test $target_thread_file = single; then
+ { echo "$as_me:$LINENO: WARNING: They cannot be faked when thread support is disabled." >&5
+echo "$as_me: WARNING: They cannot be faked when thread support is disabled." >&2;}
+ { echo "$as_me:$LINENO: WARNING: Thread-safety of certain classes is not guaranteed." >&5
+echo "$as_me: WARNING: Thread-safety of certain classes is not guaranteed." >&2;}
+ else
+ { echo "$as_me:$LINENO: WARNING: They will be faked using a mutex." >&5
+echo "$as_me: WARNING: They will be faked using a mutex." >&2;}
+ { echo "$as_me:$LINENO: WARNING: Performance of certain classes will degrade as a result." >&5
+echo "$as_me: WARNING: Performance of certain classes will degrade as a result." >&2;}
+ fi
fi
-echo $ac_n "checking for additional debug build""... $ac_c" 1>&6
-echo "configure:4085: checking for additional debug build" >&5
-echo "$ac_t""$enable_debug" 1>&6
-if test "$enable_debug" = yes; then
- GLIBCPP_BUILD_DEBUG_TRUE=
- GLIBCPP_BUILD_DEBUG_FALSE='#'
-else
- GLIBCPP_BUILD_DEBUG_TRUE='#'
- GLIBCPP_BUILD_DEBUG_FALSE=
-fi
+if $GLIBCXX_IS_NATIVE; then
+
+ # We can do more elaborate tests that assume a working linker.
+ CANADIAN=no
+
+ # Check for available headers.
+
+
+
+
+
+
-# Check whether --enable-debug_flags or --disable-debug_flags was given.
-if test "${enable_debug_flags+set}" = set; then
- enableval="$enable_debug_flags"
- case "${enableval}" in
- none) ;;
- -*) enable_debug_flags="${enableval}" ;;
- *) { echo "configure: error: Unknown argument to extra debugging flags" 1>&2; exit 1; } ;;
- esac
-else
- enable_debug_flags=none
-fi
-case x"$enable_debug" in
- xyes)
- case "$enable_debug_flags" in
- none)
- DEBUG_FLAGS="-g3 -O0";;
- -*) #valid input
- DEBUG_FLAGS="${enableval}"
- esac
- ;;
- xno)
- DEBUG_FLAGS=""
- ;;
-esac
-echo $ac_n "checking for debug build flags""... $ac_c" 1>&6
-echo "configure:4125: checking for debug build flags" >&5
-echo "$ac_t""$DEBUG_FLAGS" 1>&6
-# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
-for ac_hdr in string.h stdlib.h
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+ machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
+ sys/types.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4134: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 4139 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4144: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
-# No surprises, no surprises...
-if test $ATOMICITYH = cpu/generic ; then
- echo "configure: warning: No native atomic operations are provided yet for this platform." 1>&2
- if test $target_thread_file = single; then
- echo "configure: warning: They cannot be faked when thread support is disabled." 1>&2
- echo "configure: warning: Thread-safety of certain classes is not guaranteed." 1>&2
- else
- echo "configure: warning: They will be faked using a mutex." 1>&2
- echo "configure: warning: Performance of certain classes will degrade as a result." 1>&2
- fi
-fi
+ # All these tests are for C++; save the language and the compiler flags.
+ # The CXXFLAGS thing is suspicious, but based on similar bits previously
+ # found in GLIBCXX_CONFIGURE.
-if test -n "$with_cross_host" || test x"$build" != x"$host"; then
- # We are being configured with some form of cross compiler.
- GLIBCPP_IS_CROSS_COMPILING=true
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # This lets us hard-code the functionality we know we'll have in the cross
- # target environment. "Let" is a sugar-coated word placed on an especially
- # dull and tedious hack, actually.
- #
- # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
- # that involve linking, can't be used:
- # "cannot open sim-crt0.o"
- # "cannot open crt0.o"
- # etc. All this is because there currently exists no unified, consistent
- # way for top level CC information to be passed down to target directories:
- # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
- # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
- # crosses can be removed.
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
- # If Canadian cross, then don't pick up tools from the build directory.
- # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
- if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
- CANADIAN=yes
+ # Check for maintainer-mode bits.
+ if test x"$USE_MAINTAINER_MODE" = xno; then
+ WERROR=''
else
- CANADIAN=no
+ WERROR='-Werror'
fi
- # Construct crosses by hand, eliminating bits that need ld...
- # GLIBCPP_CHECK_COMPILER_FEATURES
- # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
- # GLIBCPP_CHECK_MATH_SUPPORT
-
- case "$target" in
- *-linux*)
- os_include_dir="os/gnu-linux"
- for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
- machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h locale.h float.h inttypes.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4225: 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 4230 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4235: \"$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
-
+ # Check for -ffunction-sections -fdata-sections
+ echo "$as_me:$LINENO: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
+echo $ECHO_N "checking for g++ that supports -ffunction-sections -fdata-sections... $ECHO_C" >&6
+ CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int foo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_fdsections=yes
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_fdsections=no
fi
-done
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ else
+ # this is the suspicious part
+ CXXFLAGS=''
+ fi
+ if test x"$ac_fdsections" = x"yes"; then
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ fi
+ echo "$as_me:$LINENO: result: $ac_fdsections" >&5
+echo "${ECHO_T}$ac_fdsections" >&6
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
# If we're not using GNU ld, then there's no point in even trying these
# tests. Check for that first. We should have already tested for gld
# by now (in libtool), but require it now just to be safe...
test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
+
+
# The name set by libtool depends on the version of libtool. Shame on us
# for depending on an impl detail, but c'est la vie. Older versions used
@@ -4284,11 +7699,11 @@ done
# Start by getting the version number. I think the libtool test already
# does some of this, but throws away the result.
-
+
ldver=`$LD --version 2>/dev/null | head -1 | \
sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
# Set --gc-sections.
@@ -4302,41 +7717,55 @@ done
CFLAGS='-x c++ -Wl,--gc-sections'
# Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:4313: checking for ld that supports -Wl,--gc-sections" >&5
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
ac_sectionLDflags=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 4318 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- int main(void)
+ int main(void)
{
try { throw 1; }
catch (...) { };
return 0;
}
-
-EOF
-if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_sectionLDflags=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
@@ -4346,7 +7775,8 @@ fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
# Set linker optimization flags.
@@ -4354,19629 +7784,75487 @@ fi
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
fi
-
-
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4363: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4371 "configure"
-#include "confdefs.h"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:4378: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+int
+main ()
+{
+sin ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+ libm="-lm"
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libm"
+
- LIBS="-lm $LIBS"
+ echo "$as_me:$LINENO: checking for isinf declaration" >&5
+echo $ECHO_N "checking for isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- for ac_func in nan copysignf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinf_use" >&6
+
+ if test x$glibcxx_cv_func_isinf_use = x"yes"; then
+
+for ac_func in isinf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4408: 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 <<EOF
-#line 4413 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4436: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _isinf declaration" >&5
+echo $ECHO_N "checking for _isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinf_use" >&6
+
+ if test x$glibcxx_cv_func__isinf_use = x"yes"; then
- for ac_func in __signbit
+for ac_func in _isinf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4465: 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 <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4493: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isnan declaration" >&5
+echo $ECHO_N "checking for isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_func in __signbitf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnan_use" >&6
+
+ if test x$glibcxx_cv_func_isnan_use = x"yes"; then
+
+for ac_func in isnan
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4521: 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 <<EOF
-#line 4526 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4549: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _isnan declaration" >&5
+echo $ECHO_N "checking for _isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnan_use" >&6
+
+ if test x$glibcxx_cv_func__isnan_use = x"yes"; then
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+for ac_func in _isnan
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4579: 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 <<EOF
-#line 4584 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4607: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
fi
done
+ fi
fi
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
- fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
+
+ echo "$as_me:$LINENO: checking for finite declaration" >&5
+echo $ECHO_N "checking for finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finite_use+set} != xset; then
+ if test "${glibcxx_cv_func_finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
-fi
-
- enable_wchar_t=no
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:4652: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 4654 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- have_mbstate_t=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
- if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finite_use" >&6
+
+ if test x$glibcxx_cv_func_finite_use = x"yes"; then
- for ac_hdr in wchar.h
+for ac_func in finite
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4683: 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 4688 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4693: \"$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
- ac_has_wchar_h=yes
-else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
- for ac_hdr in wctype.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4724: 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 4729 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4734: \"$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 "$as_me:$LINENO: checking for _finite declaration" >&5
+echo $ECHO_N "checking for _finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finite_use+set} != xset; then
+ if test "${glibcxx_cv_func__finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
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
- ac_has_wctype_h=yes
-else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finite_use" >&6
+
+ if test x$glibcxx_cv_func__finite_use = x"yes"; then
+
+for ac_func in _finite
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:4767: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 4769 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:4776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_wchar_minmax=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
-fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:4789: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 4791 "configure"
-#include "confdefs.h"
+ fi
+ fi
- #include <wchar.h>
- #include <stddef.h>
-int main() {
-wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_weof=yes
+
+
+ echo "$as_me:$LINENO: checking for copysign declaration" >&5
+echo $ECHO_N "checking for copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysign_use" >&6
+
+ if test x$glibcxx_cv_func_copysign_use = x"yes"; then
+
+for ac_func in copysign
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4816: 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 <<EOF
-#line 4821 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4844: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _copysign declaration" >&5
+echo $ECHO_N "checking for _copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysign_use" >&6
+
+ if test x$glibcxx_cv_func__copysign_use = x"yes"; then
+
+for ac_func in _copysign
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4879: 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 <<EOF
-#line 4884 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-int main() {
+fi
+done
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sincos declaration" >&5
+echo $ECHO_N "checking for sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincos_use" >&6
+
+ if test x$glibcxx_cv_func_sincos_use = x"yes"; then
+
+for ac_func in sincos
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4907: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincos declaration" >&5
+echo $ECHO_N "checking for _sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincos_use" >&6
+
+ if test x$glibcxx_cv_func__sincos_use = x"yes"; then
+
+for ac_func in _sincos
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fpclass declaration" >&5
+echo $ECHO_N "checking for fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fpclass_use" >&6
+
+ if test x$glibcxx_cv_func_fpclass_use = x"yes"; then
+
+for ac_func in fpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
+ else
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:4935: checking for ISO C99 wchar_t support" >&5
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:4947: 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
-#line 4952 "configure"
-#include "confdefs.h"
-#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4957: \"$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"
+ echo "$as_me:$LINENO: checking for _fpclass declaration" >&5
+echo $ECHO_N "checking for _fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fpclass_use" >&6
+
+ if test x$glibcxx_cv_func__fpclass_use = x"yes"; then
+
+for ac_func in _fpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_iconv_h=yes
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for qfpclass declaration" >&5
+echo $ECHO_N "checking for qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:4981: checking for langinfo.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
-#line 4986 "configure"
-#include "confdefs.h"
-#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4991: \"$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"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func_qfpclass_use = x"yes"; then
+
+for ac_func in qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _qfpclass declaration" >&5
+echo $ECHO_N "checking for _qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func__qfpclass_use = x"yes"; then
+
+for ac_func in _qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_langinfo_h=yes
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for hypot declaration" >&5
+echo $ECHO_N "checking for hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypot_use" >&6
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:5015: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5023 "configure"
-#include "confdefs.h"
+ if test x$glibcxx_cv_func_hypot_use = x"yes"; then
+
+for ac_func in hypot
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:5034: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypot declaration" >&5
+echo $ECHO_N "checking for _hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypot_use" >&6
+
+ if test x$glibcxx_cv_func__hypot_use = x"yes"; then
+
+for ac_func in _hypot
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for float trig functions" >&5
+echo $ECHO_N "checking for float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in acosf asinf atanf \
+ cosf sinf tanf \
+ coshf sinhf tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_trig_use" >&6
+ if test x$glibcxx_cv_func_float_trig_use = x"yes"; then
+
+
+
+
+
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+
+
+
+for ac_func in acosf asinf atanf \
+ cosf sinf tanf \
+ coshf sinhf tanhf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5060: 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 <<EOF
-#line 5065 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for float round functions" >&5
+echo $ECHO_N "checking for float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
-int main() {
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in ceilf floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_round_use" >&6
+ if test x$glibcxx_cv_func_float_round_use = x"yes"; then
+
+
+for ac_func in ceilf floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5088: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for expf declaration" >&5
+echo $ECHO_N "checking for expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expf_use+set} != xset; then
+ if test "${glibcxx_cv_func_expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expf_use" >&6
+
+ if test x$glibcxx_cv_func_expf_use = x"yes"; then
+
+for ac_func in expf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+ else
+
+ echo "$as_me:$LINENO: checking for _expf declaration" >&5
+echo $ECHO_N "checking for _expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expf_use+set} != xset; then
+ if test "${glibcxx_cv_func__expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- LIBS="$ac_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expf_use" >&6
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:5118: checking for XPG2 wchar_t support" >&5
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
+ if test x$glibcxx_cv_func__expf_use = x"yes"; then
+
+for ac_func in _expf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- enable_wchar_t=yes
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:5138: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for isnanf declaration" >&5
+echo $ECHO_N "checking for isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITE 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEF 1
-EOF
+int
+main ()
+{
+ isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOTF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanf_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFF 1
-EOF
+ if test x$glibcxx_cv_func_isnanf_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNAN 1
-EOF
+for ac_func in isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINCOS 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_SINCOSF 1
-EOF
+ else
- if test x"long_double_math_on_this_cpu" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEL 1
-EOF
+ echo "$as_me:$LINENO: checking for _isnanf declaration" >&5
+echo $ECHO_N "checking for _isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOTL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANL 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
- fi
- ;;
- *-hpux*)
- # Check for available headers.
- for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
- machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h locale.h float.h inttypes.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5225: 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 5230 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5235: \"$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
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanf_use" >&6
+
+ if test x$glibcxx_cv_func__isnanf_use = x"yes"; then
+
+for ac_func in _isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
-
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
fi
fi
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
-
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:5313: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
+ echo "$as_me:$LINENO: checking for isinff declaration" >&5
+echo $ECHO_N "checking for isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5318 "configure"
-#include "confdefs.h"
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinff_use" >&6
+
+ if test x$glibcxx_cv_func_isinff_use = x"yes"; then
+
+for ac_func in isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinff declaration" >&5
+echo $ECHO_N "checking for _isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -fr conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinff_use" >&6
+
+ if test x$glibcxx_cv_func__isinff_use = x"yes"; then
+
+for ac_func in _isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
- fi
-
-
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5363: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for atan2f declaration" >&5
+echo $ECHO_N "checking for atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5371 "configure"
-#include "confdefs.h"
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5378: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2f_use" >&6
+
+ if test x$glibcxx_cv_func_atan2f_use = x"yes"; then
+
+for ac_func in atan2f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+done
- LIBS="-lm $LIBS"
+ else
+ echo "$as_me:$LINENO: checking for _atan2f declaration" >&5
+echo $ECHO_N "checking for _atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- for ac_func in nan copysignf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2f_use" >&6
+
+ if test x$glibcxx_cv_func__atan2f_use = x"yes"; then
+
+for ac_func in _atan2f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5408: 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 <<EOF
-#line 5413 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fabsf declaration" >&5
+echo $ECHO_N "checking for fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
-int main() {
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsf_use" >&6
+
+ if test x$glibcxx_cv_func_fabsf_use = x"yes"; then
+
+for ac_func in fabsf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5436: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsf declaration" >&5
+echo $ECHO_N "checking for _fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsf_use" >&6
+
+ if test x$glibcxx_cv_func__fabsf_use = x"yes"; then
+
+for ac_func in _fabsf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fmodf declaration" >&5
+echo $ECHO_N "checking for fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodf_use" >&6
+
+ if test x$glibcxx_cv_func_fmodf_use = x"yes"; then
- for ac_func in __signbit
+for ac_func in fmodf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-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 <<EOF
-#line 5470 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fmodf declaration" >&5
+echo $ECHO_N "checking for _fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-int main() {
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodf_use" >&6
+
+ if test x$glibcxx_cv_func__fmodf_use = x"yes"; then
+
+for ac_func in _fmodf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for frexpf declaration" >&5
+echo $ECHO_N "checking for frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpf_use" >&6
+
+ if test x$glibcxx_cv_func_frexpf_use = x"yes"; then
+
+for ac_func in frexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _frexpf declaration" >&5
+echo $ECHO_N "checking for _frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_func in __signbitf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpf_use" >&6
+
+ if test x$glibcxx_cv_func__frexpf_use = x"yes"; then
+
+for ac_func in _frexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5521: 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 <<EOF
-#line 5526 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for hypotf declaration" >&5
+echo $ECHO_N "checking for hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotf_use" >&6
-int main() {
+ if test x$glibcxx_cv_func_hypotf_use = x"yes"; then
+for ac_func in hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5549: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotf declaration" >&5
+echo $ECHO_N "checking for _hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotf_use" >&6
+
+ if test x$glibcxx_cv_func__hypotf_use = x"yes"; then
+
+for ac_func in _hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for ldexpf declaration" >&5
+echo $ECHO_N "checking for ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpf_use = x"yes"; then
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+for ac_func in ldexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5579: 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 <<EOF
-#line 5584 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _ldexpf declaration" >&5
+echo $ECHO_N "checking for _ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpf_use" >&6
-int main() {
+ if test x$glibcxx_cv_func__ldexpf_use = x"yes"; then
+for ac_func in _ldexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5607: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for logf declaration" >&5
+echo $ECHO_N "checking for logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logf_use+set} != xset; then
+ if test "${glibcxx_cv_func_logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logf_use" >&6
+
+ if test x$glibcxx_cv_func_logf_use = x"yes"; then
+
+for ac_func in logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _logf declaration" >&5
+echo $ECHO_N "checking for _logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logf_use+set} != xset; then
+ if test "${glibcxx_cv_func__logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logf_use" >&6
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
- fi
-
-
+ if test x$glibcxx_cv_func__logf_use = x"yes"; then
+
+for ac_func in _logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
-else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
fi
+done
-
- enable_wchar_t=no
+ fi
+ fi
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:5652: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 5654 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- have_mbstate_t=yes
+
+
+ echo "$as_me:$LINENO: checking for log10f declaration" >&5
+echo $ECHO_N "checking for log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
- if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10f_use" >&6
+
+ if test x$glibcxx_cv_func_log10f_use = x"yes"; then
- for ac_hdr in wchar.h
+for ac_func in log10f
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5683: 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 5688 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5693: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _log10f declaration" >&5
+echo $ECHO_N "checking for _log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10f_use" >&6
+
+ if test x$glibcxx_cv_func__log10f_use = x"yes"; then
+
+for ac_func in _log10f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wchar_h=yes
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for modff declaration" >&5
+echo $ECHO_N "checking for modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modff_use+set} != xset; then
+ if test "${glibcxx_cv_func_modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_hdr in wctype.h
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modff_use" >&6
+
+ if test x$glibcxx_cv_func_modff_use = x"yes"; then
+
+for ac_func in modff
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5724: 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 5729 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5734: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _modff declaration" >&5
+echo $ECHO_N "checking for _modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modff_use+set} != xset; then
+ if test "${glibcxx_cv_func__modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modff_use" >&6
+
+ if test x$glibcxx_cv_func__modff_use = x"yes"; then
+
+for ac_func in _modff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wctype_h=yes
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for powf declaration" >&5
+echo $ECHO_N "checking for powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powf_use+set} != xset; then
+ if test "${glibcxx_cv_func_powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powf_use" >&6
+
+ if test x$glibcxx_cv_func_powf_use = x"yes"; then
+
+for ac_func in powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:5767: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 5769 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:5776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_wchar_minmax=yes
+ else
+
+ echo "$as_me:$LINENO: checking for _powf declaration" >&5
+echo $ECHO_N "checking for _powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powf_use+set} != xset; then
+ if test "${glibcxx_cv_func__powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:5789: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 5791 "configure"
-#include "confdefs.h"
- #include <wchar.h>
- #include <stddef.h>
-int main() {
-wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:5800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_weof=yes
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powf_use" >&6
+
+ if test x$glibcxx_cv_func__powf_use = x"yes"; then
+
+for ac_func in _powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sqrtf declaration" >&5
+echo $ECHO_N "checking for sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtf_use" >&6
+
+ if test x$glibcxx_cv_func_sqrtf_use = x"yes"; then
+
+for ac_func in sqrtf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5816: 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 <<EOF
-#line 5821 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtf declaration" >&5
+echo $ECHO_N "checking for _sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
-int main() {
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtf_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtf_use = x"yes"; then
+for ac_func in _sqrtf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5844: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sincosf declaration" >&5
+echo $ECHO_N "checking for sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosf_use" >&6
+
+ if test x$glibcxx_cv_func_sincosf_use = x"yes"; then
+
+for ac_func in sincosf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _sincosf declaration" >&5
+echo $ECHO_N "checking for _sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosf_use" >&6
+
+ if test x$glibcxx_cv_func__sincosf_use = x"yes"; then
+
+for ac_func in _sincosf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5879: 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 <<EOF
-#line 5884 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for finitef declaration" >&5
+echo $ECHO_N "checking for finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitef_use" >&6
-int main() {
+ if test x$glibcxx_cv_func_finitef_use = x"yes"; then
+for ac_func in finitef
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:5907: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitef declaration" >&5
+echo $ECHO_N "checking for _finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitef_use" >&6
+
+ if test x$glibcxx_cv_func__finitef_use = x"yes"; then
+
+for ac_func in _finitef
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for long double trig functions" >&5
+echo $ECHO_N "checking for long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in acosl asinl atanl \
+ cosl sinl tanl \
+ coshl sinhl tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_trig_use" >&6
+ if test x$glibcxx_cv_func_long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosl asinl atanl \
+ cosl sinl tanl \
+ coshl sinhl tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
+ fi
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:5935: checking for ISO C99 wchar_t support" >&5
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:5947: 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
-#line 5952 "configure"
-#include "confdefs.h"
-#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5957: \"$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"
+
+ echo "$as_me:$LINENO: checking for long double round functions" >&5
+echo $ECHO_N "checking for long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in ceill floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_round_use" >&6
+ if test x$glibcxx_cv_func_long_double_round_use = x"yes"; then
+
+
+for ac_func in ceill floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_iconv_h=yes
+done
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isnanl declaration" >&5
+echo $ECHO_N "checking for isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:5981: checking for langinfo.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
-#line 5986 "configure"
-#include "confdefs.h"
-#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5991: \"$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"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanl_use" >&6
+
+ if test x$glibcxx_cv_func_isnanl_use = x"yes"; then
+
+for ac_func in isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnanl declaration" >&5
+echo $ECHO_N "checking for _isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanl_use" >&6
+
+ if test x$glibcxx_cv_func__isnanl_use = x"yes"; then
+
+for ac_func in _isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_langinfo_h=yes
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isinfl declaration" >&5
+echo $ECHO_N "checking for isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinfl_use" >&6
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:6015: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6023 "configure"
-#include "confdefs.h"
+ if test x$glibcxx_cv_func_isinfl_use = x"yes"; then
+
+for ac_func in isinfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:6034: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinfl declaration" >&5
+echo $ECHO_N "checking for _isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinfl_use" >&6
+
+ if test x$glibcxx_cv_func__isinfl_use = x"yes"; then
+
+for ac_func in _isinfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for copysignl declaration" >&5
+echo $ECHO_N "checking for copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysignl_use" >&6
+
+ if test x$glibcxx_cv_func_copysignl_use = x"yes"; then
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+for ac_func in copysignl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6060: 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 <<EOF
-#line 6065 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _copysignl declaration" >&5
+echo $ECHO_N "checking for _copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysignl_use" >&6
-int main() {
+ if test x$glibcxx_cv_func__copysignl_use = x"yes"; then
+for ac_func in _copysignl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6088: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for atan2l declaration" >&5
+echo $ECHO_N "checking for atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2l_use" >&6
+
+ if test x$glibcxx_cv_func_atan2l_use = x"yes"; then
+
+for ac_func in atan2l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+ else
+
+ echo "$as_me:$LINENO: checking for _atan2l declaration" >&5
+echo $ECHO_N "checking for _atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- LIBS="$ac_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2l_use" >&6
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:6118: checking for XPG2 wchar_t support" >&5
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
+ if test x$glibcxx_cv_func__atan2l_use = x"yes"; then
+
+for ac_func in _atan2l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- enable_wchar_t=yes
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:6138: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for expl declaration" >&5
+echo $ECHO_N "checking for expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expl_use+set} != xset; then
+ if test "${glibcxx_cv_func_expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- os_include_dir="os/hpux"
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOT 1
-EOF
+int
+main ()
+{
+ expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- case "$target" in
- *-hpux10*)
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITE 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFF 1
-EOF
+ if test x$glibcxx_cv_func_expl_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNAN 1
-EOF
+for ac_func in expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- ;;
- esac
+fi
+done
- ;;
- *-netbsd*)
- # Check for available headers.
- for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
- machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h locale.h float.h inttypes.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6205: 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 6210 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6215: \"$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 "$as_me:$LINENO: checking for _expl declaration" >&5
+echo $ECHO_N "checking for _expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expl_use+set} != xset; then
+ if test "${glibcxx_cv_func__expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
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
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expl_use" >&6
+
+ if test x$glibcxx_cv_func__expl_use = x"yes"; then
+
+for ac_func in _expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
-
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
fi
fi
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
-
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:6293: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
+ echo "$as_me:$LINENO: checking for fabsl declaration" >&5
+echo $ECHO_N "checking for fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6298 "configure"
-#include "confdefs.h"
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsl_use" >&6
+
+ if test x$glibcxx_cv_func_fabsl_use = x"yes"; then
+
+for ac_func in fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsl declaration" >&5
+echo $ECHO_N "checking for _fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -fr conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsl_use" >&6
+
+ if test x$glibcxx_cv_func__fabsl_use = x"yes"; then
+
+for ac_func in _fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
- fi
-
-
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:6343: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for fmodl declaration" >&5
+echo $ECHO_N "checking for fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6351 "configure"
-#include "confdefs.h"
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:6358: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodl_use" >&6
+
+ if test x$glibcxx_cv_func_fmodl_use = x"yes"; then
+
+for ac_func in fmodl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+done
- LIBS="-lm $LIBS"
+ else
+ echo "$as_me:$LINENO: checking for _fmodl declaration" >&5
+echo $ECHO_N "checking for _fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- for ac_func in nan copysignf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodl_use" >&6
+
+ if test x$glibcxx_cv_func__fmodl_use = x"yes"; then
+
+for ac_func in _fmodl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6388: 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 <<EOF
-#line 6393 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
-int main() {
+ echo "$as_me:$LINENO: checking for frexpl declaration" >&5
+echo $ECHO_N "checking for frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpl_use" >&6
+
+ if test x$glibcxx_cv_func_frexpl_use = x"yes"; then
+
+for ac_func in frexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6416: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _frexpl declaration" >&5
+echo $ECHO_N "checking for _frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpl_use" >&6
+
+ if test x$glibcxx_cv_func__frexpl_use = x"yes"; then
+
+for ac_func in _frexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for hypotl declaration" >&5
+echo $ECHO_N "checking for hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotl_use" >&6
+
+ if test x$glibcxx_cv_func_hypotl_use = x"yes"; then
- for ac_func in __signbit
+for ac_func in hypotl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6445: 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 <<EOF
-#line 6450 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotl declaration" >&5
+echo $ECHO_N "checking for _hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-int main() {
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotl_use" >&6
+ if test x$glibcxx_cv_func__hypotl_use = x"yes"; then
+
+for ac_func in _hypotl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6473: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for ldexpl declaration" >&5
+echo $ECHO_N "checking for ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpl_use = x"yes"; then
+
+for ac_func in ldexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _ldexpl declaration" >&5
+echo $ECHO_N "checking for _ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_func in __signbitf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpl_use = x"yes"; then
+
+for ac_func in _ldexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6501: 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 <<EOF
-#line 6506 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for logl declaration" >&5
+echo $ECHO_N "checking for logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logl_use+set} != xset; then
+ if test "${glibcxx_cv_func_logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logl_use" >&6
-int main() {
+ if test x$glibcxx_cv_func_logl_use = x"yes"; then
+for ac_func in logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6529: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _logl declaration" >&5
+echo $ECHO_N "checking for _logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logl_use+set} != xset; then
+ if test "${glibcxx_cv_func__logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logl_use" >&6
+
+ if test x$glibcxx_cv_func__logl_use = x"yes"; then
+
+for ac_func in _logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for log10l declaration" >&5
+echo $ECHO_N "checking for log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10l_use" >&6
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+ if test x$glibcxx_cv_func_log10l_use = x"yes"; then
+
+for ac_func in log10l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6559: 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 <<EOF
-#line 6564 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
-int main() {
+ else
+
+ echo "$as_me:$LINENO: checking for _log10l declaration" >&5
+echo $ECHO_N "checking for _log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10l_use" >&6
+
+ if test x$glibcxx_cv_func__log10l_use = x"yes"; then
+for ac_func in _log10l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6587: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for modfl declaration" >&5
+echo $ECHO_N "checking for modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modfl_use" >&6
+
+ if test x$glibcxx_cv_func_modfl_use = x"yes"; then
+
+for ac_func in modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _modfl declaration" >&5
+echo $ECHO_N "checking for _modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modfl_use" >&6
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
+ if test x$glibcxx_cv_func__modfl_use = x"yes"; then
+
+for ac_func in _modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for powl declaration" >&5
+echo $ECHO_N "checking for powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powl_use+set} != xset; then
+ if test "${glibcxx_cv_func_powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-
- enable_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powl_use" >&6
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:6632: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6634 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:6641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- have_mbstate_t=yes
+ if test x$glibcxx_cv_func_powl_use = x"yes"; then
+
+for ac_func in powl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _powl declaration" >&5
+echo $ECHO_N "checking for _powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powl_use+set} != xset; then
+ if test "${glibcxx_cv_func__powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
- if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powl_use" >&6
+
+ if test x$glibcxx_cv_func__powl_use = x"yes"; then
- for ac_hdr in wchar.h
+for ac_func in _powl
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6663: 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 6668 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6673: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sqrtl declaration" >&5
+echo $ECHO_N "checking for sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func_sqrtl_use = x"yes"; then
+
+for ac_func in sqrtl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wchar_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtl declaration" >&5
+echo $ECHO_N "checking for _sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_hdr in wctype.h
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtl_use = x"yes"; then
+
+for ac_func in _sqrtl
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6704: 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 6709 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6714: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sincosl declaration" >&5
+echo $ECHO_N "checking for sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosl_use" >&6
+
+ if test x$glibcxx_cv_func_sincosl_use = x"yes"; then
+
+for ac_func in sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wctype_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincosl declaration" >&5
+echo $ECHO_N "checking for _sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosl_use" >&6
+
+ if test x$glibcxx_cv_func__sincosl_use = x"yes"; then
+
+for ac_func in _sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:6747: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6749 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_wchar_minmax=yes
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for finitel declaration" >&5
+echo $ECHO_N "checking for finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:6769: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6771 "configure"
-#include "confdefs.h"
- #include <wchar.h>
- #include <stddef.h>
-int main() {
-wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:6780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_weof=yes
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitel_use" >&6
+
+ if test x$glibcxx_cv_func_finitel_use = x"yes"; then
+
+for ac_func in finitel
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitel declaration" >&5
+echo $ECHO_N "checking for _finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitel_use" >&6
+
+ if test x$glibcxx_cv_func__finitel_use = x"yes"; then
+
+for ac_func in _finitel
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6796: 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 <<EOF
-#line 6801 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
-int main() {
+ echo "$as_me:$LINENO: checking for _float trig functions" >&5
+echo $ECHO_N "checking for _float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _acosf _asinf _atanf \
+ _cosf _sinf _tanf \
+ _coshf _sinhf _tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_trig_use" >&6
+ if test x$glibcxx_cv_func__float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosf _asinf _atanf \
+ _cosf _sinf _tanf \
+ _coshf _sinhf _tanhf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6824: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for _float round functions" >&5
+echo $ECHO_N "checking for _float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceilf _floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_round_use" >&6
+ if test x$glibcxx_cv_func__float_round_use = x"yes"; then
+
+
+for ac_func in _ceilf _floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for _long double trig functions" >&5
+echo $ECHO_N "checking for _long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_trig_use" >&6
+ if test x$glibcxx_cv_func__long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6859: 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 <<EOF
-#line 6864 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for _long double round functions" >&5
+echo $ECHO_N "checking for _long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceill _floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_round_use" >&6
+ if test x$glibcxx_cv_func__long_double_round_use = x"yes"; then
+
+
+for ac_func in _ceill _floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6887: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-rm -f conftest*
+done
+
+ fi
+
+
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_abs declaration" >&5
+echo $ECHO_N "checking for __builtin_abs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_use" >&6
+ if test x$glibcxx_cv_func___builtin_abs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_abs linkage" >&5
+echo $ECHO_N "checking for __builtin_abs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_link=yes
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_link=no
fi
-done
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:6915: checking for ISO C99 wchar_t support" >&5
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:6927: 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
-#line 6932 "configure"
-#include "confdefs.h"
-#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6937: \"$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"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6
+ if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsf declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_iconv_h=yes
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsf linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_link=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:6961: checking for langinfo.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabs declaration" >&5
+echo $ECHO_N "checking for __builtin_fabs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6966 "configure"
-#include "confdefs.h"
-#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6971: \"$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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabs linkage" >&5
+echo $ECHO_N "checking for __builtin_fabs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_link=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"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_link=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_langinfo_h=yes
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsl declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsl linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_link=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:6995: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for __builtin_labs declaration" >&5
+echo $ECHO_N "checking for __builtin_labs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7003 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:7014: \"$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"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_use" >&6
+ if test x$glibcxx_cv_func___builtin_labs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_labs linkage" >&5
+echo $ECHO_N "checking for __builtin_labs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_link=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6
+ if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- for ac_func in iconv_open iconv_close iconv nl_langinfo
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7040: 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
+glibcxx_cv_func___builtin_sqrtf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrt declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrt declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 7045 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-int main() {
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:7068: \"$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"
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrt linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrt linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_link=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- LIBS="$ac_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:7098: checking for XPG2 wchar_t support" >&5
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
- enable_wchar_t=yes
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:7118: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinf declaration" >&5
+echo $ECHO_N "checking for __builtin_sinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- os_include_dir="os/bsd/netbsd"
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITE 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOTF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinf linkage" >&5
+echo $ECHO_N "checking for __builtin_sinf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINF 1
-EOF
+glibcxx_cv_func___builtin_sinf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNAN 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANF 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
- if test x"long_double_math_on_this_cpu" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEL 1
-EOF
+ fi
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANL 1
-EOF
+ echo "$as_me:$LINENO: checking for __builtin_sin declaration" >&5
+echo $ECHO_N "checking for __builtin_sin declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- fi
- ;;
- *-freebsd*)
- # Check for available headers.
- for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
- machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
- sys/time.h unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7195: 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 7200 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7205: \"$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"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_use" >&6
+ if test x$glibcxx_cv_func___builtin_sin_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sin linkage" >&5
+echo $ECHO_N "checking for __builtin_sin linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_link=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"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_link=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
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
-
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6
+ if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinl declaration" >&5
+echo $ECHO_N "checking for __builtin_sinl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinl linkage" >&5
+echo $ECHO_N "checking for __builtin_sinl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
fi
- fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
+ fi
+ fi
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:7283: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
+
+ echo "$as_me:$LINENO: checking for __builtin_cosf declaration" >&5
+echo $ECHO_N "checking for __builtin_cosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 7288 "configure"
-#include "confdefs.h"
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosf linkage" >&5
+echo $ECHO_N "checking for __builtin_cosf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_link=no
fi
-rm -fr conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+
+ echo "$as_me:$LINENO: checking for __builtin_cos declaration" >&5
+echo $ECHO_N "checking for __builtin_cos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_use" >&6
+ if test x$glibcxx_cv_func___builtin_cos_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cos linkage" >&5
+echo $ECHO_N "checking for __builtin_cos linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6
+ if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-
-
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:7333: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cosl declaration" >&5
+echo $ECHO_N "checking for __builtin_cosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7341 "configure"
-#include "confdefs.h"
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:7348: \"$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"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosl linkage" >&5
+echo $ECHO_N "checking for __builtin_cosl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_link=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
- LIBS="-lm $LIBS"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
- for ac_func in nan copysignf
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7378: 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 <<EOF
-#line 7383 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7406: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
fi
done
- for ac_func in __signbit
+
+for ac_func in __signbit
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7435: 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 <<EOF
-#line 7440 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7463: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
fi
done
- for ac_func in __signbitf
+
+
+for ac_func in __signbitf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7491: 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 <<EOF
-#line 7496 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7519: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
fi
done
if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+
+for ac_func in __signbitl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7549: 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 <<EOF
-#line 7554 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7577: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
fi
done
fi
+ # Used in libmath/Makefile.am.
if test -n "$LIBMATHOBJS"; then
need_libmath=yes
fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
-else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
-fi
-
- enable_wchar_t=no
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:7622: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7624 "configure"
-#include "confdefs.h"
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MBSTATE_T 1
-EOF
+_ACEOF
fi
- for ac_hdr in wchar.h
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7653: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 7658 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7663: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+ ac_has_wchar_h=no
fi
+
done
- for ac_hdr in wctype.h
+
+for ac_header in wctype.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7694: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 7699 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7704: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
ac_has_wctype_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+ ac_has_wctype_h=no
fi
+
done
-
- if test x"$ac_has_wchar_h" = xyes &&
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
test x"$ac_has_wctype_h" = xyes &&
test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:7737: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7739 "configure"
-#include "confdefs.h"
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:7746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
has_wchar_minmax=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:7759: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7761 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
#include <stddef.h>
-int main() {
+int
+main ()
+{
wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
has_weof=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7786: 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 <<EOF
-#line 7791 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7814: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
fi
done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7849: 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 <<EOF
-#line 7854 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
-int main() {
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7877: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
fi
done
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:7905: checking for ISO C99 wchar_t support" >&5
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
if test x"$has_weof" = xyes &&
test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
+ test x"$ac_wfuncs" = xyes;
+ then
ac_isoC99_wchar_t=yes
else
ac_isoC99_wchar_t=no
fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:7917: 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
-#line 7922 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7927: \"$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"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_iconv_h = yes; then
ac_has_iconv_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+ ac_has_iconv_h=no
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:7951: checking for langinfo.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 7956 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7961: \"$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"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_langinfo_h = yes; then
ac_has_langinfo_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+ ac_has_langinfo_h=no
fi
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:7985: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7993 "configure"
-#include "confdefs.h"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
-
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:8004: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
libiconv="-liconv"
-else
- echo "$ac_t""no" 1>&6
fi
ac_save_LIBS="$LIBS"
LIBS="$LIBS $libiconv"
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8030: 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 <<EOF
-#line 8035 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8058: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
-else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
done
-
+
LIBS="$ac_save_LIBS"
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:8088: checking for XPG2 wchar_t support" >&5
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
+ test x"$ac_XPG2funcs" = xyes;
+ then
ac_XPG2_wchar_t=yes
else
ac_XPG2_wchar_t=no
fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
-
- enable_wchar_t=yes
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:8108: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+ echo "$as_me:$LINENO: checking for strtold declaration" >&5
+echo $ECHO_N "checking for strtold declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtold_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtold_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- os_include_dir="os/bsd/freebsd"
- cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_DRAND48 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_GETPAGESIZE 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtold(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtold_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtold_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_SETENV 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SIGSETJMP 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtold_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtold_use" >&6
+ if test x$glibcxx_cv_func_strtold_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
+for ac_func in strtold
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITE 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOT 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOTF 1
-EOF
+ echo "$as_me:$LINENO: checking for strtof declaration" >&5
+echo $ECHO_N "checking for strtof declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtof_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtof_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNAN 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtof(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtof_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtof_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- if test x"long_double_math_on_this_cpu" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FINITEL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ISINFL 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_ISNANL 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtof_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtof_use" >&6
+ if test x$glibcxx_cv_func_strtof_use = x"yes"; then
- fi
- ;;
- *-mingw32*)
- for ac_hdr in sys/types.h locale.h float.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8201: 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 8206 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8211: \"$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"
+for ac_func in strtof
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+ # For showmanyc_helper().
+
+
+for ac_header in sys/ioctl.h sys/filio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
- fi
+ if test "${glibcxx_cv_POLL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <poll.h>
+int
+main ()
+{
+struct pollfd pfd[1];
+ pfd[0].events = POLLIN;
+ poll(pfd, 1, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_POLL=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_POLL=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_POLL = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
fi
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
+ if test "${glibcxx_cv_S_ISREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_ISREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_ISREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "${glibcxx_cv_S_IFREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_IFREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:8287: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
+glibcxx_cv_S_IFREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_S_ISREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ fi
+
+
+ # For xsputn_2().
+
+for ac_header in sys/uio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 8292 "configure"
-#include "confdefs.h"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test "${glibcxx_cv_WRITEV+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/uio.h>
+int
+main ()
+{
+struct iovec iov[2];
+ writev(0, iov, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_WRITEV=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_WRITEV=no
fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_WRITEV = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WRITEV 1
+_ACEOF
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
- fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+
+ # For the __streamoff_base_type typedef.
+
+ if test "${glibcxx_cv_INT64_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdint.h>
+int
+main ()
+{
+int64_t var;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_INT64_T=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_INT64_T=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_INT64_T = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT64_T 1
+_ACEOF
+
fi
-
-
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:8337: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ # For LFS support.
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ if test "${glibcxx_cv_LFS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <stdio.h>
+
+int
+main ()
+{
+FILE* fp;
+ fopen64("t", "w");
+ fseeko64(fp, 0, SEEK_CUR);
+ ftello64(fp);
+ lseek64(1, 0, SEEK_CUR);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_LFS=yes
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8345 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:8352: \"$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"
+glibcxx_cv_LFS=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_LFS = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_LFS 1
+_ACEOF
+
+ fi
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ if test "${ac_cv_header_locale_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for locale.h" >&5
+echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
+if test "${ac_cv_header_locale_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
+echo "${ECHO_T}$ac_cv_header_locale_h" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking locale.h usability" >&5
+echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <locale.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking locale.h presence" >&5
+echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for locale.h" >&5
+echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
+if test "${ac_cv_header_locale_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_locale_h=$ac_header_preproc
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
+echo "${ECHO_T}$ac_cv_header_locale_h" >&6
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+if test $ac_cv_header_locale_h = yes; then
- LIBS="-lm $LIBS"
+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${ac_cv_val_LC_MESSAGES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_val_LC_MESSAGES=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$ac_cv_val_LC_MESSAGES" >&6
+ if test $ac_cv_val_LC_MESSAGES = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ fi
+
+fi
+
+
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <setjmp.h>
+int
+main ()
+{
+sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
- for ac_func in nan copysignf
+ if test x$gcc_no_link = xyes; then
+ if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+ ac_cv_func_mmap_fixed_mapped=no
+ fi
+fi
+if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+
+
+for ac_header in stdlib.h unistd.h
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8382: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 8387 "configure"
-#include "confdefs.h"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8410: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+echo "$as_me:$LINENO: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the file system buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propagated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h. */
+#if !HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h. */
+# if !HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ exit (1);
+ if (write (fd, data, pagesize) != pagesize)
+ exit (1);
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ exit (1);
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ exit (1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit (1);
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ exit (1);
+ if (read (fd, data3, pagesize) != pagesize)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit (1);
+ close (fd);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+fi
+rm -f conftest.mmap
+
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+
+ # This lets us hard-code the functionality we know we'll have in the cross
+ # target environment. "Let" is a sugar-coated word placed on an especially
+ # dull and tedious hack, actually.
+ #
+ # Here's why GLIBCXX_CHECK_MATH_SUPPORT, and other autoconf macros
+ # that involve linking, can't be used:
+ # "cannot open sim-crt0.o"
+ # "cannot open crt0.o"
+ # etc. All this is because there currently exists no unified, consistent
+ # way for top level CC information to be passed down to target directories:
+ # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
+ # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
+ # crosses can be removed.
+
+ # If Canadian cross, then don't pick up tools from the build directory.
+ # Used only in GLIBCXX_EXPORT_INCLUDES.
+ if test -n "$with_cross_host" &&
+ test x"$build_alias" != x"$with_cross_host" &&
+ test x"$build" != x"$target";
+ then
+ CANADIAN=yes
+ else
+ CANADIAN=no
+ fi
+
+ # Construct crosses by hand, eliminating bits that need ld...
+ # GLIBCXX_CHECK_COMPILER_FEATURES
+ # GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ # GLIBCXX_CHECK_MATH_SUPPORT
+
+ # First, test for "known" system libraries. We may be using newlib even
+ # on a hosted environment.
+ if test "x${with_newlib}" = "xyes"; then
+ os_include_dir="os/newlib"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+
+ # GLIBCXX_CHECK_STDLIB_SUPPORT
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRTOF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRTOLD 1
+_ACEOF
+
+ # AC_FUNC_MMAP
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ else
+
+# Base decisions on target environment.
+case "${host}" in
+ *-darwin*)
+ # Darwin versions vary, but the linker should work in a cross environment,
+ # so we just check for all the features here.
+ # Check for available headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+ machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
+ sys/types.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
- for ac_func in __signbit
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8439: 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
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # The CXXFLAGS thing is suspicious, but based on similar bits previously
+ # found in GLIBCXX_CONFIGURE.
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+
+ # Check for maintainer-mode bits.
+ if test x"$USE_MAINTAINER_MODE" = xno; then
+ WERROR=''
+ else
+ WERROR='-Werror'
+ fi
+
+ # Check for -ffunction-sections -fdata-sections
+ echo "$as_me:$LINENO: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
+echo $ECHO_N "checking for g++ that supports -ffunction-sections -fdata-sections... $ECHO_C" >&6
+ CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int foo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_fdsections=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 8444 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_fdsections=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ else
+ # this is the suspicious part
+ CXXFLAGS=''
+ fi
+ if test x"$ac_fdsections" = x"yes"; then
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ fi
+ echo "$as_me:$LINENO: result: $ac_fdsections" >&5
+echo "${ECHO_T}$ac_fdsections" >&6
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char sin ();
+int
+main ()
+{
+sin ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+ libm="-lm"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libm"
+
+
+
+ echo "$as_me:$LINENO: checking for isinf declaration" >&5
+echo $ECHO_N "checking for isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinf_use" >&6
-int main() {
+ if test x$glibcxx_cv_func_isinf_use = x"yes"; then
+for ac_func in isinf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8467: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _isinf declaration" >&5
+echo $ECHO_N "checking for _isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_func in __signbitf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinf_use" >&6
+
+ if test x$glibcxx_cv_func__isinf_use = x"yes"; then
+
+for ac_func in _isinf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8495: 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 <<EOF
-#line 8500 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isnan declaration" >&5
+echo $ECHO_N "checking for isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
-int main() {
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnan_use" >&6
+
+ if test x$glibcxx_cv_func_isnan_use = x"yes"; then
+
+for ac_func in isnan
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8523: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnan declaration" >&5
+echo $ECHO_N "checking for _isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnan_use" >&6
+
+ if test x$glibcxx_cv_func__isnan_use = x"yes"; then
+
+for ac_func in _isnan
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for finite declaration" >&5
+echo $ECHO_N "checking for finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finite_use+set} != xset; then
+ if test "${glibcxx_cv_func_finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finite_use" >&6
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+ if test x$glibcxx_cv_func_finite_use = x"yes"; then
+
+for ac_func in finite
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8553: 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 <<EOF
-#line 8558 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-int main() {
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finite declaration" >&5
+echo $ECHO_N "checking for _finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finite_use+set} != xset; then
+ if test "${glibcxx_cv_func__finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finite_use" >&6
+
+ if test x$glibcxx_cv_func__finite_use = x"yes"; then
+
+for ac_func in _finite
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8581: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for copysign declaration" >&5
+echo $ECHO_N "checking for copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysign_use" >&6
+
+ if test x$glibcxx_cv_func_copysign_use = x"yes"; then
+
+for ac_func in copysign
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _copysign declaration" >&5
+echo $ECHO_N "checking for _copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysign_use" >&6
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
+ if test x$glibcxx_cv_func__copysign_use = x"yes"; then
+
+for ac_func in _copysign
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for sincos declaration" >&5
+echo $ECHO_N "checking for sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-
- enable_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincos_use" >&6
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:8626: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 8628 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:8635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- have_mbstate_t=yes
+ if test x$glibcxx_cv_func_sincos_use = x"yes"; then
+
+for ac_func in sincos
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincos declaration" >&5
+echo $ECHO_N "checking for _sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
- if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincos_use" >&6
+
+ if test x$glibcxx_cv_func__sincos_use = x"yes"; then
- for ac_hdr in wchar.h
+for ac_func in _sincos
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8657: 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 8662 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8667: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fpclass declaration" >&5
+echo $ECHO_N "checking for fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fpclass_use" >&6
+
+ if test x$glibcxx_cv_func_fpclass_use = x"yes"; then
+
+for ac_func in fpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wchar_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fpclass declaration" >&5
+echo $ECHO_N "checking for _fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_hdr in wctype.h
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fpclass_use" >&6
+
+ if test x$glibcxx_cv_func__fpclass_use = x"yes"; then
+
+for ac_func in _fpclass
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8698: 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 8703 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8708: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for qfpclass declaration" >&5
+echo $ECHO_N "checking for qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func_qfpclass_use = x"yes"; then
+
+for ac_func in qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wctype_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _qfpclass declaration" >&5
+echo $ECHO_N "checking for _qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func__qfpclass_use = x"yes"; then
+
+for ac_func in _qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:8741: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 8743 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:8750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_wchar_minmax=yes
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for hypot declaration" >&5
+echo $ECHO_N "checking for hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:8763: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 8765 "configure"
-#include "confdefs.h"
- #include <wchar.h>
- #include <stddef.h>
-int main() {
-wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_weof=yes
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypot_use" >&6
+
+ if test x$glibcxx_cv_func_hypot_use = x"yes"; then
+
+for ac_func in hypot
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypot declaration" >&5
+echo $ECHO_N "checking for _hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypot_use" >&6
+
+ if test x$glibcxx_cv_func__hypot_use = x"yes"; then
+
+for ac_func in _hypot
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8790: 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 <<EOF
-#line 8795 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for float trig functions" >&5
+echo $ECHO_N "checking for float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
-int main() {
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in acosf asinf atanf \
+ cosf sinf tanf \
+ coshf sinhf tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_trig_use" >&6
+ if test x$glibcxx_cv_func_float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosf asinf atanf \
+ cosf sinf tanf \
+ coshf sinhf tanhf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8818: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for float round functions" >&5
+echo $ECHO_N "checking for float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in ceilf floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_round_use" >&6
+ if test x$glibcxx_cv_func_float_round_use = x"yes"; then
+
+
+for ac_func in ceilf floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for expf declaration" >&5
+echo $ECHO_N "checking for expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expf_use+set} != xset; then
+ if test "${glibcxx_cv_func_expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expf_use" >&6
+
+ if test x$glibcxx_cv_func_expf_use = x"yes"; then
+
+for ac_func in expf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8853: 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 <<EOF
-#line 8858 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-int main() {
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _expf declaration" >&5
+echo $ECHO_N "checking for _expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expf_use+set} != xset; then
+ if test "${glibcxx_cv_func__expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expf_use" >&6
+
+ if test x$glibcxx_cv_func__expf_use = x"yes"; then
+
+for ac_func in _expf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:8881: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isnanf declaration" >&5
+echo $ECHO_N "checking for isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanf_use" >&6
+
+ if test x$glibcxx_cv_func_isnanf_use = x"yes"; then
+
+for ac_func in isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _isnanf declaration" >&5
+echo $ECHO_N "checking for _isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanf_use" >&6
+
+ if test x$glibcxx_cv_func__isnanf_use = x"yes"; then
+
+for ac_func in _isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:8909: checking for ISO C99 wchar_t support" >&5
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:8921: 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
-#line 8926 "configure"
-#include "confdefs.h"
-#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8931: \"$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"
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isinff declaration" >&5
+echo $ECHO_N "checking for isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinff_use" >&6
+
+ if test x$glibcxx_cv_func_isinff_use = x"yes"; then
+
+for ac_func in isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_iconv_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinff declaration" >&5
+echo $ECHO_N "checking for _isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:8955: checking for langinfo.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
-#line 8960 "configure"
-#include "confdefs.h"
-#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8965: \"$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"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinff_use" >&6
+
+ if test x$glibcxx_cv_func__isinff_use = x"yes"; then
+
+for ac_func in _isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for atan2f declaration" >&5
+echo $ECHO_N "checking for atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2f_use" >&6
+
+ if test x$glibcxx_cv_func_atan2f_use = x"yes"; then
+
+for ac_func in atan2f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_langinfo_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _atan2f declaration" >&5
+echo $ECHO_N "checking for _atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2f_use" >&6
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:8989: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8997 "configure"
-#include "confdefs.h"
+ if test x$glibcxx_cv_func__atan2f_use = x"yes"; then
+
+for ac_func in _atan2f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:9008: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fabsf declaration" >&5
+echo $ECHO_N "checking for fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsf_use" >&6
+
+ if test x$glibcxx_cv_func_fabsf_use = x"yes"; then
+
+for ac_func in fabsf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsf declaration" >&5
+echo $ECHO_N "checking for _fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsf_use" >&6
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+ if test x$glibcxx_cv_func__fabsf_use = x"yes"; then
+
+for ac_func in _fabsf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9034: 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 <<EOF
-#line 9039 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fmodf declaration" >&5
+echo $ECHO_N "checking for fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodf_use" >&6
-int main() {
+ if test x$glibcxx_cv_func_fmodf_use = x"yes"; then
+for ac_func in fmodf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9062: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fmodf declaration" >&5
+echo $ECHO_N "checking for _fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodf_use" >&6
+
+ if test x$glibcxx_cv_func__fmodf_use = x"yes"; then
+
+for ac_func in _fmodf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for frexpf declaration" >&5
+echo $ECHO_N "checking for frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpf_use" >&6
+
+ if test x$glibcxx_cv_func_frexpf_use = x"yes"; then
+
+for ac_func in frexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- LIBS="$ac_save_LIBS"
+ else
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:9092: checking for XPG2 wchar_t support" >&5
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
+ echo "$as_me:$LINENO: checking for _frexpf declaration" >&5
+echo $ECHO_N "checking for _frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpf_use" >&6
+
+ if test x$glibcxx_cv_func__frexpf_use = x"yes"; then
+
+for ac_func in _frexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- enable_wchar_t=yes
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:9112: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for hypotf declaration" >&5
+echo $ECHO_N "checking for hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- os_include_dir="os/mingw32"
- ;;
- *-windiss*)
- os_include_dir="os/windiss"
- ;;
- *-qnx6.[12]*)
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
- fi
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotf_use" >&6
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+ if test x$glibcxx_cv_func_hypotf_use = x"yes"; then
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
+for ac_func in hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:9182: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
-else
- cat > conftest.$ac_ext <<EOF
-#line 9187 "configure"
-#include "confdefs.h"
+fi
+done
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:9198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotf declaration" >&5
+echo $ECHO_N "checking for _hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -fr conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotf_use" >&6
+
+ if test x$glibcxx_cv_func__hypotf_use = x"yes"; then
+
+for ac_func in _hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
- fi
-
-
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:9232: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for ldexpf declaration" >&5
+echo $ECHO_N "checking for ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 9240 "configure"
-#include "confdefs.h"
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:9247: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpf_use = x"yes"; then
+
+for ac_func in ldexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+done
- LIBS="-lm $LIBS"
+ else
+ echo "$as_me:$LINENO: checking for _ldexpf declaration" >&5
+echo $ECHO_N "checking for _ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- for ac_func in nan copysignf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpf_use = x"yes"; then
+
+for ac_func in _ldexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9277: 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 <<EOF
-#line 9282 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for logf declaration" >&5
+echo $ECHO_N "checking for logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logf_use+set} != xset; then
+ if test "${glibcxx_cv_func_logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logf_use" >&6
+
+ if test x$glibcxx_cv_func_logf_use = x"yes"; then
+
+for ac_func in logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9305: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _logf declaration" >&5
+echo $ECHO_N "checking for _logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logf_use+set} != xset; then
+ if test "${glibcxx_cv_func__logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logf_use" >&6
+
+ if test x$glibcxx_cv_func__logf_use = x"yes"; then
+
+for ac_func in _logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for log10f declaration" >&5
+echo $ECHO_N "checking for log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10f_use" >&6
+
+ if test x$glibcxx_cv_func_log10f_use = x"yes"; then
- for ac_func in __signbit
+for ac_func in log10f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9334: 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 <<EOF
-#line 9339 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _log10f declaration" >&5
+echo $ECHO_N "checking for _log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10f_use" >&6
-int main() {
+ if test x$glibcxx_cv_func__log10f_use = x"yes"; then
+for ac_func in _log10f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9362: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for modff declaration" >&5
+echo $ECHO_N "checking for modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modff_use+set} != xset; then
+ if test "${glibcxx_cv_func_modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modff_use" >&6
+
+ if test x$glibcxx_cv_func_modff_use = x"yes"; then
+
+for ac_func in modff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _modff declaration" >&5
+echo $ECHO_N "checking for _modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modff_use+set} != xset; then
+ if test "${glibcxx_cv_func__modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
- for ac_func in __signbitf
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modff_use" >&6
+
+ if test x$glibcxx_cv_func__modff_use = x"yes"; then
+
+for ac_func in _modff
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9390: 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 <<EOF
-#line 9395 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for powf declaration" >&5
+echo $ECHO_N "checking for powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powf_use+set} != xset; then
+ if test "${glibcxx_cv_func_powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powf_use" >&6
+
+ if test x$glibcxx_cv_func_powf_use = x"yes"; then
+
+for ac_func in powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9418: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _powf declaration" >&5
+echo $ECHO_N "checking for _powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powf_use+set} != xset; then
+ if test "${glibcxx_cv_func__powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powf_use" >&6
+
+ if test x$glibcxx_cv_func__powf_use = x"yes"; then
+
+for ac_func in _powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sqrtf declaration" >&5
+echo $ECHO_N "checking for sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtf_use" >&6
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
+ if test x$glibcxx_cv_func_sqrtf_use = x"yes"; then
+
+for ac_func in sqrtf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9448: 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 <<EOF
-#line 9453 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtf declaration" >&5
+echo $ECHO_N "checking for _sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtf_use" >&6
-int main() {
+ if test x$glibcxx_cv_func__sqrtf_use = x"yes"; then
+for ac_func in _sqrtf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9476: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sincosf declaration" >&5
+echo $ECHO_N "checking for sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosf_use" >&6
+
+ if test x$glibcxx_cv_func_sincosf_use = x"yes"; then
+
+for ac_func in sincosf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _sincosf declaration" >&5
+echo $ECHO_N "checking for _sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosf_use" >&6
- if test -n "$LIBMATHOBJS"; then
- need_libmath=yes
+ if test x$glibcxx_cv_func__sincosf_use = x"yes"; then
+
+for ac_func in _sincosf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for finitef declaration" >&5
+echo $ECHO_N "checking for finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-
- enable_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitef_use" >&6
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:9521: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 9523 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- have_mbstate_t=yes
+ if test x$glibcxx_cv_func_finitef_use = x"yes"; then
+
+for ac_func in finitef
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitef declaration" >&5
+echo $ECHO_N "checking for _finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
- if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitef_use" >&6
+
+ if test x$glibcxx_cv_func__finitef_use = x"yes"; then
- for ac_hdr in wchar.h
+for ac_func in _finitef
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9552: 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 9557 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9562: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for long double trig functions" >&5
+echo $ECHO_N "checking for long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in acosl asinl atanl \
+ cosl sinl tanl \
+ coshl sinhl tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_trig_use" >&6
+ if test x$glibcxx_cv_func_long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosl asinl atanl \
+ cosl sinl tanl \
+ coshl sinhl tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wchar_h=yes
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for long double round functions" >&5
+echo $ECHO_N "checking for long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in ceill floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-done
- for ac_hdr in wctype.h
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_round_use" >&6
+ if test x$glibcxx_cv_func_long_double_round_use = x"yes"; then
+
+
+for ac_func in ceill floorl
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9593: 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 9598 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9603: \"$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"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isnanl declaration" >&5
+echo $ECHO_N "checking for isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanl_use" >&6
+
+ if test x$glibcxx_cv_func_isnanl_use = x"yes"; then
+
+for ac_func in isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
- ac_has_wctype_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnanl declaration" >&5
+echo $ECHO_N "checking for _isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanl_use" >&6
+
+ if test x$glibcxx_cv_func__isnanl_use = x"yes"; then
+
+for ac_func in _isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:9636: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 9638 "configure"
-#include "confdefs.h"
-#include <wchar.h>
-int main() {
-int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_wchar_minmax=yes
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for isinfl declaration" >&5
+echo $ECHO_N "checking for isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:9658: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 9660 "configure"
-#include "confdefs.h"
- #include <wchar.h>
- #include <stddef.h>
-int main() {
-wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:9669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- has_weof=yes
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinfl_use" >&6
+
+ if test x$glibcxx_cv_func_isinfl_use = x"yes"; then
+
+for ac_func in isinfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinfl declaration" >&5
+echo $ECHO_N "checking for _isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinfl_use" >&6
+
+ if test x$glibcxx_cv_func__isinfl_use = x"yes"; then
+
+for ac_func in _isinfl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9685: 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 <<EOF
-#line 9690 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
-int main() {
+ echo "$as_me:$LINENO: checking for copysignl declaration" >&5
+echo $ECHO_N "checking for copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysignl_use" >&6
+
+ if test x$glibcxx_cv_func_copysignl_use = x"yes"; then
+
+for ac_func in copysignl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9713: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _copysignl declaration" >&5
+echo $ECHO_N "checking for _copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysignl_use" >&6
+
+ if test x$glibcxx_cv_func__copysignl_use = x"yes"; then
+
+for ac_func in _copysignl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for atan2l declaration" >&5
+echo $ECHO_N "checking for atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2l_use" >&6
+
+ if test x$glibcxx_cv_func_atan2l_use = x"yes"; then
+
+for ac_func in atan2l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9748: 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 <<EOF
-#line 9753 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
-int main() {
+ else
+ echo "$as_me:$LINENO: checking for _atan2l declaration" >&5
+echo $ECHO_N "checking for _atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2l_use" >&6
+
+ if test x$glibcxx_cv_func__atan2l_use = x"yes"; then
+
+for ac_func in _atan2l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9776: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for expl declaration" >&5
+echo $ECHO_N "checking for expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expl_use+set} != xset; then
+ if test "${glibcxx_cv_func_expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expl_use" >&6
+
+ if test x$glibcxx_cv_func_expl_use = x"yes"; then
+
+for ac_func in expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ else
+
+ echo "$as_me:$LINENO: checking for _expl declaration" >&5
+echo $ECHO_N "checking for _expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expl_use+set} != xset; then
+ if test "${glibcxx_cv_func__expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-done
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expl_use" >&6
+
+ if test x$glibcxx_cv_func__expl_use = x"yes"; then
+
+for ac_func in _expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:9804: checking for ISO C99 wchar_t support" >&5
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:9816: 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
-#line 9821 "configure"
-#include "confdefs.h"
-#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9826: \"$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"
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fabsl declaration" >&5
+echo $ECHO_N "checking for fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsl_use" >&6
+
+ if test x$glibcxx_cv_func_fabsl_use = x"yes"; then
+
+for ac_func in fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_iconv_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsl declaration" >&5
+echo $ECHO_N "checking for _fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:9850: checking for langinfo.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
-#line 9855 "configure"
-#include "confdefs.h"
-#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9860: \"$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"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsl_use" >&6
+
+ if test x$glibcxx_cv_func__fabsl_use = x"yes"; then
+
+for ac_func in _fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for fmodl declaration" >&5
+echo $ECHO_N "checking for fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodl_use" >&6
+
+ if test x$glibcxx_cv_func_fmodl_use = x"yes"; then
+
+for ac_func in fmodl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_has_langinfo_h=yes
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fmodl declaration" >&5
+echo $ECHO_N "checking for _fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodl_use" >&6
+
+ if test x$glibcxx_cv_func__fmodl_use = x"yes"; then
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:9884: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 9892 "configure"
-#include "confdefs.h"
+for ac_func in _fmodl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:9903: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for frexpl declaration" >&5
+echo $ECHO_N "checking for frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpl_use" >&6
+
+ if test x$glibcxx_cv_func_frexpl_use = x"yes"; then
+
+for ac_func in frexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _frexpl declaration" >&5
+echo $ECHO_N "checking for _frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpl_use" >&6
+
+ if test x$glibcxx_cv_func__frexpl_use = x"yes"; then
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+for ac_func in _frexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9929: 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 <<EOF
-#line 9934 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for hypotl declaration" >&5
+echo $ECHO_N "checking for hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
-int main() {
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotl_use" >&6
+
+ if test x$glibcxx_cv_func_hypotl_use = x"yes"; then
+
+for ac_func in hypotl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:9957: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotl declaration" >&5
+echo $ECHO_N "checking for _hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotl_use" >&6
+
+ if test x$glibcxx_cv_func__hypotl_use = x"yes"; then
+
+for ac_func in _hypotl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for ldexpl declaration" >&5
+echo $ECHO_N "checking for ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpl_use = x"yes"; then
+
+for ac_func in ldexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
-
- LIBS="$ac_save_LIBS"
+ else
+
+ echo "$as_me:$LINENO: checking for _ldexpl declaration" >&5
+echo $ECHO_N "checking for _ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:9987: checking for XPG2 wchar_t support" >&5
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
- enable_wchar_t=yes
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpl_use = x"yes"; then
+
+for ac_func in _ldexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:10007: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+
+
+ echo "$as_me:$LINENO: checking for logl declaration" >&5
+echo $ECHO_N "checking for logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logl_use+set} != xset; then
+ if test "${glibcxx_cv_func_logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
- os_include_dir="os/qnx/qnx6.1"
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COSL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHL 1
-EOF
+int
+main ()
+{
+ logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGL 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10L 1
-EOF
+ if test x$glibcxx_cv_func_logl_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
+for ac_func in logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_SINL 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHL 1
-EOF
+ else
- ;;
- *)
- os_include_dir="os/newlib"
- cat >> confdefs.h <<\EOF
-#define HAVE_HYPOT 1
-EOF
+ echo "$as_me:$LINENO: checking for _logl declaration" >&5
+echo $ECHO_N "checking for _logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logl_use+set} != xset; then
+ if test "${glibcxx_cv_func__logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- ;;
- esac
- case "$target" in
- *-mingw32*)
- ;;
- *-windiss*)
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2F 1
-EOF
+int
+main ()
+{
+ _logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
+ if test x$glibcxx_cv_func__logl_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
+for ac_func in _logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPF 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSF 1
-EOF
+ fi
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+ echo "$as_me:$LINENO: checking for log10l declaration" >&5
+echo $ECHO_N "checking for log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFF 1
-EOF
+int
+main ()
+{
+ log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_POWF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10l_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTF 1
-EOF
+ if test x$glibcxx_cv_func_log10l_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_TANF 1
-EOF
+for ac_func in log10l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- ;;
- *-freebsd*)
- # Must replicate generic section since we don't have strtof or strtold.
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSF 1
-EOF
+ else
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINF 1
-EOF
+ echo "$as_me:$LINENO: checking for _log10l declaration" >&5
+echo $ECHO_N "checking for _log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2F 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
+int
+main ()
+{
+ _log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10l_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPF 1
-EOF
+ if test x$glibcxx_cv_func__log10l_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSF 1
-EOF
+for ac_func in _log10l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODF 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+ fi
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
+ echo "$as_me:$LINENO: checking for modfl declaration" >&5
+echo $ECHO_N "checking for modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_POWF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_TANF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modfl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHF 1
-EOF
+ if test x$glibcxx_cv_func_modfl_use = x"yes"; then
- ;;
- *)
- # GLIBCPP_CHECK_STDLIB_SUPPORT
- cat >> confdefs.h <<\EOF
-#define HAVE_STRTOF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_STRTOLD 1
-EOF
-
- # AC_FUNC_MMAP
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
+for ac_func in modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSF 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINF 1
-EOF
+ else
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2F 1
-EOF
+ echo "$as_me:$LINENO: checking for _modfl declaration" >&5
+echo $ECHO_N "checking for _modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modfl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPF 1
-EOF
+ if test x$glibcxx_cv_func__modfl_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSF 1
-EOF
+for ac_func in _modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODF 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
+ fi
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
+ echo "$as_me:$LINENO: checking for powl declaration" >&5
+echo $ECHO_N "checking for powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powl_use+set} != xset; then
+ if test "${glibcxx_cv_func_powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_POWF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_TANF 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHF 1
-EOF
+ if test x$glibcxx_cv_func_powl_use = x"yes"; then
- ;;
- esac
+for ac_func in powl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- # At some point, we should differentiate between architectures
- # like x86, which have long double versions, and alpha/powerpc/etc.,
- # which don't. For the time being, punt.
- if test x"long_double_math_on_this_cpu" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSL 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINL 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2L 1
-EOF
+ else
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANL 1
-EOF
+ echo "$as_me:$LINENO: checking for _powl declaration" >&5
+echo $ECHO_N "checking for _powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powl_use+set} != xset; then
+ if test "${glibcxx_cv_func__powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_COSL 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPL 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSL 1
-EOF
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powl_use" >&6
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORL 1
-EOF
+ if test x$glibcxx_cv_func__powl_use = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODL 1
-EOF
+for ac_func in _powl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPL 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPL 1
-EOF
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10L 1
-EOF
+ fi
+ fi
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_POWL 1
-EOF
+ echo "$as_me:$LINENO: checking for sqrtl declaration" >&5
+echo $ECHO_N "checking for sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- cat >> confdefs.h <<\EOF
-#define HAVE_SINCOSL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHL 1
-EOF
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTL 1
-EOF
+int
+main ()
+{
+ sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >> confdefs.h <<\EOF
-#define HAVE_TANL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHL 1
-EOF
+fi
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtl_use" >&6
-else
+ if test x$glibcxx_cv_func_sqrtl_use = x"yes"; then
- # We are being configured natively. We can do more elaborate tests
- # that include AC_TRY_COMPILE now, as the linker is assumed to be
- # working.
- GLIBCPP_IS_CROSS_COMPILING=false
- CANADIAN=no
+for ac_func in sqrtl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- # Check for available headers.
- for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
- machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10513: 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 10518 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10523: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtl declaration" >&5
+echo $ECHO_N "checking for _sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtl_use = x"yes"; then
+
+for ac_func in _sqrtl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
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
-
+done
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for sincosl declaration" >&5
+echo $ECHO_N "checking for sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosl_use" >&6
+
+ if test x$glibcxx_cv_func_sincosl_use = x"yes"; then
+
+for ac_func in sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
+ else
-
- # All these tests are for C++; save the language and the compiler flags.
- # The CXXFLAGS thing is suspicious, but based on similar bits previously
- # found in GLIBCPP_CONFIGURE.
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ echo "$as_me:$LINENO: checking for _sincosl declaration" >&5
+echo $ECHO_N "checking for _sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- # Check for maintainer-mode bits.
- if test x"$USE_MAINTAINER_MODE" = xno; then
- WERROR=''
- else
- WERROR='-Werror'
+fi
+
fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosl_use" >&6
- # Check for -ffunction-sections -fdata-sections
- echo $ac_n "checking for g++ that supports -ffunction-sections -fdata-sections""... $ac_c" 1>&6
-echo "configure:10574: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
- CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
- cat > conftest.$ac_ext <<EOF
-#line 10577 "configure"
-#include "confdefs.h"
+ if test x$glibcxx_cv_func__sincosl_use = x"yes"; then
+
+for ac_func in _sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-int main() {
-int foo;
-
-; return 0; }
-EOF
-if { (eval echo configure:10585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_fdsections=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_fdsections=no
fi
-rm -f conftest*
- if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS="$ac_save_CXXFLAGS"
- else
- # this is the suspicious part
- CXXFLAGS=''
+done
+
+ fi
fi
- if test x"$ac_fdsections" = x"yes"; then
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+
+ echo "$as_me:$LINENO: checking for finitel declaration" >&5
+echo $ECHO_N "checking for finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
fi
- echo "$ac_t""$ac_fdsections" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitel_use" >&6
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ if test x$glibcxx_cv_func_finitel_use = x"yes"; then
+
+for ac_func in finitel
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitel declaration" >&5
+echo $ECHO_N "checking for _finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
- # If we're not using GNU ld, then there's no point in even trying these
- # tests. Check for that first. We should have already tested for gld
- # by now (in libtool), but require it now just to be safe...
- test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
- test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitel_use" >&6
+
+ if test x$glibcxx_cv_func__finitel_use = x"yes"; then
+
+for ac_func in _finitel
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- # The name set by libtool depends on the version of libtool. Shame on us
- # for depending on an impl detail, but c'est la vie. Older versions used
- # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
- # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
- # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
- # set (hence we're using an older libtool), then set it.
- if test x${with_gnu_ld+set} != xset; then
- if test x${ac_cv_prog_gnu_ld+set} != xset; then
- # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
- with_gnu_ld=no
- else
- with_gnu_ld=$ac_cv_prog_gnu_ld
fi
fi
- # Start by getting the version number. I think the libtool test already
- # does some of this, but throws away the result.
-
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- glibcpp_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
- # Set --gc-sections.
- if test "$with_gnu_ld" = "notbroken"; then
- # GNU ld it is! Joy and bunny rabbits!
- # All these tests are for C++; save the language and the compiler flags.
- # Need to do this so that g++ won't try to link in libstdc++
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-x c++ -Wl,--gc-sections'
- # Check for -Wl,--gc-sections
- # XXX This test is broken at the moment, as symbols required for
- # linking are now in libsupc++ (not built yet.....). In addition,
- # this test has cored on solaris in the past. In addition,
- # --gc-sections doesn't really work at the moment (keeps on discarding
- # used sections, first .eh_frame and now some of the glibc sections for
- # iconv). Bzzzzt. Thanks for playing, maybe next time.
- echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
-echo "configure:10666: checking for ld that supports -Wl,--gc-sections" >&5
- if test "$cross_compiling" = yes; then
- ac_sectionLDflags=yes
+ echo "$as_me:$LINENO: checking for _float trig functions" >&5
+echo $ECHO_N "checking for _float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 10671 "configure"
-#include "confdefs.h"
- int main(void)
- {
- try { throw 1; }
- catch (...) { };
- return 0;
- }
-
-EOF
-if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_sectionLDflags=yes
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _acosf _asinf _atanf \
+ _cosf _sinf _tanf \
+ _coshf _sinhf _tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_trig_use" >&6
+ if test x$glibcxx_cv_func__float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosf _asinf _atanf \
+ _cosf _sinf _tanf \
+ _coshf _sinhf _tanhf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for _float round functions" >&5
+echo $ECHO_N "checking for _float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_sectionLDflags=no
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceilf _floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -fr conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_round_use" >&6
+ if test x$glibcxx_cv_func__float_round_use = x"yes"; then
+
+
+for ac_func in _ceilf _floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- else
- # this is the suspicious part
- CFLAGS=''
- fi
- if test "$ac_sectionLDflags" = "yes"; then
- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
- fi
- echo "$ac_t""$ac_sectionLDflags" 1>&6
fi
- # Set linker optimization flags.
- if test x"$with_gnu_ld" = x"yes"; then
- OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+
+
+ echo "$as_me:$LINENO: checking for _long double trig functions" >&5
+echo $ECHO_N "checking for _long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_trig_use" >&6
+ if test x$glibcxx_cv_func__long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
fi
-
-
-
-
- echo $ac_n "checking for __builtin_abs declaration""... $ac_c" 1>&6
-echo "configure:10717: checking for __builtin_abs declaration" >&5
- if test x${glibcpp_cv_func___builtin_abs_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_abs_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for _long double round functions" >&5
+echo $ECHO_N "checking for _long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+
+
+
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceill _floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_round_use" >&6
+ if test x$glibcxx_cv_func__long_double_round_use = x"yes"; then
- cat > conftest.$ac_ext <<EOF
-#line 10732 "configure"
-#include "confdefs.h"
+
+for ac_func in _ceill _floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_abs declaration" >&5
+echo $ECHO_N "checking for __builtin_abs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_abs(0);
-; return 0; }
-EOF
-if { (eval echo configure:10739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_abs_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_abs_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_abs_use" 1>&6
- if test x$glibcpp_cv_func___builtin_abs_use = x"yes"; then
- echo $ac_n "checking for __builtin_abs linkage""... $ac_c" 1>&6
-echo "configure:10763: checking for __builtin_abs linkage" >&5
- if test x${glibcpp_cv_func___builtin_abs_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_abs_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 10770 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_use" >&6
+ if test x$glibcxx_cv_func___builtin_abs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_abs linkage" >&5
+echo $ECHO_N "checking for __builtin_abs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_abs(0);
-; return 0; }
-EOF
-if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_abs_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_abs_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_abs_link" 1>&6
- if test x$glibcpp_cv_func___builtin_abs_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6
+ if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_fabsf declaration""... $ac_c" 1>&6
-echo "configure:10803: checking for __builtin_fabsf declaration" >&5
- if test x${glibcpp_cv_func___builtin_fabsf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsf declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 10818 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabsf(0);
-; return 0; }
-EOF
-if { (eval echo configure:10825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabsf_use" 1>&6
- if test x$glibcpp_cv_func___builtin_fabsf_use = x"yes"; then
- echo $ac_n "checking for __builtin_fabsf linkage""... $ac_c" 1>&6
-echo "configure:10849: checking for __builtin_fabsf linkage" >&5
- if test x${glibcpp_cv_func___builtin_fabsf_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsf_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 10856 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsf linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabsf(0);
-; return 0; }
-EOF
-if { (eval echo configure:10863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsf_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsf_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabsf_link" 1>&6
- if test x$glibcpp_cv_func___builtin_fabsf_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_fabs declaration""... $ac_c" 1>&6
-echo "configure:10889: checking for __builtin_fabs declaration" >&5
- if test x${glibcpp_cv_func___builtin_fabs_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabs_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_fabs declaration" >&5
+echo $ECHO_N "checking for __builtin_fabs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 10904 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabs(0);
-; return 0; }
-EOF
-if { (eval echo configure:10911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabs_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabs_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabs_use" 1>&6
- if test x$glibcpp_cv_func___builtin_fabs_use = x"yes"; then
- echo $ac_n "checking for __builtin_fabs linkage""... $ac_c" 1>&6
-echo "configure:10935: checking for __builtin_fabs linkage" >&5
- if test x${glibcpp_cv_func___builtin_fabs_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabs_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 10942 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabs linkage" >&5
+echo $ECHO_N "checking for __builtin_fabs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabs(0);
-; return 0; }
-EOF
-if { (eval echo configure:10949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabs_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabs_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabs_link" 1>&6
- if test x$glibcpp_cv_func___builtin_fabs_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_fabsl declaration""... $ac_c" 1>&6
-echo "configure:10975: checking for __builtin_fabsl declaration" >&5
- if test x${glibcpp_cv_func___builtin_fabsl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsl declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 10990 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabsl(0);
-; return 0; }
-EOF
-if { (eval echo configure:10997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabsl_use" 1>&6
- if test x$glibcpp_cv_func___builtin_fabsl_use = x"yes"; then
- echo $ac_n "checking for __builtin_fabsl linkage""... $ac_c" 1>&6
-echo "configure:11021: checking for __builtin_fabsl linkage" >&5
- if test x${glibcpp_cv_func___builtin_fabsl_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsl_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11028 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsl linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_fabsl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsl_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_fabsl_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_fabsl_link" 1>&6
- if test x$glibcpp_cv_func___builtin_fabsl_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_labs declaration""... $ac_c" 1>&6
-echo "configure:11061: checking for __builtin_labs declaration" >&5
- if test x${glibcpp_cv_func___builtin_labs_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_labs_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_labs declaration" >&5
+echo $ECHO_N "checking for __builtin_labs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11076 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_labs(0);
-; return 0; }
-EOF
-if { (eval echo configure:11083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_labs_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_labs_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_labs_use" 1>&6
- if test x$glibcpp_cv_func___builtin_labs_use = x"yes"; then
- echo $ac_n "checking for __builtin_labs linkage""... $ac_c" 1>&6
-echo "configure:11107: checking for __builtin_labs linkage" >&5
- if test x${glibcpp_cv_func___builtin_labs_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_labs_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11114 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_use" >&6
+ if test x$glibcxx_cv_func___builtin_labs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_labs linkage" >&5
+echo $ECHO_N "checking for __builtin_labs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_labs(0);
-; return 0; }
-EOF
-if { (eval echo configure:11121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_labs_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_labs_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_labs_link" 1>&6
- if test x$glibcpp_cv_func___builtin_labs_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6
+ if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sqrtf declaration""... $ac_c" 1>&6
-echo "configure:11148: checking for __builtin_sqrtf declaration" >&5
- if test x${glibcpp_cv_func___builtin_sqrtf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11163 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrtf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrtf_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrtf_use = x"yes"; then
- echo $ac_n "checking for __builtin_sqrtf linkage""... $ac_c" 1>&6
-echo "configure:11194: checking for __builtin_sqrtf linkage" >&5
- if test x${glibcpp_cv_func___builtin_sqrtf_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtf_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11201 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrtf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtf_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtf_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrtf_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrtf_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sqrt declaration""... $ac_c" 1>&6
-echo "configure:11234: checking for __builtin_sqrt declaration" >&5
- if test x${glibcpp_cv_func___builtin_sqrt_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrt declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrt declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11249 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrt(0);
-; return 0; }
-EOF
-if { (eval echo configure:11256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrt_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrt_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrt_use = x"yes"; then
- echo $ac_n "checking for __builtin_sqrt linkage""... $ac_c" 1>&6
-echo "configure:11280: checking for __builtin_sqrt linkage" >&5
- if test x${glibcpp_cv_func___builtin_sqrt_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11287 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrt linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrt linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrt(0);
-; return 0; }
-EOF
-if { (eval echo configure:11294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrt_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrt_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrt_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sqrtl declaration""... $ac_c" 1>&6
-echo "configure:11320: checking for __builtin_sqrtl declaration" >&5
- if test x${glibcpp_cv_func___builtin_sqrtl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11335 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrtl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrtl_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrtl_use = x"yes"; then
- echo $ac_n "checking for __builtin_sqrtl linkage""... $ac_c" 1>&6
-echo "configure:11366: checking for __builtin_sqrtl linkage" >&5
- if test x${glibcpp_cv_func___builtin_sqrtl_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtl_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11373 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sqrtl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtl_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sqrtl_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sqrtl_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sqrtl_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sinf declaration""... $ac_c" 1>&6
-echo "configure:11407: checking for __builtin_sinf declaration" >&5
- if test x${glibcpp_cv_func___builtin_sinf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sinf declaration" >&5
+echo $ECHO_N "checking for __builtin_sinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11422 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sinf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sinf_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sinf_use = x"yes"; then
- echo $ac_n "checking for __builtin_sinf linkage""... $ac_c" 1>&6
-echo "configure:11453: checking for __builtin_sinf linkage" >&5
- if test x${glibcpp_cv_func___builtin_sinf_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinf_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11460 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinf linkage" >&5
+echo $ECHO_N "checking for __builtin_sinf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sinf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinf_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinf_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sinf_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sinf_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sin declaration""... $ac_c" 1>&6
-echo "configure:11493: checking for __builtin_sin declaration" >&5
- if test x${glibcpp_cv_func___builtin_sin_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sin_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sin declaration" >&5
+echo $ECHO_N "checking for __builtin_sin declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11508 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sin(0);
-; return 0; }
-EOF
-if { (eval echo configure:11515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sin_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sin_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sin_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sin_use = x"yes"; then
- echo $ac_n "checking for __builtin_sin linkage""... $ac_c" 1>&6
-echo "configure:11539: checking for __builtin_sin linkage" >&5
- if test x${glibcpp_cv_func___builtin_sin_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sin_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11546 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_use" >&6
+ if test x$glibcxx_cv_func___builtin_sin_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sin linkage" >&5
+echo $ECHO_N "checking for __builtin_sin linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sin(0);
-; return 0; }
-EOF
-if { (eval echo configure:11553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sin_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sin_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sin_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sin_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6
+ if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_sinl declaration""... $ac_c" 1>&6
-echo "configure:11579: checking for __builtin_sinl declaration" >&5
- if test x${glibcpp_cv_func___builtin_sinl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_sinl declaration" >&5
+echo $ECHO_N "checking for __builtin_sinl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11594 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sinl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sinl_use" 1>&6
- if test x$glibcpp_cv_func___builtin_sinl_use = x"yes"; then
- echo $ac_n "checking for __builtin_sinl linkage""... $ac_c" 1>&6
-echo "configure:11625: checking for __builtin_sinl linkage" >&5
- if test x${glibcpp_cv_func___builtin_sinl_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinl_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11632 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinl linkage" >&5
+echo $ECHO_N "checking for __builtin_sinl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_sinl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinl_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_sinl_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_sinl_link" 1>&6
- if test x$glibcpp_cv_func___builtin_sinl_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_cosf declaration""... $ac_c" 1>&6
-echo "configure:11666: checking for __builtin_cosf declaration" >&5
- if test x${glibcpp_cv_func___builtin_cosf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_cosf declaration" >&5
+echo $ECHO_N "checking for __builtin_cosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11681 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cosf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cosf_use" 1>&6
- if test x$glibcpp_cv_func___builtin_cosf_use = x"yes"; then
- echo $ac_n "checking for __builtin_cosf linkage""... $ac_c" 1>&6
-echo "configure:11712: checking for __builtin_cosf linkage" >&5
- if test x${glibcpp_cv_func___builtin_cosf_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosf_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11719 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosf linkage" >&5
+echo $ECHO_N "checking for __builtin_cosf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cosf(0);
-; return 0; }
-EOF
-if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosf_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosf_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cosf_link" 1>&6
- if test x$glibcpp_cv_func___builtin_cosf_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_cos declaration""... $ac_c" 1>&6
-echo "configure:11752: checking for __builtin_cos declaration" >&5
- if test x${glibcpp_cv_func___builtin_cos_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cos_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_cos declaration" >&5
+echo $ECHO_N "checking for __builtin_cos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11767 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cos(0);
-; return 0; }
-EOF
-if { (eval echo configure:11774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cos_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cos_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cos_use" 1>&6
- if test x$glibcpp_cv_func___builtin_cos_use = x"yes"; then
- echo $ac_n "checking for __builtin_cos linkage""... $ac_c" 1>&6
-echo "configure:11798: checking for __builtin_cos linkage" >&5
- if test x${glibcpp_cv_func___builtin_cos_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cos_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11805 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_use" >&6
+ if test x$glibcxx_cv_func___builtin_cos_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cos linkage" >&5
+echo $ECHO_N "checking for __builtin_cos linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cos(0);
-; return 0; }
-EOF
-if { (eval echo configure:11812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cos_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cos_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cos_link" 1>&6
- if test x$glibcpp_cv_func___builtin_cos_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6
+ if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
-
- echo $ac_n "checking for __builtin_cosl declaration""... $ac_c" 1>&6
-echo "configure:11838: checking for __builtin_cosl declaration" >&5
- if test x${glibcpp_cv_func___builtin_cosl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for __builtin_cosl declaration" >&5
+echo $ECHO_N "checking for __builtin_cosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 11853 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cosl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cosl_use" 1>&6
- if test x$glibcpp_cv_func___builtin_cosl_use = x"yes"; then
- echo $ac_n "checking for __builtin_cosl linkage""... $ac_c" 1>&6
-echo "configure:11884: checking for __builtin_cosl linkage" >&5
- if test x${glibcpp_cv_func___builtin_cosl_link+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosl_link'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11891 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosl linkage" >&5
+echo $ECHO_N "checking for __builtin_cosl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
__builtin_cosl(0);
-; return 0; }
-EOF
-if { (eval echo configure:11898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosl_link=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func___builtin_cosl_link=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_link=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
fi
- echo "$ac_t""$glibcpp_cv_func___builtin_cosl_link" 1>&6
- if test x$glibcpp_cv_func___builtin_cosl_link = x"yes"; then
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define ${ac_tr_func} 1
-EOF
+_ACEOF
fi
fi
- dummyvar=no
- if test x$dummyvar = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_ABS 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_LABS 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_COS 1
-EOF
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_COSF 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_COSL 1
-EOF
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_FABS 1
-EOF
+ LIBS="-lm $LIBS"
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_FABSF 1
-EOF
+fi
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_FABSL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SIN 1
-EOF
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SINF 1
-EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SINL 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SQRT 1
-EOF
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SQRTF 1
-EOF
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
+else
+ ac_has_wchar_h=no
+fi
+
+done
+
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
+fi
+
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- cat >> confdefs.h <<\EOF
-#define HAVE___BUILTIN_SQRTL 1
-EOF
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
+fi
+
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
+else
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
+fi
+done
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
-
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
- echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:11989: 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
+
+ echo "$as_me:$LINENO: checking for strtold declaration" >&5
+echo $ECHO_N "checking for strtold declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtold_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtold_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 11997 "configure"
-#include "confdefs.h"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtold(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtold_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtold_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtold_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtold_use" >&6
+ if test x$glibcxx_cv_func_strtold_use = x"yes"; then
+
+for ac_func in strtold
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char sin();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-int main() {
-sin()
-; return 0; }
-EOF
-if { (eval echo configure:12008: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for strtof declaration" >&5
+echo $ECHO_N "checking for strtof declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtof_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtof_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtof(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtof_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtof_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtof_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtof_use" >&6
+ if test x$glibcxx_cv_func_strtof_use = x"yes"; then
+
+for ac_func in strtof
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libm="-lm"
+done
+
+ fi
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+ # For showmanyc_helper().
+
+
+for ac_header in sys/ioctl.h sys/filio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test "${glibcxx_cv_POLL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <poll.h>
+int
+main ()
+{
+struct pollfd pfd[1];
+ pfd[0].events = POLLIN;
+ poll(pfd, 1, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_POLL=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_POLL=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_POLL = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+ fi
+
+
+ if test "${glibcxx_cv_S_ISREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_ISREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_ISREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "${glibcxx_cv_S_IFREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_IFREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_IFREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_S_ISREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ fi
+
+
+ # For xsputn_2().
+
+for ac_header in sys/uio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test "${glibcxx_cv_WRITEV+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/uio.h>
+int
+main ()
+{
+struct iovec iov[2];
+ writev(0, iov, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_WRITEV=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_WRITEV=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_WRITEV = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WRITEV 1
+_ACEOF
+
+ fi
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <setjmp.h>
+int
+main ()
+{
+sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+ ;;
+
+ *djgpp)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in float.h ieeefp.h inttypes.h locale.h \
+ memory.h stdint.h stdlib.h strings.h string.h unistd.h \
+ wchar.h wctype.h machine/endian.h sys/ioctl.h sys/param.h \
+ sys/resource.h sys/stat.h sys/time.h sys/types.h sys/uio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # The CXXFLAGS thing is suspicious, but based on similar bits previously
+ # found in GLIBCXX_CONFIGURE.
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+
+ # Check for maintainer-mode bits.
+ if test x"$USE_MAINTAINER_MODE" = xno; then
+ WERROR=''
+ else
+ WERROR='-Werror'
+ fi
+
+ # Check for -ffunction-sections -fdata-sections
+ echo "$as_me:$LINENO: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
+echo $ECHO_N "checking for g++ that supports -ffunction-sections -fdata-sections... $ECHO_C" >&6
+ CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int foo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_fdsections=yes
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_fdsections=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ else
+ # this is the suspicious part
+ CXXFLAGS=''
+ fi
+ if test x"$ac_fdsections" = x"yes"; then
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ fi
+ echo "$as_me:$LINENO: result: $ac_fdsections" >&5
+echo "${ECHO_T}$ac_fdsections" >&6
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+int
+main ()
+{
+sin ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+ libm="-lm"
fi
ac_save_LIBS="$LIBS"
LIBS="$LIBS $libm"
-
-
- echo $ac_n "checking for isinf declaration""... $ac_c" 1>&6
-echo "configure:12034: checking for isinf declaration" >&5
- if test x${glibcpp_cv_func_isinf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isinf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isinf declaration" >&5
+echo $ECHO_N "checking for isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 12049 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isinf(0);
-; return 0; }
-EOF
-if { (eval echo configure:12060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isinf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isinf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isinf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinf_use" >&6
+
+ if test x$glibcxx_cv_func_isinf_use = x"yes"; then
- if test x$glibcpp_cv_func_isinf_use = x"yes"; then
- for ac_func in isinf
+for ac_func in isinf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12087: 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 <<EOF
-#line 12092 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12115: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isinf declaration""... $ac_c" 1>&6
-echo "configure:12142: checking for _isinf declaration" >&5
- if test x${glibcpp_cv_func__isinf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isinf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 12157 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isinf declaration" >&5
+echo $ECHO_N "checking for _isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isinf(0);
-; return 0; }
-EOF
-if { (eval echo configure:12168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isinf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isinf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isinf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinf_use" >&6
+
+ if test x$glibcxx_cv_func__isinf_use = x"yes"; then
- if test x$glibcpp_cv_func__isinf_use = x"yes"; then
- for ac_func in _isinf
+for ac_func in _isinf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12195: 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 <<EOF
-#line 12200 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12223: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for isnan declaration""... $ac_c" 1>&6
-echo "configure:12253: checking for isnan declaration" >&5
- if test x${glibcpp_cv_func_isnan_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isnan_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isnan declaration" >&5
+echo $ECHO_N "checking for isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 12268 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isnan(0);
-; return 0; }
-EOF
-if { (eval echo configure:12279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isnan_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isnan_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isnan_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnan_use" >&6
- if test x$glibcpp_cv_func_isnan_use = x"yes"; then
- for ac_func in isnan
+ if test x$glibcxx_cv_func_isnan_use = x"yes"; then
+
+for ac_func in isnan
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12306: 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 <<EOF
-#line 12311 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12334: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isnan declaration""... $ac_c" 1>&6
-echo "configure:12361: checking for _isnan declaration" >&5
- if test x${glibcpp_cv_func__isnan_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isnan_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 12376 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isnan declaration" >&5
+echo $ECHO_N "checking for _isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isnan(0);
-; return 0; }
-EOF
-if { (eval echo configure:12387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isnan_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isnan_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnan_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isnan_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnan_use" >&6
+
+ if test x$glibcxx_cv_func__isnan_use = x"yes"; then
- if test x$glibcpp_cv_func__isnan_use = x"yes"; then
- for ac_func in _isnan
+for ac_func in _isnan
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12414: 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 <<EOF
-#line 12419 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12442: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for finite declaration""... $ac_c" 1>&6
-echo "configure:12472: checking for finite declaration" >&5
- if test x${glibcpp_cv_func_finite_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_finite_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for finite declaration" >&5
+echo $ECHO_N "checking for finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finite_use+set} != xset; then
+ if test "${glibcxx_cv_func_finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 12487 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
finite(0);
-; return 0; }
-EOF
-if { (eval echo configure:12498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_finite_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_finite_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_finite_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finite_use" >&6
+
+ if test x$glibcxx_cv_func_finite_use = x"yes"; then
- if test x$glibcpp_cv_func_finite_use = x"yes"; then
- for ac_func in finite
+for ac_func in finite
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12525: 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 <<EOF
-#line 12530 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12553: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _finite declaration""... $ac_c" 1>&6
-echo "configure:12580: checking for _finite declaration" >&5
- if test x${glibcpp_cv_func__finite_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__finite_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 12595 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _finite declaration" >&5
+echo $ECHO_N "checking for _finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finite_use+set} != xset; then
+ if test "${glibcxx_cv_func__finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_finite(0);
-; return 0; }
-EOF
-if { (eval echo configure:12606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__finite_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__finite_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finite_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__finite_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finite_use" >&6
- if test x$glibcpp_cv_func__finite_use = x"yes"; then
- for ac_func in _finite
+ if test x$glibcxx_cv_func__finite_use = x"yes"; then
+
+for ac_func in _finite
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12633: 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 <<EOF
-#line 12638 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12661: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for copysign declaration""... $ac_c" 1>&6
-echo "configure:12691: checking for copysign declaration" >&5
- if test x${glibcpp_cv_func_copysign_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_copysign_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for copysign declaration" >&5
+echo $ECHO_N "checking for copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 12706 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
copysign(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:12713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_copysign_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_copysign_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_copysign_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysign_use" >&6
- if test x$glibcpp_cv_func_copysign_use = x"yes"; then
- for ac_func in copysign
+ if test x$glibcxx_cv_func_copysign_use = x"yes"; then
+
+for ac_func in copysign
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12740: 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 <<EOF
-#line 12745 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12768: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _copysign declaration""... $ac_c" 1>&6
-echo "configure:12795: checking for _copysign declaration" >&5
- if test x${glibcpp_cv_func__copysign_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__copysign_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 12810 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _copysign(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:12817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__copysign_use=yes
+
+ echo "$as_me:$LINENO: checking for _copysign declaration" >&5
+echo $ECHO_N "checking for _copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__copysign_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysign_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__copysign_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysign_use" >&6
- if test x$glibcpp_cv_func__copysign_use = x"yes"; then
- for ac_func in _copysign
+ if test x$glibcxx_cv_func__copysign_use = x"yes"; then
+
+for ac_func in _copysign
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12844: 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 <<EOF
-#line 12849 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12872: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for sincos declaration""... $ac_c" 1>&6
-echo "configure:12902: checking for sincos declaration" >&5
- if test x${glibcpp_cv_func_sincos_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_sincos_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for sincos declaration" >&5
+echo $ECHO_N "checking for sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 12917 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
sincos(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:12924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_sincos_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_sincos_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_sincos_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincos_use" >&6
- if test x$glibcpp_cv_func_sincos_use = x"yes"; then
- for ac_func in sincos
+ if test x$glibcxx_cv_func_sincos_use = x"yes"; then
+
+for ac_func in sincos
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12951: 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 <<EOF
-#line 12956 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:12979: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _sincos declaration""... $ac_c" 1>&6
-echo "configure:13006: checking for _sincos declaration" >&5
- if test x${glibcpp_cv_func__sincos_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__sincos_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 13021 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _sincos(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:13028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__sincos_use=yes
+
+ echo "$as_me:$LINENO: checking for _sincos declaration" >&5
+echo $ECHO_N "checking for _sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__sincos_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__sincos_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincos_use" >&6
+
+ if test x$glibcxx_cv_func__sincos_use = x"yes"; then
- if test x$glibcpp_cv_func__sincos_use = x"yes"; then
- for ac_func in _sincos
+for ac_func in _sincos
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13055: 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 <<EOF
-#line 13060 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13083: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for fpclass declaration""... $ac_c" 1>&6
-echo "configure:13113: checking for fpclass declaration" >&5
- if test x${glibcpp_cv_func_fpclass_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_fpclass_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for fpclass declaration" >&5
+echo $ECHO_N "checking for fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13128 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
fpclass(0);
-; return 0; }
-EOF
-if { (eval echo configure:13139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_fpclass_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_fpclass_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_fpclass_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fpclass_use" >&6
+
+ if test x$glibcxx_cv_func_fpclass_use = x"yes"; then
- if test x$glibcpp_cv_func_fpclass_use = x"yes"; then
- for ac_func in fpclass
+for ac_func in fpclass
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13166: 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 <<EOF
-#line 13171 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13194: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _fpclass declaration""... $ac_c" 1>&6
-echo "configure:13221: checking for _fpclass declaration" >&5
- if test x${glibcpp_cv_func__fpclass_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__fpclass_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 13236 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _fpclass declaration" >&5
+echo $ECHO_N "checking for _fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_fpclass(0);
-; return 0; }
-EOF
-if { (eval echo configure:13247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__fpclass_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__fpclass_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__fpclass_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fpclass_use" >&6
+
+ if test x$glibcxx_cv_func__fpclass_use = x"yes"; then
- if test x$glibcpp_cv_func__fpclass_use = x"yes"; then
- for ac_func in _fpclass
+for ac_func in _fpclass
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13274: 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 <<EOF
-#line 13279 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13302: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for qfpclass declaration""... $ac_c" 1>&6
-echo "configure:13332: checking for qfpclass declaration" >&5
- if test x${glibcpp_cv_func_qfpclass_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_qfpclass_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for qfpclass declaration" >&5
+echo $ECHO_N "checking for qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13347 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
qfpclass(0);
-; return 0; }
-EOF
-if { (eval echo configure:13358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_qfpclass_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_qfpclass_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_qfpclass_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_qfpclass_use" >&6
- if test x$glibcpp_cv_func_qfpclass_use = x"yes"; then
- for ac_func in qfpclass
+ if test x$glibcxx_cv_func_qfpclass_use = x"yes"; then
+
+for ac_func in qfpclass
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13385: 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 <<EOF
-#line 13390 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13413: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _qfpclass declaration""... $ac_c" 1>&6
-echo "configure:13440: checking for _qfpclass declaration" >&5
- if test x${glibcpp_cv_func__qfpclass_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__qfpclass_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 13455 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _qfpclass declaration" >&5
+echo $ECHO_N "checking for _qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_qfpclass(0);
-; return 0; }
-EOF
-if { (eval echo configure:13466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__qfpclass_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__qfpclass_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__qfpclass_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__qfpclass_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func__qfpclass_use = x"yes"; then
- if test x$glibcpp_cv_func__qfpclass_use = x"yes"; then
- for ac_func in _qfpclass
+for ac_func in _qfpclass
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13493: 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 <<EOF
-#line 13498 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13521: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for hypot declaration""... $ac_c" 1>&6
-echo "configure:13551: checking for hypot declaration" >&5
- if test x${glibcpp_cv_func_hypot_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_hypot_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for hypot declaration" >&5
+echo $ECHO_N "checking for hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13566 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
hypot(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:13573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_hypot_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_hypot_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_hypot_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypot_use" >&6
+
+ if test x$glibcxx_cv_func_hypot_use = x"yes"; then
- if test x$glibcpp_cv_func_hypot_use = x"yes"; then
- for ac_func in hypot
+for ac_func in hypot
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13600: 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 <<EOF
-#line 13605 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13628: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _hypot declaration""... $ac_c" 1>&6
-echo "configure:13655: checking for _hypot declaration" >&5
- if test x${glibcpp_cv_func__hypot_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__hypot_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 13670 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _hypot(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:13677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__hypot_use=yes
+
+ echo "$as_me:$LINENO: checking for _hypot declaration" >&5
+echo $ECHO_N "checking for _hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__hypot_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypot_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__hypot_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypot_use" >&6
+
+ if test x$glibcxx_cv_func__hypot_use = x"yes"; then
- if test x$glibcpp_cv_func__hypot_use = x"yes"; then
- for ac_func in _hypot
+for ac_func in _hypot
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13704: 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 <<EOF
-#line 13709 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13732: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
- echo $ac_n "checking for float trig functions""... $ac_c" 1>&6
-echo "configure:13762: checking for float trig functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func_float_trig_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for float trig functions" >&5
+echo $ECHO_N "checking for float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13776 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
`for x in acosf asinf atanf \
cosf sinf tanf \
- coshf sinhf tanhf; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:13785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_float_trig_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_float_trig_use=no
-fi
-rm -f conftest*
+ coshf sinhf tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
- echo "$ac_t""$glibcpp_cv_func_float_trig_use" 1>&6
- if test x$glibcpp_cv_func_float_trig_use = x"yes"; then
- for ac_func in acosf asinf atanf \
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_trig_use" >&6
+ if test x$glibcxx_cv_func_float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosf asinf atanf \
cosf sinf tanf \
coshf sinhf tanhf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13811: 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 <<EOF
-#line 13816 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13839: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
-
- echo $ac_n "checking for float round functions""... $ac_c" 1>&6
-echo "configure:13867: checking for float round functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func_float_round_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for float round functions" >&5
+echo $ECHO_N "checking for float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13881 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
- `for x in ceilf floorf; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:13888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_float_round_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_float_round_use=no
-fi
-rm -f conftest*
+int
+main ()
+{
+ `for x in ceilf floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
- echo "$ac_t""$glibcpp_cv_func_float_round_use" 1>&6
- if test x$glibcpp_cv_func_float_round_use = x"yes"; then
- for ac_func in ceilf floorf
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_round_use" >&6
+ if test x$glibcxx_cv_func_float_round_use = x"yes"; then
+
+
+for ac_func in ceilf floorf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13912: 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 <<EOF
-#line 13917 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:13940: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
-
-
- echo $ac_n "checking for expf declaration""... $ac_c" 1>&6
-echo "configure:13969: checking for expf declaration" >&5
- if test x${glibcpp_cv_func_expf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_expf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for expf declaration" >&5
+echo $ECHO_N "checking for expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expf_use+set} != xset; then
+ if test "${glibcxx_cv_func_expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 13984 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
expf(0);
-; return 0; }
-EOF
-if { (eval echo configure:13995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_expf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_expf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_expf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expf_use" >&6
+
+ if test x$glibcxx_cv_func_expf_use = x"yes"; then
- if test x$glibcpp_cv_func_expf_use = x"yes"; then
- for ac_func in expf
+for ac_func in expf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14022: 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 <<EOF
-#line 14027 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14050: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _expf declaration""... $ac_c" 1>&6
-echo "configure:14077: checking for _expf declaration" >&5
- if test x${glibcpp_cv_func__expf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__expf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 14092 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _expf declaration" >&5
+echo $ECHO_N "checking for _expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expf_use+set} != xset; then
+ if test "${glibcxx_cv_func__expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_expf(0);
-; return 0; }
-EOF
-if { (eval echo configure:14103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__expf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__expf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__expf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expf_use" >&6
+
+ if test x$glibcxx_cv_func__expf_use = x"yes"; then
- if test x$glibcpp_cv_func__expf_use = x"yes"; then
- for ac_func in _expf
+for ac_func in _expf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14130: 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 <<EOF
-#line 14135 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14158: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for isnanf declaration""... $ac_c" 1>&6
-echo "configure:14188: checking for isnanf declaration" >&5
- if test x${glibcpp_cv_func_isnanf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isnanf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isnanf declaration" >&5
+echo $ECHO_N "checking for isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 14203 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isnanf(0);
-; return 0; }
-EOF
-if { (eval echo configure:14214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isnanf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isnanf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isnanf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanf_use" >&6
- if test x$glibcpp_cv_func_isnanf_use = x"yes"; then
- for ac_func in isnanf
+ if test x$glibcxx_cv_func_isnanf_use = x"yes"; then
+
+for ac_func in isnanf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14241: 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 <<EOF
-#line 14246 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14269: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isnanf declaration""... $ac_c" 1>&6
-echo "configure:14296: checking for _isnanf declaration" >&5
- if test x${glibcpp_cv_func__isnanf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isnanf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 14311 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isnanf declaration" >&5
+echo $ECHO_N "checking for _isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isnanf(0);
-; return 0; }
-EOF
-if { (eval echo configure:14322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isnanf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isnanf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isnanf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanf_use" >&6
+
+ if test x$glibcxx_cv_func__isnanf_use = x"yes"; then
- if test x$glibcpp_cv_func__isnanf_use = x"yes"; then
- for ac_func in _isnanf
+for ac_func in _isnanf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14349: 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 <<EOF
-#line 14354 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14377: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for isinff declaration""... $ac_c" 1>&6
-echo "configure:14407: checking for isinff declaration" >&5
- if test x${glibcpp_cv_func_isinff_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isinff_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isinff declaration" >&5
+echo $ECHO_N "checking for isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 14422 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isinff(0);
-; return 0; }
-EOF
-if { (eval echo configure:14433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isinff_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isinff_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isinff_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinff_use" >&6
+
+ if test x$glibcxx_cv_func_isinff_use = x"yes"; then
- if test x$glibcpp_cv_func_isinff_use = x"yes"; then
- for ac_func in isinff
+for ac_func in isinff
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14460: 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 <<EOF
-#line 14465 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14488: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isinff declaration""... $ac_c" 1>&6
-echo "configure:14515: checking for _isinff declaration" >&5
- if test x${glibcpp_cv_func__isinff_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isinff_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 14530 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isinff declaration" >&5
+echo $ECHO_N "checking for _isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isinff(0);
-; return 0; }
-EOF
-if { (eval echo configure:14541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isinff_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isinff_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isinff_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinff_use" >&6
- if test x$glibcpp_cv_func__isinff_use = x"yes"; then
- for ac_func in _isinff
+ if test x$glibcxx_cv_func__isinff_use = x"yes"; then
+
+for ac_func in _isinff
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14568: 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 <<EOF
-#line 14573 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14596: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for atan2f declaration""... $ac_c" 1>&6
-echo "configure:14626: checking for atan2f declaration" >&5
- if test x${glibcpp_cv_func_atan2f_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_atan2f_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for atan2f declaration" >&5
+echo $ECHO_N "checking for atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 14641 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
atan2f(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:14648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_atan2f_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_atan2f_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_atan2f_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2f_use" >&6
- if test x$glibcpp_cv_func_atan2f_use = x"yes"; then
- for ac_func in atan2f
+ if test x$glibcxx_cv_func_atan2f_use = x"yes"; then
+
+for ac_func in atan2f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14675: 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 <<EOF
-#line 14680 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14703: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _atan2f declaration""... $ac_c" 1>&6
-echo "configure:14730: checking for _atan2f declaration" >&5
- if test x${glibcpp_cv_func__atan2f_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__atan2f_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 14745 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _atan2f(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:14752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__atan2f_use=yes
+
+ echo "$as_me:$LINENO: checking for _atan2f declaration" >&5
+echo $ECHO_N "checking for _atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__atan2f_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__atan2f_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2f_use" >&6
- if test x$glibcpp_cv_func__atan2f_use = x"yes"; then
- for ac_func in _atan2f
+ if test x$glibcxx_cv_func__atan2f_use = x"yes"; then
+
+for ac_func in _atan2f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-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 <<EOF
-#line 14784 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for fabsf declaration""... $ac_c" 1>&6
-echo "configure:14837: checking for fabsf declaration" >&5
- if test x${glibcpp_cv_func_fabsf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_fabsf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for fabsf declaration" >&5
+echo $ECHO_N "checking for fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 14852 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
fabsf(0);
-; return 0; }
-EOF
-if { (eval echo configure:14863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_fabsf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_fabsf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_fabsf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsf_use" >&6
+
+ if test x$glibcxx_cv_func_fabsf_use = x"yes"; then
- if test x$glibcpp_cv_func_fabsf_use = x"yes"; then
- for ac_func in fabsf
+for ac_func in fabsf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14890: 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 <<EOF
-#line 14895 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:14918: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _fabsf declaration""... $ac_c" 1>&6
-echo "configure:14945: checking for _fabsf declaration" >&5
- if test x${glibcpp_cv_func__fabsf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__fabsf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 14960 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _fabsf declaration" >&5
+echo $ECHO_N "checking for _fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_fabsf(0);
-; return 0; }
-EOF
-if { (eval echo configure:14971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__fabsf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__fabsf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__fabsf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsf_use" >&6
+
+ if test x$glibcxx_cv_func__fabsf_use = x"yes"; then
- if test x$glibcpp_cv_func__fabsf_use = x"yes"; then
- for ac_func in _fabsf
+for ac_func in _fabsf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14998: 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 <<EOF
-#line 15003 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15026: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for fmodf declaration""... $ac_c" 1>&6
-echo "configure:15056: checking for fmodf declaration" >&5
- if test x${glibcpp_cv_func_fmodf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_fmodf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for fmodf declaration" >&5
+echo $ECHO_N "checking for fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 15071 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
fmodf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_fmodf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_fmodf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_fmodf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodf_use" >&6
+
+ if test x$glibcxx_cv_func_fmodf_use = x"yes"; then
- if test x$glibcpp_cv_func_fmodf_use = x"yes"; then
- for ac_func in fmodf
+for ac_func in fmodf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15105: 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 <<EOF
-#line 15110 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15133: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _fmodf declaration""... $ac_c" 1>&6
-echo "configure:15160: checking for _fmodf declaration" >&5
- if test x${glibcpp_cv_func__fmodf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__fmodf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 15175 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _fmodf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__fmodf_use=yes
+
+ echo "$as_me:$LINENO: checking for _fmodf declaration" >&5
+echo $ECHO_N "checking for _fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__fmodf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__fmodf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodf_use" >&6
+
+ if test x$glibcxx_cv_func__fmodf_use = x"yes"; then
- if test x$glibcpp_cv_func__fmodf_use = x"yes"; then
- for ac_func in _fmodf
+for ac_func in _fmodf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15209: 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 <<EOF
-#line 15214 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15237: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for frexpf declaration""... $ac_c" 1>&6
-echo "configure:15267: checking for frexpf declaration" >&5
- if test x${glibcpp_cv_func_frexpf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_frexpf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for frexpf declaration" >&5
+echo $ECHO_N "checking for frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 15282 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
frexpf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_frexpf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_frexpf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_frexpf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpf_use" >&6
+
+ if test x$glibcxx_cv_func_frexpf_use = x"yes"; then
- if test x$glibcpp_cv_func_frexpf_use = x"yes"; then
- for ac_func in frexpf
+for ac_func in frexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15316: 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 <<EOF
-#line 15321 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15344: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _frexpf declaration""... $ac_c" 1>&6
-echo "configure:15371: checking for _frexpf declaration" >&5
- if test x${glibcpp_cv_func__frexpf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__frexpf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 15386 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _frexpf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__frexpf_use=yes
+
+ echo "$as_me:$LINENO: checking for _frexpf declaration" >&5
+echo $ECHO_N "checking for _frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__frexpf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__frexpf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpf_use" >&6
- if test x$glibcpp_cv_func__frexpf_use = x"yes"; then
- for ac_func in _frexpf
+ if test x$glibcxx_cv_func__frexpf_use = x"yes"; then
+
+for ac_func in _frexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15420: 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 <<EOF
-#line 15425 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15448: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for hypotf declaration""... $ac_c" 1>&6
-echo "configure:15478: checking for hypotf declaration" >&5
- if test x${glibcpp_cv_func_hypotf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_hypotf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for hypotf declaration" >&5
+echo $ECHO_N "checking for hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 15493 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
hypotf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_hypotf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_hypotf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_hypotf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotf_use" >&6
- if test x$glibcpp_cv_func_hypotf_use = x"yes"; then
- for ac_func in hypotf
+ if test x$glibcxx_cv_func_hypotf_use = x"yes"; then
+
+for ac_func in hypotf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15527: 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 <<EOF
-#line 15532 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15555: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _hypotf declaration""... $ac_c" 1>&6
-echo "configure:15582: checking for _hypotf declaration" >&5
- if test x${glibcpp_cv_func__hypotf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__hypotf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 15597 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _hypotf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__hypotf_use=yes
+
+ echo "$as_me:$LINENO: checking for _hypotf declaration" >&5
+echo $ECHO_N "checking for _hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__hypotf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__hypotf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotf_use" >&6
+
+ if test x$glibcxx_cv_func__hypotf_use = x"yes"; then
- if test x$glibcpp_cv_func__hypotf_use = x"yes"; then
- for ac_func in _hypotf
+for ac_func in _hypotf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15631: 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 <<EOF
-#line 15636 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15659: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for ldexpf declaration""... $ac_c" 1>&6
-echo "configure:15689: checking for ldexpf declaration" >&5
- if test x${glibcpp_cv_func_ldexpf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_ldexpf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for ldexpf declaration" >&5
+echo $ECHO_N "checking for ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 15704 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
ldexpf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_ldexpf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_ldexpf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_ldexpf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpf_use" >&6
- if test x$glibcpp_cv_func_ldexpf_use = x"yes"; then
- for ac_func in ldexpf
+ if test x$glibcxx_cv_func_ldexpf_use = x"yes"; then
+
+for ac_func in ldexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15738: 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 <<EOF
-#line 15743 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15766: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _ldexpf declaration""... $ac_c" 1>&6
-echo "configure:15793: checking for _ldexpf declaration" >&5
- if test x${glibcpp_cv_func__ldexpf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__ldexpf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 15808 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _ldexpf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:15815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__ldexpf_use=yes
+
+ echo "$as_me:$LINENO: checking for _ldexpf declaration" >&5
+echo $ECHO_N "checking for _ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__ldexpf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__ldexpf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpf_use = x"yes"; then
- if test x$glibcpp_cv_func__ldexpf_use = x"yes"; then
- for ac_func in _ldexpf
+for ac_func in _ldexpf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15842: 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 <<EOF
-#line 15847 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15870: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for logf declaration""... $ac_c" 1>&6
-echo "configure:15900: checking for logf declaration" >&5
- if test x${glibcpp_cv_func_logf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_logf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for logf declaration" >&5
+echo $ECHO_N "checking for logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logf_use+set} != xset; then
+ if test "${glibcxx_cv_func_logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 15915 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
logf(0);
-; return 0; }
-EOF
-if { (eval echo configure:15926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_logf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_logf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_logf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logf_use" >&6
+
+ if test x$glibcxx_cv_func_logf_use = x"yes"; then
- if test x$glibcpp_cv_func_logf_use = x"yes"; then
- for ac_func in logf
+for ac_func in logf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15953: 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 <<EOF
-#line 15958 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:15981: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _logf declaration""... $ac_c" 1>&6
-echo "configure:16008: checking for _logf declaration" >&5
- if test x${glibcpp_cv_func__logf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__logf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 16023 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _logf declaration" >&5
+echo $ECHO_N "checking for _logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logf_use+set} != xset; then
+ if test "${glibcxx_cv_func__logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_logf(0);
-; return 0; }
-EOF
-if { (eval echo configure:16034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__logf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__logf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__logf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logf_use" >&6
+
+ if test x$glibcxx_cv_func__logf_use = x"yes"; then
- if test x$glibcpp_cv_func__logf_use = x"yes"; then
- for ac_func in _logf
+for ac_func in _logf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16061: 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 <<EOF
-#line 16066 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16089: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for log10f declaration""... $ac_c" 1>&6
-echo "configure:16119: checking for log10f declaration" >&5
- if test x${glibcpp_cv_func_log10f_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_log10f_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for log10f declaration" >&5
+echo $ECHO_N "checking for log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 16134 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
log10f(0);
-; return 0; }
-EOF
-if { (eval echo configure:16145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_log10f_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_log10f_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_log10f_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10f_use" >&6
- if test x$glibcpp_cv_func_log10f_use = x"yes"; then
- for ac_func in log10f
+ if test x$glibcxx_cv_func_log10f_use = x"yes"; then
+
+for ac_func in log10f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16172: 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 <<EOF
-#line 16177 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16200: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _log10f declaration""... $ac_c" 1>&6
-echo "configure:16227: checking for _log10f declaration" >&5
- if test x${glibcpp_cv_func__log10f_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__log10f_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 16242 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _log10f declaration" >&5
+echo $ECHO_N "checking for _log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_log10f(0);
-; return 0; }
-EOF
-if { (eval echo configure:16253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__log10f_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__log10f_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10f_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__log10f_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10f_use" >&6
+
+ if test x$glibcxx_cv_func__log10f_use = x"yes"; then
- if test x$glibcpp_cv_func__log10f_use = x"yes"; then
- for ac_func in _log10f
+for ac_func in _log10f
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16280: 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 <<EOF
-#line 16285 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16308: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for modff declaration""... $ac_c" 1>&6
-echo "configure:16338: checking for modff declaration" >&5
- if test x${glibcpp_cv_func_modff_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_modff_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for modff declaration" >&5
+echo $ECHO_N "checking for modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modff_use+set} != xset; then
+ if test "${glibcxx_cv_func_modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 16353 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
modff(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:16360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_modff_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_modff_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_modff_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modff_use" >&6
+
+ if test x$glibcxx_cv_func_modff_use = x"yes"; then
- if test x$glibcpp_cv_func_modff_use = x"yes"; then
- for ac_func in modff
+for ac_func in modff
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16387: 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 <<EOF
-#line 16392 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16415: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _modff declaration""... $ac_c" 1>&6
-echo "configure:16442: checking for _modff declaration" >&5
- if test x${glibcpp_cv_func__modff_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__modff_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 16457 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _modff(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:16464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__modff_use=yes
+
+ echo "$as_me:$LINENO: checking for _modff declaration" >&5
+echo $ECHO_N "checking for _modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modff_use+set} != xset; then
+ if test "${glibcxx_cv_func__modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__modff_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modff_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__modff_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modff_use" >&6
+
+ if test x$glibcxx_cv_func__modff_use = x"yes"; then
- if test x$glibcpp_cv_func__modff_use = x"yes"; then
- for ac_func in _modff
+for ac_func in _modff
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16491: 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 <<EOF
-#line 16496 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16519: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for powf declaration""... $ac_c" 1>&6
-echo "configure:16549: checking for powf declaration" >&5
- if test x${glibcpp_cv_func_powf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_powf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for powf declaration" >&5
+echo $ECHO_N "checking for powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powf_use+set} != xset; then
+ if test "${glibcxx_cv_func_powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 16564 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
powf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:16571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_powf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_powf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_powf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powf_use" >&6
+
+ if test x$glibcxx_cv_func_powf_use = x"yes"; then
- if test x$glibcpp_cv_func_powf_use = x"yes"; then
- for ac_func in powf
+for ac_func in powf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16598: 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 <<EOF
-#line 16603 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16626: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _powf declaration""... $ac_c" 1>&6
-echo "configure:16653: checking for _powf declaration" >&5
- if test x${glibcpp_cv_func__powf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__powf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 16668 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _powf(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:16675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__powf_use=yes
+
+ echo "$as_me:$LINENO: checking for _powf declaration" >&5
+echo $ECHO_N "checking for _powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powf_use+set} != xset; then
+ if test "${glibcxx_cv_func__powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__powf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__powf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powf_use" >&6
+
+ if test x$glibcxx_cv_func__powf_use = x"yes"; then
- if test x$glibcpp_cv_func__powf_use = x"yes"; then
- for ac_func in _powf
+for ac_func in _powf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16702: 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 <<EOF
-#line 16707 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16730: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for sqrtf declaration""... $ac_c" 1>&6
-echo "configure:16760: checking for sqrtf declaration" >&5
- if test x${glibcpp_cv_func_sqrtf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_sqrtf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for sqrtf declaration" >&5
+echo $ECHO_N "checking for sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 16775 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
sqrtf(0);
-; return 0; }
-EOF
-if { (eval echo configure:16786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_sqrtf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_sqrtf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_sqrtf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtf_use" >&6
- if test x$glibcpp_cv_func_sqrtf_use = x"yes"; then
- for ac_func in sqrtf
+ if test x$glibcxx_cv_func_sqrtf_use = x"yes"; then
+
+for ac_func in sqrtf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16813: 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 <<EOF
-#line 16818 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16841: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _sqrtf declaration""... $ac_c" 1>&6
-echo "configure:16868: checking for _sqrtf declaration" >&5
- if test x${glibcpp_cv_func__sqrtf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__sqrtf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 16883 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _sqrtf declaration" >&5
+echo $ECHO_N "checking for _sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_sqrtf(0);
-; return 0; }
-EOF
-if { (eval echo configure:16894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__sqrtf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__sqrtf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__sqrtf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtf_use" >&6
- if test x$glibcpp_cv_func__sqrtf_use = x"yes"; then
- for ac_func in _sqrtf
+ if test x$glibcxx_cv_func__sqrtf_use = x"yes"; then
+
+for ac_func in _sqrtf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16921: 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 <<EOF
-#line 16926 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:16949: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for sincosf declaration""... $ac_c" 1>&6
-echo "configure:16979: checking for sincosf declaration" >&5
- if test x${glibcpp_cv_func_sincosf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_sincosf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for sincosf declaration" >&5
+echo $ECHO_N "checking for sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 16994 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
sincosf(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:17001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_sincosf_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_sincosf_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_sincosf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosf_use" >&6
- if test x$glibcpp_cv_func_sincosf_use = x"yes"; then
- for ac_func in sincosf
+ if test x$glibcxx_cv_func_sincosf_use = x"yes"; then
+
+for ac_func in sincosf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17028: 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 <<EOF
-#line 17033 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17056: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _sincosf declaration""... $ac_c" 1>&6
-echo "configure:17083: checking for _sincosf declaration" >&5
- if test x${glibcpp_cv_func__sincosf_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__sincosf_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 17098 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _sincosf(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:17105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__sincosf_use=yes
+
+ echo "$as_me:$LINENO: checking for _sincosf declaration" >&5
+echo $ECHO_N "checking for _sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__sincosf_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__sincosf_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosf_use" >&6
+
+ if test x$glibcxx_cv_func__sincosf_use = x"yes"; then
- if test x$glibcpp_cv_func__sincosf_use = x"yes"; then
- for ac_func in _sincosf
+for ac_func in _sincosf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17132: 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 <<EOF
-#line 17137 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17160: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for finitef declaration""... $ac_c" 1>&6
-echo "configure:17190: checking for finitef declaration" >&5
- if test x${glibcpp_cv_func_finitef_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_finitef_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for finitef declaration" >&5
+echo $ECHO_N "checking for finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 17205 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
finitef(0);
-; return 0; }
-EOF
-if { (eval echo configure:17216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_finitef_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_finitef_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_finitef_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitef_use" >&6
+
+ if test x$glibcxx_cv_func_finitef_use = x"yes"; then
- if test x$glibcpp_cv_func_finitef_use = x"yes"; then
- for ac_func in finitef
+for ac_func in finitef
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17243: 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 <<EOF
-#line 17248 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17271: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _finitef declaration""... $ac_c" 1>&6
-echo "configure:17298: checking for _finitef declaration" >&5
- if test x${glibcpp_cv_func__finitef_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__finitef_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 17313 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _finitef declaration" >&5
+echo $ECHO_N "checking for _finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_finitef(0);
-; return 0; }
-EOF
-if { (eval echo configure:17324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__finitef_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__finitef_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitef_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__finitef_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitef_use" >&6
- if test x$glibcpp_cv_func__finitef_use = x"yes"; then
- for ac_func in _finitef
+ if test x$glibcxx_cv_func__finitef_use = x"yes"; then
+
+for ac_func in _finitef
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17351: 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 <<EOF
-#line 17356 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17379: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
- echo $ac_n "checking for long double trig functions""... $ac_c" 1>&6
-echo "configure:17409: checking for long double trig functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func_long_double_trig_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for long double trig functions" >&5
+echo $ECHO_N "checking for long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 17423 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
`for x in acosl asinl atanl \
cosl sinl tanl \
- coshl sinhl tanhl; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:17432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_long_double_trig_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_long_double_trig_use=no
-fi
-rm -f conftest*
+ coshl sinhl tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
- echo "$ac_t""$glibcpp_cv_func_long_double_trig_use" 1>&6
- if test x$glibcpp_cv_func_long_double_trig_use = x"yes"; then
- for ac_func in acosl asinl atanl \
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_trig_use" >&6
+ if test x$glibcxx_cv_func_long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosl asinl atanl \
cosl sinl tanl \
coshl sinhl tanhl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17458: 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 <<EOF
-#line 17463 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17486: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
-
- echo $ac_n "checking for long double round functions""... $ac_c" 1>&6
-echo "configure:17514: checking for long double round functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func_long_double_round_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ echo "$as_me:$LINENO: checking for long double round functions" >&5
+echo $ECHO_N "checking for long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 17528 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
- `for x in ceill floorl; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:17535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_long_double_round_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_long_double_round_use=no
-fi
-rm -f conftest*
+int
+main ()
+{
+ `for x in ceill floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
- echo "$ac_t""$glibcpp_cv_func_long_double_round_use" 1>&6
- if test x$glibcpp_cv_func_long_double_round_use = x"yes"; then
- for ac_func in ceill floorl
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_round_use" >&6
+ if test x$glibcxx_cv_func_long_double_round_use = x"yes"; then
+
+
+for ac_func in ceill floorl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17559: 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 <<EOF
-#line 17564 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17587: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
-
-
- echo $ac_n "checking for isnanl declaration""... $ac_c" 1>&6
-echo "configure:17616: checking for isnanl declaration" >&5
- if test x${glibcpp_cv_func_isnanl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isnanl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isnanl declaration" >&5
+echo $ECHO_N "checking for isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 17631 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isnanl(0);
-; return 0; }
-EOF
-if { (eval echo configure:17642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isnanl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isnanl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isnanl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanl_use" >&6
- if test x$glibcpp_cv_func_isnanl_use = x"yes"; then
- for ac_func in isnanl
+ if test x$glibcxx_cv_func_isnanl_use = x"yes"; then
+
+for ac_func in isnanl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17669: 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 <<EOF
-#line 17674 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17697: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isnanl declaration""... $ac_c" 1>&6
-echo "configure:17724: checking for _isnanl declaration" >&5
- if test x${glibcpp_cv_func__isnanl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isnanl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 17739 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isnanl declaration" >&5
+echo $ECHO_N "checking for _isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isnanl(0);
-; return 0; }
-EOF
-if { (eval echo configure:17750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isnanl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isnanl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isnanl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanl_use" >&6
+
+ if test x$glibcxx_cv_func__isnanl_use = x"yes"; then
- if test x$glibcpp_cv_func__isnanl_use = x"yes"; then
- for ac_func in _isnanl
+for ac_func in _isnanl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17777: 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 <<EOF
-#line 17782 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17805: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for isinfl declaration""... $ac_c" 1>&6
-echo "configure:17835: checking for isinfl declaration" >&5
- if test x${glibcpp_cv_func_isinfl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isinfl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for isinfl declaration" >&5
+echo $ECHO_N "checking for isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 17850 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
isinfl(0);
-; return 0; }
-EOF
-if { (eval echo configure:17861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isinfl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isinfl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_isinfl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinfl_use" >&6
+
+ if test x$glibcxx_cv_func_isinfl_use = x"yes"; then
- if test x$glibcpp_cv_func_isinfl_use = x"yes"; then
- for ac_func in isinfl
+for ac_func in isinfl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17888: 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 <<EOF
-#line 17893 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:17916: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _isinfl declaration""... $ac_c" 1>&6
-echo "configure:17943: checking for _isinfl declaration" >&5
- if test x${glibcpp_cv_func__isinfl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__isinfl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 17958 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _isinfl declaration" >&5
+echo $ECHO_N "checking for _isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_isinfl(0);
-; return 0; }
-EOF
-if { (eval echo configure:17969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__isinfl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__isinfl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__isinfl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinfl_use" >&6
+
+ if test x$glibcxx_cv_func__isinfl_use = x"yes"; then
- if test x$glibcpp_cv_func__isinfl_use = x"yes"; then
- for ac_func in _isinfl
+for ac_func in _isinfl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17996: 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 <<EOF
-#line 18001 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18024: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for copysignl declaration""... $ac_c" 1>&6
-echo "configure:18054: checking for copysignl declaration" >&5
- if test x${glibcpp_cv_func_copysignl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_copysignl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for copysignl declaration" >&5
+echo $ECHO_N "checking for copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 18069 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
copysignl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:18076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_copysignl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_copysignl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_copysignl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysignl_use" >&6
+
+ if test x$glibcxx_cv_func_copysignl_use = x"yes"; then
- if test x$glibcpp_cv_func_copysignl_use = x"yes"; then
- for ac_func in copysignl
+for ac_func in copysignl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18103: 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 <<EOF
-#line 18108 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18131: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _copysignl declaration""... $ac_c" 1>&6
-echo "configure:18158: checking for _copysignl declaration" >&5
- if test x${glibcpp_cv_func__copysignl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__copysignl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 18173 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _copysignl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:18180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__copysignl_use=yes
+
+ echo "$as_me:$LINENO: checking for _copysignl declaration" >&5
+echo $ECHO_N "checking for _copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__copysignl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysignl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__copysignl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysignl_use" >&6
- if test x$glibcpp_cv_func__copysignl_use = x"yes"; then
- for ac_func in _copysignl
+ if test x$glibcxx_cv_func__copysignl_use = x"yes"; then
+
+for ac_func in _copysignl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18207: 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 <<EOF
-#line 18212 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18235: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for atan2l declaration""... $ac_c" 1>&6
-echo "configure:18265: checking for atan2l declaration" >&5
- if test x${glibcpp_cv_func_atan2l_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_atan2l_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for atan2l declaration" >&5
+echo $ECHO_N "checking for atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 18280 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
atan2l(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:18287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_atan2l_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_atan2l_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_atan2l_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2l_use" >&6
- if test x$glibcpp_cv_func_atan2l_use = x"yes"; then
- for ac_func in atan2l
+ if test x$glibcxx_cv_func_atan2l_use = x"yes"; then
+
+for ac_func in atan2l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18314: 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 <<EOF
-#line 18319 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18342: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _atan2l declaration""... $ac_c" 1>&6
-echo "configure:18369: checking for _atan2l declaration" >&5
- if test x${glibcpp_cv_func__atan2l_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__atan2l_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 18384 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _atan2l(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:18391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__atan2l_use=yes
+
+ echo "$as_me:$LINENO: checking for _atan2l declaration" >&5
+echo $ECHO_N "checking for _atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__atan2l_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__atan2l_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2l_use" >&6
+
+ if test x$glibcxx_cv_func__atan2l_use = x"yes"; then
- if test x$glibcpp_cv_func__atan2l_use = x"yes"; then
- for ac_func in _atan2l
+for ac_func in _atan2l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18418: 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 <<EOF
-#line 18423 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18446: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for expl declaration""... $ac_c" 1>&6
-echo "configure:18476: checking for expl declaration" >&5
- if test x${glibcpp_cv_func_expl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_expl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for expl declaration" >&5
+echo $ECHO_N "checking for expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expl_use+set} != xset; then
+ if test "${glibcxx_cv_func_expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 18491 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
expl(0);
-; return 0; }
-EOF
-if { (eval echo configure:18502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_expl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_expl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_expl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expl_use" >&6
+
+ if test x$glibcxx_cv_func_expl_use = x"yes"; then
- if test x$glibcpp_cv_func_expl_use = x"yes"; then
- for ac_func in expl
+for ac_func in expl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18529: 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 <<EOF
-#line 18534 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18557: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _expl declaration""... $ac_c" 1>&6
-echo "configure:18584: checking for _expl declaration" >&5
- if test x${glibcpp_cv_func__expl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__expl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 18599 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _expl declaration" >&5
+echo $ECHO_N "checking for _expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expl_use+set} != xset; then
+ if test "${glibcxx_cv_func__expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_expl(0);
-; return 0; }
-EOF
-if { (eval echo configure:18610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__expl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__expl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__expl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expl_use" >&6
+
+ if test x$glibcxx_cv_func__expl_use = x"yes"; then
- if test x$glibcpp_cv_func__expl_use = x"yes"; then
- for ac_func in _expl
+for ac_func in _expl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18637: 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 <<EOF
-#line 18642 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18665: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for fabsl declaration""... $ac_c" 1>&6
-echo "configure:18695: checking for fabsl declaration" >&5
- if test x${glibcpp_cv_func_fabsl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_fabsl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for fabsl declaration" >&5
+echo $ECHO_N "checking for fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 18710 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
fabsl(0);
-; return 0; }
-EOF
-if { (eval echo configure:18721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_fabsl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_fabsl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_fabsl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsl_use" >&6
- if test x$glibcpp_cv_func_fabsl_use = x"yes"; then
- for ac_func in fabsl
+ if test x$glibcxx_cv_func_fabsl_use = x"yes"; then
+
+for ac_func in fabsl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18748: 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 <<EOF
-#line 18753 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18776: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _fabsl declaration""... $ac_c" 1>&6
-echo "configure:18803: checking for _fabsl declaration" >&5
- if test x${glibcpp_cv_func__fabsl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__fabsl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 18818 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _fabsl declaration" >&5
+echo $ECHO_N "checking for _fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_fabsl(0);
-; return 0; }
-EOF
-if { (eval echo configure:18829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__fabsl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__fabsl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__fabsl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsl_use" >&6
- if test x$glibcpp_cv_func__fabsl_use = x"yes"; then
- for ac_func in _fabsl
+ if test x$glibcxx_cv_func__fabsl_use = x"yes"; then
+
+for ac_func in _fabsl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18856: 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 <<EOF
-#line 18861 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18884: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for fmodl declaration""... $ac_c" 1>&6
-echo "configure:18914: checking for fmodl declaration" >&5
- if test x${glibcpp_cv_func_fmodl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_fmodl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for fmodl declaration" >&5
+echo $ECHO_N "checking for fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 18929 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
fmodl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:18936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_fmodl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_fmodl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_fmodl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodl_use" >&6
- if test x$glibcpp_cv_func_fmodl_use = x"yes"; then
- for ac_func in fmodl
+ if test x$glibcxx_cv_func_fmodl_use = x"yes"; then
+
+for ac_func in fmodl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18963: 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 <<EOF
-#line 18968 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:18991: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _fmodl declaration""... $ac_c" 1>&6
-echo "configure:19018: checking for _fmodl declaration" >&5
- if test x${glibcpp_cv_func__fmodl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__fmodl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 19033 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _fmodl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__fmodl_use=yes
+
+ echo "$as_me:$LINENO: checking for _fmodl declaration" >&5
+echo $ECHO_N "checking for _fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__fmodl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__fmodl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodl_use" >&6
+
+ if test x$glibcxx_cv_func__fmodl_use = x"yes"; then
- if test x$glibcpp_cv_func__fmodl_use = x"yes"; then
- for ac_func in _fmodl
+for ac_func in _fmodl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19067: 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 <<EOF
-#line 19072 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19095: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for frexpl declaration""... $ac_c" 1>&6
-echo "configure:19125: checking for frexpl declaration" >&5
- if test x${glibcpp_cv_func_frexpl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_frexpl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for frexpl declaration" >&5
+echo $ECHO_N "checking for frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 19140 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
frexpl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_frexpl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_frexpl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_frexpl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpl_use" >&6
+
+ if test x$glibcxx_cv_func_frexpl_use = x"yes"; then
- if test x$glibcpp_cv_func_frexpl_use = x"yes"; then
- for ac_func in frexpl
+for ac_func in frexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19174: 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 <<EOF
-#line 19179 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19202: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _frexpl declaration""... $ac_c" 1>&6
-echo "configure:19229: checking for _frexpl declaration" >&5
- if test x${glibcpp_cv_func__frexpl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__frexpl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 19244 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _frexpl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__frexpl_use=yes
+
+ echo "$as_me:$LINENO: checking for _frexpl declaration" >&5
+echo $ECHO_N "checking for _frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__frexpl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__frexpl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpl_use" >&6
+
+ if test x$glibcxx_cv_func__frexpl_use = x"yes"; then
- if test x$glibcpp_cv_func__frexpl_use = x"yes"; then
- for ac_func in _frexpl
+for ac_func in _frexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19278: 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 <<EOF
-#line 19283 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19306: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for hypotl declaration""... $ac_c" 1>&6
-echo "configure:19336: checking for hypotl declaration" >&5
- if test x${glibcpp_cv_func_hypotl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_hypotl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for hypotl declaration" >&5
+echo $ECHO_N "checking for hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 19351 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
hypotl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_hypotl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_hypotl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_hypotl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotl_use" >&6
+
+ if test x$glibcxx_cv_func_hypotl_use = x"yes"; then
- if test x$glibcpp_cv_func_hypotl_use = x"yes"; then
- for ac_func in hypotl
+for ac_func in hypotl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19385: 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 <<EOF
-#line 19390 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19413: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _hypotl declaration""... $ac_c" 1>&6
-echo "configure:19440: checking for _hypotl declaration" >&5
- if test x${glibcpp_cv_func__hypotl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__hypotl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 19455 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _hypotl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__hypotl_use=yes
+
+ echo "$as_me:$LINENO: checking for _hypotl declaration" >&5
+echo $ECHO_N "checking for _hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__hypotl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__hypotl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotl_use" >&6
- if test x$glibcpp_cv_func__hypotl_use = x"yes"; then
- for ac_func in _hypotl
+ if test x$glibcxx_cv_func__hypotl_use = x"yes"; then
+
+for ac_func in _hypotl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19489: 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 <<EOF
-#line 19494 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19517: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for ldexpl declaration""... $ac_c" 1>&6
-echo "configure:19547: checking for ldexpl declaration" >&5
- if test x${glibcpp_cv_func_ldexpl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_ldexpl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for ldexpl declaration" >&5
+echo $ECHO_N "checking for ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 19562 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
ldexpl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_ldexpl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_ldexpl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_ldexpl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpl_use = x"yes"; then
- if test x$glibcpp_cv_func_ldexpl_use = x"yes"; then
- for ac_func in ldexpl
+for ac_func in ldexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19596: 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 <<EOF
-#line 19601 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19624: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _ldexpl declaration""... $ac_c" 1>&6
-echo "configure:19651: checking for _ldexpl declaration" >&5
- if test x${glibcpp_cv_func__ldexpl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__ldexpl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 19666 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _ldexpl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:19673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__ldexpl_use=yes
+
+ echo "$as_me:$LINENO: checking for _ldexpl declaration" >&5
+echo $ECHO_N "checking for _ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__ldexpl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__ldexpl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpl_use" >&6
- if test x$glibcpp_cv_func__ldexpl_use = x"yes"; then
- for ac_func in _ldexpl
+ if test x$glibcxx_cv_func__ldexpl_use = x"yes"; then
+
+for ac_func in _ldexpl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19700: 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 <<EOF
-#line 19705 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19728: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for logl declaration""... $ac_c" 1>&6
-echo "configure:19758: checking for logl declaration" >&5
- if test x${glibcpp_cv_func_logl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_logl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for logl declaration" >&5
+echo $ECHO_N "checking for logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logl_use+set} != xset; then
+ if test "${glibcxx_cv_func_logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 19773 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
logl(0);
-; return 0; }
-EOF
-if { (eval echo configure:19784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_logl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_logl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_logl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logl_use" >&6
- if test x$glibcpp_cv_func_logl_use = x"yes"; then
- for ac_func in logl
+ if test x$glibcxx_cv_func_logl_use = x"yes"; then
+
+for ac_func in logl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19811: 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 <<EOF
-#line 19816 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19839: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _logl declaration""... $ac_c" 1>&6
-echo "configure:19866: checking for _logl declaration" >&5
- if test x${glibcpp_cv_func__logl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__logl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 19881 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _logl declaration" >&5
+echo $ECHO_N "checking for _logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logl_use+set} != xset; then
+ if test "${glibcxx_cv_func__logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_logl(0);
-; return 0; }
-EOF
-if { (eval echo configure:19892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__logl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__logl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__logl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logl_use" >&6
+
+ if test x$glibcxx_cv_func__logl_use = x"yes"; then
- if test x$glibcpp_cv_func__logl_use = x"yes"; then
- for ac_func in _logl
+for ac_func in _logl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:19919: 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 <<EOF
-#line 19924 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:19947: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for log10l declaration""... $ac_c" 1>&6
-echo "configure:19977: checking for log10l declaration" >&5
- if test x${glibcpp_cv_func_log10l_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_log10l_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for log10l declaration" >&5
+echo $ECHO_N "checking for log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 19992 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
log10l(0);
-; return 0; }
-EOF
-if { (eval echo configure:20003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_log10l_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_log10l_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_log10l_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10l_use" >&6
+
+ if test x$glibcxx_cv_func_log10l_use = x"yes"; then
- if test x$glibcpp_cv_func_log10l_use = x"yes"; then
- for ac_func in log10l
+for ac_func in log10l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20030: 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 <<EOF
-#line 20035 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20058: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _log10l declaration""... $ac_c" 1>&6
-echo "configure:20085: checking for _log10l declaration" >&5
- if test x${glibcpp_cv_func__log10l_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__log10l_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 20100 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _log10l declaration" >&5
+echo $ECHO_N "checking for _log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_log10l(0);
-; return 0; }
-EOF
-if { (eval echo configure:20111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__log10l_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__log10l_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10l_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__log10l_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10l_use" >&6
- if test x$glibcpp_cv_func__log10l_use = x"yes"; then
- for ac_func in _log10l
+ if test x$glibcxx_cv_func__log10l_use = x"yes"; then
+
+for ac_func in _log10l
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20138: 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 <<EOF
-#line 20143 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20166: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for modfl declaration""... $ac_c" 1>&6
-echo "configure:20196: checking for modfl declaration" >&5
- if test x${glibcpp_cv_func_modfl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_modfl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for modfl declaration" >&5
+echo $ECHO_N "checking for modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 20211 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
modfl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_modfl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_modfl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_modfl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modfl_use" >&6
- if test x$glibcpp_cv_func_modfl_use = x"yes"; then
- for ac_func in modfl
+ if test x$glibcxx_cv_func_modfl_use = x"yes"; then
+
+for ac_func in modfl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20245: 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 <<EOF
-#line 20250 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20273: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _modfl declaration""... $ac_c" 1>&6
-echo "configure:20300: checking for _modfl declaration" >&5
- if test x${glibcpp_cv_func__modfl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__modfl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 20315 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _modfl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__modfl_use=yes
+
+ echo "$as_me:$LINENO: checking for _modfl declaration" >&5
+echo $ECHO_N "checking for _modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__modfl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modfl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__modfl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modfl_use" >&6
+
+ if test x$glibcxx_cv_func__modfl_use = x"yes"; then
- if test x$glibcpp_cv_func__modfl_use = x"yes"; then
- for ac_func in _modfl
+for ac_func in _modfl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20349: 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 <<EOF
-#line 20354 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20377: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for powl declaration""... $ac_c" 1>&6
-echo "configure:20407: checking for powl declaration" >&5
- if test x${glibcpp_cv_func_powl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_powl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for powl declaration" >&5
+echo $ECHO_N "checking for powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powl_use+set} != xset; then
+ if test "${glibcxx_cv_func_powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 20422 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
powl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_powl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_powl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_powl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powl_use" >&6
+
+ if test x$glibcxx_cv_func_powl_use = x"yes"; then
- if test x$glibcpp_cv_func_powl_use = x"yes"; then
- for ac_func in powl
+for ac_func in powl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20456: 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 <<EOF
-#line 20461 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20484: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _powl declaration""... $ac_c" 1>&6
-echo "configure:20511: checking for _powl declaration" >&5
- if test x${glibcpp_cv_func__powl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__powl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 20526 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _powl(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__powl_use=yes
+
+ echo "$as_me:$LINENO: checking for _powl declaration" >&5
+echo $ECHO_N "checking for _powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powl_use+set} != xset; then
+ if test "${glibcxx_cv_func__powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__powl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__powl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powl_use" >&6
+
+ if test x$glibcxx_cv_func__powl_use = x"yes"; then
- if test x$glibcpp_cv_func__powl_use = x"yes"; then
- for ac_func in _powl
+for ac_func in _powl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20560: 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 <<EOF
-#line 20565 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20588: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for sqrtl declaration""... $ac_c" 1>&6
-echo "configure:20618: checking for sqrtl declaration" >&5
- if test x${glibcpp_cv_func_sqrtl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_sqrtl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for sqrtl declaration" >&5
+echo $ECHO_N "checking for sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 20633 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
sqrtl(0);
-; return 0; }
-EOF
-if { (eval echo configure:20644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_sqrtl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_sqrtl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_sqrtl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func_sqrtl_use = x"yes"; then
- if test x$glibcpp_cv_func_sqrtl_use = x"yes"; then
- for ac_func in sqrtl
+for ac_func in sqrtl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20671: 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 <<EOF
-#line 20676 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20699: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _sqrtl declaration""... $ac_c" 1>&6
-echo "configure:20726: checking for _sqrtl declaration" >&5
- if test x${glibcpp_cv_func__sqrtl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__sqrtl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 20741 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _sqrtl declaration" >&5
+echo $ECHO_N "checking for _sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_sqrtl(0);
-; return 0; }
-EOF
-if { (eval echo configure:20752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__sqrtl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__sqrtl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__sqrtl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtl_use = x"yes"; then
- if test x$glibcpp_cv_func__sqrtl_use = x"yes"; then
- for ac_func in _sqrtl
+for ac_func in _sqrtl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20779: 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 <<EOF
-#line 20784 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20807: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for sincosl declaration""... $ac_c" 1>&6
-echo "configure:20837: checking for sincosl declaration" >&5
- if test x${glibcpp_cv_func_sincosl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_sincosl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for sincosl declaration" >&5
+echo $ECHO_N "checking for sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 20852 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
sincosl(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_sincosl_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_sincosl_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_sincosl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosl_use" >&6
+
+ if test x$glibcxx_cv_func_sincosl_use = x"yes"; then
- if test x$glibcpp_cv_func_sincosl_use = x"yes"; then
- for ac_func in sincosl
+for ac_func in sincosl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20886: 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 <<EOF
-#line 20891 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:20914: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _sincosl declaration""... $ac_c" 1>&6
-echo "configure:20941: checking for _sincosl declaration" >&5
- if test x${glibcpp_cv_func__sincosl_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__sincosl_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 20956 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- _sincosl(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:20963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__sincosl_use=yes
+
+ echo "$as_me:$LINENO: checking for _sincosl declaration" >&5
+echo $ECHO_N "checking for _sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__sincosl_use=no
-fi
-rm -f conftest*
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__sincosl_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosl_use" >&6
- if test x$glibcpp_cv_func__sincosl_use = x"yes"; then
- for ac_func in _sincosl
+ if test x$glibcxx_cv_func__sincosl_use = x"yes"; then
+
+for ac_func in _sincosl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:20990: 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 <<EOF
-#line 20995 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21018: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for finitel declaration""... $ac_c" 1>&6
-echo "configure:21048: checking for finitel declaration" >&5
- if test x${glibcpp_cv_func_finitel_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_finitel_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for finitel declaration" >&5
+echo $ECHO_N "checking for finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 21063 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
finitel(0);
-; return 0; }
-EOF
-if { (eval echo configure:21074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_finitel_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_finitel_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_finitel_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitel_use" >&6
+
+ if test x$glibcxx_cv_func_finitel_use = x"yes"; then
- if test x$glibcpp_cv_func_finitel_use = x"yes"; then
- for ac_func in finitel
+for ac_func in finitel
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21101: 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 <<EOF
-#line 21106 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21129: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
else
-
- echo $ac_n "checking for _finitel declaration""... $ac_c" 1>&6
-echo "configure:21156: checking for _finitel declaration" >&5
- if test x${glibcpp_cv_func__finitel_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func__finitel_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 21171 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for _finitel declaration" >&5
+echo $ECHO_N "checking for _finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-
-int main() {
+
+int
+main ()
+{
_finitel(0);
-; return 0; }
-EOF
-if { (eval echo configure:21182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__finitel_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__finitel_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitel_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func__finitel_use" 1>&6
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitel_use" >&6
+
+ if test x$glibcxx_cv_func__finitel_use = x"yes"; then
- if test x$glibcpp_cv_func__finitel_use = x"yes"; then
- for ac_func in _finitel
+for ac_func in _finitel
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21209: 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 <<EOF
-#line 21214 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21237: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
+
fi
fi
-
-
- echo $ac_n "checking for _float trig functions""... $ac_c" 1>&6
-echo "configure:21268: checking for _float trig functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func__float_trig_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+ echo "$as_me:$LINENO: checking for _float trig functions" >&5
+echo $ECHO_N "checking for _float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- cat > conftest.$ac_ext <<EOF
-#line 21282 "configure"
-#include "confdefs.h"
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
+int
+main ()
+{
`for x in _acosf _asinf _atanf \
_cosf _sinf _tanf \
- _coshf _sinhf _tanhf; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:21291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__float_trig_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__float_trig_use=no
-fi
-rm -f conftest*
+ _coshf _sinhf _tanhf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
- echo "$ac_t""$glibcpp_cv_func__float_trig_use" 1>&6
- if test x$glibcpp_cv_func__float_trig_use = x"yes"; then
- for ac_func in _acosf _asinf _atanf \
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_trig_use" >&6
+ if test x$glibcxx_cv_func__float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosf _asinf _atanf \
_cosf _sinf _tanf \
_coshf _sinhf _tanhf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21317: 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 <<EOF
-#line 21322 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
-int main() {
+ echo "$as_me:$LINENO: checking for _float round functions" >&5
+echo $ECHO_N "checking for _float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceilf _floorf; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_round_use" >&6
+ if test x$glibcxx_cv_func__float_round_use = x"yes"; then
+
+
+for ac_func in _ceilf _floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21345: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for _long double trig functions" >&5
+echo $ECHO_N "checking for _long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_trig_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
-rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_trig_use" >&6
+ if test x$glibcxx_cv_func__long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+ fi
+
+
+ echo "$as_me:$LINENO: checking for _long double round functions" >&5
+echo $ECHO_N "checking for _long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ `for x in _ceill _floorl; do echo "$x (0);"; done`
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_round_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_round_use" >&6
+ if test x$glibcxx_cv_func__long_double_round_use = x"yes"; then
+
+
+for ac_func in _ceill _floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
done
fi
-
- echo $ac_n "checking for _float round functions""... $ac_c" 1>&6
-echo "configure:21373: checking for _float round functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func__float_round_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_abs declaration" >&5
+echo $ECHO_N "checking for __builtin_abs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+
+
+
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
- cat > conftest.$ac_ext <<EOF
-#line 21387 "configure"
-#include "confdefs.h"
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_use" >&6
+ if test x$glibcxx_cv_func___builtin_abs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_abs linkage" >&5
+echo $ECHO_N "checking for __builtin_abs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-int main() {
- `for x in _ceilf _floorf; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:21394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__float_round_use=yes
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_link=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__float_round_use=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_link=no
fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6
+ if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsf declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
- echo "$ac_t""$glibcpp_cv_func__float_round_use" 1>&6
- if test x$glibcpp_cv_func__float_round_use = x"yes"; then
- for ac_func in _ceilf _floorf
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21418: 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
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsf linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabs declaration" >&5
+echo $ECHO_N "checking for __builtin_fabs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabs linkage" >&5
+echo $ECHO_N "checking for __builtin_fabs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsl declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsl linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_labs declaration" >&5
+echo $ECHO_N "checking for __builtin_labs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_use" >&6
+ if test x$glibcxx_cv_func___builtin_labs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_labs linkage" >&5
+echo $ECHO_N "checking for __builtin_labs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6
+ if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrt declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrt declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrt linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrt linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_link=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 21423 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinf declaration" >&5
+echo $ECHO_N "checking for __builtin_sinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinf linkage" >&5
+echo $ECHO_N "checking for __builtin_sinf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sin declaration" >&5
+echo $ECHO_N "checking for __builtin_sin declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_use" >&6
+ if test x$glibcxx_cv_func___builtin_sin_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sin linkage" >&5
+echo $ECHO_N "checking for __builtin_sin linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6
+ if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinl declaration" >&5
+echo $ECHO_N "checking for __builtin_sinl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinl linkage" >&5
+echo $ECHO_N "checking for __builtin_sinl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cosf declaration" >&5
+echo $ECHO_N "checking for __builtin_cosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosf linkage" >&5
+echo $ECHO_N "checking for __builtin_cosf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cos declaration" >&5
+echo $ECHO_N "checking for __builtin_cos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_use" >&6
+ if test x$glibcxx_cv_func___builtin_cos_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cos linkage" >&5
+echo $ECHO_N "checking for __builtin_cos linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6
+ if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cosl declaration" >&5
+echo $ECHO_N "checking for __builtin_cosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosl linkage" >&5
+echo $ECHO_N "checking for __builtin_cosl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_link=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then
+ ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+cat >>confdefs.h <<_ACEOF
+#define ${ac_tr_func} 1
+_ACEOF
+
+ fi
+ fi
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
-int main() {
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21446: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_wchar_h=no
fi
+
done
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
+fi
+
+done
-
- echo $ac_n "checking for _long double trig functions""... $ac_c" 1>&6
-echo "configure:21475: checking for _long double trig functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func__long_double_trig_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- cat > conftest.$ac_ext <<EOF
-#line 21489 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- `for x in _acosl _asinl _atanl \
- _cosl _sinl _tanl \
- _coshl _sinhl _tanhl; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:21498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__long_double_trig_use=yes
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__long_double_trig_use=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
fi
+done
- echo "$ac_t""$glibcpp_cv_func__long_double_trig_use" 1>&6
- if test x$glibcpp_cv_func__long_double_trig_use = x"yes"; then
- for ac_func in _acosl _asinl _atanl \
- _cosl _sinl _tanl \
- _coshl _sinhl _tanhl
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21524: 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 <<EOF
-#line 21529 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
-int main() {
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21552: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-rm -f conftest*
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_iconv_h=no
fi
-done
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
-
- echo $ac_n "checking for _long double round functions""... $ac_c" 1>&6
-echo "configure:21580: checking for _long double round functions" >&5
- if eval "test \"`echo '$''{'glibcpp_cv_func__long_double_round_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ ac_has_langinfo_h=no
+fi
- cat > conftest.$ac_ext <<EOF
-#line 21594 "configure"
-#include "confdefs.h"
-#include <math.h>
-int main() {
- `for x in _ceill _floorl; do echo "$x (0);"; done`
-; return 0; }
-EOF
-if { (eval echo configure:21601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func__long_double_round_use=yes
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func__long_double_round_use=no
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
+fi
+done
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+
+ echo "$as_me:$LINENO: checking for strtold declaration" >&5
+echo $ECHO_N "checking for strtold declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtold_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtold_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtold(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtold_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtold_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
fi
- echo "$ac_t""$glibcpp_cv_func__long_double_round_use" 1>&6
- if test x$glibcpp_cv_func__long_double_round_use = x"yes"; then
- for ac_func in _ceill _floorl
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtold_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtold_use" >&6
+ if test x$glibcxx_cv_func_strtold_use = x"yes"; then
+
+for ac_func in strtold
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21625: 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 <<EOF
-#line 21630 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
-int main() {
+ echo "$as_me:$LINENO: checking for strtof declaration" >&5
+echo $ECHO_N "checking for strtof declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtof_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtof_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtof(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtof_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtof_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtof_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtof_use" >&6
+ if test x$glibcxx_cv_func_strtof_use = x"yes"; then
+
+for ac_func in strtof
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21653: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+ if test "${glibcxx_cv_S_ISREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_ISREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_ISREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "${glibcxx_cv_S_IFREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_IFREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_IFREG=no
fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+
+ if test $glibcxx_cv_S_ISREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ fi
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WRITEV 1
+_ACEOF
+
+ ;;
+
+ *-freebsd*)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
+ sys/time.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_t""no" 1>&6
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
done
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
fi
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-
- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:21685: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 21693 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:21700: \"$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"
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
LIBS="-lm $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
- for ac_func in nan copysignf
+
+for ac_func in copysignf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21730: 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 <<EOF
-#line 21735 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
-int main() {
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21758: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+ ac_has_wchar_h=no
fi
+
done
- for ac_func in __signbit
+for ac_header in wctype.h
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21787: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
+fi
+
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 21792 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
-int main() {
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21815: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+ ac_cv_header_langinfo_h=$ac_header_preproc
fi
-done
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
- for ac_func in __signbitf
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21843: 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
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 21848 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
-int main() {
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21871: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
+fi
+done
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETENV 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANL 1
+_ACEOF
+
+ fi
+ ;;
+ *-hpux*)
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
fi
+
done
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
- if test x$ac_cv_func_copysignl = x"yes"; then
- for ac_func in __signbitl
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21901: 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
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 21906 "configure"
-#include "confdefs.h"
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
-int main() {
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:21929: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
fi
-rm -f conftest*
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
fi
+done
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
fi
done
fi
+ # Used in libmath/Makefile.am.
if test -n "$LIBMATHOBJS"; then
need_libmath=yes
fi
-
-
-if test "$need_libmath" = yes; then
- GLIBCPP_BUILD_LIBMATH_TRUE=
- GLIBCPP_BUILD_LIBMATH_FALSE='#'
-else
- GLIBCPP_BUILD_LIBMATH_TRUE='#'
- GLIBCPP_BUILD_LIBMATH_FALSE=
-fi
-
- enable_wchar_t=no
- echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:21974: checking for mbstate_t" >&5
- cat > conftest.$ac_ext <<EOF
-#line 21976 "configure"
-#include "confdefs.h"
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
mbstate_t teststate;
-; return 0; }
-EOF
-if { (eval echo configure:21983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- have_mbstate_t=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
- echo "$ac_t""$have_mbstate_t" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
if test x"$have_mbstate_t" = xyes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MBSTATE_T 1
-EOF
+_ACEOF
fi
- for ac_hdr in wchar.h
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:22005: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 22010 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22015: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_wchar_h=no
+ ac_has_wchar_h=no
fi
+
done
- for ac_hdr in wctype.h
+
+for ac_header in wctype.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:22046: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 22051 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22056: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
ac_has_wctype_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_wctype_h=no
+ ac_has_wctype_h=no
fi
+
done
-
- if test x"$ac_has_wchar_h" = xyes &&
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
test x"$ac_has_wctype_h" = xyes &&
test x"$enable_c_mbchar" != xno; then
-
- echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:22089: checking for WCHAR_MIN and WCHAR_MAX" >&5
- cat > conftest.$ac_ext <<EOF
-#line 22091 "configure"
-#include "confdefs.h"
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
-int main() {
+int
+main ()
+{
int i = WCHAR_MIN; int j = WCHAR_MAX;
-; return 0; }
-EOF
-if { (eval echo configure:22098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
has_wchar_minmax=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_wchar_minmax=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
fi
-rm -f conftest*
- echo "$ac_t""$has_wchar_minmax" 1>&6
-
- echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:22111: checking for WEOF" >&5
- cat > conftest.$ac_ext <<EOF
-#line 22113 "configure"
-#include "confdefs.h"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
#include <stddef.h>
-int main() {
+int
+main ()
+{
wint_t i = WEOF;
-; return 0; }
-EOF
-if { (eval echo configure:22122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
has_weof=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- has_weof=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
fi
-rm -f conftest*
- echo "$ac_t""$has_weof" 1>&6
-
- ac_wfuncs=yes
- for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22138: 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 <<EOF
-#line 22143 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-int main() {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22166: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
+else
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
done
-
- for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ case "$target" in
+ *-hpux10*)
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+ ;;
+ esac
+ ;;
+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22201: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 22206 "configure"
-#include "confdefs.h"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
-int main() {
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22229: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
+else
+ ac_has_wchar_h=no
+fi
+
+done
+
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
else
- echo "$ac_t""no" 1>&6
-\
- ac_wfuncs=no
+ ac_has_wctype_h=no
+fi
+
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
fi
done
- echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:22257: checking for ISO C99 wchar_t support" >&5
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
if test x"$has_weof" = xyes &&
test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes; then
+ test x"$ac_wfuncs" = xyes;
+ then
ac_isoC99_wchar_t=yes
else
ac_isoC99_wchar_t=no
fi
- echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
-
- ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:22269: 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
-#line 22274 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <iconv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22279: \"$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"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_iconv_h = yes; then
ac_has_iconv_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_iconv_h=no
+ ac_has_iconv_h=no
fi
- ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:22303: checking for langinfo.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 22308 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <langinfo.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22313: \"$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"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_langinfo_h = yes; then
ac_has_langinfo_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_has_langinfo_h=no
+ ac_has_langinfo_h=no
fi
- echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:22337: checking for iconv in -liconv" >&5
-ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 22345 "configure"
-#include "confdefs.h"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char iconv();
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
-int main() {
-iconv()
-; return 0; }
-EOF
-if { (eval echo configure:22356: \"$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"
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
+fi
+done
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+
+ # For LFS.
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT64_T 1
+_ACEOF
+
+ case "$target" in
+ *-uclinux*)
+ # Don't enable LFS with uClibc
+ ;;
+ *)
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_LFS 1
+_ACEOF
+
+ esac
+
+ # For showmanyc_helper().
+
+
+for ac_header in sys/ioctl.h sys/filio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- libiconv="-liconv"
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test "${glibcxx_cv_POLL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <poll.h>
+int
+main ()
+{
+struct pollfd pfd[1];
+ pfd[0].events = POLLIN;
+ poll(pfd, 1, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_POLL=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+glibcxx_cv_POLL=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_POLL = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+ fi
+
+
+ if test "${glibcxx_cv_S_ISREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_ISREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_ISREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "${glibcxx_cv_S_IFREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_IFREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_IFREG=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_S_ISREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ elif test $glibcxx_cv_S_IFREG = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ fi
+
+
+ # For xsputn_2().
+
+for ac_header in sys/uio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test "${glibcxx_cv_WRITEV+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/uio.h>
+int
+main ()
+{
+struct iovec iov[2];
+ writev(0, iov, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_WRITEV=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_WRITEV=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test $glibcxx_cv_WRITEV = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WRITEV 1
+_ACEOF
+
+ fi
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINL 1
+_ACEOF
- for ac_func in iconv_open iconv_close iconv nl_langinfo
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHL 1
+_ACEOF
+
+ fi
+ ;;
+ *-mingw32*)
+
+
+
+for ac_header in sys/types.h locale.h float.h
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22382: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 22387 "configure"
-#include "confdefs.h"
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
-int main() {
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22410: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- \
- ac_XPG2funcs=yes
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
+else
+ ac_has_wchar_h=no
+fi
+
+done
+
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
+fi
+
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
+fi
+
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
else
- echo "$ac_t""no" 1>&6
-ac_XPG2funcs=no
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
done
-
+
LIBS="$ac_save_LIBS"
- echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:22440: checking for XPG2 wchar_t support" >&5
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes; then
+ test x"$ac_XPG2funcs" = xyes;
+ then
ac_XPG2_wchar_t=yes
else
ac_XPG2_wchar_t=no
fi
- echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
-
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes; then
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_USE_WCHAR_T 1
-EOF
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+ ;;
+ *-netbsd*)
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
- enable_wchar_t=yes
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
fi
fi
- echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:22460: checking for enabled wchar_t specializations" >&5
- echo "$ac_t""$enable_wchar_t" 1>&6
-
-if test "$enable_wchar_t" = yes; then
- GLIBCPP_TEST_WCHAR_T_TRUE=
- GLIBCPP_TEST_WCHAR_T_FALSE='#'
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
else
- GLIBCPP_TEST_WCHAR_T_TRUE='#'
- GLIBCPP_TEST_WCHAR_T_FALSE=
-fi
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
-
- echo $ac_n "checking for strtold declaration""... $ac_c" 1>&6
-echo "configure:22479: checking for strtold declaration" >&5
- if test x${glibcpp_cv_func_strtold_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_strtold_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 22494 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
- strtold(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:22501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_strtold_use=yes
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_strtold_use=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
fi
- echo "$ac_t""$glibcpp_cv_func_strtold_use" 1>&6
- if test x$glibcpp_cv_func_strtold_use = x"yes"; then
- for ac_func in strtold
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22527: 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
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 22532 "configure"
-#include "confdefs.h"
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
-int main() {
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22555: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_wchar_h=no
fi
+
done
-
+
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
- echo $ac_n "checking for strtof declaration""... $ac_c" 1>&6
-echo "configure:22583: checking for strtof declaration" >&5
- if test x${glibcpp_cv_func_strtof_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_strtof_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
+ ac_has_wctype_h=no
+fi
- cat > conftest.$ac_ext <<EOF
-#line 22598 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
- strtof(0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:22605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_strtof_use=yes
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_strtof_use=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-
+has_weof=no
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
- fi
- echo "$ac_t""$glibcpp_cv_func_strtof_use" 1>&6
- if test x$glibcpp_cv_func_strtof_use = x"yes"; then
- for ac_func in strtof
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22631: 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 <<EOF
-#line 22636 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-int main() {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22659: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
+else
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
done
-
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
- for ac_func in drand48
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22688: 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
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANL 1
+_ACEOF
+
+ fi
+ ;;
+ *-qnx6.1* | *-qnx6.2*)
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 22693 "configure"
-#include "confdefs.h"
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
-int main() {
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22716: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_wchar_h=no
fi
+
done
- CXXFLAGS="$ac_save_CXXFLAGS"
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
-
-
- echo $ac_n "checking for isatty declaration""... $ac_c" 1>&6
-echo "configure:22750: checking for isatty declaration" >&5
- if test x${glibcpp_cv_func_isatty_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_isatty_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 22765 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-int main() {
- isatty(0);
-; return 0; }
-EOF
-if { (eval echo configure:22772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_isatty_use=yes
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_isatty_use=no
+ ac_has_wctype_h=no
fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
- fi
- echo "$ac_t""$glibcpp_cv_func_isatty_use" 1>&6
- if test x$glibcpp_cv_func_isatty_use = x"yes"; then
- for ac_func in isatty
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22798: 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
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 22803 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-int main() {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:22826: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
+else
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
done
-
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
-
- CXXFLAGS="$ac_save_CXXFLAGS"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSL 1
+_ACEOF
- # For showmanyc_helper().
- for ac_hdr in sys/ioctl.h sys/filio.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:22861: 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 22866 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22871: \"$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"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
+
+ ;;
+ *-solaris*)
+ case "$target" in
+ # *-solaris2.5)
+ # os_include_dir="os/solaris/solaris2.5"
+ # ;;
+ # *-solaris2.6)
+ # os_include_dir="os/solaris/solaris2.6"
+ # ;;
+ *-solaris2.7 | *-solaris2.8 | *-solaris2.9 | *-solaris2.10)
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_BTOWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FGETWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FGETWS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPCLASS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPUTWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPUTWS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FWIDE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FWPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FWSCANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETWCHAR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRLEN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRTOWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSINIT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSRTOWCS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PUTWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PUTWCHAR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SWPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SWSCANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNGETWC 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFWPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_VSWPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_VWPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCRTOMB 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCAT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCHR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCOLL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCPY 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCSPN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSFTIME 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSLEN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSNCAT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSNCMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSNCPY 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSPBRK 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSRCHR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSRTOMBS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSSPN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSSTR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSTOD 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSTOK 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSTOL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSTOUL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSXFRM 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCTOB 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WMEMCHR 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WMEMCMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WMEMCPY 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WMEMMOVE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WMEMSET 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WPRINTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WSCANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV_CLOSE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV_OPEN 1
+_ACEOF
+
+ # Look for the pieces required for wchar_t support in order to
+ # get all the right HAVE_* macros defined.
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=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"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
+
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
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
-
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_wchar_h=no
fi
+
done
-
- if eval "test \"`echo '$''{'glibcpp_cv_POLL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
-
- cat > conftest.$ac_ext <<EOF
-#line 22903 "configure"
-#include "confdefs.h"
-#include <poll.h>
-int main() {
-struct pollfd pfd[1]; pfd[0].events = POLLIN; poll(pfd, 1, 0);
-; return 0; }
-EOF
-if { (eval echo configure:22910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_POLL=yes
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_POLL=no
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
-
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
fi
- if test x$glibcpp_cv_POLL = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_POLL 1
-EOF
+done
- fi
-
- if eval "test \"`echo '$''{'glibcpp_cv_S_ISREG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
else
-
- cat > conftest.$ac_ext <<EOF
-#line 22936 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat buffer; fstat(0, &buffer); S_ISREG(buffer.st_mode);
-; return 0; }
-EOF
-if { (eval echo configure:22943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_S_ISREG=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_S_ISREG=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
+
- if eval "test \"`echo '$''{'glibcpp_cv_S_IFREG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
-
- cat > conftest.$ac_ext <<EOF
-#line 22961 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat buffer; fstat(0, &buffer); S_IFREG & buffer.st_mode;
-; return 0; }
-EOF
-if { (eval echo configure:22968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_cv_S_IFREG=yes
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_S_IFREG=no
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
-
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
- if test x$glibcpp_cv_S_ISREG = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_S_ISREG 1
-EOF
- elif test x$glibcpp_cv_S_IFREG = xyes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_S_IFREG 1
-EOF
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
+else
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
+fi
+done
+
+
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+ # All of the dependencies for wide character support are here, so
+ # turn it on. This requires some syncronization with the
+ # GLIBCXX_CHECK_WCHAR_T_SUPPORT in acinclude.m4
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ # Are these tested for even when cross?
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOAT_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_IEEEFP_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOCALE_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NAN_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_FILIO_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_IOCTL_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_ISA_DEFS_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_RESOURCE_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_TIME_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_TYPES_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCHAR_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCTYPE_H 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ ;;
+ esac
+ case "$target" in
+ sparc*-*-solaris2.8 | sparc*-*-solaris2.9 | sparc*-*-solaris2.10)
+ # I saw these on sparc-sun-solaris2.8, but not 2.6, and not on i386
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_ABS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_LABS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_COS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SIN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SINF 1
+_ACEOF
+
+ ;;
+ esac
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRTOF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRTOLD 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ ;;
+ *-tpf)
+
-
- ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for locale.h""... $ac_c" 1>&6
-echo "configure:22997: checking for locale.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+
+for ac_header in nan.h endian.h machine/endian.h \
+ sys/param.h sys/types.h locale.h float.h inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 23002 "configure"
-#include "confdefs.h"
-#include <locale.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:23007: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:23025: 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 23030 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:23037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_val_LC_MESSAGES=yes
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for linking
+ # are now in libsupc++ (not built yet). In addition, this test has
+ # cored on solaris in the past. In addition, --gc-sections doesn't
+ # really work at the moment (keeps on discarding used sections, first
+ # .eh_frame and now some of the glibc sections for iconv).
+ # Bzzzzt. Thanks for playing, maybe next time.
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_val_LC_MESSAGES=no
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_sectionLDflags=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_sectionLDflags=no
fi
-rm -f conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_sectionLDflags" >&5
+echo "${ECHO_T}$ac_sectionLDflags" >&6
+ fi
-echo "$ac_t""$ac_cv_val_LC_MESSAGES" 1>&6
- if test $ac_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
- fi
-
+
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
- cat > conftest.$ac_ext <<EOF
-#line 23064 "configure"
-#include "confdefs.h"
+ LIBS="-lm $LIBS"
- #include <setjmp.h>
-
-int main() {
-sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
-; return 0; }
-EOF
-if { (eval echo configure:23073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_SIGSETJMP 1
-EOF
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
-
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ # Test wchar.h for mbstate_t, which is needed for char_traits and
+ # others even if wchar_t support is not on.
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+mbstate_t teststate;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ have_mbstate_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_mbstate_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ fi
- for ac_hdr in unistd.h
+ # Sanity check for existence of ISO C99 headers for extended encoding.
+
+for ac_header in wchar.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:23090: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 23095 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:23100: \"$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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
-
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wchar_h=yes
else
- echo "$ac_t""no" 1>&6
+ ac_has_wchar_h=no
fi
+
done
-for ac_func in getpagesize
+
+for ac_header in wctype.h
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:23129: 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
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 23134 "configure"
-#include "confdefs.h"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_wctype_h=yes
+else
+ ac_has_wctype_h=no
+fi
+
+done
+
+
+ # Only continue checking if the ISO C99 headers exist and support is on.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+ # numeric_limits can instantiate type_traits<wchar_t>
+ echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_wchar_minmax=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_wchar_minmax=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
+echo "${ECHO_T}$has_wchar_minmax" >&6
+
+ # Test wchar.h for WEOF, which is what we use to determine whether
+ # to specialize for char_traits<wchar_t> or not.
+ echo "$as_me:$LINENO: checking for WEOF" >&5
+echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ #include <stddef.h>
+int
+main ()
+{
+wint_t i = WEOF;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ has_weof=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+has_weof=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $has_weof" >&5
+echo "${ECHO_T}$has_weof" >&6
+
+ # Tests for wide character functions used in char_traits<wchar_t>.
+ ac_wfuncs=yes
+
+
+
+
+
+
+for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for names injected into std:: by the c_std headers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-int main() {
+
+
+
+
+
+for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
+ vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:23157: \"$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"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ac_wfuncs=no
+fi
+done
+
+
+ # Checks for wide character functions that are not required
+ # for basic wchar_t support. Don't disable support if they are missing.
+ # Injection of these is wrapped with guard macros.
+
+
+
+
+
+for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
+echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes;
+ then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
+echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+
+ # Use iconv for wchar_t to char conversions. As such, check for
+ # X/Open Portability Guide, version 2 features (XPG2).
+ if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+ ac_has_iconv_h=yes
+else
+ ac_has_iconv_h=no
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+
+ if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking langinfo.h usability" >&5
+echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <langinfo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking langinfo.h presence" >&5
+echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_t""no" 1>&6
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for langinfo.h" >&5
+echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
+if test "${ac_cv_header_langinfo_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_langinfo_h=$ac_header_preproc
fi
-done
+echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
+echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:23182: 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
+fi
+if test $ac_cv_header_langinfo_h = yes; then
+ ac_has_langinfo_h=yes
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+ ac_has_langinfo_h=no
+fi
+
+
+
+ # Check for existence of libiconv.a providing XPG2 wchar_t support.
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 23190 "configure"
-#include "confdefs.h"
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv ();
+int
+main ()
+{
+iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_iconv_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_iconv_iconv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
+if test $ac_cv_lib_iconv_iconv = yes; then
+ libiconv="-liconv"
+fi
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-#endif /* no HAVE_GETPAGESIZE */
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
}
+#endif
-EOF
-if { (eval echo configure:23330: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_XPG2funcs=yes
+else
+ ac_XPG2funcs=no
fi
+done
-fi
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
+ LIBS="$ac_save_LIBS"
+
+ echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
+echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes;
+ then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
+echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
+
+ # At the moment, only enable wchar_t specializations if all the
+ # above support is present.
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes;
+ then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
+
+ enable_wchar_t=yes
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOSF 1
+_ACEOF
+
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITEL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOTL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNANL 1
+_ACEOF
+
+ fi
+ ;;
+ *-vxworks)
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
-fi
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+ ;;
+ *-windiss*)
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHL 1
+_ACEOF
+
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: No support for this host/target combination." >&5
+echo "$as_me: error: No support for this host/target combination." >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+ fi
+
+ # At some point, we should differentiate between architectures
+ # like x86, which have long double versions, and alpha/powerpc/etc.,
+ # which don't. For the time being, punt.
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACOSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ASINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATAN2L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CEILL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGNL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FABSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLOORL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOGL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODFL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POWL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINCOSL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANL 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TANHL 1
+_ACEOF
+
+ fi
+
fi
-# This depends on GLIBCPP_CHECK_LINKER_FEATURES, but without it assumes no.
-# Check whether --enable-symvers or --disable-symvers was given.
+# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
+
+
+ # Check whether --enable-symvers or --disable-symvers was given.
if test "${enable_symvers+set}" = set; then
enableval="$enable_symvers"
- case "$enableval" in
- yes) enable_symvers=yes ;;
- no) enable_symvers=no ;;
- # other names here, just as sanity checks
- #gnu|sun|etcetera) enable_symvers=$enableval ;;
- gnu) enable_symvers=$enableval ;;
- *) { echo "configure: error: Unknown argument to enable/disable symvers" 1>&2; exit 1; } ;;
- esac
+
+ case "$enableval" in
+ yes|no|gnu) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable symvers" >&5
+echo "$as_me: error: Unknown argument to enable/disable symvers" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
else
enable_symvers=yes
-fi
+fi;
+
+
+# If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks...
-# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
-# don't know enough about $LD to do tricks...
-if test x$enable_shared = xno ||
- test "x$LD" = x ||
- test x$glibcpp_gnu_ld_version = x; then
+# FIXME The following test is too strict, in theory.
+if test $enable_shared = no ||
+ test "x$LD" = x ||
+ test x$glibcxx_gnu_ld_version = x; then
enable_symvers=no
fi
# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
if test $enable_symvers != no; then
- echo $ac_n "checking for shared libgcc""... $ac_c" 1>&6
-echo "configure:23382: checking for shared libgcc" >&5
+ echo "$as_me:$LINENO: checking for shared libgcc" >&5
+echo $ECHO_N "checking for shared libgcc... $ECHO_C" >&6
ac_save_CFLAGS="$CFLAGS"
CFLAGS=' -lgcc_s'
- cat > conftest.$ac_ext <<EOF
-#line 23386 "configure"
-#include "confdefs.h"
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-return 0
-; return 0; }
-EOF
-if { (eval echo configure:23393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- glibcpp_shared_libgcc=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_shared_libgcc=no
-fi
-rm -f conftest*
+int
+main ()
+{
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_shared_libgcc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_shared_libgcc=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
- echo "$ac_t""$glibcpp_shared_libgcc" 1>&6
+ if test $glibcxx_shared_libgcc = no; then
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+ glibcxx_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -shared -shared-libgcc -o conftest.so \
+ conftest.c -v 2>&1 >/dev/null \
+ | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
+ rm -f conftest.c conftest.so
+ if test x${glibcxx_libgcc_s_suffix+set} = xset; then
+ CFLAGS=" -lgcc_s$glibcxx_libgcc_s_suffix"
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_shared_libgcc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_shared_libgcc" >&5
+echo "${ECHO_T}$glibcxx_shared_libgcc" >&6
fi
-# For GNU ld, we need at least this version. It's 2.12 in the same format
-# as the tested-for version. See GLIBCPP_CHECK_LINKER_FEATURES for more.
-glibcpp_min_gnu_ld_version=21200
+# For GNU ld, we need at least this version. The format is described in
+# GLIBCXX_CHECK_LINKER_FEATURES above.
+glibcxx_min_gnu_ld_version=21400
+# XXXXXXXXXXX glibcxx_gnu_ld_version=21390
-# Check to see if unspecified "yes" value can win, given results
-# above.
-if test $enable_symvers = yes ; then
+# Check to see if unspecified "yes" value can win, given results above.
+# Change "yes" into either "no" or a style name.
+if test $enable_symvers = yes; then
if test $with_gnu_ld = yes &&
- test $glibcpp_shared_libgcc = yes ;
+ test $glibcxx_shared_libgcc = yes;
then
- if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
- enable_symvers=gnu
+ if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
+ enable_symvers=gnu
else
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS='-shared -Wl,--version-script,conftest.map'
- enable_symvers=no
-
- echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
-
- cat > conftest.$ac_ext <<EOF
-#line 23428 "configure"
-#include "confdefs.h"
-int foo;
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:23435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- enable_symvers=gnu
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ # The right tools, the right setup, but too old. Fallbacks?
+ { echo "$as_me:$LINENO: WARNING: === Linker version $glibcxx_gnu_ld_version is too old for" >&5
+echo "$as_me: WARNING: === Linker version $glibcxx_gnu_ld_version is too old for" >&2;}
+ { echo "$as_me:$LINENO: WARNING: === full symbol versioning support in this release of GCC." >&5
+echo "$as_me: WARNING: === full symbol versioning support in this release of GCC." >&2;}
+ { echo "$as_me:$LINENO: WARNING: === You would need to upgrade your binutils to version" >&5
+echo "$as_me: WARNING: === You would need to upgrade your binutils to version" >&2;}
+ { echo "$as_me:$LINENO: WARNING: === $glibcxx_min_gnu_ld_version or later and rebuild GCC." >&5
+echo "$as_me: WARNING: === $glibcxx_min_gnu_ld_version or later and rebuild GCC." >&2;}
+ if test $glibcxx_gnu_ld_version -ge 21200 ; then
+ # Globbing fix is present, proper block support is not.
+ { echo "$as_me:$LINENO: WARNING: === Symbol versioning will be disabled." >&5
+echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
+ enable_symvers=no
else
- # this is the suspicious part
- CFLAGS=''
+ # 2.11 or older.
+ { echo "$as_me:$LINENO: WARNING: === Symbol versioning will be disabled." >&5
+echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
+ enable_symvers=no
fi
- rm -f conftest.map
fi
else
# just fail for now
+ { echo "$as_me:$LINENO: WARNING: === You have requested some kind of symbol versioning, but" >&5
+echo "$as_me: WARNING: === You have requested some kind of symbol versioning, but" >&2;}
+ { echo "$as_me:$LINENO: WARNING: === either you are not using a supported linker, or you are" >&5
+echo "$as_me: WARNING: === either you are not using a supported linker, or you are" >&2;}
+ { echo "$as_me:$LINENO: WARNING: === not building a shared libgcc_s (which is required)." >&5
+echo "$as_me: WARNING: === not building a shared libgcc_s (which is required)." >&2;}
+ { echo "$as_me:$LINENO: WARNING: === Symbol versioning will be disabled." >&5
+echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
enable_symvers=no
fi
fi
+# Everything parsed; figure out what file to use.
case $enable_symvers in
no)
- SYMVER_MAP=config/linker-map.dummy
- ;;
+ SYMVER_MAP=config/linker-map.dummy
+ ;;
gnu)
- SYMVER_MAP=config/linker-map.gnu
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_SYMVER 1
-EOF
-
- ;;
+ SYMVER_MAP=config/linker-map.gnu
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_SYMVER 1
+_ACEOF
+
+ ;;
esac
-if test $enable_symvers != no; then
- GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE=
- GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE='#'
-else
- GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE='#'
- GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE=
-fi
-echo $ac_n "checking versioning on shared library symbols""... $ac_c" 1>&6
-echo "configure:23481: checking versioning on shared library symbols" >&5
-echo "$ac_t""$enable_symvers" 1>&6
+{ echo "$as_me:$LINENO: versioning on shared library symbols is $enable_symvers" >&5
+echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
-# This depends on GLIBCPP_ENABLE_SYMVERS and GLIBCPP_IS_CROSS_COMPILING.
+# This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+
+ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
+ # Do checks for resource limit functions.
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xfalse; then
- # Do checks for memory limit functions.
-
setrlimit_have_headers=yes
- for ac_hdr in unistd.h sys/time.h sys/resource.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:23495: 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 23500 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:23505: \"$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"
+
+
+
+for ac_header in unistd.h sys/time.h sys/resource.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
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"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
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
-
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6
-setrlimit_have_headers=no
+ setrlimit_have_headers=no
fi
+
done
# If don't have the headers, then we can't run the tests now, and we
# won't be seeing any of these during testsuite compilation.
if test $setrlimit_have_headers = yes; then
# Can't do these in a loop, else the resulting syntax is wrong.
-
- cat > conftest.$ac_ext <<EOF
-#line 23538 "configure"
-#include "confdefs.h"
-#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-
-int main() {
- int f = RLIMIT_DATA ;
-; return 0; }
-EOF
-if { (eval echo configure:23548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_mresult=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_mresult=0
-fi
-rm -f conftest*
- cat >> confdefs.h <<EOF
-#define HAVE_MEMLIMIT_DATA $glibcpp_mresult
-EOF
-
-
- cat > conftest.$ac_ext <<EOF
-#line 23565 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-
-int main() {
- int f = RLIMIT_RSS ;
-; return 0; }
-EOF
-if { (eval echo configure:23575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_mresult=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_mresult=0
-fi
-rm -f conftest*
- cat >> confdefs.h <<EOF
-#define HAVE_MEMLIMIT_RSS $glibcpp_mresult
-EOF
+ #include <sys/time.h>
+ #include <sys/resource.h>
+int
+main ()
+{
+ int f = RLIMIT_DATA ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_mresult=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_mresult=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMIT_DATA $glibcxx_mresult
+_ACEOF
+
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
-
- cat > conftest.$ac_ext <<EOF
-#line 23592 "configure"
-#include "confdefs.h"
+int
+main ()
+{
+ int f = RLIMIT_RSS ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_mresult=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_mresult=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMIT_RSS $glibcxx_mresult
+_ACEOF
+
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-
-int main() {
- int f = RLIMIT_VMEM ;
-; return 0; }
-EOF
-if { (eval echo configure:23602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_mresult=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_mresult=0
-fi
-rm -f conftest*
- cat >> confdefs.h <<EOF
-#define HAVE_MEMLIMIT_VMEM $glibcpp_mresult
-EOF
+ #include <sys/time.h>
+ #include <sys/resource.h>
+int
+main ()
+{
+ int f = RLIMIT_VMEM ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_mresult=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_mresult=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMIT_VMEM $glibcxx_mresult
+_ACEOF
+
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
-
- cat > conftest.$ac_ext <<EOF
-#line 23619 "configure"
-#include "confdefs.h"
+int
+main ()
+{
+ int f = RLIMIT_AS ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_mresult=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_mresult=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMIT_AS $glibcxx_mresult
+_ACEOF
+
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-
-int main() {
- int f = RLIMIT_AS ;
-; return 0; }
-EOF
-if { (eval echo configure:23629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_mresult=1
+ #include <sys/time.h>
+ #include <sys/resource.h>
+
+int
+main ()
+{
+ int f = RLIMIT_FSIZE ;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_mresult=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_mresult=0
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_mresult=0
fi
-rm -f conftest*
- cat >> confdefs.h <<EOF
-#define HAVE_MEMLIMIT_AS $glibcpp_mresult
-EOF
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMIT_FSIZE $glibcxx_mresult
+_ACEOF
# Check for rlimit, setrlimit.
- if eval "test \"`echo '$''{'ac_setrlimit'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_setrlimit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 23651 "configure"
-#include "confdefs.h"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-
-int main() {
- struct rlimit r; setrlimit(0, &r);
-; return 0; }
-EOF
-if { (eval echo configure:23661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ #include <sys/time.h>
+ #include <sys/resource.h>
+
+int
+main ()
+{
+struct rlimit r;
+ setrlimit(0, &r);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_setrlimit=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_setrlimit=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_setrlimit=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
+
fi
fi
- echo $ac_n "checking for testsuite memory limit support""... $ac_c" 1>&6
-echo "configure:23677: checking for testsuite memory limit support" >&5
+ echo "$as_me:$LINENO: checking for testsuite resource limits support" >&5
+echo $ECHO_N "checking for testsuite resource limits support... $ECHO_C" >&6
if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
- ac_mem_limits=yes
- cat >> confdefs.h <<\EOF
-#define _GLIBCPP_MEM_LIMITS 1
-EOF
+ ac_res_limits=yes
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_RES_LIMITS 1
+_ACEOF
else
- ac_mem_limits=no
+ ac_res_limits=no
fi
- echo "$ac_t""$ac_mem_limits" 1>&6
+ echo "$as_me:$LINENO: result: $ac_res_limits" >&5
+echo "${ECHO_T}$ac_res_limits" >&6
# Look for setenv, so that extended locale tests can be performed.
-
- echo $ac_n "checking for setenv declaration""... $ac_c" 1>&6
-echo "configure:23693: checking for setenv declaration" >&5
- if test x${glibcpp_cv_func_setenv_use+set} != xset; then
- if eval "test \"`echo '$''{'glibcpp_cv_func_setenv_use'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 23708 "configure"
-#include "confdefs.h"
+
+ echo "$as_me:$LINENO: checking for setenv declaration" >&5
+echo $ECHO_N "checking for setenv declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_setenv_use+set} != xset; then
+ if test "${glibcxx_cv_func_setenv_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-int main() {
+int
+main ()
+{
setenv(0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:23715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- glibcpp_cv_func_setenv_use=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- glibcpp_cv_func_setenv_use=no
-fi
-rm -f conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_setenv_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_setenv_use=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
-
fi
fi
- echo "$ac_t""$glibcpp_cv_func_setenv_use" 1>&6
- if test x$glibcpp_cv_func_setenv_use = x"yes"; then
- for ac_func in setenv
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_setenv_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_setenv_use" >&6
+ if test x$glibcxx_cv_func_setenv_use = x"yes"; then
+
+for ac_func in setenv
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:23741: 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 <<EOF
-#line 23746 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:23769: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
- fi
fi
- # Export file names for ABI checking.
- baseline_dir="${glibcpp_srcdir}/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
-
- # Determine if checking the ABI is desirable.
- # Only build this as native, since automake does not understand
- # CXX_FOR_BUILD.
- if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then
- enable_abi_check=no
+ if test $enable_symvers = no; then
+ enable_abi_check=no
+ else
+ case "$host" in
+ *-*-cygwin*)
+ enable_abi_check=no ;;
+ *)
+ enable_abi_check=yes ;;
+ esac
+ fi
else
- case "$host" in
- *-*-cygwin*)
- enable_abi_check=no ;;
- *)
- enable_abi_check=yes ;;
- esac
+ # Only build this as native, since automake does not understand
+ # CXX_FOR_BUILD.
+ enable_abi_check=no
fi
-
-if test "$enable_abi_check" = yes; then
- GLIBCPP_TEST_ABI_TRUE=
- GLIBCPP_TEST_ABI_FALSE='#'
-else
- GLIBCPP_TEST_ABI_TRUE='#'
- GLIBCPP_TEST_ABI_FALSE=
-fi
+ # Export file names for ABI checking.
+ baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
+
+
+
+
# Propagate the target-specific source directories through the build chain.
-# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
+# (Nothing currently uses cpu_include_dir directly; only atomicity_include_dir
# uses it, and it only gets used in this file.)
+ATOMICITY_SRCDIR=config/${atomicity_dir}
+ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
OS_INC_SRCDIR=config/${os_include_dir}
-ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
-# Set up cross-compile flags
-
-if test "$CANADIAN" = yes; then
- CANADIAN_TRUE=
- CANADIAN_FALSE='#'
+# Determine cross-compile flags and AM_CONDITIONALs.
+#AC_SUBST(GLIBCXX_IS_NATIVE)
+#AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
+# from GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT:
+#AM_CONDITIONAL(GLIBCXX_BUILD_LIBMATH, test $need_libmath = yes)
+
+
+if test $is_hosted = yes; then
+ GLIBCXX_HOSTED_TRUE=
+ GLIBCXX_HOSTED_FALSE='#'
else
- CANADIAN_TRUE='#'
- CANADIAN_FALSE=
+ GLIBCXX_HOSTED_TRUE='#'
+ GLIBCXX_HOSTED_FALSE=
fi
-
-cat > confcache <<\EOF
+
+
+
+
+if test $enable_libstdcxx_pch = yes; then
+ GLIBCXX_BUILD_PCH_TRUE=
+ GLIBCXX_BUILD_PCH_FALSE='#'
+else
+ GLIBCXX_BUILD_PCH_TRUE='#'
+ GLIBCXX_BUILD_PCH_FALSE=
+fi
+
+
+
+
+if test $enable_cheaders = c; then
+ GLIBCXX_C_HEADERS_C_TRUE=
+ GLIBCXX_C_HEADERS_C_FALSE='#'
+else
+ GLIBCXX_C_HEADERS_C_TRUE='#'
+ GLIBCXX_C_HEADERS_C_FALSE=
+fi
+
+
+
+
+if test $enable_cheaders = c_std; then
+ GLIBCXX_C_HEADERS_C_STD_TRUE=
+ GLIBCXX_C_HEADERS_C_STD_FALSE='#'
+else
+ GLIBCXX_C_HEADERS_C_STD_TRUE='#'
+ GLIBCXX_C_HEADERS_C_STD_FALSE=
+fi
+
+
+
+
+if test $c_compatibility = yes; then
+ GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE=
+ GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE='#'
+else
+ GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE='#'
+ GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE=
+fi
+
+
+
+
+if test $enable_libstdcxx_debug = yes; then
+ GLIBCXX_BUILD_DEBUG_TRUE=
+ GLIBCXX_BUILD_DEBUG_FALSE='#'
+else
+ GLIBCXX_BUILD_DEBUG_TRUE='#'
+ GLIBCXX_BUILD_DEBUG_FALSE=
+fi
+
+
+
+
+if test $enable_symvers != no; then
+ GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE=
+ GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE='#'
+else
+ GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE='#'
+ GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE=
+fi
+
+
+
+
+if test $enable_wchar_t = yes; then
+ GLIBCXX_TEST_WCHAR_T_TRUE=
+ GLIBCXX_TEST_WCHAR_T_FALSE='#'
+else
+ GLIBCXX_TEST_WCHAR_T_TRUE='#'
+ GLIBCXX_TEST_WCHAR_T_FALSE=
+fi
+
+
+
+
+if test $enable_abi_check = yes; then
+ GLIBCXX_TEST_ABI_TRUE=
+ GLIBCXX_TEST_ABI_FALSE='#'
+else
+ GLIBCXX_TEST_ABI_TRUE='#'
+ GLIBCXX_TEST_ABI_FALSE=
+fi
+
+
+
+
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-
-if test "${multilib}" = "yes"; then
+if test ${multilib} = yes; then
multilib_arg="--enable-multilib"
else
multilib_arg=
fi
-# Export all the install information
+# Export all the install information.
+
+ glibcxx_toolexecdir=no
+ glibcxx_toolexeclibdir=no
+ glibcxx_prefixdir=$prefix
-# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
-# exported correctly in GLIBCPP_CONFIGURE.
-glibcpp_toolexecdir=no
-glibcpp_toolexeclibdir=no
-glibcpp_prefixdir=${prefix}
+ echo "$as_me:$LINENO: checking for gxx-include-dir" >&5
+echo $ECHO_N "checking for gxx-include-dir... $ECHO_C" >&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:23908: 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"
- case "${withval}" in
- yes)
- { echo "configure: error: Missing directory for --with-gxx-include-dir" 1>&2; exit 1; }
- gxx_include_dir=no
- ;;
- no)
- gxx_include_dir=no
- ;;
- *)
- gxx_include_dir=${withval}
- ;;
-esac
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: Missing directory for --with-gxx-include-dir" >&5
+echo "$as_me: error: Missing directory for --with-gxx-include-dir" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) gxx_include_dir=no ;;
+ *) gxx_include_dir=$withval ;;
+ esac
else
gxx_include_dir=no
-fi
+fi;
+ echo "$as_me:$LINENO: result: $gxx_include_dir" >&5
+echo "${ECHO_T}$gxx_include_dir" >&6
-echo "$ac_t""$gxx_include_dir" 1>&6
-
-# Process the option "--enable-version-specific-runtime-libs"
-echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
-echo "configure:23932: checking for --enable-version-specific-runtime-libs" >&5
-# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
+ echo "$as_me:$LINENO: checking for --enable-version-specific-runtime-libs" >&5
+echo $ECHO_N "checking for --enable-version-specific-runtime-libs... $ECHO_C" >&6
+ # 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"
case "$enableval" in
- yes) version_specific_libs=yes ;;
- no) version_specific_libs=no ;;
- *) { echo "configure: error: Unknown argument to enable/disable version-specific libs" 1>&2; exit 1; };;
- esac
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable version-specific libs" >&5
+echo "$as_me: error: Unknown argument to enable/disable version-specific libs" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
else
version_specific_libs=no
-fi
-# Option set, now we can test it.
-echo "$ac_t""$version_specific_libs" 1>&6
+fi;
+ echo "$as_me:$LINENO: result: $version_specific_libs" >&5
+echo "${ECHO_T}$version_specific_libs" >&6
-# Default case for install directory for include files.
-if test $version_specific_libs = no && test $gxx_include_dir = no; then
- gxx_include_dir='$(prefix)'/include/c++/${gcc_version}
-fi
+ # Default case for install directory for include files.
+ if test $version_specific_libs = no && test $gxx_include_dir = no; then
+ gxx_include_dir='${prefix}'/include/c++/${gcc_version}
+ fi
-# Version-specific runtime libs processing.
-if test $version_specific_libs = yes; then
- # Need the gcc compiler version to know where to install libraries
- # and header files if --enable-version-specific-runtime-libs option
- # is selected.
- if test x"$gxx_include_dir" = x"no"; then
- gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/c++
+ # Version-specific runtime libs processing.
+ if test $version_specific_libs = yes; then
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected. FIXME: these variables are misnamed, there are
+ # no executables installed in _toolexecdir or _toolexeclibdir.
+ if test x"$gxx_include_dir" = x"no"; then
+ gxx_include_dir='${libdir}/gcc/${host_alias}/'$gcc_version/include/c++
+ fi
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
fi
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
-fi
-# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
-# Install a library built with a cross compiler in tooldir, not libdir.
-if test x"$glibcpp_toolexecdir" = x"no"; then
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib'
- else
- glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)'
+ # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ if test x"$glibcxx_toolexecdir" = x"no"; then
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
+ glibcxx_toolexeclibdir='${toolexecdir}/lib'
+ else
+ glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
+ glibcxx_toolexeclibdir='${libdir}'
+ fi
+ multi_os_directory=`$CXX -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
+ esac
fi
- glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
-fi
-echo $ac_n "checking for install location""... $ac_c" 1>&6
-echo "configure:23979: checking for install location" >&5
-echo "$ac_t""$gxx_include_dir" 1>&6
+ echo "$as_me:$LINENO: checking for install location" >&5
+echo $ECHO_N "checking for install location... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $gxx_include_dir" >&5
+echo "${ECHO_T}$gxx_include_dir" >&6
@@ -23984,580 +83272,1477 @@ echo "$ac_t""$gxx_include_dir" 1>&6
-# Export all the include and flag information to makefiles.
+# Export all the include and flag information to Makefiles.
- # Root level of the build directory include sources.
- GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
+ # Used for every C++ compile we perform.
+ GLIBCXX_INCLUDES="\
+-I$glibcxx_builddir/include/$host_alias \
+-I$glibcxx_builddir/include \
+-I$glibcxx_srcdir/libsupc++"
- # Passed down for canadian crosses.
- if test x"$CANADIAN" = xyes; then
- TOPLEVEL_INCLUDES='-I$(includedir)'
+ # For Canadian crosses, pick this up too.
+ if test $CANADIAN = yes; then
+ GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
fi
- LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
+ # Stuff in the actual top level. Currently only used by libsupc++ to
+ # get unwind* headers from the gcc dir.
+ #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
+ TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
- LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
+ # Now, export this to all the little Makefiles....
- if test x"$need_libio" = xyes; then
- LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
-
- fi
- # Now, export this to all the little Makefiles....
-
-
-
-
# Optimization flags that are probably a good idea for thrill-seekers. Just
- # uncomment the lines below and make, everything else is ready to go...
- # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
+ # uncomment the lines below and make, everything else is ready to go...
+ # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
OPTIMIZE_CXXFLAGS=
-
- WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
-
+
+ WARN_FLAGS='-Wall -W -Wwrite-strings -Wcast-qual'
+
if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
- grep "enable shared" > /dev/null; then
+ grep "enable shared" > /dev/null;
+then
LIBSUPCXX_PICFLAGS=-prefer-pic
else
LIBSUPCXX_PICFLAGS=
fi
-# Generate the various Makefiles, include files, and scripts.
-# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
-# libsupc++/Makefile.am and testsuite/Makefile.am so that multilib installs
-# will end up installed in the correct place. To work around this not being
-# passed down from config-ml.in -> top_srcdir/Makefile.am ->
-# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile include/Makefile libmath/Makefile libsupc++/Makefile src/Makefile po/Makefile testsuite/Makefile"
+
+ ac_config_files="$ac_config_files scripts/check_survey"
+
+ ac_config_files="$ac_config_files scripts/testsuite_flags"
+
+
+ ac_config_commands="$ac_config_commands default"
+
+
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_HOSTED_TRUE}" && test -z "${GLIBCXX_HOSTED_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_HOSTED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_HOSTED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_BUILD_PCH_TRUE}" && test -z "${GLIBCXX_BUILD_PCH_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_BUILD_PCH\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_BUILD_PCH\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_C_HEADERS_C_TRUE}" && test -z "${GLIBCXX_C_HEADERS_C_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_C_HEADERS_C\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_C_HEADERS_C\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_C_HEADERS_C_STD_TRUE}" && test -z "${GLIBCXX_C_HEADERS_C_STD_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_C_HEADERS_C_STD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_C_HEADERS_C_STD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE}" && test -z "${GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_C_HEADERS_COMPATIBILITY\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_C_HEADERS_COMPATIBILITY\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_BUILD_DEBUG_TRUE}" && test -z "${GLIBCXX_BUILD_DEBUG_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_BUILD_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_BUILD_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_BUILD_VERSIONED_SHLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_BUILD_VERSIONED_SHLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_TEST_WCHAR_T_TRUE}" && test -z "${GLIBCXX_TEST_WCHAR_T_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_WCHAR_T\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_TEST_WCHAR_T\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GLIBCXX_TEST_ABI_TRUE}" && test -z "${GLIBCXX_TEST_ABI_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_ABI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_TEST_ABI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile \
- include/Makefile src/Makefile \
- libmath/Makefile libio/Makefile libsupc++/Makefile \
- po/Makefile testsuite/Makefile mkcheck testsuite_flags config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@PACKAGE@%$PACKAGE%g
-s%@libtool_VERSION@%$libtool_VERSION%g
-s%@toplevel_srcdir@%$toplevel_srcdir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@glibcpp_builddir@%$glibcpp_builddir%g
-s%@glibcpp_srcdir@%$glibcpp_srcdir%g
-s%@AWK@%$AWK%g
-s%@LN_S@%$LN_S%g
-s%@glibcpp_basedir@%$glibcpp_basedir%g
-s%@CC@%$CC%g
-s%@glibcpp_CXX@%$glibcpp_CXX%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@CXXCPP@%$CXXCPP%g
-s%@enable_shared@%$enable_shared%g
-s%@enable_static@%$enable_static%g
-s%@ifGNUmake@%$ifGNUmake%g
-s%@CPP@%$CPP%g
-s%@CSTDIO_H@%$CSTDIO_H%g
-s%@BASIC_FILE_H@%$BASIC_FILE_H%g
-s%@BASIC_FILE_CC@%$BASIC_FILE_CC%g
-s%@CCODECVT_C@%$CCODECVT_C%g
-s%@GLIBCPP_BUILD_LIBIO_TRUE@%$GLIBCPP_BUILD_LIBIO_TRUE%g
-s%@GLIBCPP_BUILD_LIBIO_FALSE@%$GLIBCPP_BUILD_LIBIO_FALSE%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%@libio_la@%$libio_la%g
-s%@check_msgfmt@%$check_msgfmt%g
-s%@glibcpp_MOFILES@%$glibcpp_MOFILES%g
-s%@glibcpp_POFILES@%$glibcpp_POFILES%g
-s%@glibcpp_localedir@%$glibcpp_localedir%g
-s%@USE_NLS@%$USE_NLS%g
-s%@CLOCALE_H@%$CLOCALE_H%g
-s%@CCODECVT_H@%$CCODECVT_H%g
-s%@CMESSAGES_H@%$CMESSAGES_H%g
-s%@CCODECVT_CC@%$CCODECVT_CC%g
-s%@CCOLLATE_CC@%$CCOLLATE_CC%g
-s%@CCTYPE_CC@%$CCTYPE_CC%g
-s%@CMESSAGES_CC@%$CMESSAGES_CC%g
-s%@CMONEY_CC@%$CMONEY_CC%g
-s%@CNUMERIC_CC@%$CNUMERIC_CC%g
-s%@CTIME_H@%$CTIME_H%g
-s%@CTIME_CC@%$CTIME_CC%g
-s%@CLOCALE_CC@%$CLOCALE_CC%g
-s%@CLOCALE_INTERNAL_H@%$CLOCALE_INTERNAL_H%g
-s%@C_INCLUDE_DIR@%$C_INCLUDE_DIR%g
-s%@GLIBCPP_C_HEADERS_C_TRUE@%$GLIBCPP_C_HEADERS_C_TRUE%g
-s%@GLIBCPP_C_HEADERS_C_FALSE@%$GLIBCPP_C_HEADERS_C_FALSE%g
-s%@GLIBCPP_C_HEADERS_C_STD_TRUE@%$GLIBCPP_C_HEADERS_C_STD_TRUE%g
-s%@GLIBCPP_C_HEADERS_C_STD_FALSE@%$GLIBCPP_C_HEADERS_C_STD_FALSE%g
-s%@GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@%$GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE%g
-s%@GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE@%$GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE%g
-s%@glibcpp_thread_h@%$glibcpp_thread_h%g
-s%@LIBUNWIND_FLAG@%$LIBUNWIND_FLAG%g
-s%@EXTRA_CXX_FLAGS@%$EXTRA_CXX_FLAGS%g
-s%@GLIBCPP_BUILD_DEBUG_TRUE@%$GLIBCPP_BUILD_DEBUG_TRUE%g
-s%@GLIBCPP_BUILD_DEBUG_FALSE@%$GLIBCPP_BUILD_DEBUG_FALSE%g
-s%@DEBUG_FLAGS@%$DEBUG_FLAGS%g
-s%@SECTION_FLAGS@%$SECTION_FLAGS%g
-s%@SECTION_LDFLAGS@%$SECTION_LDFLAGS%g
-s%@OPT_LDFLAGS@%$OPT_LDFLAGS%g
-s%@LIBMATHOBJS@%$LIBMATHOBJS%g
-s%@GLIBCPP_BUILD_LIBMATH_TRUE@%$GLIBCPP_BUILD_LIBMATH_TRUE%g
-s%@GLIBCPP_BUILD_LIBMATH_FALSE@%$GLIBCPP_BUILD_LIBMATH_FALSE%g
-s%@GLIBCPP_TEST_WCHAR_T_TRUE@%$GLIBCPP_TEST_WCHAR_T_TRUE%g
-s%@GLIBCPP_TEST_WCHAR_T_FALSE@%$GLIBCPP_TEST_WCHAR_T_FALSE%g
-s%@WERROR@%$WERROR%g
-s%@SYMVER_MAP@%$SYMVER_MAP%g
-s%@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@%$GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE%g
-s%@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@%$GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE%g
-s%@baseline_dir@%$baseline_dir%g
-s%@GLIBCPP_TEST_ABI_TRUE@%$GLIBCPP_TEST_ABI_TRUE%g
-s%@GLIBCPP_TEST_ABI_FALSE@%$GLIBCPP_TEST_ABI_FALSE%g
-s%@OS_INC_SRCDIR@%$OS_INC_SRCDIR%g
-s%@ATOMICITY_INC_SRCDIR@%$ATOMICITY_INC_SRCDIR%g
-s%@GLIBCPP_IS_CROSS_COMPILING@%$GLIBCPP_IS_CROSS_COMPILING%g
-s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
-s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
-s%@glibcpp_prefixdir@%$glibcpp_prefixdir%g
-s%@gxx_include_dir@%$gxx_include_dir%g
-s%@glibcpp_toolexecdir@%$glibcpp_toolexecdir%g
-s%@glibcpp_toolexeclibdir@%$glibcpp_toolexeclibdir%g
-s%@LIBIO_INCLUDES@%$LIBIO_INCLUDES%g
-s%@GLIBCPP_INCLUDES@%$GLIBCPP_INCLUDES%g
-s%@TOPLEVEL_INCLUDES@%$TOPLEVEL_INCLUDES%g
-s%@LIBMATH_INCLUDES@%$LIBMATH_INCLUDES%g
-s%@LIBSUPCXX_INCLUDES@%$LIBSUPCXX_INCLUDES%g
-s%@OPTIMIZE_CXXFLAGS@%$OPTIMIZE_CXXFLAGS%g
-s%@WARN_FLAGS@%$WARN_FLAGS%g
-s%@LIBSUPCXX_PICFLAGS@%$LIBSUPCXX_PICFLAGS%g
-CEOF
-EOF
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by package-unused $as_me version-unused, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+package-unused config.status version-unused
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile \
- include/Makefile src/Makefile \
- libmath/Makefile libio/Makefile libsupc++/Makefile \
- po/Makefile testsuite/Makefile mkcheck testsuite_flags"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+
+# Variables needed in config.status (file generation) which aren't already
+# passed by autoconf.
+SUBDIRS="$SUBDIRS"
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "libmath/Makefile" ) CONFIG_FILES="$CONFIG_FILES libmath/Makefile" ;;
+ "libsupc++/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsupc++/Makefile" ;;
+ "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+ "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+ "scripts/check_survey" ) CONFIG_FILES="$CONFIG_FILES scripts/check_survey" ;;
+ "scripts/testsuite_flags" ) CONFIG_FILES="$CONFIG_FILES scripts/testsuite_flags" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@libtool_VERSION@,$libtool_VERSION,;t t
+s,@multi_basedir@,$multi_basedir,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@glibcxx_builddir@,$glibcxx_builddir,;t t
+s,@glibcxx_srcdir@,$glibcxx_srcdir,;t t
+s,@toplevel_srcdir@,$toplevel_srcdir,;t t
+s,@CC@,$CC,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CXX@,$CXX,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@LN_S@,$LN_S,;t t
+s,@AS@,$AS,;t t
+s,@ac_ct_AS@,$ac_ct_AS,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@enable_shared@,$enable_shared,;t t
+s,@enable_static@,$enable_static,;t t
+s,@GLIBCXX_HOSTED_TRUE@,$GLIBCXX_HOSTED_TRUE,;t t
+s,@GLIBCXX_HOSTED_FALSE@,$GLIBCXX_HOSTED_FALSE,;t t
+s,@GLIBCXX_BUILD_PCH_TRUE@,$GLIBCXX_BUILD_PCH_TRUE,;t t
+s,@GLIBCXX_BUILD_PCH_FALSE@,$GLIBCXX_BUILD_PCH_FALSE,;t t
+s,@glibcxx_PCHFLAGS@,$glibcxx_PCHFLAGS,;t t
+s,@CSTDIO_H@,$CSTDIO_H,;t t
+s,@BASIC_FILE_H@,$BASIC_FILE_H,;t t
+s,@BASIC_FILE_CC@,$BASIC_FILE_CC,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@check_msgfmt@,$check_msgfmt,;t t
+s,@glibcxx_MOFILES@,$glibcxx_MOFILES,;t t
+s,@glibcxx_POFILES@,$glibcxx_POFILES,;t t
+s,@glibcxx_localedir@,$glibcxx_localedir,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@CLOCALE_H@,$CLOCALE_H,;t t
+s,@CCODECVT_H@,$CCODECVT_H,;t t
+s,@CMESSAGES_H@,$CMESSAGES_H,;t t
+s,@CCODECVT_CC@,$CCODECVT_CC,;t t
+s,@CCOLLATE_CC@,$CCOLLATE_CC,;t t
+s,@CCTYPE_CC@,$CCTYPE_CC,;t t
+s,@CMESSAGES_CC@,$CMESSAGES_CC,;t t
+s,@CMONEY_CC@,$CMONEY_CC,;t t
+s,@CNUMERIC_CC@,$CNUMERIC_CC,;t t
+s,@CTIME_H@,$CTIME_H,;t t
+s,@CTIME_CC@,$CTIME_CC,;t t
+s,@CLOCALE_CC@,$CLOCALE_CC,;t t
+s,@CLOCALE_INTERNAL_H@,$CLOCALE_INTERNAL_H,;t t
+s,@ALLOCATOR_H@,$ALLOCATOR_H,;t t
+s,@ALLOCATOR_NAME@,$ALLOCATOR_NAME,;t t
+s,@C_INCLUDE_DIR@,$C_INCLUDE_DIR,;t t
+s,@GLIBCXX_C_HEADERS_C_TRUE@,$GLIBCXX_C_HEADERS_C_TRUE,;t t
+s,@GLIBCXX_C_HEADERS_C_FALSE@,$GLIBCXX_C_HEADERS_C_FALSE,;t t
+s,@GLIBCXX_C_HEADERS_C_STD_TRUE@,$GLIBCXX_C_HEADERS_C_STD_TRUE,;t t
+s,@GLIBCXX_C_HEADERS_C_STD_FALSE@,$GLIBCXX_C_HEADERS_C_STD_FALSE,;t t
+s,@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@,$GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE,;t t
+s,@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@,$GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE,;t t
+s,@glibcxx_thread_h@,$glibcxx_thread_h,;t t
+s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
+s,@GLIBCXX_BUILD_DEBUG_TRUE@,$GLIBCXX_BUILD_DEBUG_TRUE,;t t
+s,@GLIBCXX_BUILD_DEBUG_FALSE@,$GLIBCXX_BUILD_DEBUG_FALSE,;t t
+s,@EXTRA_CXX_FLAGS@,$EXTRA_CXX_FLAGS,;t t
+s,@WERROR@,$WERROR,;t t
+s,@SECTION_FLAGS@,$SECTION_FLAGS,;t t
+s,@SECTION_LDFLAGS@,$SECTION_LDFLAGS,;t t
+s,@OPT_LDFLAGS@,$OPT_LDFLAGS,;t t
+s,@LIBMATHOBJS@,$LIBMATHOBJS,;t t
+s,@SYMVER_MAP@,$SYMVER_MAP,;t t
+s,@port_specific_symbol_files@,$port_specific_symbol_files,;t t
+s,@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@,$GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE,;t t
+s,@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@,$GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE,;t t
+s,@baseline_dir@,$baseline_dir,;t t
+s,@GLIBCXX_TEST_WCHAR_T_TRUE@,$GLIBCXX_TEST_WCHAR_T_TRUE,;t t
+s,@GLIBCXX_TEST_WCHAR_T_FALSE@,$GLIBCXX_TEST_WCHAR_T_FALSE,;t t
+s,@GLIBCXX_TEST_ABI_TRUE@,$GLIBCXX_TEST_ABI_TRUE,;t t
+s,@GLIBCXX_TEST_ABI_FALSE@,$GLIBCXX_TEST_ABI_FALSE,;t t
+s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
+s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
+s,@OS_INC_SRCDIR@,$OS_INC_SRCDIR,;t t
+s,@glibcxx_prefixdir@,$glibcxx_prefixdir,;t t
+s,@gxx_include_dir@,$gxx_include_dir,;t t
+s,@glibcxx_toolexecdir@,$glibcxx_toolexecdir,;t t
+s,@glibcxx_toolexeclibdir@,$glibcxx_toolexeclibdir,;t t
+s,@GLIBCXX_INCLUDES@,$GLIBCXX_INCLUDES,;t t
+s,@TOPLEVEL_INCLUDES@,$TOPLEVEL_INCLUDES,;t t
+s,@OPTIMIZE_CXXFLAGS@,$OPTIMIZE_CXXFLAGS,;t t
+s,@WARN_FLAGS@,$WARN_FLAGS,;t t
+s,@LIBSUPCXX_PICFLAGS@,$LIBSUPCXX_PICFLAGS,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+ # Run the commands associated with the file.
+ case $ac_file in
+ scripts/check_survey ) chmod +x scripts/check_survey ;;
+ scripts/testsuite_flags ) chmod +x scripts/testsuite_flags ;;
esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 )
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+ ac_file=Makefile . ${multi_basedir}/config-ml.in
+ ;;
+esac ;;
+ default ) if test -n "$CONFIG_FILES"; then
+ # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
+ # that multilib installs will end up installed in the correct place.
+ # The testsuite needs it for multilib-aware ABI baseline files.
+ # To work around this not being passed down from config-ml.in ->
+ # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
+ # append it here. Only modify Makefiles that have just been created.
+ #
+ # Also, get rid of this simulated-VPATH thing that automake does.
+ cat > vpsed << \_EOF
+s!`test -f '$<' || echo '$(srcdir)/'`!!
+_EOF
+ for i in $SUBDIRS; do
+ case $CONFIG_FILES in
+ *${i}/Makefile*)
+ #echo "Adding MULTISUBDIR to $i/Makefile"
+ sed -f vpsed $i/Makefile > tmp
+ grep '^MULTISUBDIR =' Makefile >> tmp
+ mv tmp $i/Makefile
+ ;;
+ esac
+ done
+ rm vpsed
+ fi
+ (cd include && ${MAKE-make})
+ ;;
+ esac
+done
+_ACEOF
-srcdir=${srcdir}
-host=${host}
-target=${target}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="${multilib_arg} ${ac_configure_args}"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-glibcpp_basedir=${glibcpp_basedir}
-CC="${CC}"
-CXX="${CXX}"
-ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-if test -n "$CONFIG_FILES"; then
- LD="${ORIGINAL_LD_FOR_MULTILIBS}"
- ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
- grep '^MULTISUBDIR =' Makefile >> src/Makefile
- grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
- grep '^MULTISUBDIR =' Makefile >> testsuite/Makefile
-fi
-chmod +x mkcheck
-chmod +x testsuite_flags
-
-exit 0
-EOF
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-
-# Sanity checking & User-visible messages.
-# Checks down here, otherwise they get scrolled off before
-# the user will notice.
-
-# Trying to get more people to read documentation. Possibly remove
-# check and warn all the time. There is no "informational" AC_MSG_
-# macro, so these are going to be printed even when --quiet/--silent
-# is given.
-if test ! -f stamp-sanity-warned; then
- touch stamp-sanity-warned
- echo ""
- echo "Please make certain that you read the installation information here:"
- echo " faster => ${srcdir}/docs/html/install.html"
- echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/install.html>"
- echo ""
- echo "and the configuration information here:"
- echo " faster => ${srcdir}/docs/html/configopts.html"
- echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html>"
- echo ""
- echo "before proceeding with ${_cv_gnu_make_command}."
- echo ""
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
fi
+
diff --git a/contrib/libstdc++/configure.ac b/contrib/libstdc++/configure.ac
new file mode 100644
index 0000000..35fef0d
--- /dev/null
+++ b/contrib/libstdc++/configure.ac
@@ -0,0 +1,355 @@
+# Process this file with autoconf to produce a configure script, like so:
+# aclocal && autoconf && autoheader && automake
+
+AC_PREREQ(2.57)
+AC_INIT(package-unused, version-unused,, libstdc++)
+AC_CONFIG_SRCDIR(src/ios.cc)
+AC_CONFIG_HEADER(config.h)
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported. Only used at the end of this file.
+### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=6:2:0
+AC_SUBST(libtool_VERSION)
+
+# Find the rest of the source tree framework.
+GLIBCXX_TOPREL_CONFIGURE
+
+# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
+#
+# You will slowly go insane if you do not grok the following fact: when
+# building v3 as part of the compiler, the top-level /target/ becomes the
+# library's /host/. configure then causes --target to default to --host,
+# exactly like any other package using autoconf. Therefore, 'target' and
+# 'host' will always be the same. This makes sense both for native and
+# cross compilers, just think about it for a little while. :-)
+#
+# Also, if v3 is being configured as part of a cross compiler, the top-level
+# configure script will pass the "real" host as $with_cross_host.
+#
+# Do not delete or change the following two lines. For why, see
+# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
+AC_CANONICAL_SYSTEM
+target_alias=${target_alias-$host_alias}
+
+# Handy for debugging:
+#AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
+
+if test "$build" != "$host"; then
+ # We are being configured with some form of cross compiler.
+ GLIBCXX_IS_NATIVE=false
+ GCC_NO_EXECUTABLES
+else
+ GLIBCXX_IS_NATIVE=true
+fi
+
+# Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the
+# following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
+# 1.x: minimum required version
+# no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch
+# of other PACKAGE_* variables will, however, and there's nothing
+# we can do about that; they come from AC_INIT).
+# foreign: we don't follow the normal rules for GNU packages (no COPYING
+# file in the top srcdir, etc, etc), so stop complaining.
+# no-dependencies: turns off auto dependency generation (just for now)
+# -Wall: turns on all automake warnings...
+# -Wno-portability: ...except this one, since GNU make is now required.
+AM_INIT_AUTOMAKE([1.7.6 no-define foreign no-dependencies -Wall -Wno-portability])
+
+# Runs configure.host, finds CC, CXX, and assorted other critical bits. Sets
+# up critical shell variables.
+GLIBCXX_CONFIGURE
+
+#AC_MSG_NOTICE([====== Starting libtool configuration])
+AC_LIBTOOL_DLOPEN
+AM_PROG_LIBTOOL
+AC_SUBST(enable_shared)
+AC_SUBST(enable_static)
+#AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
+
+# Possibly disable most of the library.
+## XXX Consider skipping unncessary tests altogether in this case, rather
+## than just ignoring the results. Faster /and/ more correct, win win.
+GLIBCXX_ENABLE_HOSTED
+
+# Check for support bits and g++ features that don't require linking.
+GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
+GLIBCXX_ENABLE_PCH($is_hosted)
+
+# Enable all the variable C++ runtime options.
+# NB: C_MBCHAR must come early.
+GLIBCXX_ENABLE_CSTDIO
+GLIBCXX_ENABLE_CLOCALE
+GLIBCXX_ENABLE_ALLOCATOR
+GLIBCXX_ENABLE_CHEADERS($c_model) dnl c_model from configure.host
+GLIBCXX_ENABLE_C_MBCHAR([yes])
+GLIBCXX_ENABLE_C99([yes])
+GLIBCXX_ENABLE_LONG_LONG([yes])
+GLIBCXX_ENABLE_THREADS
+GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
+GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"])
+GLIBCXX_ENABLE_DEBUG([no])
+GLIBCXX_ENABLE_CXX_FLAGS
+
+# No surprises, no surprises...
+if test $atomicity_dir = cpu/generic ; then
+ AC_MSG_WARN([No native atomic operations are provided for this platform.])
+ if test $target_thread_file = single; then
+ AC_MSG_WARN([They cannot be faked when thread support is disabled.])
+ AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
+ else
+ AC_MSG_WARN([They will be faked using a mutex.])
+ AC_MSG_WARN([Performance of certain classes will degrade as a result.])
+ fi
+fi
+
+
+if $GLIBCXX_IS_NATIVE; then
+
+ # We can do more elaborate tests that assume a working linker.
+ CANADIAN=no
+
+ # Check for available headers.
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+ machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
+ sys/types.h])
+
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_MATH_SUPPORT
+ GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+
+ # For showmanyc_helper().
+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
+ GLIBCXX_CHECK_POLL
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+
+ # For xsputn_2().
+ AC_CHECK_HEADERS(sys/uio.h)
+ GLIBCXX_CHECK_WRITEV
+
+ # For the __streamoff_base_type typedef.
+ GLIBCXX_CHECK_INT64_T
+
+ # For LFS support.
+ GLIBCXX_CHECK_LFS
+
+ AC_LC_MESSAGES
+
+ AC_TRY_COMPILE(
+ [#include <setjmp.h>],
+ [sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+ ],
+ [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
+
+ AC_FUNC_MMAP
+
+else
+
+ # This lets us hard-code the functionality we know we'll have in the cross
+ # target environment. "Let" is a sugar-coated word placed on an especially
+ # dull and tedious hack, actually.
+ #
+ # Here's why GLIBCXX_CHECK_MATH_SUPPORT, and other autoconf macros
+ # that involve linking, can't be used:
+ # "cannot open sim-crt0.o"
+ # "cannot open crt0.o"
+ # etc. All this is because there currently exists no unified, consistent
+ # way for top level CC information to be passed down to target directories:
+ # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
+ # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
+ # crosses can be removed.
+
+ # If Canadian cross, then don't pick up tools from the build directory.
+ # Used only in GLIBCXX_EXPORT_INCLUDES.
+ if test -n "$with_cross_host" &&
+ test x"$build_alias" != x"$with_cross_host" &&
+ test x"$build" != x"$target";
+ then
+ CANADIAN=yes
+ else
+ CANADIAN=no
+ fi
+
+ # Construct crosses by hand, eliminating bits that need ld...
+ # GLIBCXX_CHECK_COMPILER_FEATURES
+ # GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ # GLIBCXX_CHECK_MATH_SUPPORT
+
+ # First, test for "known" system libraries. We may be using newlib even
+ # on a hosted environment.
+ if test "x${with_newlib}" = "xyes"; then
+ os_include_dir="os/newlib"
+ AC_DEFINE(HAVE_HYPOT)
+
+ # GLIBCXX_CHECK_STDLIB_SUPPORT
+ AC_DEFINE(HAVE_STRTOF)
+ AC_DEFINE(HAVE_STRTOLD)
+ # AC_FUNC_MMAP
+ AC_DEFINE(HAVE_MMAP)
+
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_LDEXPF)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_POWF)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANHF)
+
+ AC_DEFINE(HAVE_S_ISREG)
+ AC_DEFINE(HAVE_S_IFREG)
+ else
+ m4_include([crossconfig.m4])
+ fi
+
+ # At some point, we should differentiate between architectures
+ # like x86, which have long double versions, and alpha/powerpc/etc.,
+ # which don't. For the time being, punt.
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_ACOSL)
+ AC_DEFINE(HAVE_ASINL)
+ AC_DEFINE(HAVE_ATAN2L)
+ AC_DEFINE(HAVE_ATANL)
+ AC_DEFINE(HAVE_CEILL)
+ AC_DEFINE(HAVE_COPYSIGNL)
+ AC_DEFINE(HAVE_COSL)
+ AC_DEFINE(HAVE_COSHL)
+ AC_DEFINE(HAVE_EXPL)
+ AC_DEFINE(HAVE_FABSL)
+ AC_DEFINE(HAVE_FLOORL)
+ AC_DEFINE(HAVE_FMODL)
+ AC_DEFINE(HAVE_FREXPL)
+ AC_DEFINE(HAVE_LDEXPL)
+ AC_DEFINE(HAVE_LOG10L)
+ AC_DEFINE(HAVE_LOGL)
+ AC_DEFINE(HAVE_MODFL)
+ AC_DEFINE(HAVE_POWL)
+ AC_DEFINE(HAVE_SINCOSL)
+ AC_DEFINE(HAVE_SINL)
+ AC_DEFINE(HAVE_SINHL)
+ AC_DEFINE(HAVE_SQRTL)
+ AC_DEFINE(HAVE_TANL)
+ AC_DEFINE(HAVE_TANHL)
+ fi
+
+fi
+
+# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
+GLIBCXX_ENABLE_SYMVERS([yes])
+
+# This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+GLIBCXX_CONFIGURE_TESTSUITE
+
+# Propagate the target-specific source directories through the build chain.
+# (Nothing currently uses cpu_include_dir directly; only atomicity_include_dir
+# uses it, and it only gets used in this file.)
+ATOMICITY_SRCDIR=config/${atomicity_dir}
+ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+OS_INC_SRCDIR=config/${os_include_dir}
+AC_SUBST(ATOMICITY_SRCDIR)
+AC_SUBST(ATOMIC_WORD_SRCDIR)
+AC_SUBST(OS_INC_SRCDIR)
+
+# Determine cross-compile flags and AM_CONDITIONALs.
+#AC_SUBST(GLIBCXX_IS_NATIVE)
+#AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
+# from GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT:
+#AM_CONDITIONAL(GLIBCXX_BUILD_LIBMATH, test $need_libmath = yes)
+GLIBCXX_EVALUATE_CONDITIONALS
+
+AC_CACHE_SAVE
+
+if test ${multilib} = yes; then
+ multilib_arg="--enable-multilib"
+else
+ multilib_arg=
+fi
+
+# Export all the install information.
+GLIBCXX_EXPORT_INSTALL_INFO
+
+# Export all the include and flag information to Makefiles.
+GLIBCXX_EXPORT_INCLUDES
+GLIBCXX_EXPORT_FLAGS
+
+if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
+ grep "enable shared" > /dev/null;
+then
+ LIBSUPCXX_PICFLAGS=-prefer-pic
+else
+ LIBSUPCXX_PICFLAGS=
+fi
+AC_SUBST(LIBSUPCXX_PICFLAGS)
+
+dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
+dnl which can all be called multiple times as needed, plus one (different)
+dnl AC_OUTPUT macro. This one lists the files to be created:
+AC_CONFIG_FILES( \
+ Makefile \
+ AC_FOREACH([DIR], glibcxx_SUBDIRS, [DIR/Makefile ])
+ )
+AC_CONFIG_FILES([scripts/check_survey],[chmod +x scripts/check_survey])
+AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags])
+
+dnl These commands are run at the end of config.status:
+AC_CONFIG_COMMANDS([default],
+[if test -n "$CONFIG_FILES"; then
+ # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
+ # that multilib installs will end up installed in the correct place.
+ # The testsuite needs it for multilib-aware ABI baseline files.
+ # To work around this not being passed down from config-ml.in ->
+ # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
+ # append it here. Only modify Makefiles that have just been created.
+ #
+ # Also, get rid of this simulated-VPATH thing that automake does.
+ cat > vpsed << \_EOF
+s!`test -f '$<' || echo '$(srcdir)/'`!!
+_EOF
+ for i in $SUBDIRS; do
+ case $CONFIG_FILES in
+ *${i}/Makefile*)
+ #echo "Adding MULTISUBDIR to $i/Makefile"
+ sed -f vpsed $i/Makefile > tmp
+ grep '^MULTISUBDIR =' Makefile >> tmp
+ mv tmp $i/Makefile
+ ;;
+ esac
+ done
+ rm vpsed
+ fi
+ (cd include && ${MAKE-make})
+],
+[
+# Variables needed in config.status (file generation) which aren't already
+# passed by autoconf.
+SUBDIRS="$SUBDIRS"
+])
+
+dnl And this actually makes things happen:
+AC_OUTPUT
diff --git a/contrib/libstdc++/configure.host b/contrib/libstdc++/configure.host
new file mode 100644
index 0000000..747cf74
--- /dev/null
+++ b/contrib/libstdc++/configure.host
@@ -0,0 +1,242 @@
+# configure.host
+#
+# This shell script handles all host based configuration for libstdc++.
+# It sets various shell variables based on the the host and the
+# configuration options. You can modify this shell script without needing
+# to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
+#
+# You should read docs/html/17_intro/porting.* to make sense of this file.
+#
+#
+# It uses the following shell variables as set by config.guess:
+# host The configuration host (full CPU-vendor-OS triplet)
+# host_cpu The configuration host CPU
+# host_os The configuration host OS
+#
+#
+# It sets the following shell variables:
+#
+# cpu_include_dir CPU-specific directory, defaults to cpu/generic
+# if cpu/host_cpu doesn't exist. This is
+# used to set atomicity_include_dir.
+#
+# os_include_dir OS-specific directory, defaults to os/generic.
+#
+# c_model the "C" header model, defaults to c_std.
+#
+# c_compatibility if "C" compatibility headers are necessary,
+# defaults to no.
+#
+# abi_baseline_pair directory name for ABI compat testing,
+# defaults to host_cpu-host_os (as per config.guess)
+#
+# atomicity_dir location of atomicity.h,
+# defaults to cpu_include_dir
+#
+# atomic_word_dir location of atomic_word.h
+# defaults to generic.
+#
+# It possibly modifies the following variables:
+#
+# OPT_LDFLAGS extra flags to pass when linking the library, of
+# the form '-Wl,blah'
+# (defaults to empty in acinclude.m4)
+#
+# port_specific_symbol_files
+# whitespace-seperated list of files containing
+# additional symbols to export from the shared
+# library, when symbol versioning is in use
+#
+#
+# If the defaults will not work for your platform, you need only change the
+# variables that won't work, i.e., you do not need to explicitly set a
+# working variable to its default. Most hosts only need to change the two
+# *_include_dir variables.
+
+
+# DEFAULTS
+# Try to guess a default cpu_include_dir based on the name of the CPU. We
+# cannot do this for os_include_dir; there are too many portable operating
+# systems out there. :-)
+c_model=c_std
+c_compatibility=no
+atomic_word_dir=cpu/generic
+
+# HOST-SPECIFIC OVERRIDES
+# Set any CPU-dependent bits.
+# Here we override defaults and catch more general cases due to naming
+# conventions (e.g., chip_name* to catch all variants).
+
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_cpu}" in
+ alpha*)
+ try_cpu=alpha
+ ;;
+ i[567]86 | x86_64)
+ try_cpu=i486
+ ;;
+ hppa*)
+ try_cpu=hppa
+ ;;
+ mips*)
+ # NB: cpu/mips/atomicity.h needs MIPS II or above.
+ # Of course, there is no sane way to test for this, no ABI macro,
+ # and no consistent host_cpu name differentiation. Therefore, only
+ # use it where it is known to be safe, ie it runs linux (see below).
+ try_cpu=generic
+ ;;
+ m680[246]0)
+ try_cpu=m68k
+ ;;
+ powerpc* | rs6000)
+ try_cpu=powerpc
+ ;;
+ s390x)
+ try_cpu=s390
+ ;;
+ sparc* | ultrasparc)
+ try_cpu=sparc
+ ;;
+ *)
+ if test -f ${glibcxx_srcdir}/config/cpu/${host_cpu}/atomicity.h; then
+ try_cpu=${host_cpu}
+ else
+ try_cpu=generic
+ fi
+ ;;
+esac
+
+# Set specific CPU overrides for atomic_word_dir. Most can just use generic.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_cpu}" in
+ cris*)
+ atomic_word_dir=cpu/cris
+ ;;
+ sparc* | ultrasparc)
+ atomic_word_dir=cpu/sparc
+ ;;
+esac
+
+# Now look for the file(s) usually tied to a CPU model, and make
+# default choices for those if they haven't been explicitly set
+# already.
+cpu_include_dir="cpu/${try_cpu}"
+atomicity_dir=$cpu_include_dir
+abi_baseline_pair=${try_cpu}-${host_os}
+
+
+# Set any OS-dependent bits.
+# Set the os_include_dir.
+# Set c_model, c_compatibility here.
+# If atomic ops and/or numeric limits are OS-specific rather than
+# CPU-specifc, set those here too.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_os}" in
+ aix4.[3456789]* | aix[56789]*)
+ # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
+ # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
+ # explicitly duplicate the directory for 4.[<3].
+ os_include_dir="os/aix"
+ atomicity_dir="os/aix"
+ OPT_LDFLAGS="-Wl,-G"
+ ;;
+ aix4.*)
+ os_include_dir="os/generic"
+ atomicity_dir="os/aix"
+ ;;
+ aix*)
+ os_include_dir="os/generic"
+ atomicity_dir="cpu/generic"
+ ;;
+ bsd*)
+ # Plain BSD attempts to share FreeBSD files.
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ cygwin*)
+ os_include_dir="os/newlib"
+ ;;
+ *djgpp*) # leading * picks up "msdosdjgpp"
+ os_include_dir="os/djgpp"
+ ;;
+ freebsd*)
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+ os_include_dir="os/gnu-linux"
+ ;;
+ hpux*)
+ os_include_dir="os/hpux"
+ ;;
+ irix[1-6] | irix[1-5].* | irix6.[0-4]*)
+ # This is known to work on at least IRIX 5.2 and 6.3.
+ os_include_dir="os/irix/irix5.2"
+ atomicity_dir=os/irix
+ atomic_word_dir=os/irix
+ ;;
+ irix6.5*)
+ os_include_dir="os/irix/irix6.5"
+ atomicity_dir=os/irix
+ atomic_word_dir=os/irix
+ ;;
+ mingw32*)
+ os_include_dir="os/mingw32"
+ ;;
+ netbsd*)
+ os_include_dir="os/bsd/netbsd"
+ ;;
+ qnx6.[12]*)
+ os_include_dir="os/qnx/qnx6.1"
+ c_model=c
+ ;;
+ solaris2)
+ # This too-vague configuration does not provide enough information
+ # to select a ctype include, and thus os_include_dir is a crap shoot.
+ echo "Please specify the full version of Solaris, ie. solaris2.9 " 1>&2
+ exit 1;
+ ;;
+ solaris2.5 | solaris2.5.[0-9])
+ os_include_dir="os/solaris/solaris2.5"
+ ;;
+ solaris2.6)
+ os_include_dir="os/solaris/solaris2.6"
+ ;;
+ solaris2.[789] | solaris2.1[0-9])
+ os_include_dir="os/solaris/solaris2.7"
+ ;;
+ tpf)
+ os_include_dir="os/tpf"
+ ;;
+ vxworks)
+ os_include_dir="os/vxworks"
+ ;;
+ windiss*)
+ os_include_dir="os/windiss"
+ ;;
+ *)
+ os_include_dir="os/generic"
+ ;;
+esac
+
+
+# Set any OS-dependent and CPU-dependent bits.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host}" in
+ mips*-*-linux*)
+ atomicity_dir="cpu/mips"
+ ;;
+ x86_64-*-linux*)
+ abi_baseline_pair="x86_64-linux-gnu"
+ ;;
+ alpha*-*-freebsd5*)
+ abi_baseline_pair="alpha-freebsd5"
+ ;;
+ i*86-*-freebsd4*)
+ abi_baseline_pair="i386-freebsd4"
+ ;;
+ i*86-*-freebsd5*)
+ abi_baseline_pair="i386-freebsd5"
+ ;;
+ sparc*-*-freebsd5*)
+ abi_baseline_pair="sparc-freebsd5"
+ ;;
+esac
diff --git a/contrib/libstdc++/crossconfig.m4 b/contrib/libstdc++/crossconfig.m4
new file mode 100644
index 0000000..96bbdd8
--- /dev/null
+++ b/contrib/libstdc++/crossconfig.m4
@@ -0,0 +1,505 @@
+dnl
+dnl This file contains stuff.
+dnl
+
+# Base decisions on target environment.
+case "${host}" in
+ *-darwin*)
+ # Darwin versions vary, but the linker should work in a cross environment,
+ # so we just check for all the features here.
+ # Check for available headers.
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+ machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
+ sys/types.h])
+
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
+ GLIBCXX_CHECK_MATH_SUPPORT
+ GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+
+ # For showmanyc_helper().
+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
+ GLIBCXX_CHECK_POLL
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+
+ # For xsputn_2().
+ AC_CHECK_HEADERS(sys/uio.h)
+ GLIBCXX_CHECK_WRITEV
+
+ AC_DEFINE(HAVE_LC_MESSAGES)
+
+ AC_TRY_COMPILE(
+ [#include <setjmp.h>],
+ [sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+ ],
+ [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
+
+ AC_DEFINE(HAVE_MMAP)
+ ;;
+
+ *djgpp)
+ AC_CHECK_HEADERS([float.h ieeefp.h inttypes.h locale.h \
+ memory.h stdint.h stdlib.h strings.h string.h unistd.h \
+ wchar.h wctype.h machine/endian.h sys/ioctl.h sys/param.h \
+ sys/resource.h sys/stat.h sys/time.h sys/types.h sys/uio.h])
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_MATH_SUPPORT
+ GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+ AC_DEFINE(HAVE_WRITEV)
+ ;;
+
+ *-freebsd*)
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
+ sys/time.h unistd.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ AC_DEFINE(HAVE_GETPAGESIZE)
+ AC_DEFINE(HAVE_SETENV)
+ AC_DEFINE(HAVE_SIGSETJMP)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOT)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+
+ AC_DEFINE(HAVE_MMAP)
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_LDEXPF)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_POWF)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANHF)
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_FINITEL)
+ AC_DEFINE(HAVE_ISINFL)
+ AC_DEFINE(HAVE_ISNANL)
+ fi
+ ;;
+ *-hpux*)
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOT)
+ case "$target" in
+ *-hpux10*)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ ;;
+ esac
+ ;;
+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+
+ # For LFS.
+ AC_DEFINE(HAVE_INT64_T)
+ case "$target" in
+ *-uclinux*)
+ # Don't enable LFS with uClibc
+ ;;
+ *)
+ AC_DEFINE(_GLIBCXX_USE_LFS)
+ esac
+
+ # For showmanyc_helper().
+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
+ GLIBCXX_CHECK_POLL
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+
+ # For xsputn_2().
+ AC_CHECK_HEADERS(sys/uio.h)
+ GLIBCXX_CHECK_WRITEV
+
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOT)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SINCOS)
+ AC_DEFINE(HAVE_SINCOSF)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANHF)
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_ACOSL)
+ AC_DEFINE(HAVE_ASINL)
+ AC_DEFINE(HAVE_ATANL)
+ AC_DEFINE(HAVE_ATAN2L)
+ AC_DEFINE(HAVE_CEILL)
+ AC_DEFINE(HAVE_COPYSIGNL)
+ AC_DEFINE(HAVE_COSL)
+ AC_DEFINE(HAVE_COSHL)
+ AC_DEFINE(HAVE_EXPL)
+ AC_DEFINE(HAVE_FABSL)
+ AC_DEFINE(HAVE_FINITEL)
+ AC_DEFINE(HAVE_FLOORL)
+ AC_DEFINE(HAVE_FMODL)
+ AC_DEFINE(HAVE_FREXPL)
+ AC_DEFINE(HAVE_HYPOTL)
+ AC_DEFINE(HAVE_ISINFL)
+ AC_DEFINE(HAVE_ISNANL)
+ AC_DEFINE(HAVE_LOGL)
+ AC_DEFINE(HAVE_LOG10L)
+ AC_DEFINE(HAVE_MODFL)
+ AC_DEFINE(HAVE_POWL)
+ AC_DEFINE(HAVE_SINL)
+ AC_DEFINE(HAVE_SINHL)
+ AC_DEFINE(HAVE_SINCOSL)
+ AC_DEFINE(HAVE_SQRTL)
+ AC_DEFINE(HAVE_TANL)
+ AC_DEFINE(HAVE_TANHL)
+ fi
+ ;;
+ *-mingw32*)
+ AC_CHECK_HEADERS([sys/types.h locale.h float.h])
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ ;;
+ *-netbsd*)
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_FINITEL)
+ AC_DEFINE(HAVE_ISINFL)
+ AC_DEFINE(HAVE_ISNANL)
+ fi
+ ;;
+ *-qnx6.1* | *-qnx6.2*)
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSL)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_COSHL)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_LOGL)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOG10L)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINL)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SINHL)
+ ;;
+ *-solaris*)
+ case "$target" in
+ # *-solaris2.5)
+ # os_include_dir="os/solaris/solaris2.5"
+ # ;;
+ # *-solaris2.6)
+ # os_include_dir="os/solaris/solaris2.6"
+ # ;;
+ *-solaris2.7 | *-solaris2.8 | *-solaris2.9 | *-solaris2.10)
+ AC_DEFINE(HAVE_GETPAGESIZE)
+ AC_DEFINE(HAVE_SIGSETJMP)
+ AC_DEFINE(HAVE_MBSTATE_T)
+ AC_DEFINE(HAVE_POLL)
+ AC_DEFINE(HAVE_S_ISREG)
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ AC_DEFINE(HAVE_BTOWC)
+ AC_DEFINE(HAVE_FGETWC)
+ AC_DEFINE(HAVE_FGETWS)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FPCLASS)
+ AC_DEFINE(HAVE_FPUTWC)
+ AC_DEFINE(HAVE_FPUTWS)
+ AC_DEFINE(HAVE_FWIDE)
+ AC_DEFINE(HAVE_FWPRINTF)
+ AC_DEFINE(HAVE_FWSCANF)
+ AC_DEFINE(HAVE_GETPAGESIZE)
+ AC_DEFINE(HAVE_GETWC)
+ AC_DEFINE(HAVE_GETWCHAR)
+ AC_DEFINE(HAVE_MBRLEN)
+ AC_DEFINE(HAVE_MBRTOWC)
+ AC_DEFINE(HAVE_MBSINIT)
+ AC_DEFINE(HAVE_MBSRTOWCS)
+ AC_DEFINE(HAVE_NL_LANGINFO)
+ AC_DEFINE(HAVE_PUTWC)
+ AC_DEFINE(HAVE_PUTWCHAR)
+ AC_DEFINE(HAVE_SWPRINTF)
+ AC_DEFINE(HAVE_SWSCANF)
+ AC_DEFINE(HAVE_UNGETWC)
+ AC_DEFINE(HAVE_VFWPRINTF)
+ AC_DEFINE(HAVE_VSWPRINTF)
+ AC_DEFINE(HAVE_VWPRINTF)
+ AC_DEFINE(HAVE_WCRTOMB)
+ AC_DEFINE(HAVE_WCSCAT)
+ AC_DEFINE(HAVE_WCSCHR)
+ AC_DEFINE(HAVE_WCSCMP)
+ AC_DEFINE(HAVE_WCSCOLL)
+ AC_DEFINE(HAVE_WCSCPY)
+ AC_DEFINE(HAVE_WCSCSPN)
+ AC_DEFINE(HAVE_WCSFTIME)
+ AC_DEFINE(HAVE_WCSLEN)
+ AC_DEFINE(HAVE_WCSNCAT)
+ AC_DEFINE(HAVE_WCSNCMP)
+ AC_DEFINE(HAVE_WCSNCPY)
+ AC_DEFINE(HAVE_WCSPBRK)
+ AC_DEFINE(HAVE_WCSRCHR)
+ AC_DEFINE(HAVE_WCSRTOMBS)
+ AC_DEFINE(HAVE_WCSSPN)
+ AC_DEFINE(HAVE_WCSSTR)
+ AC_DEFINE(HAVE_WCSTOD)
+ AC_DEFINE(HAVE_WCSTOK)
+ AC_DEFINE(HAVE_WCSTOL)
+ AC_DEFINE(HAVE_WCSTOUL)
+ AC_DEFINE(HAVE_WCSXFRM)
+ AC_DEFINE(HAVE_WCTOB)
+ AC_DEFINE(HAVE_WMEMCHR)
+ AC_DEFINE(HAVE_WMEMCMP)
+ AC_DEFINE(HAVE_WMEMCPY)
+ AC_DEFINE(HAVE_WMEMMOVE)
+ AC_DEFINE(HAVE_WMEMSET)
+ AC_DEFINE(HAVE_WPRINTF)
+ AC_DEFINE(HAVE_WSCANF)
+ AC_DEFINE(HAVE_ICONV)
+ AC_DEFINE(HAVE_ICONV_CLOSE)
+ AC_DEFINE(HAVE_ICONV_OPEN)
+ # Look for the pieces required for wchar_t support in order to
+ # get all the right HAVE_* macros defined.
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ # All of the dependencies for wide character support are here, so
+ # turn it on. This requires some syncronization with the
+ # GLIBCXX_CHECK_WCHAR_T_SUPPORT in acinclude.m4
+ AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
+ # Are these tested for even when cross?
+ AC_DEFINE(HAVE_FLOAT_H)
+ AC_DEFINE(HAVE_IEEEFP_H)
+ AC_DEFINE(HAVE_INTTYPES_H)
+ AC_DEFINE(HAVE_LOCALE_H)
+ AC_DEFINE(HAVE_NAN_H)
+ AC_DEFINE(HAVE_SYS_FILIO_H)
+ AC_DEFINE(HAVE_SYS_IOCTL_H)
+ AC_DEFINE(HAVE_SYS_ISA_DEFS_H)
+ AC_DEFINE(HAVE_SYS_RESOURCE_H)
+ AC_DEFINE(HAVE_SYS_TIME_H)
+ AC_DEFINE(HAVE_SYS_TYPES_H)
+ AC_DEFINE(HAVE_UNISTD_H)
+ AC_DEFINE(HAVE_WCHAR_H)
+ AC_DEFINE(HAVE_WCTYPE_H)
+ AC_DEFINE(HAVE_LIBM)
+ ;;
+ esac
+ case "$target" in
+ sparc*-*-solaris2.8 | sparc*-*-solaris2.9 | sparc*-*-solaris2.10)
+ # I saw these on sparc-sun-solaris2.8, but not 2.6, and not on i386
+ AC_DEFINE(HAVE___BUILTIN_ABS)
+ AC_DEFINE(HAVE___BUILTIN_LABS)
+ AC_DEFINE(HAVE___BUILTIN_FABS)
+ AC_DEFINE(HAVE___BUILTIN_FABSF)
+ AC_DEFINE(HAVE___BUILTIN_FABSL)
+ AC_DEFINE(HAVE___BUILTIN_COS)
+ AC_DEFINE(HAVE___BUILTIN_COSF)
+ AC_DEFINE(HAVE___BUILTIN_SIN)
+ AC_DEFINE(HAVE___BUILTIN_SINF)
+ ;;
+ esac
+ AC_DEFINE(HAVE_STRTOF)
+ AC_DEFINE(HAVE_STRTOLD)
+ AC_DEFINE(HAVE_MMAP)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_HYPOT)
+ ;;
+ *-tpf)
+ AC_CHECK_HEADERS([nan.h endian.h machine/endian.h \
+ sys/param.h sys/types.h locale.h float.h inttypes.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ AC_DEFINE(HAVE_SINCOS)
+ AC_DEFINE(HAVE_SINCOSF)
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_FINITEL)
+ AC_DEFINE(HAVE_HYPOTL)
+ AC_DEFINE(HAVE_ISINFL)
+ AC_DEFINE(HAVE_ISNANL)
+ fi
+ ;;
+ *-vxworks)
+ AC_DEFINE(HAVE_MMAP)
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_HYPOT)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_POWF)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANHF)
+ ;;
+ *-windiss*)
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ACOSL)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ASINL)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_ATAN2L)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_ATANL)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_CEILL)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSL)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_COSHL)
+ AC_DEFINE(HAVE_EXPF)
+ AC_DEFINE(HAVE_EXPL)
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_FABSL)
+ AC_DEFINE(HAVE_FLOORF)
+ AC_DEFINE(HAVE_FLOORL)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_FMODL)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_FREXPL)
+ AC_DEFINE(HAVE_LDEXPF)
+ AC_DEFINE(HAVE_LDEXPL)
+ AC_DEFINE(HAVE_LOG10F)
+ AC_DEFINE(HAVE_LOG10L)
+ AC_DEFINE(HAVE_LOGF)
+ AC_DEFINE(HAVE_MODFF)
+ AC_DEFINE(HAVE_MODFL)
+ AC_DEFINE(HAVE_POWF)
+ AC_DEFINE(HAVE_POWL)
+ AC_DEFINE(HAVE_SINF)
+ AC_DEFINE(HAVE_SINL)
+ AC_DEFINE(HAVE_SINHF)
+ AC_DEFINE(HAVE_SINHL)
+ AC_DEFINE(HAVE_SQRTF)
+ AC_DEFINE(HAVE_SQRTL)
+ AC_DEFINE(HAVE_TANF)
+ AC_DEFINE(HAVE_TANL)
+ AC_DEFINE(HAVE_TANHF)
+ AC_DEFINE(HAVE_TANHL)
+ ;;
+ *)
+ AC_MSG_ERROR([No support for this host/target combination.])
+ ;;
+esac
+
diff --git a/contrib/libstdc++/fragment.am b/contrib/libstdc++/fragment.am
new file mode 100644
index 0000000..d0d03a2
--- /dev/null
+++ b/contrib/libstdc++/fragment.am
@@ -0,0 +1,26 @@
+
+## This is used in all Makefile.am's except for libmath's. Set defaults here.
+
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
+
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
+WARN_CXXFLAGS = \
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+
+
+
+
+## vim:ft=automake
diff --git a/contrib/libstdc++/include/Makefile.am b/contrib/libstdc++/include/Makefile.am
index cf15102..34e2033 100644
--- a/contrib/libstdc++/include/Makefile.am
+++ b/contrib/libstdc++/include/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the include subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
@@ -21,22 +21,10 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-AUTOMAKE_OPTIONS = 1.3 cygnus
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-# Cross compiler and multilib support.
-CXX = @glibcpp_CXX@
-glibcpp_srcdir=@glibcpp_srcdir@
-glibcpp_builddir=@glibcpp_builddir@
-
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-INCLUDES = -nostdinc++ $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+include $(top_srcdir)/fragment.am
# Standard C++ includes.
-std_srcdir = ${glibcpp_srcdir}/include/std
+std_srcdir = ${glibcxx_srcdir}/include/std
std_builddir = .
std_headers = \
${std_srcdir}/std_algorithm.h \
@@ -68,7 +56,7 @@ std_headers = \
${std_srcdir}/std_utility.h \
${std_srcdir}/std_valarray.h \
${std_srcdir}/std_vector.h
-# Renamed at build time.
+# Renamed at build time.
std_headers_rename = \
algorithm \
bitset \
@@ -100,9 +88,11 @@ std_headers_rename = \
valarray \
vector
-bits_srcdir = ${glibcpp_srcdir}/include/bits
+bits_srcdir = ${glibcxx_srcdir}/include/bits
bits_builddir = ./bits
bits_headers = \
+ ${bits_srcdir}/allocator.h \
+ ${bits_srcdir}/atomicity.h \
${bits_srcdir}/basic_ios.h \
${bits_srcdir}/basic_ios.tcc \
${bits_srcdir}/basic_string.h \
@@ -111,9 +101,9 @@ bits_headers = \
${bits_srcdir}/char_traits.h \
${bits_srcdir}/codecvt.h \
${bits_srcdir}/concept_check.h \
+ ${bits_srcdir}/concurrence.h \
${bits_srcdir}/cpp_type_traits.h \
${bits_srcdir}/deque.tcc \
- ${bits_srcdir}/fpos.h \
${bits_srcdir}/fstream.tcc \
${bits_srcdir}/functexcept.h \
${bits_srcdir}/gslice.h \
@@ -128,14 +118,13 @@ bits_headers = \
${bits_srcdir}/localefwd.h \
${bits_srcdir}/mask_array.h \
${bits_srcdir}/ostream.tcc \
- ${bits_srcdir}/pthread_allocimpl.h \
+ ${bits_srcdir}/postypes.h \
${bits_srcdir}/stream_iterator.h \
${bits_srcdir}/streambuf_iterator.h \
${bits_srcdir}/slice_array.h \
${bits_srcdir}/sstream.tcc \
${bits_srcdir}/stl_algo.h \
${bits_srcdir}/stl_algobase.h \
- ${bits_srcdir}/stl_alloc.h \
${bits_srcdir}/stl_bvector.h \
${bits_srcdir}/stl_construct.h \
${bits_srcdir}/stl_deque.h \
@@ -150,7 +139,6 @@ bits_headers = \
${bits_srcdir}/stl_multiset.h \
${bits_srcdir}/stl_numeric.h \
${bits_srcdir}/stl_pair.h \
- ${bits_srcdir}/stl_pthread_alloc.h \
${bits_srcdir}/stl_queue.h \
${bits_srcdir}/stl_raw_storage_iter.h \
${bits_srcdir}/stl_relops.h \
@@ -166,10 +154,11 @@ bits_headers = \
${bits_srcdir}/type_traits.h \
${bits_srcdir}/valarray_array.h \
${bits_srcdir}/valarray_array.tcc \
- ${bits_srcdir}/valarray_meta.h \
+ ${bits_srcdir}/valarray_before.h \
+ ${bits_srcdir}/valarray_after.h \
${bits_srcdir}/vector.tcc
-backward_srcdir = ${glibcpp_srcdir}/include/backward
+backward_srcdir = ${glibcxx_srcdir}/include/backward
backward_builddir = ./backward
backward_headers = \
${backward_srcdir}/complex.h \
@@ -209,28 +198,36 @@ backward_headers = \
${backward_srcdir}/strstream \
${backward_srcdir}/backward_warning.h
-ext_srcdir = ${glibcpp_srcdir}/include/ext
+ext_srcdir = ${glibcxx_srcdir}/include/ext
ext_builddir = ./ext
ext_headers = \
${ext_srcdir}/algorithm \
+ ${ext_srcdir}/bitmap_allocator.h \
+ ${ext_srcdir}/debug_allocator.h \
+ ${ext_srcdir}/demangle.h \
${ext_srcdir}/enc_filebuf.h \
${ext_srcdir}/stdio_filebuf.h \
+ ${ext_srcdir}/stdio_sync_filebuf.h \
${ext_srcdir}/functional \
${ext_srcdir}/hash_map \
${ext_srcdir}/hash_set \
${ext_srcdir}/iterator \
+ ${ext_srcdir}/malloc_allocator.h \
${ext_srcdir}/memory \
+ ${ext_srcdir}/mt_allocator.h \
+ ${ext_srcdir}/new_allocator.h \
${ext_srcdir}/numeric \
+ ${ext_srcdir}/pod_char_traits.h \
+ ${ext_srcdir}/pool_allocator.h \
${ext_srcdir}/rb_tree \
${ext_srcdir}/rope \
${ext_srcdir}/ropeimpl.h \
${ext_srcdir}/slist \
- ${ext_srcdir}/stl_hash_fun.h \
- ${ext_srcdir}/stl_hashtable.h \
- ${ext_srcdir}/stl_rope.h
+ ${ext_srcdir}/hash_fun.h \
+ ${ext_srcdir}/hashtable.h
# This is the common subset of files that all three "C" header models use.
-c_base_srcdir = @C_INCLUDE_DIR@
+c_base_srcdir = $(C_INCLUDE_DIR)
c_base_builddir = .
c_base_headers = \
${c_base_srcdir}/std_cassert.h \
@@ -250,7 +247,7 @@ c_base_headers = \
${c_base_srcdir}/std_cstring.h \
${c_base_srcdir}/std_ctime.h \
${c_base_srcdir}/std_cwchar.h \
- ${c_base_srcdir}/std_cwctype.h
+ ${c_base_srcdir}/std_cwctype.h
c_base_headers_rename = \
cassert \
cctype \
@@ -269,10 +266,10 @@ c_base_headers_rename = \
cstring \
ctime \
cwchar \
- cwctype
+ cwctype
# "C" compatibility headers.
-c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
+c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
c_compatibility_builddir = .
c_compatibility_headers = \
${c_compatibility_srcdir}/assert.h \
@@ -292,60 +289,108 @@ c_compatibility_headers = \
${c_compatibility_srcdir}/string.h \
${c_compatibility_srcdir}/time.h \
${c_compatibility_srcdir}/wchar.h \
- ${c_compatibility_srcdir}/wctype.h
+ ${c_compatibility_srcdir}/wctype.h
+
+# Debug mode headers
+debug_srcdir = ${glibcxx_srcdir}/include/debug
+debug_builddir = ./debug
+debug_headers = \
+ ${debug_srcdir}/bitset \
+ ${debug_srcdir}/debug.h \
+ ${debug_srcdir}/deque \
+ ${debug_srcdir}/formatter.h \
+ ${debug_srcdir}/hash_map \
+ ${debug_srcdir}/hash_map.h \
+ ${debug_srcdir}/hash_multimap.h \
+ ${debug_srcdir}/hash_multiset.h \
+ ${debug_srcdir}/hash_set \
+ ${debug_srcdir}/hash_set.h \
+ ${debug_srcdir}/list \
+ ${debug_srcdir}/map \
+ ${debug_srcdir}/map.h \
+ ${debug_srcdir}/multimap.h \
+ ${debug_srcdir}/multiset.h \
+ ${debug_srcdir}/safe_base.h \
+ ${debug_srcdir}/safe_iterator.h \
+ ${debug_srcdir}/safe_iterator.tcc \
+ ${debug_srcdir}/safe_sequence.h \
+ ${debug_srcdir}/set \
+ ${debug_srcdir}/set.h \
+ ${debug_srcdir}/string \
+ ${debug_srcdir}/vector
# Some of the different "C" header models need extra files.
# Some "C" header schemes require the "C" compatibility headers.
# For --enable-cheaders=c_std
-if GLIBCPP_C_HEADERS_C_STD
-c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
+if GLIBCXX_C_HEADERS_C_STD
+c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
else
-c_base_headers_extra =
+c_base_headers_extra =
endif
-if GLIBCPP_C_HEADERS_COMPATIBILITY
+if GLIBCXX_C_HEADERS_COMPATIBILITY
c_compatibility_headers_extra = ${c_compatibility_headers}
else
-c_compatibility_headers_extra =
+c_compatibility_headers_extra =
endif
-target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
-target_builddir = ./${target_alias}/bits
-target_headers = \
- ${target_srcdir}/ctype_base.h \
- ${target_srcdir}/ctype_inline.h \
- ${target_srcdir}/ctype_noninline.h \
- ${target_srcdir}/os_defines.h \
- ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h
-
-# Non-installed target_header files.
-target_headers_noinst = \
- ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@
-
-# These target_headers_extra files are all built with ad hoc naming rules.
-target_headers_extra = \
- ${target_builddir}/basic_file.h \
- ${target_builddir}/c++config.h \
- ${target_builddir}/c++io.h \
- ${target_builddir}/c++locale.h \
- ${target_builddir}/messages_members.h \
- ${target_builddir}/time_members.h \
- ${target_builddir}/codecvt_specializations.h
-
-thread_target_headers = \
- ${target_builddir}/gthr.h \
- ${target_builddir}/gthr-single.h \
- ${target_builddir}/gthr-posix.h \
- ${target_builddir}/gthr-default.h
+host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
+host_builddir = ./${host_alias}/bits
+host_headers = \
+ ${host_srcdir}/ctype_base.h \
+ ${host_srcdir}/ctype_inline.h \
+ ${host_srcdir}/ctype_noninline.h \
+ ${host_srcdir}/os_defines.h \
+ ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h
+
+# Non-installed host_header files.
+host_headers_noinst = \
+ ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H)
+
+# These host_headers_extra files are all built with ad hoc naming rules.
+host_headers_extra = \
+ ${host_builddir}/basic_file.h \
+ ${host_builddir}/c++config.h \
+ ${host_builddir}/c++allocator.h \
+ ${host_builddir}/c++io.h \
+ ${host_builddir}/c++locale.h \
+ ${host_builddir}/messages_members.h \
+ ${host_builddir}/time_members.h \
+ ${host_builddir}/codecvt_specializations.h
+
+thread_host_headers = \
+ ${host_builddir}/gthr.h \
+ ${host_builddir}/gthr-single.h \
+ ${host_builddir}/gthr-posix.h \
+ ${host_builddir}/gthr-default.h
+
+pch_input = ${host_builddir}/stdc++.h
+pch_output_builddir = ${host_builddir}/stdc++.h.gch
+pch_source = ${glibcxx_srcdir}/include/stdc++.h
+PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
+if GLIBCXX_BUILD_PCH
+pch_build = ${pch_input}
+pch_install = install-pch
+else
+pch_build =
+pch_install =
+endif
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
-allstamps = \
+allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
- stamp-backward stamp-ext stamp-target
+ stamp-backward stamp-ext stamp-debug stamp-host
+
+# List of all files that are created by explicit building, editing, or
+# catenation.
+allcreated = \
+ ${host_builddir}/c++config.h \
+ ${thread_host_headers} \
+ ${pch_build}
# Here are the rules for building the headers
-all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
+all-local: ${allstamped} ${allcreated}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
@@ -353,124 +398,151 @@ stamp-std: ${std_headers}
@if [ ! -d "${std_builddir}" ]; then \
mkdir -p ${std_builddir} ;\
fi ;\
- (cd ${std_builddir} && for h in $?; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- @LN_S@ $$h ./$${official_name} || true ;\
- done) ;\
- echo `date` > stamp-std
-
-stamp-std-precompile: stamp-std
- for h in ${std_headers_rename}; do \
- $(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \
- done; \
- echo `date` > stamp-std-precompile
+ if [ ! -f stamp-std ]; then \
+ (cd ${std_builddir} && for h in $?; do \
+ official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${official_name} || true ;\
+ done) ;\
+ fi ;\
+ $(STAMP) stamp-std
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
mkdir -p ${bits_builddir} ;\
fi ;\
- (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-bits
+ if [ ! -f stamp-bits ]; then \
+ (cd ${bits_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-bits
-stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
+stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
- (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- @LN_S@ $$h ./$${official_name} || true ;\
- done) ;\
- if [ ! -z "${c_base_headers_extra}" ]; then \
- (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
+ if [ ! -f stamp-c_base ]; then \
+ (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
+ official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${official_name} || true ;\
+ done) ;\
+ if [ ! -z "${c_base_headers_extra}" ]; then \
+ (cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\
+ fi ;\
fi ;\
- echo `date` > stamp-c_base
+ $(STAMP) stamp-c_base
stamp-c_compatibility: ${c_compatibility_headers_extra}
@if [ ! -d "${c_compatibility_builddir}" ]; then \
mkdir -p ${c_compatibility_builddir} ;\
fi ;\
- if [ ! -z "${c_compatibility_headers_extra}" ]; then \
- (cd ${c_compatibility_builddir} && @LN_S@ $? . || true) ;\
+ if [ ! -f stamp-c_compatibility ]; then \
+ if [ ! -z "${c_compatibility_headers_extra}" ]; then \
+ (cd ${c_compatibility_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
fi ;\
- echo `date` > stamp-c_compatibility
+ $(STAMP) stamp-c_compatibility
stamp-backward: ${backward_headers}
@if [ ! -d "${backward_builddir}" ]; then \
mkdir -p ${backward_builddir} ;\
fi ;\
- (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-backward
+ if [ ! -f stamp-backward ]; then \
+ (cd ${backward_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-backward
stamp-ext: ${ext_headers}
@if [ ! -d "${ext_builddir}" ]; then \
- mkdir -p ${ext_builddir} ;\
+ mkdir -p ${ext_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-ext ]; then \
+ (cd ${ext_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-ext
+
+stamp-debug: ${debug_headers}
+ @if [ ! -d "${debug_builddir}" ]; then \
+ mkdir -p ${debug_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-debug ]; then \
+ (cd ${debug_builddir} && @LN_S@ $? . || true) ;\
fi ;\
- (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-ext
-
-stamp-${target_alias}:
- @if [ ! -d ${target_builddir} ]; then \
- mkdir -p ${target_builddir} ;\
- echo `date` > stamp-${target_alias} ;\
- fi
-
-# Target includes static.
-# XXX Missing dependency info for {target_headers_extra}
-stamp-target: ${target_headers} ${target_headers_noinst} stamp-${target_alias}
- @if [ ! -f stamp-target ]; then \
- (cd ${target_builddir} ;\
- @LN_S@ ${target_headers} . || true ;\
- @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@ . || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CTIME_H@ time_members.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true);\
- echo `date` > stamp-target ; \
- fi
-
-# Target includes dynamic.
-${target_builddir}/c++config.h: ${CONFIG_HEADER} \
- ${glibcpp_srcdir}/include/bits/c++config \
- stamp-${target_alias}
- @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
- sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
- -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
- -e 's/VERSION/_GLIBCPP_VERSION/g' \
- -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
+ $(STAMP) stamp-debug
+
+stamp-${host_alias}:
+ @if [ ! -d ${host_builddir} ]; then \
+ mkdir -p ${host_builddir} ;\
+ fi ;\
+ $(STAMP) stamp-${host_alias}
+
+# Host includes static.
+# XXX Missing dependency info for {host_headers_extra}
+stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
+ @if [ ! -f stamp-host ]; then \
+ (cd ${host_builddir} ;\
+ $(LN_S) ${host_headers} . || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(ALLOCATOR_H) c++allocator.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_H) messages_members.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CTIME_H) time_members.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_H) codecvt_specializations.h || true);\
+ fi ;\
+ $(STAMP) stamp-host
+
+# Host includes dynamic.
+${host_builddir}/c++config.h: ${top_builddir}/config.h \
+ ${glibcxx_srcdir}/include/bits/c++config \
+ stamp-${host_alias}
+ @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+ sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
+ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
+ -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
< ${CONFIG_HEADER} >> $@ ;\
- echo "#endif // _CPP_CPPCONFIG_" >>$@
+ echo "#endif // _CXXCONFIG_" >>$@
-# Target includes for threads
-glibcpp_thread_h = @glibcpp_thread_h@
+# Host includes for threads
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
- sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias}
+ sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
+ -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/gthr.h > $@
-${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-single.h > $@
-${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
- -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
+ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-posix.h > $@
-${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
- -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
+ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
- < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
+ < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
+
+# Build a precompiled C++ include, stdc++.h.gch.
+${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source}
+ touch ${pch_input}; \
+ if [ ! -d "${pch_output_builddir}" ]; then \
+ mkdir -p ${pch_output_builddir}; \
+ fi; \
+ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
+ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
# For robustness sake (in light of junk files or in-source
# configuration), copy from the build or source tree to the install
@@ -478,10 +550,33 @@ ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
# components. Yes, with minor differences, this is sheer duplication
# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
# `$(mkinstalldirs)' instead of `mkdir -p'. In particular,
-# target_headers_extra are taken out of the build tree staging area;
+# host_headers_extra are taken out of the build tree staging area;
# the rest are taken from the original source tree.
-gxx_include_dir = @gxx_include_dir@
-install-data-local:
+
+if GLIBCXX_HOSTED
+install-data-local: install-headers ${pch_install}
+else
+install-data-local: install-freestanding-headers
+endif
+
+# This is a subset of the full install-headers rule. We only need <cstddef>,
+# <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any
+# files which they include (and which we provide). The last three headers
+# are installed by libsupc++, so only the first four and the sub-includes
+# are copied here.
+install-freestanding-headers:
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir}
+ for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
+ $(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir}
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
+ for file in cstddef cstdlib cstdarg; do \
+ $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
+
+# The real deal.
+install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir}
for file in ${bits_headers}; do \
@@ -504,13 +599,21 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
for file in ${std_headers_rename}; do \
$(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done
- $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${target_builddir}
- for file in ${target_headers} ${target_headers_extra} \
- ${thread_target_headers}; do \
- $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir}
+ for file in ${debug_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir}
+ for file in ${host_headers} ${host_headers_extra} \
+ ${thread_host_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done
+
+install-pch:
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}
+ for file in ${pch_output_builddir}/*; do \
+ $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}; done
# By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.pch stamp-std-precompile
+CLEANFILES = ${pch_input} ${pch_output_builddir}/*
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled
diff --git a/contrib/libstdc++/include/Makefile.in b/contrib/libstdc++/include/Makefile.in
index b6cc451..aad3d17 100644
--- a/contrib/libstdc++/include/Makefile.in
+++ b/contrib/libstdc++/include/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,71 +12,52 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
-ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@
-CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
@@ -83,36 +66,73 @@ CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
+CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@
+GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@
+GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@
+GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBMATHOBJS = @LIBMATHOBJS@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_MAP = @SYMVER_MAP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
@@ -120,39 +140,87 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
-baseline_file = @baseline_file@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
+datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
-glibcpp_CXX = @glibcpp_CXX@
-glibcpp_MOFILES = @glibcpp_MOFILES@
-glibcpp_POFILES = @glibcpp_POFILES@
-glibcpp_basedir = @glibcpp_basedir@
-glibcpp_localedir = @glibcpp_localedir@
-glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_toolexecdir = @glibcpp_toolexecdir@
-glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
-ifGNUmake = @ifGNUmake@
-libio_la = @libio_la@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+mandir = @mandir@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
-AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
+
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
+
+WARN_CXXFLAGS = \
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
-# Cross compiler and multilib support.
-CXX = @glibcpp_CXX@
-glibcpp_srcdir = @glibcpp_srcdir@
-glibcpp_builddir = @glibcpp_builddir@
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-INCLUDES = -nostdinc++ $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
# Standard C++ includes.
-std_srcdir = ${glibcpp_srcdir}/include/std
+std_srcdir = ${glibcxx_srcdir}/include/std
std_builddir = .
std_headers = \
${std_srcdir}/std_algorithm.h \
@@ -185,7 +253,7 @@ std_headers = \
${std_srcdir}/std_valarray.h \
${std_srcdir}/std_vector.h
-# Renamed at build time.
+# Renamed at build time.
std_headers_rename = \
algorithm \
bitset \
@@ -218,9 +286,11 @@ std_headers_rename = \
vector
-bits_srcdir = ${glibcpp_srcdir}/include/bits
+bits_srcdir = ${glibcxx_srcdir}/include/bits
bits_builddir = ./bits
bits_headers = \
+ ${bits_srcdir}/allocator.h \
+ ${bits_srcdir}/atomicity.h \
${bits_srcdir}/basic_ios.h \
${bits_srcdir}/basic_ios.tcc \
${bits_srcdir}/basic_string.h \
@@ -229,9 +299,9 @@ bits_headers = \
${bits_srcdir}/char_traits.h \
${bits_srcdir}/codecvt.h \
${bits_srcdir}/concept_check.h \
+ ${bits_srcdir}/concurrence.h \
${bits_srcdir}/cpp_type_traits.h \
${bits_srcdir}/deque.tcc \
- ${bits_srcdir}/fpos.h \
${bits_srcdir}/fstream.tcc \
${bits_srcdir}/functexcept.h \
${bits_srcdir}/gslice.h \
@@ -246,14 +316,13 @@ bits_headers = \
${bits_srcdir}/localefwd.h \
${bits_srcdir}/mask_array.h \
${bits_srcdir}/ostream.tcc \
- ${bits_srcdir}/pthread_allocimpl.h \
+ ${bits_srcdir}/postypes.h \
${bits_srcdir}/stream_iterator.h \
${bits_srcdir}/streambuf_iterator.h \
${bits_srcdir}/slice_array.h \
${bits_srcdir}/sstream.tcc \
${bits_srcdir}/stl_algo.h \
${bits_srcdir}/stl_algobase.h \
- ${bits_srcdir}/stl_alloc.h \
${bits_srcdir}/stl_bvector.h \
${bits_srcdir}/stl_construct.h \
${bits_srcdir}/stl_deque.h \
@@ -268,7 +337,6 @@ bits_headers = \
${bits_srcdir}/stl_multiset.h \
${bits_srcdir}/stl_numeric.h \
${bits_srcdir}/stl_pair.h \
- ${bits_srcdir}/stl_pthread_alloc.h \
${bits_srcdir}/stl_queue.h \
${bits_srcdir}/stl_raw_storage_iter.h \
${bits_srcdir}/stl_relops.h \
@@ -284,11 +352,12 @@ bits_headers = \
${bits_srcdir}/type_traits.h \
${bits_srcdir}/valarray_array.h \
${bits_srcdir}/valarray_array.tcc \
- ${bits_srcdir}/valarray_meta.h \
+ ${bits_srcdir}/valarray_before.h \
+ ${bits_srcdir}/valarray_after.h \
${bits_srcdir}/vector.tcc
-backward_srcdir = ${glibcpp_srcdir}/include/backward
+backward_srcdir = ${glibcxx_srcdir}/include/backward
backward_builddir = ./backward
backward_headers = \
${backward_srcdir}/complex.h \
@@ -329,29 +398,37 @@ backward_headers = \
${backward_srcdir}/backward_warning.h
-ext_srcdir = ${glibcpp_srcdir}/include/ext
+ext_srcdir = ${glibcxx_srcdir}/include/ext
ext_builddir = ./ext
ext_headers = \
${ext_srcdir}/algorithm \
+ ${ext_srcdir}/bitmap_allocator.h \
+ ${ext_srcdir}/debug_allocator.h \
+ ${ext_srcdir}/demangle.h \
${ext_srcdir}/enc_filebuf.h \
${ext_srcdir}/stdio_filebuf.h \
+ ${ext_srcdir}/stdio_sync_filebuf.h \
${ext_srcdir}/functional \
${ext_srcdir}/hash_map \
${ext_srcdir}/hash_set \
${ext_srcdir}/iterator \
+ ${ext_srcdir}/malloc_allocator.h \
${ext_srcdir}/memory \
+ ${ext_srcdir}/mt_allocator.h \
+ ${ext_srcdir}/new_allocator.h \
${ext_srcdir}/numeric \
+ ${ext_srcdir}/pod_char_traits.h \
+ ${ext_srcdir}/pool_allocator.h \
${ext_srcdir}/rb_tree \
${ext_srcdir}/rope \
${ext_srcdir}/ropeimpl.h \
${ext_srcdir}/slist \
- ${ext_srcdir}/stl_hash_fun.h \
- ${ext_srcdir}/stl_hashtable.h \
- ${ext_srcdir}/stl_rope.h
+ ${ext_srcdir}/hash_fun.h \
+ ${ext_srcdir}/hashtable.h
# This is the common subset of files that all three "C" header models use.
-c_base_srcdir = @C_INCLUDE_DIR@
+c_base_srcdir = $(C_INCLUDE_DIR)
c_base_builddir = .
c_base_headers = \
${c_base_srcdir}/std_cassert.h \
@@ -371,7 +448,7 @@ c_base_headers = \
${c_base_srcdir}/std_cstring.h \
${c_base_srcdir}/std_ctime.h \
${c_base_srcdir}/std_cwchar.h \
- ${c_base_srcdir}/std_cwctype.h
+ ${c_base_srcdir}/std_cwctype.h
c_base_headers_rename = \
cassert \
@@ -391,11 +468,11 @@ c_base_headers_rename = \
cstring \
ctime \
cwchar \
- cwctype
+ cwctype
# "C" compatibility headers.
-c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
+c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
c_compatibility_builddir = .
c_compatibility_headers = \
${c_compatibility_srcdir}/assert.h \
@@ -415,174 +492,263 @@ c_compatibility_headers = \
${c_compatibility_srcdir}/string.h \
${c_compatibility_srcdir}/time.h \
${c_compatibility_srcdir}/wchar.h \
- ${c_compatibility_srcdir}/wctype.h
-
-@GLIBCPP_C_HEADERS_C_STD_TRUE@c_base_headers_extra = @GLIBCPP_C_HEADERS_C_STD_TRUE@${c_base_srcdir}/cmath.tcc
-@GLIBCPP_C_HEADERS_C_STD_FALSE@c_base_headers_extra =
-@GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = @GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@${c_compatibility_headers}
-@GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra =
-
-target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
-target_builddir = ./${target_alias}/bits
-target_headers = \
- ${target_srcdir}/ctype_base.h \
- ${target_srcdir}/ctype_inline.h \
- ${target_srcdir}/ctype_noninline.h \
- ${target_srcdir}/os_defines.h \
- ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h
-
-
-# Non-installed target_header files.
-target_headers_noinst = \
- ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@
-
-
-# These target_headers_extra files are all built with ad hoc naming rules.
-target_headers_extra = \
- ${target_builddir}/basic_file.h \
- ${target_builddir}/c++config.h \
- ${target_builddir}/c++io.h \
- ${target_builddir}/c++locale.h \
- ${target_builddir}/messages_members.h \
- ${target_builddir}/time_members.h \
- ${target_builddir}/codecvt_specializations.h
-
-
-thread_target_headers = \
- ${target_builddir}/gthr.h \
- ${target_builddir}/gthr-single.h \
- ${target_builddir}/gthr-posix.h \
- ${target_builddir}/gthr-default.h
-
+ ${c_compatibility_srcdir}/wctype.h
+
+
+# Debug mode headers
+debug_srcdir = ${glibcxx_srcdir}/include/debug
+debug_builddir = ./debug
+debug_headers = \
+ ${debug_srcdir}/bitset \
+ ${debug_srcdir}/debug.h \
+ ${debug_srcdir}/deque \
+ ${debug_srcdir}/formatter.h \
+ ${debug_srcdir}/hash_map \
+ ${debug_srcdir}/hash_map.h \
+ ${debug_srcdir}/hash_multimap.h \
+ ${debug_srcdir}/hash_multiset.h \
+ ${debug_srcdir}/hash_set \
+ ${debug_srcdir}/hash_set.h \
+ ${debug_srcdir}/list \
+ ${debug_srcdir}/map \
+ ${debug_srcdir}/map.h \
+ ${debug_srcdir}/multimap.h \
+ ${debug_srcdir}/multiset.h \
+ ${debug_srcdir}/safe_base.h \
+ ${debug_srcdir}/safe_iterator.h \
+ ${debug_srcdir}/safe_iterator.tcc \
+ ${debug_srcdir}/safe_sequence.h \
+ ${debug_srcdir}/set \
+ ${debug_srcdir}/set.h \
+ ${debug_srcdir}/string \
+ ${debug_srcdir}/vector
+
+@GLIBCXX_C_HEADERS_C_STD_FALSE@c_base_headers_extra =
+
+# Some of the different "C" header models need extra files.
+# Some "C" header schemes require the "C" compatibility headers.
+# For --enable-cheaders=c_std
+@GLIBCXX_C_HEADERS_C_STD_TRUE@c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
+@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra =
+
+@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers}
+
+host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
+host_builddir = ./${host_alias}/bits
+host_headers = \
+ ${host_srcdir}/ctype_base.h \
+ ${host_srcdir}/ctype_inline.h \
+ ${host_srcdir}/ctype_noninline.h \
+ ${host_srcdir}/os_defines.h \
+ ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h
+
+
+# Non-installed host_header files.
+host_headers_noinst = \
+ ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H)
+
+
+# These host_headers_extra files are all built with ad hoc naming rules.
+host_headers_extra = \
+ ${host_builddir}/basic_file.h \
+ ${host_builddir}/c++config.h \
+ ${host_builddir}/c++allocator.h \
+ ${host_builddir}/c++io.h \
+ ${host_builddir}/c++locale.h \
+ ${host_builddir}/messages_members.h \
+ ${host_builddir}/time_members.h \
+ ${host_builddir}/codecvt_specializations.h
+
+
+thread_host_headers = \
+ ${host_builddir}/gthr.h \
+ ${host_builddir}/gthr-single.h \
+ ${host_builddir}/gthr-posix.h \
+ ${host_builddir}/gthr-default.h
+
+
+pch_input = ${host_builddir}/stdc++.h
+pch_output_builddir = ${host_builddir}/stdc++.h.gch
+pch_source = ${glibcxx_srcdir}/include/stdc++.h
+PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
+@GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_input}
+@GLIBCXX_BUILD_PCH_FALSE@pch_build =
+@GLIBCXX_BUILD_PCH_TRUE@pch_install = install-pch
+@GLIBCXX_BUILD_PCH_FALSE@pch_install =
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
-allstamps = \
+allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
- stamp-backward stamp-ext stamp-target
-
+ stamp-backward stamp-ext stamp-debug stamp-host
-# Target includes for threads
-glibcpp_thread_h = @glibcpp_thread_h@
-uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-# For robustness sake (in light of junk files or in-source
-# configuration), copy from the build or source tree to the install
-# tree using only the human-maintained file lists and directory
-# components. Yes, with minor differences, this is sheer duplication
-# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
-# `$(mkinstalldirs)' instead of `mkdir -p'. In particular,
-# target_headers_extra are taken out of the build tree staging area;
-# the rest are taken from the original source tree.
-gxx_include_dir = @gxx_include_dir@
+# List of all files that are created by explicit building, editing, or
+# catenation.
+allcreated = \
+ ${host_builddir}/c++config.h \
+ ${thread_host_headers} \
+ ${pch_build}
-# By adding these files here, automake will remove them for 'make clean'
-CLEANFILES = *.pch stamp-std-precompile
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-DIST_COMMON = Makefile.am Makefile.in
+# Host includes for threads
+uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+# By adding these files here, automake will remove them for 'make clean'
+CLEANFILES = ${pch_input} ${pch_output_builddir}/*
+subdir = include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+depcomp =
+am__depfiles_maybe =
+DIST_SOURCES =
+DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \
+ Makefile.am
+all: all-am
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+mostlyclean-libtool:
+ -rm -f *.lo
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
tags: TAGS
TAGS:
+ctags: CTAGS
+CTAGS:
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-subdir = include
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ $(mkinstalldirs) $(distdir)/..
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
+check-am: all-am
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
+all-am: Makefile all-local
-install-data-am: install-data-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile all-local
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool mostlyclean-am
-clean-am: clean-generic mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-generic clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-am
+info: info-am
-maintainer-clean-am: maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
-.PHONY: tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-local \
-all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+ clean-libtool distclean distclean-generic distclean-libtool \
+ distdir dvi dvi-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-info-am
# Here are the rules for building the headers
-all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
+all-local: ${allstamped} ${allcreated}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
@@ -590,121 +756,179 @@ stamp-std: ${std_headers}
@if [ ! -d "${std_builddir}" ]; then \
mkdir -p ${std_builddir} ;\
fi ;\
- (cd ${std_builddir} && for h in $?; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- @LN_S@ $$h ./$${official_name} || true ;\
- done) ;\
- echo `date` > stamp-std
-
-stamp-std-precompile: stamp-std
- for h in ${std_headers_rename}; do \
- $(CXX) -Winvalid-pch -x c++-header $(INCLUDES) $${h}; \
- done; \
- echo `date` > stamp-std-precompile
+ if [ ! -f stamp-std ]; then \
+ (cd ${std_builddir} && for h in $?; do \
+ official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${official_name} || true ;\
+ done) ;\
+ fi ;\
+ $(STAMP) stamp-std
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
mkdir -p ${bits_builddir} ;\
fi ;\
- (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-bits
+ if [ ! -f stamp-bits ]; then \
+ (cd ${bits_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-bits
-stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
+stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
- (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
- official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
- @LN_S@ $$h ./$${official_name} || true ;\
- done) ;\
- if [ ! -z "${c_base_headers_extra}" ]; then \
- (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
+ if [ ! -f stamp-c_base ]; then \
+ (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
+ official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+ $(LN_S) $$h ./$${official_name} || true ;\
+ done) ;\
+ if [ ! -z "${c_base_headers_extra}" ]; then \
+ (cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\
+ fi ;\
fi ;\
- echo `date` > stamp-c_base
+ $(STAMP) stamp-c_base
stamp-c_compatibility: ${c_compatibility_headers_extra}
@if [ ! -d "${c_compatibility_builddir}" ]; then \
mkdir -p ${c_compatibility_builddir} ;\
fi ;\
- if [ ! -z "${c_compatibility_headers_extra}" ]; then \
- (cd ${c_compatibility_builddir} && @LN_S@ $? . || true) ;\
+ if [ ! -f stamp-c_compatibility ]; then \
+ if [ ! -z "${c_compatibility_headers_extra}" ]; then \
+ (cd ${c_compatibility_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
fi ;\
- echo `date` > stamp-c_compatibility
+ $(STAMP) stamp-c_compatibility
stamp-backward: ${backward_headers}
@if [ ! -d "${backward_builddir}" ]; then \
mkdir -p ${backward_builddir} ;\
fi ;\
- (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-backward
+ if [ ! -f stamp-backward ]; then \
+ (cd ${backward_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-backward
stamp-ext: ${ext_headers}
@if [ ! -d "${ext_builddir}" ]; then \
- mkdir -p ${ext_builddir} ;\
+ mkdir -p ${ext_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-ext ]; then \
+ (cd ${ext_builddir} && $(LN_S) $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-ext
+
+stamp-debug: ${debug_headers}
+ @if [ ! -d "${debug_builddir}" ]; then \
+ mkdir -p ${debug_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-debug ]; then \
+ (cd ${debug_builddir} && @LN_S@ $? . || true) ;\
fi ;\
- (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
- echo `date` > stamp-ext
-
-stamp-${target_alias}:
- @if [ ! -d ${target_builddir} ]; then \
- mkdir -p ${target_builddir} ;\
- echo `date` > stamp-${target_alias} ;\
- fi
-
-# Target includes static.
-# XXX Missing dependency info for {target_headers_extra}
-stamp-target: ${target_headers} ${target_headers_noinst} stamp-${target_alias}
- @if [ ! -f stamp-target ]; then \
- (cd ${target_builddir} ;\
- @LN_S@ ${target_headers} . || true ;\
- @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@ . || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CTIME_H@ time_members.h || true ;\
- @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true);\
- echo `date` > stamp-target ; \
- fi
-
-# Target includes dynamic.
-${target_builddir}/c++config.h: ${CONFIG_HEADER} \
- ${glibcpp_srcdir}/include/bits/c++config \
- stamp-${target_alias}
- @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
- sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
- -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
- -e 's/VERSION/_GLIBCPP_VERSION/g' \
- -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
+ $(STAMP) stamp-debug
+
+stamp-${host_alias}:
+ @if [ ! -d ${host_builddir} ]; then \
+ mkdir -p ${host_builddir} ;\
+ fi ;\
+ $(STAMP) stamp-${host_alias}
+
+# Host includes static.
+# XXX Missing dependency info for {host_headers_extra}
+stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
+ @if [ ! -f stamp-host ]; then \
+ (cd ${host_builddir} ;\
+ $(LN_S) ${host_headers} . || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(ALLOCATOR_H) c++allocator.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_H) messages_members.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CTIME_H) time_members.h || true ;\
+ $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_H) codecvt_specializations.h || true);\
+ fi ;\
+ $(STAMP) stamp-host
+
+# Host includes dynamic.
+${host_builddir}/c++config.h: ${top_builddir}/config.h \
+ ${glibcxx_srcdir}/include/bits/c++config \
+ stamp-${host_alias}
+ @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+ sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
+ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
+ -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
< ${CONFIG_HEADER} >> $@ ;\
- echo "#endif // _CPP_CPPCONFIG_" >>$@
+ echo "#endif // _CXXCONFIG_" >>$@
-${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
- sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias}
+ sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
+ -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/gthr.h > $@
-${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-single.h > $@
-${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
- -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
+ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-posix.h > $@
-${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
- stamp-${target_alias}
- sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
- -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
- -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
+ stamp-${host_alias}
+ sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
+ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
- < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
-install-data-local:
+ < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
+
+# Build a precompiled C++ include, stdc++.h.gch.
+${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source}
+ touch ${pch_input}; \
+ if [ ! -d "${pch_output_builddir}" ]; then \
+ mkdir -p ${pch_output_builddir}; \
+ fi; \
+ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
+ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
+
+# For robustness sake (in light of junk files or in-source
+# configuration), copy from the build or source tree to the install
+# tree using only the human-maintained file lists and directory
+# components. Yes, with minor differences, this is sheer duplication
+# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
+# `$(mkinstalldirs)' instead of `mkdir -p'. In particular,
+# host_headers_extra are taken out of the build tree staging area;
+# the rest are taken from the original source tree.
+
+@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers ${pch_install}
+@GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers
+
+# This is a subset of the full install-headers rule. We only need <cstddef>,
+# <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any
+# files which they include (and which we provide). The last three headers
+# are installed by libsupc++, so only the first four and the sub-includes
+# are copied here.
+install-freestanding-headers:
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir}
+ for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
+ $(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir}
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
+ for file in cstddef cstdlib cstdarg; do \
+ $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
+
+# The real deal.
+install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir}
for file in ${bits_headers}; do \
@@ -727,10 +951,18 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
for file in ${std_headers_rename}; do \
$(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done
- $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${target_builddir}
- for file in ${target_headers} ${target_headers_extra} \
- ${thread_target_headers}; do \
- $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir}
+ for file in ${debug_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir}
+ for file in ${host_headers} ${host_headers_extra} \
+ ${thread_host_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done
+
+install-pch:
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}
+ for file in ${pch_output_builddir}/*; do \
+ $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}; done
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled
@@ -740,7 +972,6 @@ install-data-local:
.PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
$(std_headers_rename): ; @:
$(c_base_headers_rename): ; @:
-
# 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/contrib/libstdc++/include/backward/algo.h b/contrib/libstdc++/include/backward/algo.h
index a3554a8..6f24835 100644
--- a/contrib/libstdc++/include/backward/algo.h
+++ b/contrib/libstdc++/include/backward/algo.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_ALGO_H
-#define _CPP_BACKWARD_ALGO_H 1
+#ifndef _BACKWARD_ALGO_H
+#define _BACKWARD_ALGO_H 1
#include "backward_warning.h"
#include "algobase.h"
@@ -66,57 +66,57 @@
#include <ext/numeric>
// Names from <stl_algo.h>
-using std::for_each;
-using std::find;
-using std::find_if;
-using std::adjacent_find;
-using std::count;
-using std::count_if;
-using std::search;
-using std::search_n;
-using std::swap_ranges;
-using std::transform;
-using std::replace;
-using std::replace_if;
-using std::replace_copy;
-using std::replace_copy_if;
-using std::generate;
-using std::generate_n;
-using std::remove;
-using std::remove_if;
-using std::remove_copy;
-using std::remove_copy_if;
-using std::unique;
-using std::unique_copy;
-using std::reverse;
-using std::reverse_copy;
-using std::rotate;
-using std::rotate_copy;
-using std::random_shuffle;
-using std::partition;
-using std::stable_partition;
-using std::sort;
-using std::stable_sort;
-using std::partial_sort;
-using std::partial_sort_copy;
-using std::nth_element;
-using std::lower_bound;
-using std::upper_bound;
-using std::equal_range;
-using std::binary_search;
-using std::merge;
-using std::inplace_merge;
-using std::includes;
-using std::set_union;
-using std::set_intersection;
-using std::set_difference;
-using std::set_symmetric_difference;
-using std::min_element;
-using std::max_element;
-using std::next_permutation;
-using std::prev_permutation;
-using std::find_first_of;
-using std::find_end;
+using std::for_each;
+using std::find;
+using std::find_if;
+using std::adjacent_find;
+using std::count;
+using std::count_if;
+using std::search;
+using std::search_n;
+using std::swap_ranges;
+using std::transform;
+using std::replace;
+using std::replace_if;
+using std::replace_copy;
+using std::replace_copy_if;
+using std::generate;
+using std::generate_n;
+using std::remove;
+using std::remove_if;
+using std::remove_copy;
+using std::remove_copy_if;
+using std::unique;
+using std::unique_copy;
+using std::reverse;
+using std::reverse_copy;
+using std::rotate;
+using std::rotate_copy;
+using std::random_shuffle;
+using std::partition;
+using std::stable_partition;
+using std::sort;
+using std::stable_sort;
+using std::partial_sort;
+using std::partial_sort_copy;
+using std::nth_element;
+using std::lower_bound;
+using std::upper_bound;
+using std::equal_range;
+using std::binary_search;
+using std::merge;
+using std::inplace_merge;
+using std::includes;
+using std::set_union;
+using std::set_intersection;
+using std::set_difference;
+using std::set_symmetric_difference;
+using std::min_element;
+using std::max_element;
+using std::next_permutation;
+using std::prev_permutation;
+using std::find_first_of;
+using std::find_end;
// Names from stl_heap.h
using std::push_heap;
@@ -125,24 +125,24 @@ using std::make_heap;
using std::sort_heap;
// Names from stl_numeric.h
-using std::accumulate;
-using std::inner_product;
-using std::partial_sum;
-using std::adjacent_difference;
+using std::accumulate;
+using std::inner_product;
+using std::partial_sum;
+using std::adjacent_difference;
// Names from ext/algorithm
-using __gnu_cxx::random_sample;
+using __gnu_cxx::random_sample;
using __gnu_cxx::random_sample_n;
-using __gnu_cxx::is_sorted;
+using __gnu_cxx::is_sorted;
using __gnu_cxx::is_heap;
using __gnu_cxx::count; // Extension returning void
using __gnu_cxx::count_if; // Extension returning void
// Names from ext/numeric
-using __gnu_cxx::power;
-using __gnu_cxx::iota;
+using __gnu_cxx::power;
+using __gnu_cxx::iota;
-#endif /* _CPP_BACKWARD_ALGO_H */
+#endif /* _BACKWARD_ALGO_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/algobase.h b/contrib/libstdc++/include/backward/algobase.h
index 1606559..86028a0 100644
--- a/contrib/libstdc++/include/backward/algobase.h
+++ b/contrib/libstdc++/include/backward/algobase.h
@@ -52,8 +52,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_ALGOBASE_H
-#define _CPP_BACKWARD_ALGOBASE_H 1
+#ifndef _BACKWARD_ALGOBASE_H
+#define _BACKWARD_ALGOBASE_H 1
#include "backward_warning.h"
#include "pair.h"
@@ -64,17 +64,17 @@
#include <ext/memory>
// Names from stl_algobase.h
-using std::iter_swap;
-using std::swap;
-using std::min;
-using std::max;
-using std::copy;
-using std::copy_backward;
-using std::fill;
-using std::fill_n;
-using std::mismatch;
-using std::equal;
-using std::lexicographical_compare;
+using std::iter_swap;
+using std::swap;
+using std::min;
+using std::max;
+using std::copy;
+using std::copy_backward;
+using std::fill;
+using std::fill_n;
+using std::mismatch;
+using std::equal;
+using std::lexicographical_compare;
// Names from stl_uninitialized.h
using std::uninitialized_copy;
@@ -82,13 +82,13 @@ using std::uninitialized_fill;
using std::uninitialized_fill_n;
// Names from ext/algorithm
-using __gnu_cxx::copy_n;
-using __gnu_cxx::lexicographical_compare_3way;
+using __gnu_cxx::copy_n;
+using __gnu_cxx::lexicographical_compare_3way;
// Names from ext/memory
using __gnu_cxx::uninitialized_copy_n;
-#endif /* _CPP_BACKWARD_ALGOBASE_H */
+#endif /* _BACKWARD_ALGOBASE_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/alloc.h b/contrib/libstdc++/include/backward/alloc.h
index 9482e4c..d3c3c73 100644
--- a/contrib/libstdc++/include/backward/alloc.h
+++ b/contrib/libstdc++/include/backward/alloc.h
@@ -1,6 +1,6 @@
// Backward-compat support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,19 +40,13 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_ALLOC_H
-#define _CPP_BACKWARD_ALLOC_H 1
+#ifndef _BACKWARD_ALLOC_H
+#define _BACKWARD_ALLOC_H 1
#include "backward_warning.h"
#include <bits/c++config.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
-using std::__malloc_alloc_template;
-using std::__simple_alloc;
-using std::__debug_alloc;
-using std::__alloc;
-using std::__single_client_alloc;
using std::allocator;
-using std::__default_alloc_template;
-#endif
+#endif
diff --git a/contrib/libstdc++/include/backward/backward_warning.h b/contrib/libstdc++/include/backward/backward_warning.h
index 0f007bf..9e13777 100644
--- a/contrib/libstdc++/include/backward/backward_warning.h
+++ b/contrib/libstdc++/include/backward/backward_warning.h
@@ -25,15 +25,15 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_BACKWARD_WARNING_H
-#define _CPP_BACKWARD_BACKWARD_WARNING_H 1
+#ifndef _BACKWARD_BACKWARD_WARNING_H
+#define _BACKWARD_BACKWARD_WARNING_H 1
#ifdef __DEPRECATED
#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section 17.4.1.2 of the \
C++ standard. Examples include substituting the <X> header for the <X.h> \
-header for C++ includes, or <sstream> instead of the deprecated header \
-<strstream.h>. To disable this warning use -Wno-deprecated.
+header for C++ includes, or <iostream> instead of the deprecated header \
+<iostream.h>. To disable this warning use -Wno-deprecated.
#endif
#endif
diff --git a/contrib/libstdc++/include/backward/bvector.h b/contrib/libstdc++/include/backward/bvector.h
index b114052..9245792 100644
--- a/contrib/libstdc++/include/backward/bvector.h
+++ b/contrib/libstdc++/include/backward/bvector.h
@@ -1,6 +1,6 @@
// Backward-compat support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -53,16 +53,15 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef __SGI_STL_BVECTOR_H
-#define __SGI_STL_BVECTOR_H
-
+#ifndef _BACKWARD_BVECTOR_H
+#define _BACKWARD_BVECTOR_H 1
#include "backward_warning.h"
#include <vector>
-using std::bit_vector;
+typedef std::vector<bool, std::allocator<bool> > bit_vector;
-#endif /* __SGI_STL_BVECTOR_H */
+#endif /* _BACKWARD_BVECTOR_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/complex.h b/contrib/libstdc++/include/backward/complex.h
index 0e72174..dfc6714 100644
--- a/contrib/libstdc++/include/backward/complex.h
+++ b/contrib/libstdc++/include/backward/complex.h
@@ -25,16 +25,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_COMPLEX_H
-#define _CPP_BACKWARD_COMPLEX_H 1
+#ifndef _BACKWARD_COMPLEX_H
+#define _BACKWARD_COMPLEX_H 1
#include "backward_warning.h"
#include <complex>
using std::complex;
-typedef complex<float> float_complex;
-typedef complex<double> double_complex;
-typedef complex<long double> long_double_complex;
+typedef complex<float> float_complex;
+typedef complex<double> double_complex;
+typedef complex<long double> long_double_complex;
#endif
diff --git a/contrib/libstdc++/include/backward/defalloc.h b/contrib/libstdc++/include/backward/defalloc.h
index 264e296..76ea52a 100644
--- a/contrib/libstdc++/include/backward/defalloc.h
+++ b/contrib/libstdc++/include/backward/defalloc.h
@@ -47,20 +47,20 @@
// This file WILL BE REMOVED in a future release.
//
// DO NOT USE THIS FILE unless you have an old container implementation
-// that requires an allocator with the HP-style interface.
+// that requires an allocator with the HP-style interface.
//
// Standard-conforming allocators have a very different interface. The
// standard default allocator is declared in the header <memory>.
-#ifndef _CPP_BACKWARD_DEFALLOC_H
-#define _CPP_BACKWARD_DEFALLOC_H 1
+#ifndef _BACKWARD_DEFALLOC_H
+#define _BACKWARD_DEFALLOC_H 1
#include "backward_warning.h"
#include "new.h"
#include <stddef.h>
#include <stdlib.h>
-#include <limits.h>
-#include "iostream.h"
+#include <limits.h>
+#include "iostream.h"
#include "algobase.h"
@@ -69,7 +69,7 @@ inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
set_new_handler(0);
_Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
if (__tmp == 0) {
- cerr << "out of memory" << endl;
+ cerr << "out of memory" << endl;
exit(1);
}
return __tmp;
@@ -91,19 +91,19 @@ public:
typedef const _Tp& const_reference;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
- pointer allocate(size_type __n) {
+ pointer allocate(size_type __n) {
return ::allocate((difference_type)__n, (pointer)0);
}
void deallocate(pointer __p) { ::deallocate(__p); }
pointer address(reference __x) { return (pointer)&__x; }
- const_pointer const_address(const_reference __x) {
- return (const_pointer)&__x;
+ const_pointer const_address(const_reference __x) {
+ return (const_pointer)&__x;
}
- size_type init_page_size() {
- return max(size_type(1), size_type(4096/sizeof(_Tp)));
+ size_type init_page_size() {
+ return max(size_type(1), size_type(4096/sizeof(_Tp)));
}
- size_type max_size() const {
- return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
+ size_type max_size() const {
+ return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
}
};
@@ -114,4 +114,4 @@ public:
-#endif /* _CPP_BACKWARD_DEFALLOC_H */
+#endif /* _BACKWARD_DEFALLOC_H */
diff --git a/contrib/libstdc++/include/backward/deque.h b/contrib/libstdc++/include/backward/deque.h
index 983ae07..36c7479 100644
--- a/contrib/libstdc++/include/backward/deque.h
+++ b/contrib/libstdc++/include/backward/deque.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_DEQUE_H
-#define _CPP_BACKWARD_DEQUE_H 1
+#ifndef _BACKWARD_DEQUE_H
+#define _BACKWARD_DEQUE_H 1
#include "backward_warning.h"
#include "algobase.h"
@@ -63,7 +63,7 @@
using std::deque;
-#endif /* _CPP_BACKWARD_DEQUE_H */
+#endif /* _BACKWARD_DEQUE_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/fstream.h b/contrib/libstdc++/include/backward/fstream.h
index 44461f4..6dfd514 100644
--- a/contrib/libstdc++/include/backward/fstream.h
+++ b/contrib/libstdc++/include/backward/fstream.h
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_FSTREAM_H
-#define _CPP_BACKWARD_FSTREAM_H 1
+#ifndef _BACKWARD_FSTREAM_H
+#define _BACKWARD_FSTREAM_H 1
#include "backward_warning.h"
#include <fstream>
@@ -37,7 +37,7 @@ using std::ofstream;
using std::fstream;
using std::streampos;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
using std::wfilebuf;
using std::wifstream;
using std::wofstream;
diff --git a/contrib/libstdc++/include/backward/function.h b/contrib/libstdc++/include/backward/function.h
index bc96f49..9fc8719 100644
--- a/contrib/libstdc++/include/backward/function.h
+++ b/contrib/libstdc++/include/backward/function.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_FUNCTION_H
-#define _CPP_BACKWARD_FUNCTION_H 1
+#ifndef _BACKWARD_FUNCTION_H
+#define _BACKWARD_FUNCTION_H 1
#include "backward_warning.h"
#include <bits/c++config.h>
@@ -63,67 +63,67 @@
#include <ext/functional>
// Names from stl_function.h
-using std::unary_function;
-using std::binary_function;
-using std::plus;
-using std::minus;
-using std::multiplies;
-using std::divides;
-using std::modulus;
-using std::negate;
-using std::equal_to;
-using std::not_equal_to;
-using std::greater;
-using std::less;
-using std::greater_equal;
-using std::less_equal;
-using std::logical_and;
-using std::logical_or;
-using std::logical_not;
-using std::unary_negate;
-using std::binary_negate;
-using std::not1;
-using std::not2;
-using std::binder1st;
-using std::binder2nd;
-using std::bind1st;
-using std::bind2nd;
-using std::pointer_to_unary_function;
-using std::pointer_to_binary_function;
-using std::ptr_fun;
-using std::mem_fun_t;
-using std::const_mem_fun_t;
-using std::mem_fun_ref_t;
-using std::const_mem_fun_ref_t;
-using std::mem_fun1_t;
-using std::const_mem_fun1_t;
-using std::mem_fun1_ref_t;
-using std::const_mem_fun1_ref_t;
-using std::mem_fun;
-using std::mem_fun_ref;
+using std::unary_function;
+using std::binary_function;
+using std::plus;
+using std::minus;
+using std::multiplies;
+using std::divides;
+using std::modulus;
+using std::negate;
+using std::equal_to;
+using std::not_equal_to;
+using std::greater;
+using std::less;
+using std::greater_equal;
+using std::less_equal;
+using std::logical_and;
+using std::logical_or;
+using std::logical_not;
+using std::unary_negate;
+using std::binary_negate;
+using std::not1;
+using std::not2;
+using std::binder1st;
+using std::binder2nd;
+using std::bind1st;
+using std::bind2nd;
+using std::pointer_to_unary_function;
+using std::pointer_to_binary_function;
+using std::ptr_fun;
+using std::mem_fun_t;
+using std::const_mem_fun_t;
+using std::mem_fun_ref_t;
+using std::const_mem_fun_ref_t;
+using std::mem_fun1_t;
+using std::const_mem_fun1_t;
+using std::mem_fun1_ref_t;
+using std::const_mem_fun1_ref_t;
+using std::mem_fun;
+using std::mem_fun_ref;
// Names from ext/functional
-using __gnu_cxx::identity_element;
-using __gnu_cxx::unary_compose;
-using __gnu_cxx::binary_compose;
-using __gnu_cxx::compose1;
-using __gnu_cxx::compose2;
-using __gnu_cxx::identity;
-using __gnu_cxx::select1st;
-using __gnu_cxx::select2nd;
-using __gnu_cxx::project1st;
-using __gnu_cxx::project2nd;
-using __gnu_cxx::constant_void_fun;
-using __gnu_cxx::constant_unary_fun;
-using __gnu_cxx::constant_binary_fun;
-using __gnu_cxx::constant0;
-using __gnu_cxx::constant1;
-using __gnu_cxx::constant2;
-using __gnu_cxx::subtractive_rng;
-using __gnu_cxx::mem_fun1;
-using __gnu_cxx::mem_fun1_ref;
+using __gnu_cxx::identity_element;
+using __gnu_cxx::unary_compose;
+using __gnu_cxx::binary_compose;
+using __gnu_cxx::compose1;
+using __gnu_cxx::compose2;
+using __gnu_cxx::identity;
+using __gnu_cxx::select1st;
+using __gnu_cxx::select2nd;
+using __gnu_cxx::project1st;
+using __gnu_cxx::project2nd;
+using __gnu_cxx::constant_void_fun;
+using __gnu_cxx::constant_unary_fun;
+using __gnu_cxx::constant_binary_fun;
+using __gnu_cxx::constant0;
+using __gnu_cxx::constant1;
+using __gnu_cxx::constant2;
+using __gnu_cxx::subtractive_rng;
+using __gnu_cxx::mem_fun1;
+using __gnu_cxx::mem_fun1_ref;
-#endif /* _CPP_BACKWARD_FUNCTION_H */
+#endif /* _BACKWARD_FUNCTION_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/hash_map.h b/contrib/libstdc++/include/backward/hash_map.h
index 25c177a..bc9c148 100644
--- a/contrib/libstdc++/include/backward/hash_map.h
+++ b/contrib/libstdc++/include/backward/hash_map.h
@@ -53,8 +53,8 @@
*
*/
-#ifndef _CPP_BACKWARD_HASH_MAP_H
-#define _CPP_BACKWARD_HASH_MAP_H 1
+#ifndef _BACKWARD_HASH_MAP_H
+#define _BACKWARD_HASH_MAP_H 1
#include "backward_warning.h"
#include "algobase.h"
@@ -65,7 +65,7 @@ using __gnu_cxx::hashtable;
using __gnu_cxx::hash_map;
using __gnu_cxx::hash_multimap;
-#endif /* _CPP_BACKWARD_HASH_MAP_H */
+#endif /* _BACKWARD_HASH_MAP_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/hash_set.h b/contrib/libstdc++/include/backward/hash_set.h
index ddb7a75..89307de 100644
--- a/contrib/libstdc++/include/backward/hash_set.h
+++ b/contrib/libstdc++/include/backward/hash_set.h
@@ -53,8 +53,8 @@
*
*/
-#ifndef _CPP_BACKWARD_HASH_SET_H
-#define _CPP_BACKWARD_HASH_SET_H 1
+#ifndef _BACKWARD_HASH_SET_H
+#define _BACKWARD_HASH_SET_H 1
#include "backward_warning.h"
#include "algobase.h"
@@ -65,5 +65,5 @@ using __gnu_cxx::hashtable;
using __gnu_cxx::hash_set;
using __gnu_cxx::hash_multiset;
-#endif /* _CPP_BACKWARD_HASH_SET_H */
+#endif /* _BACKWARD_HASH_SET_H */
diff --git a/contrib/libstdc++/include/backward/hashtable.h b/contrib/libstdc++/include/backward/hashtable.h
index bbad516..abedd55 100644
--- a/contrib/libstdc++/include/backward/hashtable.h
+++ b/contrib/libstdc++/include/backward/hashtable.h
@@ -57,11 +57,11 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BACKWARD_HASHTABLE_H
-#define _CPP_BACKWARD_HASHTABLE_H 1
+#ifndef _BACKWARD_HASHTABLE_H
+#define _BACKWARD_HASHTABLE_H 1
#include "backward_warning.h"
-#include <ext/stl_hashtable.h>
+#include <ext/hashtable.h>
#include "algo.h"
#include "alloc.h"
#include "vector.h"
@@ -69,7 +69,7 @@
using __gnu_cxx::hash;
using __gnu_cxx::hashtable;
-#endif /* _CPP_BACKWARD_HASHTABLE_H */
+#endif /* _BACKWARD_HASHTABLE_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/heap.h b/contrib/libstdc++/include/backward/heap.h
index 9308f0e..2f19545 100644
--- a/contrib/libstdc++/include/backward/heap.h
+++ b/contrib/libstdc++/include/backward/heap.h
@@ -52,8 +52,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_HEAP_H
-#define _CPP_BACKWARD_HEAP_H 1
+#ifndef _BACKWARD_HEAP_H
+#define _BACKWARD_HEAP_H 1
#include "backward_warning.h"
#include <bits/c++config.h>
@@ -64,7 +64,7 @@ using std::pop_heap;
using std::make_heap;
using std::sort_heap;
-#endif /* _CPP_BACKWARD_HEAP_H */
+#endif /* _BACKWARD_HEAP_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/iomanip.h b/contrib/libstdc++/include/backward/iomanip.h
index 53286cd..160dbeb 100644
--- a/contrib/libstdc++/include/backward/iomanip.h
+++ b/contrib/libstdc++/include/backward/iomanip.h
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_IOMANIP_H
-#define _CPP_BACKWARD_IOMANIP_H 1
+#ifndef _BACKWARD_IOMANIP_H
+#define _BACKWARD_IOMANIP_H 1
#include "backward_warning.h"
#include "iostream.h"
diff --git a/contrib/libstdc++/include/backward/iostream.h b/contrib/libstdc++/include/backward/iostream.h
index 5346d9d..5a5ccea 100644
--- a/contrib/libstdc++/include/backward/iostream.h
+++ b/contrib/libstdc++/include/backward/iostream.h
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_IOSTREAM_H
-#define _CPP_BACKWARD_IOSTREAM_H 1
+#ifndef _BACKWARD_IOSTREAM_H
+#define _BACKWARD_IOSTREAM_H 1
#include "backward_warning.h"
#include <iostream>
@@ -41,7 +41,7 @@ using std::cout;
using std::cin;
using std::cerr;
using std::clog;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
using std::wcout;
using std::wcin;
using std::wcerr;
diff --git a/contrib/libstdc++/include/backward/istream.h b/contrib/libstdc++/include/backward/istream.h
index 059e774..707b575 100644
--- a/contrib/libstdc++/include/backward/istream.h
+++ b/contrib/libstdc++/include/backward/istream.h
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_ISTREAM_H
-#define _CPP_BACKWARD_ISTREAM_H 1
+#ifndef _BACKWARD_ISTREAM_H
+#define _BACKWARD_ISTREAM_H 1
#include "backward_warning.h"
#include "iostream.h"
diff --git a/contrib/libstdc++/include/backward/iterator.h b/contrib/libstdc++/include/backward/iterator.h
index 179f457..8316a83 100644
--- a/contrib/libstdc++/include/backward/iterator.h
+++ b/contrib/libstdc++/include/backward/iterator.h
@@ -1,3 +1,32 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1994
@@ -24,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_ITERATOR_H
-#define _CPP_BACKWARD_ITERATOR_H 1
+#ifndef _BACKWARD_ITERATOR_H
+#define _BACKWARD_ITERATOR_H 1
#include "backward_warning.h"
#include "function.h"
@@ -116,7 +145,7 @@ template<class _Iter>
using std::distance;
using __gnu_cxx::distance; // 3-parameter extension
-using std::advance;
+using std::advance;
using std::insert_iterator;
using std::front_insert_iterator;
@@ -145,7 +174,7 @@ template <class _Tp>
inline void
destroy(_Tp* __pointer)
{ std::_Destroy(__pointer); }
-
+
template <class _ForwardIterator>
inline void
destroy(_ForwardIterator __first, _ForwardIterator __last)
@@ -155,7 +184,7 @@ template <class _ForwardIterator>
// Names from stl_raw_storage_iter.h
using std::raw_storage_iterator;
-#endif /* _CPP_BACKWARD_ITERATOR_H */
+#endif /* _BACKWARD_ITERATOR_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/list.h b/contrib/libstdc++/include/backward/list.h
index 350a92a..00c11a6 100644
--- a/contrib/libstdc++/include/backward/list.h
+++ b/contrib/libstdc++/include/backward/list.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_LIST_H
-#define _CPP_BACKWARD_LIST_H 1
+#ifndef _BACKWARD_LIST_H
+#define _BACKWARD_LIST_H 1
#include "backward_warning.h"
#include "algobase.h"
@@ -63,7 +63,7 @@
using std::list;
-#endif /* _CPP_BACKWARD_LIST_H */
+#endif /* _BACKWARD_LIST_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/map.h b/contrib/libstdc++/include/backward/map.h
index 00f606d..56d5c69 100644
--- a/contrib/libstdc++/include/backward/map.h
+++ b/contrib/libstdc++/include/backward/map.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_MAP_H
-#define _CPP_BACKWARD_MAP_H 1
+#ifndef _BACKWARD_MAP_H
+#define _BACKWARD_MAP_H 1
#include "backward_warning.h"
#include "tree.h"
@@ -62,7 +62,7 @@
using std::map;
-#endif /* _CPP_BACKWARD_MAP_H */
+#endif /* _BACKWARD_MAP_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/multimap.h b/contrib/libstdc++/include/backward/multimap.h
index b9cdc84..aba42f7 100644
--- a/contrib/libstdc++/include/backward/multimap.h
+++ b/contrib/libstdc++/include/backward/multimap.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_MULTIMAP_H
-#define _CPP_BACKWARD_MULTIMAP_H 1
+#ifndef _BACKWARD_MULTIMAP_H
+#define _BACKWARD_MULTIMAP_H 1
#include "backward_warning.h"
#include "tree.h"
@@ -62,7 +62,7 @@
using std::multimap;
-#endif /* _CPP_BACKWARD_MULTIMAP_H */
+#endif /* _BACKWARD_MULTIMAP_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/multiset.h b/contrib/libstdc++/include/backward/multiset.h
index 8aa7fd3..7ec0c94 100644
--- a/contrib/libstdc++/include/backward/multiset.h
+++ b/contrib/libstdc++/include/backward/multiset.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_MULTISET_H
-#define _CPP_BACKWARD_MULTISET_H 1
+#ifndef _BACKWARD_MULTISET_H
+#define _BACKWARD_MULTISET_H 1
#include "backward_warning.h"
#include "tree.h"
@@ -62,7 +62,7 @@
using std::multiset;
-#endif /* _CPP_BACKWARD_MULTISET_H */
+#endif /* _BACKWARD_MULTISET_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/new.h b/contrib/libstdc++/include/backward/new.h
index 8e4c5c9..00a4819 100644
--- a/contrib/libstdc++/include/backward/new.h
+++ b/contrib/libstdc++/include/backward/new.h
@@ -1,20 +1,20 @@
// -*- C++ -*- forwarding header.
// Copyright (C) 2000 Free Software Foundation
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
-//
-// GNU CC is distributed in the hope that it will be useful,
+//
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_NEW_H
-#define _CPP_BACKWARD_NEW_H 1
+#ifndef _BACKWARD_NEW_H
+#define _BACKWARD_NEW_H 1
#include "backward_warning.h"
#include <new>
@@ -39,4 +39,4 @@ using std::nothrow;
using std::new_handler;
using std::set_new_handler;
-#endif
+#endif
diff --git a/contrib/libstdc++/include/backward/ostream.h b/contrib/libstdc++/include/backward/ostream.h
index 4c74756..a72de09 100644
--- a/contrib/libstdc++/include/backward/ostream.h
+++ b/contrib/libstdc++/include/backward/ostream.h
@@ -25,13 +25,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_OSTREAM_H
-#define _CPP_BACKWARD_OSTREAM_H 1
+#ifndef _BACKWARD_OSTREAM_H
+#define _BACKWARD_OSTREAM_H 1
#include "backward_warning.h"
#include "iostream.h"
-#endif
+#endif
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/pair.h b/contrib/libstdc++/include/backward/pair.h
index f0ff7d7..cbb3bc7 100644
--- a/contrib/libstdc++/include/backward/pair.h
+++ b/contrib/libstdc++/include/backward/pair.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_PAIR_H
-#define _CPP_BACKWARD_PAIR_H 1
+#ifndef _BACKWARD_PAIR_H
+#define _BACKWARD_PAIR_H 1
#include "backward_warning.h"
#include <bits/c++config.h>
@@ -63,7 +63,7 @@
using std::pair;
using std::make_pair;
-#endif /* _CPP_BACKWARD_PAIR_H */
+#endif /* _BACKWARD_PAIR_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/queue.h b/contrib/libstdc++/include/backward/queue.h
index 1d3b29c..a3e2ff3 100644
--- a/contrib/libstdc++/include/backward/queue.h
+++ b/contrib/libstdc++/include/backward/queue.h
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_QUEUE_H
-#define _CPP_BACKWARD_QUEUE_H 1
+#ifndef _BACKWARD_QUEUE_H
+#define _BACKWARD_QUEUE_H 1
#include "backward_warning.h"
#include <queue>
@@ -34,7 +34,7 @@
using std::queue;
using std::priority_queue;
-#endif
+#endif
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/rope.h b/contrib/libstdc++/include/backward/rope.h
index 5f4c787..fc6715a 100644
--- a/contrib/libstdc++/include/backward/rope.h
+++ b/contrib/libstdc++/include/backward/rope.h
@@ -40,20 +40,20 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_ROPE_H
-#define _CPP_BACKWARD_ROPE_H 1
+#ifndef _BACKWARD_ROPE_H
+#define _BACKWARD_ROPE_H 1
#include "backward_warning.h"
-#include "hashtable.h"
+#include "hashtable.h"
#include <ext/rope>
-using __gnu_cxx::char_producer;
-using __gnu_cxx::sequence_buffer;
-using __gnu_cxx::rope;
-using __gnu_cxx::crope;
-using __gnu_cxx::wrope;
+using __gnu_cxx::char_producer;
+using __gnu_cxx::sequence_buffer;
+using __gnu_cxx::rope;
+using __gnu_cxx::crope;
+using __gnu_cxx::wrope;
-#endif /* _CPP_BACKWARD_ROPE_H */
+#endif /* _BACKWARD_ROPE_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/set.h b/contrib/libstdc++/include/backward/set.h
index c189255..6a8320b 100644
--- a/contrib/libstdc++/include/backward/set.h
+++ b/contrib/libstdc++/include/backward/set.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_SET_H
-#define _CPP_BACKWARD_SET_H 1
+#ifndef _BACKWARD_SET_H
+#define _BACKWARD_SET_H 1
#include "backward_warning.h"
#include "tree.h"
@@ -62,7 +62,7 @@
using std::set;
-#endif /* _CPP_BACKWARD_SET_H */
+#endif /* _BACKWARD_SET_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/slist.h b/contrib/libstdc++/include/backward/slist.h
index decf04d..63db065 100644
--- a/contrib/libstdc++/include/backward/slist.h
+++ b/contrib/libstdc++/include/backward/slist.h
@@ -41,15 +41,15 @@
*
*/
-#ifndef _CPP_BACKWARD_SLIST_H
-#define _CPP_BACKWARD_SLIST_H 1
+#ifndef _BACKWARD_SLIST_H
+#define _BACKWARD_SLIST_H 1
#include "backward_warning.h"
#include <ext/slist>
using __gnu_cxx::slist;
-#endif /* _CPP_BACKWARD_SLIST_H */
+#endif /* _BACKWARD_SLIST_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/stack.h b/contrib/libstdc++/include/backward/stack.h
index 6f60293..0ff53a4 100644
--- a/contrib/libstdc++/include/backward/stack.h
+++ b/contrib/libstdc++/include/backward/stack.h
@@ -53,8 +53,8 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_STACK_H
-#define _CPP_BACKWARD_STACK_H 1
+#ifndef _BACKWARD_STACK_H
+#define _BACKWARD_STACK_H 1
#include "backward_warning.h"
#include "vector.h"
@@ -65,7 +65,7 @@
using std::stack;
-#endif /* _CPP_BACKWARD_STACK_H */
+#endif /* _BACKWARD_STACK_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/stream.h b/contrib/libstdc++/include/backward/stream.h
index 21a851d..5540c7e 100644
--- a/contrib/libstdc++/include/backward/stream.h
+++ b/contrib/libstdc++/include/backward/stream.h
@@ -25,13 +25,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_STREAM_H
-#define _CPP_BACKWARD_STREAM_H 1
+#ifndef _BACKWARD_STREAM_H
+#define _BACKWARD_STREAM_H 1
#include "backward_warning.h"
#include "iostream.h"
-#endif
+#endif
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/streambuf.h b/contrib/libstdc++/include/backward/streambuf.h
index aef863f..fc9825e 100644
--- a/contrib/libstdc++/include/backward/streambuf.h
+++ b/contrib/libstdc++/include/backward/streambuf.h
@@ -25,15 +25,15 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BACKWARD_STREAMBUF_H
-#define _CPP_BACKWARD_STREAMBUF_H 1
+#ifndef _BACKWARD_STREAMBUF_H
+#define _BACKWARD_STREAMBUF_H 1
#include "backward_warning.h"
#include <streambuf>
using std::streambuf;
-#endif
+#endif
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/strstream b/contrib/libstdc++/include/backward/strstream
index 165c6e7..a5b95c5 100644
--- a/contrib/libstdc++/include/backward/strstream
+++ b/contrib/libstdc++/include/backward/strstream
@@ -1,6 +1,6 @@
// Backward-compat support -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -61,12 +61,12 @@ namespace std
// Note that this class is not a template.
class strstreambuf : public basic_streambuf<char, char_traits<char> >
{
- public:
+ public:
// Types.
typedef char_traits<char> _Traits;
typedef basic_streambuf<char, _Traits> _Base;
- public:
+ public:
// Constructor, destructor
explicit strstreambuf(streamsize __initial_capacity = 0);
strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
@@ -97,7 +97,12 @@ namespace std
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
= ios_base::in | ios_base::out);
- private:
+ private:
+ strstreambuf&
+ operator=(const strstreambuf&);
+
+ strstreambuf(const strstreambuf&);
+
// Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
char* _M_alloc(size_t);
void _M_free(char*);
@@ -105,7 +110,7 @@ namespace std
// Helper function used in constructors.
void _M_setup(char* __get, char* __put, streamsize __n);
- private:
+ private:
// Data members.
void* (*_M_alloc_fun)(size_t);
void (*_M_free_fun)(void*);
@@ -171,4 +176,4 @@ namespace std
strstreambuf _M_buf;
};
} // namespace std
-#endif
+#endif
diff --git a/contrib/libstdc++/include/backward/tempbuf.h b/contrib/libstdc++/include/backward/tempbuf.h
index f47e707..06de2bd 100644
--- a/contrib/libstdc++/include/backward/tempbuf.h
+++ b/contrib/libstdc++/include/backward/tempbuf.h
@@ -53,16 +53,16 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_TEMPBUF_H
-#define _CPP_BACKWARD_TEMPBUF_H 1
+#ifndef _BACKWARD_TEMPBUF_H
+#define _BACKWARD_TEMPBUF_H 1
#include "backward_warning.h"
#include "pair.h"
#include "iterator.h"
#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <bits/type_traits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <bits/type_traits.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <ext/memory>
@@ -71,7 +71,7 @@ using std::get_temporary_buffer;
using std::return_temporary_buffer;
using __gnu_cxx::temporary_buffer;
-#endif /* _CPP_BACKWARD_TEMPBUF_H */
+#endif /* _BACKWARD_TEMPBUF_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/backward/tree.h b/contrib/libstdc++/include/backward/tree.h
index f3ee652..fcfcbf4 100644
--- a/contrib/libstdc++/include/backward/tree.h
+++ b/contrib/libstdc++/include/backward/tree.h
@@ -41,15 +41,15 @@
*
*/
-#ifndef _CPP_EXT_TREE
-#define _CPP_EXT_TREE 1
+#ifndef _BACKWARD_TREE
+#define _BACKWARD_TREE 1
#include "backward_warning.h"
#include <ext/rb_tree>
using __gnu_cxx::rb_tree;
-#endif
+#endif
// Local Variables:
// mode:C++
// End:
diff --git a/contrib/libstdc++/include/backward/vector.h b/contrib/libstdc++/include/backward/vector.h
index 7788068..ba9b704 100644
--- a/contrib/libstdc++/include/backward/vector.h
+++ b/contrib/libstdc++/include/backward/vector.h
@@ -53,17 +53,17 @@
* purpose. It is provided "as is" without express or implied warranty.
*/
-#ifndef _CPP_BACKWARD_VECTOR_H
-#define _CPP_BACKWARD_VECTOR_H 1
+#ifndef _BACKWARD_VECTOR_H
+#define _BACKWARD_VECTOR_H 1
#include "backward_warning.h"
#include "algobase.h"
-#include "alloc.h"
+#include "alloc.h"
#include <vector>
using std::vector;
-#endif /* _CPP_BACKWARD_VECTOR_H */
+#endif /* _BACKWARD_VECTOR_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/bits/allocator.h b/contrib/libstdc++/include/bits/allocator.h
new file mode 100644
index 0000000..c9200ec
--- /dev/null
+++ b/contrib/libstdc++/include/bits/allocator.h
@@ -0,0 +1,130 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+/** @file allocator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _ALLOCATOR_H
+#define _ALLOCATOR_H 1
+
+// Define the base class to std::allocator.
+#include <bits/c++allocator.h>
+
+namespace std
+{
+ template<typename _Tp>
+ class allocator;
+
+ template<>
+ class allocator<void>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef allocator<_Tp1> other; };
+ };
+
+ /**
+ * @brief The "standard" allocator, as per [20.4].
+ *
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Tp>
+ class allocator: public ___glibcxx_base_allocator<_Tp>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef allocator<_Tp1> other; };
+
+ allocator() throw() { }
+
+ allocator(const allocator& a) throw()
+ : ___glibcxx_base_allocator<_Tp>(a) { }
+
+ template<typename _Tp1>
+ allocator(const allocator<_Tp1>&) throw() { }
+
+ ~allocator() throw() { }
+
+ // Inherit everything else.
+ };
+
+ template<typename _T1, typename _T2>
+ inline bool
+ operator==(const allocator<_T1>&, const allocator<_T2>&)
+ { return true; }
+
+ template<typename _T1, typename _T2>
+ inline bool
+ operator!=(const allocator<_T1>&, const allocator<_T2>&)
+ { return false; }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class allocator<char>;
+ extern template class allocator<wchar_t>;
+#endif
+
+ // Undefine.
+#undef ___glibcxx_base_allocator
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/allocator_traits.h b/contrib/libstdc++/include/bits/allocator_traits.h
new file mode 100644
index 0000000..93bae7a
--- /dev/null
+++ b/contrib/libstdc++/include/bits/allocator_traits.h
@@ -0,0 +1,237 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _ALLOCATOR_TRAITS_H
+#define _ALLOCATOR_TRAITS_H 1
+
+#include <cstddef>
+
+namespace std
+{
+ /**
+ * @if maint
+ * This is used primarily (only?) in _Alloc_traits and other places to
+ * help provide the _Alloc_type typedef. All it does is forward the
+ * requests after some minimal checking.
+ *
+ * This is neither "standard"-conforming nor "SGI". The _Alloc parameter
+ * must be "SGI" style.
+ * @endif
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Tp, typename _Alloc>
+ class __simple_alloc
+ {
+ public:
+ static _Tp*
+ allocate(size_t __n)
+ {
+ _Tp* __ret = 0;
+ if (__n)
+ __ret = static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp)));
+ return __ret;
+ }
+
+ static _Tp*
+ allocate()
+ { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }
+
+ static void
+ deallocate(_Tp* __p, size_t __n)
+ { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }
+
+ static void
+ deallocate(_Tp* __p)
+ { _Alloc::deallocate(__p, sizeof (_Tp)); }
+ };
+
+
+ /**
+ * @if maint
+ * Allocator adaptor to turn an "SGI" style allocator (e.g.,
+ * __alloc, __malloc_alloc) into a "standard" conforming
+ * allocator. Note that this adaptor does *not* assume that all
+ * objects of the underlying alloc class are identical, nor does it
+ * assume that all of the underlying alloc's member functions are
+ * static member functions. Note, also, that __allocator<_Tp,
+ * __alloc> is essentially the same thing as allocator<_Tp>.
+ * @endif
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Tp, typename _Alloc>
+ struct __allocator
+ {
+ _Alloc __underlying_alloc;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef __allocator<_Tp1, _Alloc> other; };
+
+ __allocator() throw() { }
+
+ __allocator(const __allocator& __a) throw()
+ : __underlying_alloc(__a.__underlying_alloc) { }
+
+ template<typename _Tp1>
+ __allocator(const __allocator<_Tp1, _Alloc>& __a) throw()
+ : __underlying_alloc(__a.__underlying_alloc) { }
+
+ ~__allocator() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ // NB: __n is permitted to be 0. The C++ standard says nothing
+ // about what the return value is when __n == 0.
+ _Tp*
+ allocate(size_type __n, const void* = 0)
+ {
+ _Tp* __ret = 0;
+ if (__n)
+ __ret = static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp)));
+ return __ret;
+ }
+
+ // __p is not permitted to be a null pointer.
+ void
+ deallocate(pointer __p, size_type __n)
+ { __underlying_alloc.deallocate(__p, __n * sizeof(_Tp)); }
+
+ size_type
+ max_size() const throw() { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_]allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val) { ::new(__p) _Tp(__val); }
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ template<typename _Alloc>
+ struct __allocator<void, _Alloc>
+ {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef __allocator<_Tp1, _Alloc> other; };
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const __allocator<_Tp,_Alloc>& __a1,
+ const __allocator<_Tp,_Alloc>& __a2)
+ { return __a1.__underlying_alloc == __a2.__underlying_alloc; }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const __allocator<_Tp, _Alloc>& __a1,
+ const __allocator<_Tp, _Alloc>& __a2)
+ { return __a1.__underlying_alloc != __a2.__underlying_alloc; }
+
+
+ /**
+ * @if maint
+ * Another allocator adaptor: _Alloc_traits. This serves two purposes.
+ * First, make it possible to write containers that can use either "SGI"
+ * style allocators or "standard" allocators. Second, provide a mechanism
+ * so that containers can query whether or not the allocator has distinct
+ * instances. If not, the container can avoid wasting a word of memory to
+ * store an empty object. For examples of use, see stl_vector.h, etc, or
+ * any of the other classes derived from this one.
+ *
+ * This adaptor uses partial specialization. The general case of
+ * _Alloc_traits<_Tp, _Alloc> assumes that _Alloc is a
+ * standard-conforming allocator, possibly with non-equal instances and
+ * non-static members. (It still behaves correctly even if _Alloc has
+ * static member and if all instances are equal. Refinements affect
+ * performance, not correctness.)
+ *
+ * There are always two members: allocator_type, which is a standard-
+ * conforming allocator type for allocating objects of type _Tp, and
+ * _S_instanceless, a static const member of type bool. If
+ * _S_instanceless is true, this means that there is no difference
+ * between any two instances of type allocator_type. Furthermore, if
+ * _S_instanceless is true, then _Alloc_traits has one additional
+ * member: _Alloc_type. This type encapsulates allocation and
+ * deallocation of objects of type _Tp through a static interface; it
+ * has two member functions, whose signatures are
+ *
+ * - static _Tp* allocate(size_t)
+ * - static void deallocate(_Tp*, size_t)
+ *
+ * The size_t parameters are "standard" style (see top of
+ * allocator.h) in that they take counts, not sizes.
+ *
+ * @endif
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ // The fully general version.
+ template<typename _Tp, typename _Allocator>
+ struct _Alloc_traits
+ {
+ static const bool _S_instanceless = false;
+ typedef typename _Allocator::template rebind<_Tp>::other allocator_type;
+ };
+
+ template<typename _Tp, typename _Allocator>
+ const bool _Alloc_traits<_Tp, _Allocator>::_S_instanceless;
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/atomicity.h b/contrib/libstdc++/include/bits/atomicity.h
new file mode 100644
index 0000000..d2620b0
--- /dev/null
+++ b/contrib/libstdc++/include/bits/atomicity.h
@@ -0,0 +1,46 @@
+// Low-level functions for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_ATOMICITY_H
+#define _GLIBCXX_ATOMICITY_H 1
+
+#include <bits/atomic_word.h>
+
+namespace __gnu_cxx
+{
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val);
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word* __mem, int __val);
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/bits/basic_ios.h b/contrib/libstdc++/include/bits/basic_ios.h
index 70d8e84..7ffe40e 100644
--- a/contrib/libstdc++/include/bits/basic_ios.h
+++ b/contrib/libstdc++/include/bits/basic_ios.h
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -33,8 +33,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_BASICIOS_H
-#define _CPP_BITS_BASICIOS_H 1
+#ifndef _BASIC_IOS_H
+#define _BASIC_IOS_H 1
#pragma GCC system_header
@@ -43,7 +43,7 @@
#include <bits/locale_classes.h>
#include <bits/locale_facets.h>
-namespace std
+namespace std
{
// 27.4.5 Template class basic_ios
/**
@@ -76,14 +76,12 @@ namespace std
* @endif
*/
typedef ctype<_CharT> __ctype_type;
- typedef ostreambuf_iterator<_CharT, _Traits> __ostreambuf_iter;
- typedef num_put<_CharT, __ostreambuf_iter> __numput_type;
- typedef istreambuf_iterator<_CharT, _Traits> __istreambuf_iter;
- typedef num_get<_CharT, __istreambuf_iter> __numget_type;
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+ __num_put_type;
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+ __num_get_type;
//@}
- friend void ios_base::Init::_S_ios_create(bool);
-
// Data members:
protected:
basic_ostream<_CharT, _Traits>* _M_tie;
@@ -92,11 +90,11 @@ namespace std
basic_streambuf<_CharT, _Traits>* _M_streambuf;
// Cached use_facet<ctype>, which is based on the current locale info.
- const __ctype_type* _M_fctype;
- // From ostream.
- const __numput_type* _M_fnumput;
- // From istream.
- const __numget_type* _M_fnumget;
+ const __ctype_type* _M_ctype;
+ // For ostream.
+ const __num_put_type* _M_num_put;
+ // For istream.
+ const __num_get_type* _M_num_get;
public:
//@{
@@ -106,11 +104,11 @@ namespace std
* This allows you to write constructs such as
* "if (!a_stream) ..." and "while (a_stream) ..."
*/
- operator void*() const
+ operator void*() const
{ return this->fail() ? 0 : const_cast<basic_ios*>(this); }
- bool
- operator!() const
+ bool
+ operator!() const
{ return this->fail(); }
//@}
@@ -121,8 +119,8 @@ namespace std
* See std::ios_base::iostate for the possible bit values. Most
* users will call one of the interpreting wrappers, e.g., good().
*/
- iostate
- rdstate() const
+ iostate
+ rdstate() const
{ return _M_streambuf_state; }
/**
@@ -132,7 +130,7 @@ namespace std
* See std::ios_base::iostate for the possible bit values. Most
* users will not need to pass an argument.
*/
- void
+ void
clear(iostate __state = goodbit);
/**
@@ -141,18 +139,31 @@ namespace std
*
* See std::ios_base::iostate for the possible bit values.
*/
- void
- setstate(iostate __state)
+ void
+ setstate(iostate __state)
{ this->clear(this->rdstate() | __state); }
+ // Flip the internal state on for the proper state bits, then re
+ // throws the propagated exception if bit also set in
+ // exceptions().
+ void
+ _M_setstate(iostate __state)
+ {
+ // 27.6.1.2.1 Common requirements.
+ // Turn this on without causing an ios::failure to be thrown.
+ _M_streambuf_state |= __state;
+ if (this->exceptions() & __state)
+ __throw_exception_again;
+ }
+
/**
* @brief Fast error checking.
* @return True if no error flags are set.
*
* A wrapper around rdstate.
*/
- bool
- good() const
+ bool
+ good() const
{ return this->rdstate() == 0; }
/**
@@ -161,8 +172,8 @@ namespace std
*
* Note that other iostate flags may also be set.
*/
- bool
- eof() const
+ bool
+ eof() const
{ return (this->rdstate() & eofbit) != 0; }
/**
@@ -172,8 +183,8 @@ namespace std
* Checking the badbit in fail() is historical practice.
* Note that other iostate flags may also be set.
*/
- bool
- fail() const
+ bool
+ fail() const
{ return (this->rdstate() & (badbit | failbit)) != 0; }
/**
@@ -182,8 +193,8 @@ namespace std
*
* Note that other iostate flags may also be set.
*/
- bool
- bad() const
+ bool
+ bad() const
{ return (this->rdstate() & badbit) != 0; }
/**
@@ -193,8 +204,8 @@ namespace std
* This changes nothing in the stream. See the one-argument version
* of exceptions(iostate) for the meaning of the return value.
*/
- iostate
- exceptions() const
+ iostate
+ exceptions() const
{ return _M_exception; }
/**
@@ -213,26 +224,26 @@ namespace std
* #include <iostream>
* #include <fstream>
* #include <exception>
- *
+ *
* int main()
* {
* std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
- *
+ *
* std::ifstream f ("/etc/motd");
- *
+ *
* std::cerr << "Setting badbit\n";
* f.setstate (std::ios_base::badbit);
- *
+ *
* std::cerr << "Setting exception mask\n";
* f.exceptions (std::ios_base::badbit);
* }
* @endcode
*/
- void
- exceptions(iostate __except)
- {
- _M_exception = __except;
- this->clear(_M_streambuf_state);
+ void
+ exceptions(iostate __except)
+ {
+ _M_exception = __except;
+ this->clear(_M_streambuf_state);
}
// Constructor/destructor:
@@ -241,9 +252,10 @@ namespace std
*
* The parameter is passed by derived streams.
*/
- explicit
- basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
- : ios_base(), _M_fctype(0), _M_fnumput(0), _M_fnumget(0)
+ explicit
+ basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
+ : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
+ _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ this->init(__sb); }
/**
@@ -252,9 +264,9 @@ namespace std
* The destructor does nothing. More specifically, it does not
* destroy the streambuf held by rdbuf().
*/
- virtual
+ virtual
~basic_ios() { }
-
+
// Members:
/**
* @brief Fetches the current @e tied stream.
@@ -266,7 +278,7 @@ namespace std
* first flushed. For example, @c std::cin is tied to @c std::cout.
*/
basic_ostream<_CharT, _Traits>*
- tie() const
+ tie() const
{ return _M_tie; }
/**
@@ -292,7 +304,7 @@ namespace std
* This does not change the state of the stream.
*/
basic_streambuf<_CharT, _Traits>*
- rdbuf() const
+ rdbuf() const
{ return _M_streambuf; }
/**
@@ -308,13 +320,28 @@ namespace std
* in derived classes by overrides of the zero-argument @c rdbuf(),
* which is non-virtual for hysterical raisins. As a result, you
* must use explicit qualifications to access this function via any
- * derived class.
+ * derived class. For example:
+ *
+ * @code
+ * std::fstream foo; // or some other derived type
+ * std::streambuf* p = .....;
+ *
+ * foo.ios::rdbuf(p); // ios == basic_ios<char>
+ * @endcode
*/
- basic_streambuf<_CharT, _Traits>*
+ basic_streambuf<_CharT, _Traits>*
rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
/**
- * @doctodo
+ * @brief Copies fields of __rhs into this.
+ * @param __rhs The source values for the copies.
+ * @return Reference to this object.
+ *
+ * All fields of __rhs are copied into this object except that rdbuf()
+ * and rdstate() remain unchanged. All values in the pword and iword
+ * arrays are copied. Before copying, each callback is invoked with
+ * erase_event. After copying, each (new) callback is invoked with
+ * copyfmt_event. The final step is to copy exceptions().
*/
basic_ios&
copyfmt(const basic_ios& __rhs);
@@ -325,15 +352,15 @@ namespace std
*
* It defaults to a space (' ') in the current locale.
*/
- char_type
- fill() const
+ char_type
+ fill() const
{
if (!_M_fill_init)
{
_M_fill = this->widen(' ');
_M_fill_init = true;
}
- return _M_fill;
+ return _M_fill;
}
/**
@@ -345,7 +372,7 @@ namespace std
* have been requested (e.g., via setw), Q characters are actually
* used, and Q<P. It defaults to a space (' ') in the current locale.
*/
- char_type
+ char_type
fill(char_type __ch)
{
char_type __old = this->fill();
@@ -365,7 +392,7 @@ namespace std
* Additional l10n notes are at
* http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html
*/
- locale
+ locale
imbue(const locale& __loc);
/**
@@ -379,13 +406,13 @@ namespace std
*
* Returns the result of
* @code
- * std::use_facet< ctype<char_type> >(getloc()).narrow(c,dfault)
+ * std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)
* @endcode
*
* Additional l10n notes are at
* http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html
*/
- char
+ char
narrow(char_type __c, char __dfault) const;
/**
@@ -397,15 +424,15 @@ namespace std
*
* Returns the result of
* @code
- * std::use_facet< ctype<char_type> >(getloc()).widen(c)
+ * std::use_facet<ctype<char_type> >(getloc()).widen(c)
* @endcode
*
* Additional l10n notes are at
* http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html
*/
- char_type
+ char_type
widen(char __c) const;
-
+
protected:
// 27.4.5.1 basic_ios constructors
/**
@@ -414,47 +441,27 @@ namespace std
* The default constructor does nothing and is not normally
* accessible to users.
*/
- basic_ios() : ios_base()
+ basic_ios()
+ : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
+ _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ }
/**
* @brief All setup is performed here.
*
* This is called from the public constructor. It is not virtual and
- * cannot be redefined. The second argument, __cache, is used
- * to initialize the standard streams without allocating
- * memory.
+ * cannot be redefined.
*/
- void
+ void
init(basic_streambuf<_CharT, _Traits>* __sb);
- bool
- _M_check_facet(const locale::facet* __f) const
- {
- if (!__f)
- __throw_bad_cast();
- return true;
- }
-
void
_M_cache_locale(const locale& __loc);
-
-#if 1
- // XXX GLIBCXX_ABI Deprecated, compatibility only.
- void
- _M_cache_facets(const locale& __loc);
-#endif
-
- // Internal state setter that won't throw, only set the state bits.
- // Used to guarantee we don't throw when setting badbit.
- void
- _M_setstate(iostate __state) { _M_streambuf_state |= __state; }
};
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
#include <bits/basic_ios.tcc>
#endif
-#endif /* _CPP_BITS_BASICIOS_H */
+#endif /* _BASIC_IOS_H */
diff --git a/contrib/libstdc++/include/bits/basic_ios.tcc b/contrib/libstdc++/include/bits/basic_ios.tcc
index 1c9cd3b..fcb4b02 100644
--- a/contrib/libstdc++/include/bits/basic_ios.tcc
+++ b/contrib/libstdc++/include/bits/basic_ios.tcc
@@ -1,4 +1,4 @@
-// basic_ios locale and locale-related member functions -*- C++ -*-
+// basic_ios member functions -*- C++ -*-
// Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
//
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_BITS_BASICIOS_TCC
-#define _CPP_BITS_BASICIOS_TCC 1
+#ifndef _BASIC_IOS_TCC
+#define _BASIC_IOS_TCC 1
#pragma GCC system_header
@@ -37,17 +37,17 @@ namespace std
template<typename _CharT, typename _Traits>
void
basic_ios<_CharT, _Traits>::clear(iostate __state)
- {
+ {
if (this->rdbuf())
_M_streambuf_state = __state;
else
_M_streambuf_state = __state | badbit;
- if ((this->rdstate() & this->exceptions()))
- __throw_ios_failure("basic_ios::clear(iostate) caused exception");
+ if (this->exceptions() & this->rdstate())
+ __throw_ios_failure(__N("basic_ios::clear"));
}
-
+
template<typename _CharT, typename _Traits>
- basic_streambuf<_CharT, _Traits>*
+ basic_streambuf<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
{
basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
@@ -60,74 +60,66 @@ namespace std
basic_ios<_CharT, _Traits>&
basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
{
- // Per 27.1.1.1, do not call imbue, yet must trash all caches
- // associated with imbue()
-
- // Alloc any new word array first, so if it fails we have "rollback".
- _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
- _M_local_word : new _Words[__rhs._M_word_size];
-
- // Bump refs before doing callbacks, for safety.
- _Callback_list* __cb = __rhs._M_callbacks;
- if (__cb)
- __cb->_M_add_reference();
- _M_call_callbacks(erase_event);
- if (_M_word != _M_local_word)
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 292. effects of a.copyfmt (a)
+ if (this != &__rhs)
{
- delete [] _M_word;
- _M_word = 0;
+ // Per 27.1.1, do not call imbue, yet must trash all caches
+ // associated with imbue()
+
+ // Alloc any new word array first, so if it fails we have "rollback".
+ _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
+ _M_local_word : new _Words[__rhs._M_word_size];
+
+ // Bump refs before doing callbacks, for safety.
+ _Callback_list* __cb = __rhs._M_callbacks;
+ if (__cb)
+ __cb->_M_add_reference();
+ _M_call_callbacks(erase_event);
+ if (_M_word != _M_local_word)
+ {
+ delete [] _M_word;
+ _M_word = 0;
+ }
+ _M_dispose_callbacks();
+
+ // NB: Don't want any added during above.
+ _M_callbacks = __cb;
+ for (int __i = 0; __i < __rhs._M_word_size; ++__i)
+ __words[__i] = __rhs._M_word[__i];
+ if (_M_word != _M_local_word)
+ {
+ delete [] _M_word;
+ _M_word = 0;
+ }
+ _M_word = __words;
+ _M_word_size = __rhs._M_word_size;
+
+ this->flags(__rhs.flags());
+ this->width(__rhs.width());
+ this->precision(__rhs.precision());
+ this->tie(__rhs.tie());
+ this->fill(__rhs.fill());
+ _M_ios_locale = __rhs.getloc();
+ _M_cache_locale(_M_ios_locale);
+
+ _M_call_callbacks(copyfmt_event);
+
+ // The next is required to be the last assignment.
+ this->exceptions(__rhs.exceptions());
}
- _M_dispose_callbacks();
-
- _M_callbacks = __cb; // NB: Don't want any added during above.
- for (int __i = 0; __i < __rhs._M_word_size; ++__i)
- __words[__i] = __rhs._M_word[__i];
- if (_M_word != _M_local_word)
- {
- delete [] _M_word;
- _M_word = 0;
- }
- _M_word = __words;
- _M_word_size = __rhs._M_word_size;
-
- this->flags(__rhs.flags());
- this->width(__rhs.width());
- this->precision(__rhs.precision());
- this->tie(__rhs.tie());
- this->fill(__rhs.fill());
- _M_ios_locale = __rhs.getloc();
-
- // This removes the link to __rhs locale cache
- _M_call_callbacks(copyfmt_event);
-
- _M_cache_locale(_M_ios_locale);
-
-
- // The next is required to be the last assignment.
- this->exceptions(__rhs.exceptions());
-
return *this;
}
template<typename _CharT, typename _Traits>
char
basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
- {
- char __ret = __dfault;
- if (_M_check_facet(_M_fctype))
- __ret = _M_fctype->narrow(__c, __dfault);
- return __ret;
- }
+ { return __check_facet(_M_ctype).narrow(__c, __dfault); }
template<typename _CharT, typename _Traits>
_CharT
basic_ios<_CharT, _Traits>::widen(char __c) const
- {
- char_type __ret = char_type();
- if (_M_check_facet(_M_fctype))
- __ret = _M_fctype->widen(__c);
- return __ret;
- }
+ { return __check_facet(_M_ctype).widen(__c); }
// Locales:
template<typename _CharT, typename _Traits>
@@ -148,8 +140,9 @@ namespace std
{
// NB: This may be called more than once on the same object.
ios_base::_M_init();
+
+ // Cache locale data and specific facets used by iostreams.
_M_cache_locale(_M_ios_locale);
- _M_tie = 0;
// NB: The 27.4.4.1 Postconditions Table specifies requirements
// after basic_ios::init() has been called. As part of this,
@@ -166,6 +159,7 @@ namespace std
_M_fill = _CharT();
_M_fill_init = false;
+ _M_tie = 0;
_M_exception = goodbit;
_M_streambuf = __sb;
_M_streambuf_state = __sb ? goodbit : badbit;
@@ -176,44 +170,31 @@ namespace std
basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
{
if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
- _M_fctype = &use_facet<__ctype_type>(__loc);
- else
- _M_fctype = 0;
- if (__builtin_expect(has_facet<__numput_type>(__loc), true))
- _M_fnumput = &use_facet<__numput_type>(__loc);
+ _M_ctype = &use_facet<__ctype_type>(__loc);
else
- _M_fnumput = 0;
- if (__builtin_expect(has_facet<__numget_type>(__loc), true))
- _M_fnumget = &use_facet<__numget_type>(__loc);
+ _M_ctype = 0;
+
+ if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
+ _M_num_put = &use_facet<__num_put_type>(__loc);
else
- _M_fnumget = 0;
- }
+ _M_num_put = 0;
-#if 1
- // XXX GLIBCXX_ABI Deprecated, compatibility only.
- template<typename _CharT, typename _Traits>
- void
- basic_ios<_CharT, _Traits>::_M_cache_facets(const locale& __loc)
- {
- if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
- _M_fctype = &use_facet<__ctype_type>(__loc);
- if (__builtin_expect(has_facet<__numput_type>(__loc), true))
- _M_fnumput = &use_facet<__numput_type>(__loc);
- if (__builtin_expect(has_facet<__numget_type>(__loc), true))
- _M_fnumget = &use_facet<__numget_type>(__loc);
+ if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
+ _M_num_get = &use_facet<__num_get_type>(__loc);
+ else
+ _M_num_get = 0;
}
-#endif
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_ios<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_ios<wchar_t>;
#endif
#endif
} // namespace std
-#endif
+#endif
diff --git a/contrib/libstdc++/include/bits/basic_string.h b/contrib/libstdc++/include/bits/basic_string.h
index e92009d..16fe5ac 100644
--- a/contrib/libstdc++/include/bits/basic_string.h
+++ b/contrib/libstdc++/include/bits/basic_string.h
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,12 +37,13 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STRING_H
-#define _CPP_BITS_STRING_H 1
+#ifndef _BASIC_STRING_H
+#define _BASIC_STRING_H 1
#pragma GCC system_header
#include <bits/atomicity.h>
+#include <debug/debug.h>
namespace std
{
@@ -72,7 +73,7 @@ namespace std
* [_Rep]
* _M_length
* [basic_string<char_type>] _M_capacity
- * _M_dataplus _M_state
+ * _M_dataplus _M_refcount
* _M_p ----------------> unnamed array of char_type
* @endcode
*
@@ -110,37 +111,44 @@ namespace std
{
// Types:
public:
- typedef _Traits traits_type;
- typedef typename _Traits::char_type value_type;
- typedef _Alloc allocator_type;
- typedef typename _Alloc::size_type size_type;
- typedef typename _Alloc::difference_type difference_type;
- typedef typename _Alloc::reference reference;
- typedef typename _Alloc::const_reference const_reference;
- typedef typename _Alloc::pointer pointer;
- typedef typename _Alloc::const_pointer const_pointer;
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Alloc allocator_type;
+ typedef typename _Alloc::size_type size_type;
+ typedef typename _Alloc::difference_type difference_type;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;
typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
const_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
private:
// _Rep: string representation
// Invariants:
- // 1. String really contains _M_length + 1 characters; last is set
- // to 0 only on call to c_str(). We avoid instantiating
- // _CharT() where the interface does not require it.
+ // 1. String really contains _M_length + 1 characters: due to 21.3.4
+ // must be kept null-terminated.
// 2. _M_capacity >= _M_length
- // Allocated memory is always _M_capacity + (1 * sizeof(_CharT)).
- // 3. _M_references has three states:
+ // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT).
+ // 3. _M_refcount has three states:
// -1: leaked, one reference, no ref-copies allowed, non-const.
// 0: one reference, non-const.
// n>0: n + 1 references, operations require a lock, const.
// 4. All fields==0 is an empty string, given the extra storage
// beyond-the-end for a null terminator; thus, the shared
// empty string representation needs no constructor.
- struct _Rep
+
+ struct _Rep_base
+ {
+ size_type _M_length;
+ size_type _M_capacity;
+ _Atomic_word _M_refcount;
+ };
+
+ struct _Rep : _Rep_base
{
// Types:
typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
@@ -157,38 +165,38 @@ namespace std
// npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)
// Solving for m:
// m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1
- // In addition, this implementation quarters this ammount.
- static const size_type _S_max_size;
- static const _CharT _S_terminal;
+ // In addition, this implementation quarters this amount.
+ static const size_type _S_max_size;
+ static const _CharT _S_terminal;
+
+ // The following storage is init'd to 0 by the linker, resulting
+ // (carefully) in an empty string with one reference.
+ static size_type _S_empty_rep_storage[];
- size_type _M_length;
- size_type _M_capacity;
- _Atomic_word _M_references;
+ static _Rep&
+ _S_empty_rep()
+ { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
bool
_M_is_leaked() const
- { return _M_references < 0; }
+ { return this->_M_refcount < 0; }
bool
_M_is_shared() const
- { return _M_references > 0; }
+ { return this->_M_refcount > 0; }
void
_M_set_leaked()
- { _M_references = -1; }
+ { this->_M_refcount = -1; }
void
_M_set_sharable()
- { _M_references = 0; }
+ { this->_M_refcount = 0; }
_CharT*
_M_refdata() throw()
{ return reinterpret_cast<_CharT*>(this + 1); }
- _CharT&
- operator[](size_t __s) throw()
- { return _M_refdata() [__s]; }
-
_CharT*
_M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
{
@@ -198,13 +206,14 @@ namespace std
// Create & Destroy
static _Rep*
- _S_create(size_t, const _Alloc&);
+ _S_create(size_type, size_type, const _Alloc&);
void
_M_dispose(const _Alloc& __a)
{
- if (__exchange_and_add(&_M_references, -1) <= 0)
- _M_destroy(__a);
+ if (__builtin_expect(this != &_S_empty_rep(), false))
+ if (__gnu_cxx::__exchange_and_add(&this->_M_refcount, -1) <= 0)
+ _M_destroy(__a);
} // XXX MT
void
@@ -213,7 +222,8 @@ namespace std
_CharT*
_M_refcopy() throw()
{
- __atomic_add(&_M_references, 1);
+ if (__builtin_expect(this != &_S_empty_rep(), false))
+ __gnu_cxx::__atomic_add(&this->_M_refcount, 1);
return _M_refdata();
} // XXX MT
@@ -234,15 +244,13 @@ namespace std
// Data Members (public):
// NB: This is an unsigned type, and thus represents the maximum
// size that the allocator can hold.
- static const size_type npos = static_cast<size_type>(-1);
+ /// @var
+ /// Value returned by various member functions when they fail.
+ static const size_type npos = static_cast<size_type>(-1);
private:
// Data Members (private):
- mutable _Alloc_hider _M_dataplus;
-
- // The following storage is init'd to 0 by the linker, resulting
- // (carefully) in an empty string with one reference.
- static size_type _S_empty_rep_storage[(sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)];
+ mutable _Alloc_hider _M_dataplus;
_CharT*
_M_data() const
@@ -271,21 +279,20 @@ namespace std
_M_leak_hard();
}
- iterator
- _M_check(size_type __pos) const
+ size_type
+ _M_check(size_type __pos, const char* __s) const
{
if (__pos > this->size())
- __throw_out_of_range("basic_string::_M_check");
- return _M_ibegin() + __pos;
+ __throw_out_of_range(__N(__s));
+ return __pos;
}
- // NB: _M_fold doesn't check for a bad __pos1 value.
- iterator
- _M_fold(size_type __pos, size_type __off) const
+ // NB: _M_limit doesn't check for a bad __pos value.
+ size_type
+ _M_limit(size_type __pos, size_type __off) const
{
- bool __testoff = __off < this->size() - __pos;
- size_type __newoff = __testoff ? __off : this->size() - __pos;
- return (_M_ibegin() + __pos + __newoff);
+ const bool __testoff = __off < this->size() - __pos;
+ return __testoff ? __off : this->size() - __pos;
}
// _S_copy_chars is a separate template to permit specialization
@@ -322,48 +329,131 @@ namespace std
static _Rep&
_S_empty_rep()
- { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
+ { return _Rep::_S_empty_rep(); }
public:
// Construct/copy/destroy:
// NB: We overload ctors in some cases instead of using default
// arguments, per 17.4.4.4 para. 2 item 2.
+ /**
+ * @brief Default constructor creates an empty string.
+ */
inline
basic_string();
+ /**
+ * @brief Construct an empty string using allocator a.
+ */
explicit
basic_string(const _Alloc& __a);
// NB: per LWG issue 42, semantics different from IS:
+ /**
+ * @brief Construct string with copy of value of @a str.
+ * @param str Source string.
+ */
basic_string(const basic_string& __str);
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param str Source string.
+ * @param pos Index of first character to copy from.
+ * @param n Number of characters to copy (default remainder).
+ */
basic_string(const basic_string& __str, size_type __pos,
size_type __n = npos);
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param str Source string.
+ * @param pos Index of first character to copy from.
+ * @param n Number of characters to copy.
+ * @param a Allocator to use.
+ */
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a);
+ /**
+ * @brief Construct string initialized by a character array.
+ * @param s Source character array.
+ * @param n Number of characters to copy.
+ * @param a Allocator to use (default is default allocator).
+ *
+ * NB: s must have at least n characters, '\0' has no special
+ * meaning.
+ */
basic_string(const _CharT* __s, size_type __n,
const _Alloc& __a = _Alloc());
+ /**
+ * @brief Construct string as copy of a C string.
+ * @param s Source C string.
+ * @param a Allocator to use (default is default allocator).
+ */
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+ /**
+ * @brief Construct string as multiple characters.
+ * @param n Number of characters.
+ * @param c Character to use.
+ * @param a Allocator to use (default is default allocator).
+ */
basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
+ /**
+ * @brief Construct string as copy of a range.
+ * @param beg Start of range.
+ * @param end End of range.
+ * @param a Allocator to use (default is default allocator).
+ */
template<class _InputIterator>
basic_string(_InputIterator __beg, _InputIterator __end,
const _Alloc& __a = _Alloc());
+ /**
+ * @brief Destroy the string instance.
+ */
~basic_string()
{ _M_rep()->_M_dispose(this->get_allocator()); }
+ /**
+ * @brief Assign the value of @a str to this string.
+ * @param str Source string.
+ */
basic_string&
- operator=(const basic_string& __str) { return this->assign(__str); }
+ operator=(const basic_string& __str)
+ {
+ this->assign(__str);
+ return *this;
+ }
+ /**
+ * @brief Copy contents of @a s into this string.
+ * @param s Source null-terminated string.
+ */
basic_string&
- operator=(const _CharT* __s) { return this->assign(__s); }
+ operator=(const _CharT* __s)
+ {
+ this->assign(__s);
+ return *this;
+ }
+ /**
+ * @brief Set value to string of length 1.
+ * @param c Source character.
+ *
+ * Assigning to a character makes this string length 1 and
+ * (*this)[0] == @a c.
+ */
basic_string&
- operator=(_CharT __c) { return this->assign(1, __c); }
+ operator=(_CharT __c)
+ {
+ this->assign(1, __c);
+ return *this;
+ }
// Iterators:
+ /**
+ * Returns a read/write iterator that points to the first character in
+ * the %string. Unshares the string.
+ */
iterator
begin()
{
@@ -371,333 +461,955 @@ namespace std
return iterator(_M_data());
}
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * character in the %string.
+ */
const_iterator
begin() const
{ return const_iterator(_M_data()); }
+ /**
+ * Returns a read/write iterator that points one past the last
+ * character in the %string. Unshares the string.
+ */
iterator
end()
{
- _M_leak();
- return iterator(_M_data() + this->size());
+ _M_leak();
+ return iterator(_M_data() + this->size());
}
+ /**
+ * Returns a read-only (constant) iterator that points one past the
+ * last character in the %string.
+ */
const_iterator
end() const
{ return const_iterator(_M_data() + this->size()); }
+ /**
+ * Returns a read/write reverse iterator that points to the last
+ * character in the %string. Iteration is done in reverse element
+ * order. Unshares the string.
+ */
reverse_iterator
rbegin()
{ return reverse_iterator(this->end()); }
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last character in the %string. Iteration is done in
+ * reverse element order.
+ */
const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(this->end()); }
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first character in the %string. Iteration is done in reverse
+ * element order. Unshares the string.
+ */
reverse_iterator
rend()
{ return reverse_iterator(this->begin()); }
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first character in the %string. Iteration
+ * is done in reverse element order.
+ */
const_reverse_iterator
rend() const
{ return const_reverse_iterator(this->begin()); }
public:
// Capacity:
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
size_type
size() const { return _M_rep()->_M_length; }
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
size_type
length() const { return _M_rep()->_M_length; }
+ /// Returns the size() of the largest possible %string.
size_type
max_size() const { return _Rep::_S_max_size; }
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param n Number of characters the %string should contain.
+ * @param c Character to fill any new elements.
+ *
+ * This function will %resize the %string to the specified
+ * number of characters. If the number is smaller than the
+ * %string's current size the %string is truncated, otherwise
+ * the %string is extended and new elements are set to @a c.
+ */
void
resize(size_type __n, _CharT __c);
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param n Number of characters the %string should contain.
+ *
+ * This function will resize the %string to the specified length. If
+ * the new size is smaller than the %string's current size the %string
+ * is truncated, otherwise the %string is extended and new characters
+ * are default-constructed. For basic types such as char, this means
+ * setting them to 0.
+ */
void
resize(size_type __n) { this->resize(__n, _CharT()); }
+ /**
+ * Returns the total number of characters that the %string can hold
+ * before needing to allocate more memory.
+ */
size_type
capacity() const { return _M_rep()->_M_capacity; }
+ /**
+ * @brief Attempt to preallocate enough memory for specified number of
+ * characters.
+ * @param n Number of characters required.
+ * @throw std::length_error If @a n exceeds @c max_size().
+ *
+ * This function attempts to reserve enough memory for the
+ * %string to hold the specified number of characters. If the
+ * number requested is more than max_size(), length_error is
+ * thrown.
+ *
+ * The advantage of this function is that if optimal code is a
+ * necessity and the user can determine the string length that will be
+ * required, the user can reserve the memory in %advance, and thus
+ * prevent a possible reallocation of memory and copying of %string
+ * data.
+ */
void
reserve(size_type __res_arg = 0);
+ /**
+ * Erases the string, making it empty.
+ */
void
clear() { _M_mutate(0, this->size(), 0); }
+ /**
+ * Returns true if the %string is empty. Equivalent to *this == "".
+ */
bool
empty() const { return this->size() == 0; }
// Element access:
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read-only (constant) reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ */
const_reference
operator[] (size_type __pos) const
- { return _M_data()[__pos]; }
+ {
+ _GLIBCXX_DEBUG_ASSERT(__pos <= size());
+ return _M_data()[__pos];
+ }
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read/write reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().) Unshares the string.
+ */
reference
operator[](size_type __pos)
{
+ _GLIBCXX_DEBUG_ASSERT(__pos < size());
_M_leak();
return _M_data()[__pos];
}
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read-only (const) reference to the character.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is
+ * first checked that it is in the range of the string. The function
+ * throws out_of_range if the check fails.
+ */
const_reference
at(size_type __n) const
{
if (__n >= this->size())
- __throw_out_of_range("basic_string::at");
+ __throw_out_of_range(__N("basic_string::at"));
return _M_data()[__n];
}
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read/write reference to the character.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is
+ * first checked that it is in the range of the string. The function
+ * throws out_of_range if the check fails. Success results in
+ * unsharing the string.
+ */
reference
at(size_type __n)
{
if (__n >= size())
- __throw_out_of_range("basic_string::at");
+ __throw_out_of_range(__N("basic_string::at"));
_M_leak();
return _M_data()[__n];
}
// Modifiers:
+ /**
+ * @brief Append a string to this string.
+ * @param str The string to append.
+ * @return Reference to this string.
+ */
basic_string&
operator+=(const basic_string& __str) { return this->append(__str); }
+ /**
+ * @brief Append a C string.
+ * @param s The C string to append.
+ * @return Reference to this string.
+ */
basic_string&
operator+=(const _CharT* __s) { return this->append(__s); }
+ /**
+ * @brief Append a character.
+ * @param s The character to append.
+ * @return Reference to this string.
+ */
basic_string&
operator+=(_CharT __c) { return this->append(size_type(1), __c); }
+ /**
+ * @brief Append a string to this string.
+ * @param str The string to append.
+ * @return Reference to this string.
+ */
basic_string&
append(const basic_string& __str);
+ /**
+ * @brief Append a substring.
+ * @param str The string to append.
+ * @param pos Index of the first character of str to append.
+ * @param n The number of characters to append.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a pos is not a valid index.
+ *
+ * This function appends @a n characters from @a str starting at @a pos
+ * to this string. If @a n is is larger than the number of available
+ * characters in @a str, the remainder of @a str is appended.
+ */
basic_string&
append(const basic_string& __str, size_type __pos, size_type __n);
+ /**
+ * @brief Append a C substring.
+ * @param s The C string to append.
+ * @param n The number of characters to append.
+ * @return Reference to this string.
+ */
basic_string&
append(const _CharT* __s, size_type __n);
+ /**
+ * @brief Append a C string.
+ * @param s The C string to append.
+ * @return Reference to this string.
+ */
basic_string&
append(const _CharT* __s)
- { return this->append(__s, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->append(__s, traits_type::length(__s));
+ }
+ /**
+ * @brief Append multiple characters.
+ * @param n The number of characters to append.
+ * @param c The character to use.
+ * @return Reference to this string.
+ *
+ * Appends n copies of c to this string.
+ */
basic_string&
- append(size_type __n, _CharT __c);
-
+ append(size_type __n, _CharT __c)
+ { return _M_replace_aux(this->size(), size_type(0), __n, __c); }
+
+ /**
+ * @brief Append a range of characters.
+ * @param first Iterator referencing the first character to append.
+ * @param last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Appends characters in the range [first,last) to this string.
+ */
template<class _InputIterator>
basic_string&
append(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_iend(), _M_iend(), __first, __last); }
+ /**
+ * @brief Append a single character.
+ * @param c Character to append.
+ */
void
push_back(_CharT __c)
- { this->replace(_M_iend(), _M_iend(), 1, __c); }
+ { _M_replace_aux(this->size(), size_type(0), size_type(1), __c); }
+ /**
+ * @brief Set value to contents of another string.
+ * @param str Source string to use.
+ * @return Reference to this string.
+ */
basic_string&
assign(const basic_string& __str);
+ /**
+ * @brief Set value to a substring of a string.
+ * @param str The string to use.
+ * @param pos Index of the first character of str.
+ * @param n Number of characters to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a pos is not a valid index.
+ *
+ * This function sets this string to the substring of @a str consisting
+ * of @a n characters at @a pos. If @a n is is larger than the number
+ * of available characters in @a str, the remainder of @a str is used.
+ */
basic_string&
- assign(const basic_string& __str, size_type __pos, size_type __n);
-
+ assign(const basic_string& __str, size_type __pos, size_type __n)
+ { return this->assign(__str._M_data()
+ + __str._M_check(__pos, "basic_string::assign"),
+ __str._M_limit(__pos, __n)); }
+
+ /**
+ * @brief Set value to a C substring.
+ * @param s The C string to use.
+ * @param n Number of characters to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the first @a n
+ * characters of @a s. If @a n is is larger than the number of
+ * available characters in @a s, the remainder of @a s is used.
+ */
basic_string&
assign(const _CharT* __s, size_type __n);
+ /**
+ * @brief Set value to contents of a C string.
+ * @param s The C string to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the value of @a s.
+ * The data is copied, so there is no dependence on @a s once the
+ * function returns.
+ */
basic_string&
assign(const _CharT* __s)
- { return this->assign(__s, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->assign(__s, traits_type::length(__s));
+ }
+ /**
+ * @brief Set value to multiple characters.
+ * @param n Length of the resulting string.
+ * @param c The character to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to @a n copies of
+ * character @a c.
+ */
basic_string&
assign(size_type __n, _CharT __c)
- { return this->replace(_M_ibegin(), _M_iend(), __n, __c); }
-
+ { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
+
+ /**
+ * @brief Set value to a range of characters.
+ * @param first Iterator referencing the first character to append.
+ * @param last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Sets value of string to characters in the range [first,last).
+ */
template<class _InputIterator>
basic_string&
assign(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+ /**
+ * @brief Insert multiple characters.
+ * @param p Iterator referencing location in string to insert at.
+ * @param n Number of characters to insert
+ * @param c The character to insert.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts @a n copies of character @a c starting at the position
+ * referenced by iterator @a p. If adding characters causes the length
+ * to exceed max_size(), length_error is thrown. The value of the
+ * string doesn't change if an error is thrown.
+ */
void
insert(iterator __p, size_type __n, _CharT __c)
{ this->replace(__p, __p, __n, __c); }
+ /**
+ * @brief Insert a range of characters.
+ * @param p Iterator referencing location in string to insert at.
+ * @param beg Start of range.
+ * @param end End of range.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts characters in range [beg,end). If adding characters causes
+ * the length to exceed max_size(), length_error is thrown. The value
+ * of the string doesn't change if an error is thrown.
+ */
template<class _InputIterator>
void insert(iterator __p, _InputIterator __beg, _InputIterator __end)
{ this->replace(__p, __p, __beg, __end); }
+ /**
+ * @brief Insert value of a string.
+ * @param pos1 Iterator referencing location in string to insert at.
+ * @param str The string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts value of @a str starting at @a pos1. If adding characters
+ * causes the length to exceed max_size(), length_error is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
basic_string&
insert(size_type __pos1, const basic_string& __str)
- { return this->insert(__pos1, __str, 0, __str.size()); }
-
+ { return this->insert(__pos1, __str, size_type(0), __str.size()); }
+
+ /**
+ * @brief Insert a substring.
+ * @param pos1 Iterator referencing location in string to insert at.
+ * @param str The string to insert.
+ * @param pos2 Start of characters in str to insert.
+ * @param n Number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos1 > size() or
+ * @a pos2 > @a str.size().
+ *
+ * Starting at @a pos1, insert @a n character of @a str beginning with
+ * @a pos2. If adding characters causes the length to exceed
+ * max_size(), length_error is thrown. If @a pos1 is beyond the end of
+ * this string or @a pos2 is beyond the end of @a str, out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
basic_string&
insert(size_type __pos1, const basic_string& __str,
- size_type __pos2, size_type __n);
-
+ size_type __pos2, size_type __n)
+ { return this->insert(__pos1, __str._M_data()
+ + __str._M_check(__pos2, "basic_string::insert"),
+ __str._M_limit(__pos2, __n)); }
+
+ /**
+ * @brief Insert a C substring.
+ * @param pos Iterator referencing location in string to insert at.
+ * @param s The C string to insert.
+ * @param n The number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a n characters of @a s starting at @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos is beyond end(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
basic_string&
insert(size_type __pos, const _CharT* __s, size_type __n);
+ /**
+ * @brief Insert a C string.
+ * @param pos Iterator referencing location in string to insert at.
+ * @param s The C string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a n characters of @a s starting at @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos is beyond end(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
basic_string&
insert(size_type __pos, const _CharT* __s)
- { return this->insert(__pos, __s, traits_type::length(__s)); }
-
- basic_string&
- insert(size_type __pos, size_type __n, _CharT __c)
{
- this->insert(_M_check(__pos), __n, __c);
- return *this;
+ __glibcxx_requires_string(__s);
+ return this->insert(__pos, __s, traits_type::length(__s));
}
+ /**
+ * @brief Insert multiple characters.
+ * @param pos Index in string to insert at.
+ * @param n Number of characters to insert
+ * @param c The character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts @a n copies of character @a c starting at index @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos > length(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
+ basic_string&
+ insert(size_type __pos, size_type __n, _CharT __c)
+ { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
+ size_type(0), __n, __c); }
+
+ /**
+ * @brief Insert one character.
+ * @param p Iterator referencing position in string to insert at.
+ * @param c The character to insert.
+ * @return Iterator referencing newly inserted char.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts character @a c at position referenced by @a p. If adding
+ * character causes the length to exceed max_size(), length_error is
+ * thrown. If @a p is beyond end of string, out_of_range is thrown.
+ * The value of the string doesn't change if an error is thrown.
+ */
iterator
- insert(iterator __p, _CharT __c = _CharT())
+ insert(iterator __p, _CharT __c)
{
- size_type __pos = __p - _M_ibegin();
- this->insert(_M_check(__pos), size_type(1), __c);
+ _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
+ const size_type __pos = __p - _M_ibegin();
+ _M_replace_aux(__pos, size_type(0), size_type(1), __c);
_M_rep()->_M_set_leaked();
- return this->_M_ibegin() + __pos;
+ return this->_M_ibegin() + __pos;
}
+ /**
+ * @brief Remove characters.
+ * @param pos Index of first character to remove (default 0).
+ * @param n Number of characters to remove (default remainder).
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Removes @a n characters from this string starting at @a pos. The
+ * length of the string is reduced by @a n. If there are < @a n
+ * characters to remove, the remainder of the string is truncated. If
+ * @a p is beyond end of string, out_of_range is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
basic_string&
erase(size_type __pos = 0, size_type __n = npos)
- {
- return this->replace(_M_check(__pos), _M_fold(__pos, __n),
- _M_data(), _M_data());
- }
-
+ { return _M_replace_safe(_M_check(__pos, "basic_string::erase"),
+ _M_limit(__pos, __n), NULL, size_type(0)); }
+
+ /**
+ * @brief Remove one character.
+ * @param position Iterator referencing the character to remove.
+ * @return iterator referencing same location after removal.
+ *
+ * Removes the character at @a position from this string. The value
+ * of the string doesn't change if an error is thrown.
+ */
iterator
erase(iterator __position)
{
- size_type __i = __position - _M_ibegin();
- this->replace(__position, __position + 1, _M_data(), _M_data());
+ _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()
+ && __position < _M_iend());
+ const size_type __pos = __position - _M_ibegin();
+ _M_replace_safe(__pos, size_type(1), NULL, size_type(0));
_M_rep()->_M_set_leaked();
- return _M_ibegin() + __i;
+ return _M_ibegin() + __pos;
}
+ /**
+ * @brief Remove a range of characters.
+ * @param first Iterator referencing the first character to remove.
+ * @param last Iterator referencing the end of the range.
+ * @return Iterator referencing location of first after removal.
+ *
+ * Removes the characters in the range [first,last) from this string.
+ * The value of the string doesn't change if an error is thrown.
+ */
iterator
erase(iterator __first, iterator __last)
{
- size_type __i = __first - _M_ibegin();
- this->replace(__first, __last, _M_data(), _M_data());
+ _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last
+ && __last <= _M_iend());
+ const size_type __pos = __first - _M_ibegin();
+ _M_replace_safe(__pos, __last - __first, NULL, size_type(0));
_M_rep()->_M_set_leaked();
- return _M_ibegin() + __i;
+ return _M_ibegin() + __pos;
}
+ /**
+ * @brief Replace characters with value from another string.
+ * @param pos Index of first character to replace.
+ * @param n Number of characters to be replaced.
+ * @param str String to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos+n) from this string.
+ * In place, the value of @a str is inserted. If @a pos is beyond end
+ * of string, out_of_range is thrown. If the length of the result
+ * exceeds max_size(), length_error is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
basic_string&
replace(size_type __pos, size_type __n, const basic_string& __str)
{ return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+ /**
+ * @brief Replace characters with value from another string.
+ * @param pos1 Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param str String to insert.
+ * @param pos2 Index of first character of str to use.
+ * @param n2 Number of characters from str to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos1 > size() or @a pos2 >
+ * str.size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos1,pos1 + n) from this
+ * string. In place, the value of @a str is inserted. If @a pos is
+ * beyond end of string, out_of_range is thrown. If the length of the
+ * result exceeds max_size(), length_error is thrown. The value of the
+ * string doesn't change if an error is thrown.
+ */
basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2);
-
+ size_type __pos2, size_type __n2)
+ { return this->replace(__pos1, __n1, __str._M_data()
+ + __str._M_check(__pos2, "basic_string::replace"),
+ __str._M_limit(__pos2, __n2)); }
+
+ /**
+ * @brief Replace characters with value of a C substring.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param str C string to insert.
+ * @param n2 Number of characters from str to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos1 > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, the first @a n2 characters of @a str are inserted, or all
+ * of @a str if @a n2 is too large. If @a pos is beyond end of string,
+ * out_of_range is thrown. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
basic_string&
replace(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2);
+ /**
+ * @brief Replace characters with value of a C string.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param str C string to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, the first @a n characters of @a str are inserted. If @a
+ * pos is beyond end of string, out_of_range is thrown. If the length
+ * of result exceeds max_size(), length_error is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
basic_string&
replace(size_type __pos, size_type __n1, const _CharT* __s)
- { return this->replace(__pos, __n1, __s, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__pos, __n1, __s, traits_type::length(__s));
+ }
+ /**
+ * @brief Replace characters with multiple characters.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param n2 Number of characters to insert.
+ * @param c Character to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, @a n2 copies of @a c are inserted. If @a pos is beyond
+ * end of string, out_of_range is thrown. If the length of result
+ * exceeds max_size(), length_error is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
basic_string&
replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
- { return this->replace(_M_check(__pos), _M_fold(__pos, __n1), __n2, __c); }
-
+ { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
+ _M_limit(__pos, __n1), __n2, __c); }
+
+ /**
+ * @brief Replace range of characters with string.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param str String value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the value of
+ * @a str is inserted. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
basic_string&
replace(iterator __i1, iterator __i2, const basic_string& __str)
{ return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+ /**
+ * @brief Replace range of characters with C substring.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param s C string value to insert.
+ * @param n Number of characters from s to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the first @a
+ * n characters of @a s are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
basic_string&
- replace(iterator __i1, iterator __i2,
- const _CharT* __s, size_type __n)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); }
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+ }
+ /**
+ * @brief Replace range of characters with C string.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param s C string value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the
+ * characters of @a s are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
basic_string&
replace(iterator __i1, iterator __i2, const _CharT* __s)
- { return this->replace(__i1, __i2, __s, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__i1, __i2, __s, traits_type::length(__s));
+ }
+ /**
+ * @brief Replace range of characters with multiple characters
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param n Number of characters to insert.
+ * @param c Character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, @a n copies
+ * of @a c are inserted. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
basic_string&
- replace(iterator __i1, iterator __i2, size_type __n, _CharT __c);
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
+ }
+ /**
+ * @brief Replace range of characters with range.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param k1 Iterator referencing start of range to insert.
+ * @param k2 Iterator referencing end of range to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, characters
+ * in the range [k1,k2) are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
template<class _InputIterator>
basic_string&
replace(iterator __i1, iterator __i2,
_InputIterator __k1, _InputIterator __k2)
- { return _M_replace(__i1, __i2, __k1, __k2,
- typename iterator_traits<_InputIterator>::iterator_category()); }
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
+ }
// Specializations for the common case of pointer and iterator:
// useful to avoid the overhead of temporary buffering in _M_replace.
basic_string&
- replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
- __k1, __k2 - __k1); }
+ replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
basic_string&
- replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
- __k1, __k2 - __k1); }
+ replace(iterator __i1, iterator __i2,
+ const _CharT* __k1, const _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
basic_string&
- replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1.base(), __k2 - __k1);
}
basic_string&
- replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ replace(iterator __i1, iterator __i2,
+ const_iterator __k1, const_iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1.base(), __k2 - __k1);
}
private:
+ template<class _Integer>
+ basic_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
+ _Integer __val, __true_type)
+ { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
+
template<class _InputIterator>
- basic_string&
- _M_replace(iterator __i1, iterator __i2, _InputIterator __k1,
- _InputIterator __k2, input_iterator_tag);
+ basic_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, __false_type);
- template<class _ForwardIterator>
- basic_string&
- _M_replace_safe(iterator __i1, iterator __i2, _ForwardIterator __k1,
- _ForwardIterator __k2);
+ basic_string&
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c)
+ {
+ if (this->max_size() - (this->size() - __n1) < __n2)
+ __throw_length_error(__N("basic_string::_M_replace_aux"));
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2 == 1)
+ _M_data()[__pos1] = __c;
+ else if (__n2)
+ traits_type::assign(_M_data() + __pos1, __n2, __c);
+ return *this;
+ }
+
+ basic_string&
+ _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2 == 1)
+ _M_data()[__pos1] = *__s;
+ else if (__n2)
+ traits_type::copy(_M_data() + __pos1, __s, __n2);
+ return *this;
+ }
// _S_construct_aux is used to implement the 21.3.1 para 15 which
// requires special behaviour if _InIter is an integral type
- template<class _InIter>
+ template<class _InIterator>
static _CharT*
- _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
- __false_type)
+ _S_construct_aux(_InIterator __beg, _InIterator __end,
+ const _Alloc& __a, __false_type)
{
- typedef typename iterator_traits<_InIter>::iterator_category _Tag;
+ typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
return _S_construct(__beg, __end, __a, _Tag());
}
- template<class _InIter>
+ template<class _InIterator>
static _CharT*
- _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
- __true_type)
- {
- return _S_construct(static_cast<size_type>(__beg),
- static_cast<value_type>(__end), __a);
- }
+ _S_construct_aux(_InIterator __beg, _InIterator __end,
+ const _Alloc& __a, __true_type)
+ { return _S_construct(static_cast<size_type>(__beg),
+ static_cast<value_type>(__end), __a); }
- template<class _InIter>
+ template<class _InIterator>
static _CharT*
- _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a)
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
{
- typedef typename _Is_integer<_InIter>::_Integral _Integral;
+ typedef typename _Is_integer<_InIterator>::_Integral _Integral;
return _S_construct_aux(__beg, __end, __a, _Integral());
}
// For Input Iterators, used in istreambuf_iterators, etc.
- template<class _InIter>
+ template<class _InIterator>
static _CharT*
- _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag);
// For forward_iterators up to random_access_iterators, used for
// string::iterator, _CharT*, etc.
- template<class _FwdIter>
+ template<class _FwdIterator>
static _CharT*
- _S_construct(_FwdIter __beg, _FwdIter __end, const _Alloc& __a,
+ _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
forward_iterator_tag);
static _CharT*
@@ -705,129 +1417,445 @@ namespace std
public:
+ /**
+ * @brief Copy substring into C string.
+ * @param s C string to copy value into.
+ * @param n Number of characters to copy.
+ * @param pos Index of first character to copy.
+ * @return Number of characters actually copied
+ * @throw std::out_of_range If pos > size().
+ *
+ * Copies up to @a n characters starting at @a pos into the C string @a
+ * s. If @a pos is greater than size(), out_of_range is thrown.
+ */
size_type
copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+ /**
+ * @brief Swap contents with another string.
+ * @param s String to swap with.
+ *
+ * Exchanges the contents of this string with that of @a s in constant
+ * time.
+ */
void
- swap(basic_string<_CharT, _Traits, _Alloc>& __s);
+ swap(basic_string& __s);
// String operations:
+ /**
+ * @brief Return const pointer to null-terminated contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
const _CharT*
- c_str() const
- {
- // MT: This assumes concurrent writes are OK.
- size_type __n = this->size();
- traits_type::assign(_M_data()[__n], _Rep::_S_terminal);
- return _M_data();
- }
-
+ c_str() const { return _M_data(); }
+
+ /**
+ * @brief Return const pointer to contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
const _CharT*
data() const { return _M_data(); }
+ /**
+ * @brief Return copy of allocator used to construct this string.
+ */
allocator_type
get_allocator() const { return _M_dataplus; }
+ /**
+ * @brief Find position of a C substring.
+ * @param s C string to locate.
+ * @param pos Index of character to search from.
+ * @param n Number of characters from @a s to search for.
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the first @a n characters
+ * in @a s within this string. If found, returns the index where it
+ * begins. If not found, returns npos.
+ */
size_type
find(const _CharT* __s, size_type __pos, size_type __n) const;
+ /**
+ * @brief Find position of a string.
+ * @param str String to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for value of @a str within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
size_type
find(const basic_string& __str, size_type __pos = 0) const
{ return this->find(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find position of a C string.
+ * @param s C string to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the value of @a s within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
size_type
find(const _CharT* __s, size_type __pos = 0) const
- { return this->find(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->find(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
size_type
find(_CharT __c, size_type __pos = 0) const;
+ /**
+ * @brief Find last position of a string.
+ * @param str String to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for value of @a str within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
size_type
rfind(const basic_string& __str, size_type __pos = npos) const
{ return this->rfind(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find last position of a C substring.
+ * @param s C string to locate.
+ * @param pos Index of character to search back from.
+ * @param n Number of characters from s to search for.
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for the first @a n
+ * characters in @a s within this string. If found, returns the index
+ * where it begins. If not found, returns npos.
+ */
size_type
rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+ /**
+ * @brief Find last position of a C string.
+ * @param s C string to locate.
+ * @param pos Index of character to start search at (default 0).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for the value of @a s within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
size_type
rfind(const _CharT* __s, size_type __pos = npos) const
- { return this->rfind(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->rfind(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find last position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search back from (default 0).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
size_type
rfind(_CharT __c, size_type __pos = npos) const;
+ /**
+ * @brief Find position of a character of string.
+ * @param str String containing characters to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the characters of
+ * @a str within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
size_type
find_first_of(const basic_string& __str, size_type __pos = 0) const
{ return this->find_first_of(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find position of a character of C substring.
+ * @param s String containing characters to locate.
+ * @param pos Index of character to search from (default 0).
+ * @param n Number of characters from s to search for.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the first @a n
+ * characters of @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
size_type
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+ /**
+ * @brief Find position of a character of C string.
+ * @param s String containing characters to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the characters of
+ * @a s within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
size_type
find_first_of(const _CharT* __s, size_type __pos = 0) const
- { return this->find_first_of(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_of(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the character @a c within
+ * this string. If found, returns the index where it was found. If
+ * not found, returns npos.
+ *
+ * Note: equivalent to find(c, pos).
+ */
size_type
find_first_of(_CharT __c, size_type __pos = 0) const
{ return this->find(__c, __pos); }
+ /**
+ * @brief Find last position of a character of string.
+ * @param str String containing characters to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the characters of
+ * @a str within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
size_type
find_last_of(const basic_string& __str, size_type __pos = npos) const
{ return this->find_last_of(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find last position of a character of C substring.
+ * @param s C string containing characters to locate.
+ * @param pos Index of character to search back from (default end).
+ * @param n Number of characters from s to search for.
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the first @a n
+ * characters of @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
size_type
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+ /**
+ * @brief Find last position of a character of C string.
+ * @param s C string containing characters to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the characters of
+ * @a s within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
size_type
find_last_of(const _CharT* __s, size_type __pos = npos) const
- { return this->find_last_of(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_of(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find last position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search back from (default 0).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ *
+ * Note: equivalent to rfind(c, pos).
+ */
size_type
find_last_of(_CharT __c, size_type __pos = npos) const
{ return this->rfind(__c, __pos); }
+ /**
+ * @brief Find position of a character not in string.
+ * @param str String containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in @a str within this string. If found, returns the index where it
+ * was found. If not found, returns npos.
+ */
size_type
find_first_not_of(const basic_string& __str, size_type __pos = 0) const
{ return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find position of a character not in C substring.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @param n Number of characters from s to consider.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in the first @a n characters of @a s within this string. If found,
+ * returns the index where it was found. If not found, returns npos.
+ */
size_type
find_first_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
+ /**
+ * @brief Find position of a character not in C string.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in @a s within this string. If found, returns the index where it
+ * was found. If not found, returns npos.
+ */
size_type
find_first_not_of(const _CharT* __s, size_type __pos = 0) const
- { return this->find_first_not_of(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_not_of(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find position of a different character.
+ * @param c Character to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character other than @a c
+ * within this string. If found, returns the index where it was found.
+ * If not found, returns npos.
+ */
size_type
find_first_not_of(_CharT __c, size_type __pos = 0) const;
+ /**
+ * @brief Find last position of a character not in string.
+ * @param str String containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in @a str within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
size_type
find_last_not_of(const basic_string& __str, size_type __pos = npos) const
{ return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+ /**
+ * @brief Find last position of a character not in C substring.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @param n Number of characters from s to consider.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in the first @a n characters of @a s within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
size_type
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
+ /**
+ * @brief Find position of a character not in C string.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
size_type
find_last_not_of(const _CharT* __s, size_type __pos = npos) const
- { return this->find_last_not_of(__s, __pos, traits_type::length(__s)); }
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_not_of(__s, __pos, traits_type::length(__s));
+ }
+ /**
+ * @brief Find last position of a different character.
+ * @param c Character to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches backward for a character other than
+ * @a c within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
size_type
find_last_not_of(_CharT __c, size_type __pos = npos) const;
+ /**
+ * @brief Get a substring.
+ * @param pos Index of first character (default 0).
+ * @param n Number of characters in substring (default remainder).
+ * @return The new string.
+ * @throw std::out_of_range If pos > size().
+ *
+ * Construct and return a new string using the @a n characters starting
+ * at @a pos. If the string is too short, use the remainder of the
+ * characters. If @a pos is beyond the end of the string, out_of_range
+ * is thrown.
+ */
basic_string
substr(size_type __pos = 0, size_type __n = npos) const
- {
- if (__pos > this->size())
- __throw_out_of_range("basic_string::substr");
- return basic_string(*this, __pos, __n);
- }
-
+ { return basic_string(*this,
+ _M_check(__pos, "basic_string::substr"), __n); }
+
+ /**
+ * @brief Compare to a string.
+ * @param str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a str, 0 if
+ * their values are equivalent, or > 0 if this string is ordered after
+ * @a str. If the lengths of @a str and this string are different, the
+ * shorter one is ordered first. If they are the same, returns the
+ * result of traits::compare(data(),str.data(),size());
+ */
int
compare(const basic_string& __str) const
{
- size_type __size = this->size();
- size_type __osize = __str.size();
- size_type __len = std::min(__size, __osize);
+ const size_type __size = this->size();
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__size, __osize);
int __r = traits_type::compare(_M_data(), __str.data(), __len);
if (!__r)
@@ -835,21 +1863,101 @@ namespace std
return __r;
}
+ /**
+ * @brief Compare substring to a string.
+ * @param pos Index of first character of substring.
+ * @param n Number of characters in substring.
+ * @param str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n characters starting
+ * at @a pos. Returns an integer < 0 if the substring is ordered
+ * before @a str, 0 if their values are equivalent, or > 0 if the
+ * substring is ordered after @a str. If the lengths @a of str and the
+ * substring are different, the shorter one is ordered first. If they
+ * are the same, returns the result of
+ * traits::compare(substring.data(),str.data(),size());
+ */
int
compare(size_type __pos, size_type __n, const basic_string& __str) const;
+ /**
+ * @brief Compare substring to a substring.
+ * @param pos1 Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param str String to compare against.
+ * @param pos2 Index of first character of substring of str.
+ * @param n2 Number of characters in substring of str.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos1. Form the substring of @a str from the @a n2 characters
+ * starting at @a pos2. Returns an integer < 0 if this substring is
+ * ordered before the substring of @a str, 0 if their values are
+ * equivalent, or > 0 if this substring is ordered after the substring
+ * of @a str. If the lengths of the substring of @a str and this
+ * substring are different, the shorter one is ordered first. If they
+ * are the same, returns the result of
+ * traits::compare(substring.data(),str.substr(pos2,n2).data(),size());
+ */
int
compare(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2) const;
+ /**
+ * @brief Compare to a C string.
+ * @param s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a s, 0 if
+ * their values are equivalent, or > 0 if this string is ordered after
+ * @a s. If the lengths of @a s and this string are different, the
+ * shorter one is ordered first. If they are the same, returns the
+ * result of traits::compare(data(),s,size());
+ */
int
compare(const _CharT* __s) const;
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 5 String::compare specification questionable
+ /**
+ * @brief Compare substring to a C string.
+ * @param pos Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos. Returns an integer < 0 if the substring is ordered
+ * before @a s, 0 if their values are equivalent, or > 0 if the
+ * substring is ordered after @a s. If the lengths of @a s and the
+ * substring are different, the shorter one is ordered first. If they
+ * are the same, returns the result of
+ * traits::compare(substring.data(),s,size());
+ */
int
compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+ /**
+ * @brief Compare substring against a character array.
+ * @param pos1 Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param s character array to compare against.
+ * @param n2 Number of characters of s.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos1. Form a string from the first @a n2 characters of @a s.
+ * Returns an integer < 0 if this substring is ordered before the string
+ * from @a s, 0 if their values are equivalent, or > 0 if this substring
+ * is ordered after the string from @a s. If the lengths of this
+ * substring and @a n2 are different, the shorter one is ordered first.
+ * If they are the same, returns the result of
+ * traits::compare(substring.data(),s,size());
+ *
+ * NB: s must have at least n2 characters, '\0' has no special
+ * meaning.
+ */
int
compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const;
@@ -859,9 +1967,15 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>::
basic_string()
- : _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { }
+ : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
// operator+
+ /**
+ * @brief Concatenate two strings.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with value of @a lhs followed by @a rhs.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
@@ -872,15 +1986,33 @@ namespace std
return __str;
}
+ /**
+ * @brief Concatenate C string and string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with value of @a lhs followed by @a rhs.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT,_Traits,_Alloc>
operator+(const _CharT* __lhs,
const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+ /**
+ * @brief Concatenate character and string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT,_Traits,_Alloc>
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+ /**
+ * @brief Concatenate string and C string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
@@ -891,11 +2023,17 @@ namespace std
return __str;
}
+ /**
+ * @brief Concatenate string and character.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
{
- typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__string_type __str(__lhs);
__str.append(__size_type(1), __rhs);
@@ -903,18 +2041,36 @@ namespace std
}
// operator ==
+ /**
+ * @brief Test equivalence of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs.compare(@a rhs) == 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) == 0; }
+ /**
+ * @brief Test equivalence of C string and string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a rhs.compare(@a lhs) == 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) == 0; }
+ /**
+ * @brief Test equivalence of string and C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs.compare(@a rhs) == 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
@@ -922,18 +2078,36 @@ namespace std
{ return __lhs.compare(__rhs) == 0; }
// operator !=
+ /**
+ * @brief Test difference of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs.compare(@a rhs) != 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) != 0; }
+ /**
+ * @brief Test difference of C string and string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a rhs.compare(@a lhs) != 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) != 0; }
+ /**
+ * @brief Test difference of string and C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs.compare(@a rhs) != 0. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
@@ -941,18 +2115,36 @@ namespace std
{ return __lhs.compare(__rhs) != 0; }
// operator <
+ /**
+ * @brief Test if string precedes string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) < 0; }
+ /**
+ * @brief Test if string precedes C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) < 0; }
+ /**
+ * @brief Test if C string precedes string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const _CharT* __lhs,
@@ -960,18 +2152,36 @@ namespace std
{ return __rhs.compare(__lhs) > 0; }
// operator >
+ /**
+ * @brief Test if string follows string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) > 0; }
+ /**
+ * @brief Test if string follows C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) > 0; }
+ /**
+ * @brief Test if C string follows string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const _CharT* __lhs,
@@ -979,18 +2189,36 @@ namespace std
{ return __rhs.compare(__lhs) < 0; }
// operator <=
+ /**
+ * @brief Test if string doesn't follow string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) <= 0; }
+ /**
+ * @brief Test if string doesn't follow C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) <= 0; }
+ /**
+ * @brief Test if C string doesn't follow string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const _CharT* __lhs,
@@ -998,50 +2226,119 @@ namespace std
{ return __rhs.compare(__lhs) >= 0; }
// operator >=
+ /**
+ * @brief Test if string doesn't precede string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) >= 0; }
+ /**
+ * @brief Test if string doesn't precede C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) >= 0; }
+ /**
+ * @brief Test if C string doesn't precede string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) <= 0; }
-
+ /**
+ * @brief Swap contents of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ *
+ * Exchanges the contents of @a lhs and @a rhs in constant time.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline void
swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ __lhs.swap(__rhs); }
+ /**
+ * @brief Read stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a is into @a str until whitespace is found, the
+ * end of the stream is encountered, or str.max_size() is reached. If
+ * is.width() is non-zero, that is the limit on the number of characters
+ * stored into @a str. Any previous contents of @a str are erased.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str);
+ /**
+ * @brief Write string to a stream.
+ * @param os Output stream.
+ * @param str String to write out.
+ * @return Reference to the output stream.
+ *
+ * Output characters of @a str into os following the same rules as for
+ * writing a C string.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const basic_string<_CharT, _Traits, _Alloc>& __str);
+ /**
+ * @brief Read a line from stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @param delim Character marking end of line.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a is into @a str until @a delim is found, the
+ * end of the stream is encountered, or str.max_size() is reached. If
+ * is.width() is non-zero, that is the limit on the number of characters
+ * stored into @a str. Any previous contents of @a str are erased. If @a
+ * delim was encountered, it is extracted but not stored into @a str.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT,_Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
+ /**
+ * @brief Read a line from stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from is into @a str until '\n' is found, the end of
+ * the stream is encountered, or str.max_size() is reached. If is.width()
+ * is non-zero, that is the limit on the number of characters stored into
+ * @a str. Any previous contents of @a str are erased. If end of line was
+ * encountered, it is extracted but not stored into @a str.
+ */
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_istream<_CharT,_Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str);
} // namespace std
-#endif /* _CPP_BITS_STRING_H */
+#endif /* _BASIC_STRING_H */
diff --git a/contrib/libstdc++/include/bits/basic_string.tcc b/contrib/libstdc++/include/bits/basic_string.tcc
index d3f1e8e..7034778 100644
--- a/contrib/libstdc++/include/bits/basic_string.tcc
+++ b/contrib/libstdc++/include/bits/basic_string.tcc
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -38,20 +38,30 @@
// Written by Jason Merrill based upon the specification by Takanori Adachi
// in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers to ISO-14882.
-#ifndef _CPP_BITS_STRING_TCC
-#define _CPP_BITS_STRING_TCC 1
+#ifndef _BASIC_STRING_TCC
+#define _BASIC_STRING_TCC 1
#pragma GCC system_header
namespace std
{
+ template<typename _Type>
+ inline bool
+ __is_null_pointer(_Type* __ptr)
+ { return __ptr == 0; }
+
+ template<typename _Type>
+ inline bool
+ __is_null_pointer(_Type)
+ { return false; }
+
template<typename _CharT, typename _Traits, typename _Alloc>
- const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ const typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
- _Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4;
+ _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
template<typename _CharT, typename _Traits, typename _Alloc>
- const _CharT
+ const _CharT
basic_string<_CharT, _Traits, _Alloc>::
_Rep::_S_terminal = _CharT();
@@ -63,100 +73,86 @@ namespace std
// at static init time (before static ctors are run).
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
- basic_string<_CharT, _Traits, _Alloc>::_S_empty_rep_storage[
- (sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)];
+ basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
+ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
+ sizeof(size_type)];
// NB: This is the special case for Input Iterators, used in
// istreambuf_iterators, etc.
// Input Iterators have a cost structure very different from
// pointers, calling for a different coding style.
template<typename _CharT, typename _Traits, typename _Alloc>
- template<typename _InIter>
+ template<typename _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
- _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag)
{
if (__beg == __end && __a == _Alloc())
- return _S_empty_rep()._M_refcopy();
+ return _S_empty_rep()._M_refdata();
// Avoid reallocation for common case.
- _CharT __buf[100];
- size_type __i = 0;
- while (__beg != __end && __i < sizeof(__buf) / sizeof(_CharT))
- {
- __buf[__i++] = *__beg;
- ++__beg;
+ _CharT __buf[128];
+ size_type __len = 0;
+ while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
+ {
+ __buf[__len++] = *__beg;
+ ++__beg;
}
- _Rep* __r = _Rep::_S_create(__i, __a);
- traits_type::copy(__r->_M_refdata(), __buf, __i);
- __r->_M_length = __i;
- try
+ _Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
+ traits_type::copy(__r->_M_refdata(), __buf, __len);
+ try
{
- // NB: this loop looks precisely this way because
- // it avoids comparing __beg != __end any more
- // than strictly necessary; != might be expensive!
- for (;;)
+ while (__beg != __end)
{
- _CharT* __p = __r->_M_refdata() + __r->_M_length;
- _CharT* __last = __r->_M_refdata() + __r->_M_capacity;
- for (;;)
+ if (__len == __r->_M_capacity)
{
- if (__beg == __end)
- {
- __r->_M_length = __p - __r->_M_refdata();
- *__p = _Rep::_S_terminal; // grrr.
- return __r->_M_refdata();
- }
- if (__p == __last)
- break;
- *__p++ = *__beg;
- ++__beg;
+ // Allocate more space.
+ _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
+ traits_type::copy(__another->_M_refdata(),
+ __r->_M_refdata(), __len);
+ __r->_M_destroy(__a);
+ __r = __another;
}
- // Allocate more space.
- size_type __len = __p - __r->_M_refdata();
- _Rep* __another = _Rep::_S_create(__len + 1, __a);
- traits_type::copy(__another->_M_refdata(),
- __r->_M_refdata(), __len);
- __r->_M_destroy(__a);
- __r = __another;
- __r->_M_length = __len;
+ __r->_M_refdata()[__len++] = *__beg;
+ ++__beg;
}
}
- catch(...)
+ catch(...)
{
- __r->_M_destroy(__a);
+ __r->_M_destroy(__a);
__throw_exception_again;
}
- return 0;
+ __r->_M_length = __len;
+ __r->_M_refdata()[__len] = _Rep::_S_terminal; // grrr.
+ return __r->_M_refdata();
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
- template <class _InIter>
+ template <typename _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
- _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
forward_iterator_tag)
{
if (__beg == __end && __a == _Alloc())
- return _S_empty_rep()._M_refcopy();
+ return _S_empty_rep()._M_refdata();
// NB: Not required, but considered best practice.
- if (__builtin_expect(__beg == _InIter(), 0))
- __throw_logic_error("attempt to create string with null pointer");
+ if (__builtin_expect(__is_null_pointer(__beg), 0))
+ __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
- size_type __dnew = static_cast<size_type>(std::distance(__beg, __end));
-
+ const size_type __dnew = static_cast<size_type>(std::distance(__beg,
+ __end));
// Check for out_of_range and length_error exceptions.
- _Rep* __r = _Rep::_S_create(__dnew, __a);
- try
+ _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
+ try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
- catch(...)
- {
- __r->_M_destroy(__a);
+ catch(...)
+ {
+ __r->_M_destroy(__a);
__throw_exception_again;
}
__r->_M_length = __dnew;
-
__r->_M_refdata()[__dnew] = _Rep::_S_terminal; // grrr.
return __r->_M_refdata();
}
@@ -167,20 +163,13 @@ namespace std
_S_construct(size_type __n, _CharT __c, const _Alloc& __a)
{
if (__n == 0 && __a == _Alloc())
- return _S_empty_rep()._M_refcopy();
+ return _S_empty_rep()._M_refdata();
// Check for out_of_range and length_error exceptions.
- _Rep* __r = _Rep::_S_create(__n, __a);
- try
- {
- if (__n)
- traits_type::assign(__r->_M_refdata(), __n, __c);
- }
- catch(...)
- {
- __r->_M_destroy(__a);
- __throw_exception_again;
- }
+ _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
+ if (__n)
+ traits_type::assign(__r->_M_refdata(), __n, __c);
+
__r->_M_length = __n;
__r->_M_refdata()[__n] = _Rep::_S_terminal; // grrr
return __r->_M_refdata();
@@ -189,8 +178,9 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str)
- : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()),
- __str.get_allocator())
+ : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
+ __str.get_allocator()),
+ __str.get_allocator())
{ }
template<typename _CharT, typename _Traits, typename _Alloc>
@@ -198,28 +188,36 @@ namespace std
basic_string(const _Alloc& __a)
: _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
{ }
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos, size_type __n)
- : _M_dataplus(_S_construct(__str._M_check(__pos),
- __str._M_fold(__pos, __n), _Alloc()), _Alloc())
+ : _M_dataplus(_S_construct(__str._M_data()
+ + __str._M_check(__pos,
+ "basic_string::basic_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, _Alloc()), _Alloc())
{ }
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a)
- : _M_dataplus(_S_construct(__str._M_check(__pos),
- __str._M_fold(__pos, __n), __a), __a)
+ : _M_dataplus(_S_construct(__str._M_data()
+ + __str._M_check(__pos,
+ "basic_string::basic_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, __a), __a)
{ }
+ // TBD: DPG annotate
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
: _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
{ }
+ // TBD: DPG annotate
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const _CharT* __s, const _Alloc& __a)
@@ -232,22 +230,24 @@ namespace std
basic_string(size_type __n, _CharT __c, const _Alloc& __a)
: _M_dataplus(_S_construct(__n, __c, __a), __a)
{ }
-
+
+ // TBD: DPG annotate
template<typename _CharT, typename _Traits, typename _Alloc>
- template<typename _InputIter>
+ template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>::
- basic_string(_InputIter __beg, _InputIter __end, const _Alloc& __a)
+ basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
: _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ }
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::assign(const basic_string& __str)
+ basic_string<_CharT, _Traits, _Alloc>::
+ assign(const basic_string& __str)
{
if (_M_rep() != __str._M_rep())
{
// XXX MT
- allocator_type __a = this->get_allocator();
+ const allocator_type __a = this->get_allocator();
_CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
_M_rep()->_M_dispose(__a);
_M_data(__tmp);
@@ -258,26 +258,14 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
- assign(const basic_string& __str, size_type __pos, size_type __n)
- {
- const size_type __strsize = __str.size();
- if (__pos > __strsize)
- __throw_out_of_range("basic_string::assign");
- const bool __testn = __n < __strsize - __pos;
- const size_type __newsize = __testn ? __n : __strsize - __pos;
- return this->assign(__str._M_data() + __pos, __newsize);
- }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
assign(const _CharT* __s, size_type __n)
{
+ __glibcxx_requires_string_len(__s, __n);
if (__n > this->max_size())
- __throw_length_error("basic_string::assign");
+ __throw_length_error(__N("basic_string::assign"));
if (_M_rep()->_M_is_shared() || less<const _CharT*>()(__s, _M_data())
|| less<const _CharT*>()(_M_data() + this->size(), __s))
- return _M_replace_safe(_M_ibegin(), _M_iend(), __s, __s + __n);
+ return _M_replace_safe(size_type(0), this->size(), __s, __n);
else
{
// Work in-place
@@ -286,6 +274,7 @@ namespace std
traits_type::copy(_M_data(), __s, __n);
else if (__pos)
traits_type::move(_M_data(), __s, __n);
+ _M_rep()->_M_set_sharable();
_M_rep()->_M_length = __n;
_M_data()[__n] = _Rep::_S_terminal; // grr.
return *this;
@@ -295,31 +284,15 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
- insert(size_type __pos1, const basic_string& __str,
- size_type __pos2, size_type __n)
- {
- const size_type __strsize = __str.size();
- if (__pos2 > __strsize)
- __throw_out_of_range("basic_string::insert");
- const bool __testn = __n < __strsize - __pos2;
- const size_type __newsize = __testn ? __n : __strsize - __pos2;
- return this->insert(__pos1, __str._M_data() + __pos2, __newsize);
- }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
insert(size_type __pos, const _CharT* __s, size_type __n)
{
- const size_type __size = this->size();
- if (__pos > __size)
- __throw_out_of_range("basic_string::insert");
- if (__size > this->max_size() - __n)
- __throw_length_error("basic_string::insert");
+ __glibcxx_requires_string_len(__s, __n);
+ _M_check(__pos, "basic_string::insert");
+ if (this->max_size() - this->size() < __n)
+ __throw_length_error(__N("basic_string::insert"));
if (_M_rep()->_M_is_shared() || less<const _CharT*>()(__s, _M_data())
- || less<const _CharT*>()(_M_data() + __size, __s))
- return _M_replace_safe(_M_ibegin() + __pos, _M_ibegin() + __pos,
- __s, __s + __n);
+ || less<const _CharT*>()(_M_data() + this->size(), __s))
+ return _M_replace_safe(__pos, size_type(0), __s, __n);
else
{
// Work in-place. If _M_mutate reallocates the string, __s
@@ -335,43 +308,60 @@ namespace std
traits_type::copy(__p, __s + __n, __n);
else
{
- traits_type::copy(__p, __s, __p - __s);
- traits_type::copy(__p + (__p-__s), __p + __n, __n - (__p-__s));
+ const size_type __nleft = __p - __s;
+ traits_type::copy(__p, __s, __nleft);
+ traits_type::copy(__p + __nleft, __p + __n, __n - __nleft);
}
return *this;
}
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
replace(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2)
{
- const size_type __size = this->size();
- if (__pos > __size)
- __throw_out_of_range("basic_string::replace");
- const bool __testn1 = __n1 < __size - __pos;
- const size_type __foldn1 = __testn1 ? __n1 : __size - __pos;
- if (__size - __foldn1 > this->max_size() - __n2)
- __throw_length_error("basic_string::replace");
+ __glibcxx_requires_string_len(__s, __n2);
+ _M_check(__pos, "basic_string::replace");
+ __n1 = _M_limit(__pos, __n1);
+ if (this->max_size() - (this->size() - __n1) < __n2)
+ __throw_length_error(__N("basic_string::replace"));
+ bool __left;
if (_M_rep()->_M_is_shared() || less<const _CharT*>()(__s, _M_data())
- || less<const _CharT*>()(_M_data() + __size, __s))
- return _M_replace_safe(_M_ibegin() + __pos,
- _M_ibegin() + __pos + __foldn1, __s, __s + __n2);
- // Todo: optimized in-place replace.
+ || less<const _CharT*>()(_M_data() + this->size(), __s))
+ return _M_replace_safe(__pos, __n1, __s, __n2);
+ else if ((__left = __s + __n2 <= _M_data() + __pos)
+ || _M_data() + __pos + __n1 <= __s)
+ {
+ // Work in-place: non-overlapping case.
+ const size_type __off = __s - _M_data();
+ _M_mutate(__pos, __n1, __n2);
+ if (__left)
+ traits_type::copy(_M_data() + __pos,
+ _M_data() + __off, __n2);
+ else
+ traits_type::copy(_M_data() + __pos,
+ _M_data() + __off + __n2 - __n1, __n2);
+ return *this;
+ }
else
- return _M_replace(_M_ibegin() + __pos, _M_ibegin() + __pos + __foldn1,
- __s, __s + __n2,
- typename iterator_traits<const _CharT*>::iterator_category());
+ {
+ // Todo: overlapping case.
+ const basic_string __tmp(__s, __n2);
+ return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
+ }
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::_Rep::
_M_destroy(const _Alloc& __a) throw ()
{
- size_type __size = sizeof(_Rep) + (_M_capacity + 1) * sizeof(_CharT);
+ if (this == &_S_empty_rep())
+ return;
+ const size_type __size = sizeof(_Rep_base) +
+ (this->_M_capacity + 1) * sizeof(_CharT);
_Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
}
@@ -379,97 +369,74 @@ namespace std
void
basic_string<_CharT, _Traits, _Alloc>::_M_leak_hard()
{
- if (_M_rep()->_M_is_shared())
+ if (_M_rep() == &_S_empty_rep())
+ return;
+ if (_M_rep()->_M_is_shared())
_M_mutate(0, 0, 0);
_M_rep()->_M_set_leaked();
}
- // _M_mutate and, below, _M_clone, include, in the same form, an exponential
- // growth policy, necessary to meet amortized linear time requirements of
- // the library: see http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
- // The policy is active for allocations requiring an amount of memory above
- // system pagesize. This is consistent with the requirements of the standard:
- // see, f.i., http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
_M_mutate(size_type __pos, size_type __len1, size_type __len2)
{
- size_type __old_size = this->size();
+ const size_type __old_size = this->size();
const size_type __new_size = __old_size + __len2 - __len1;
- const _CharT* __src = _M_data() + __pos + __len1;
const size_type __how_much = __old_size - __pos - __len1;
-
- if (_M_rep()->_M_is_shared() || __new_size > capacity())
+
+ if (_M_rep() == &_S_empty_rep()
+ || _M_rep()->_M_is_shared() || __new_size > capacity())
{
// Must reallocate.
- allocator_type __a = get_allocator();
- // See below (_S_create) for the meaning and value of these
- // constants.
- const size_type __pagesize = 4096;
- const size_type __malloc_header_size = 4 * sizeof (void*);
- // The biggest string which fits in a memory page
- const size_type __page_capacity = (__pagesize - __malloc_header_size
- - sizeof(_Rep) - sizeof(_CharT))
- / sizeof(_CharT);
- _Rep* __r;
- if (__new_size > capacity() && __new_size > __page_capacity)
- // Growing exponentially.
- __r = _Rep::_S_create(__new_size > 2*capacity() ?
- __new_size : 2*capacity(), __a);
- else
- __r = _Rep::_S_create(__new_size, __a);
- try
- {
- if (__pos)
- traits_type::copy(__r->_M_refdata(), _M_data(), __pos);
- if (__how_much)
- traits_type::copy(__r->_M_refdata() + __pos + __len2,
- __src, __how_much);
- }
- catch(...)
- {
- __r->_M_dispose(get_allocator());
- __throw_exception_again;
- }
+ const allocator_type __a = get_allocator();
+ _Rep* __r = _Rep::_S_create(__new_size, capacity(), __a);
+
+ if (__pos)
+ traits_type::copy(__r->_M_refdata(), _M_data(), __pos);
+ if (__how_much)
+ traits_type::copy(__r->_M_refdata() + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
+
_M_rep()->_M_dispose(__a);
_M_data(__r->_M_refdata());
- }
+ }
else if (__how_much && __len1 != __len2)
{
// Work in-place
- traits_type::move(_M_data() + __pos + __len2, __src, __how_much);
+ traits_type::move(_M_data() + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
}
_M_rep()->_M_set_sharable();
_M_rep()->_M_length = __new_size;
_M_data()[__new_size] = _Rep::_S_terminal; // grrr. (per 21.3.4)
- // You cannot leave those LWG people alone for a second.
+ // You cannot leave those LWG people alone for a second.
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::reserve(size_type __res)
{
- if (__res > this->capacity() || _M_rep()->_M_is_shared())
+ if (__res != this->capacity() || _M_rep()->_M_is_shared())
{
if (__res > this->max_size())
- __throw_length_error("basic_string::reserve");
+ __throw_length_error(__N("basic_string::reserve"));
// Make sure we don't shrink below the current size
if (__res < this->size())
__res = this->size();
- allocator_type __a = get_allocator();
+ const allocator_type __a = get_allocator();
_CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
_M_rep()->_M_dispose(__a);
_M_data(__tmp);
}
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
void basic_string<_CharT, _Traits, _Alloc>::swap(basic_string& __s)
{
- if (_M_rep()->_M_is_leaked())
+ if (_M_rep()->_M_is_leaked())
_M_rep()->_M_set_sharable();
- if (__s._M_rep()->_M_is_leaked())
+ if (__s._M_rep()->_M_is_leaked())
__s._M_rep()->_M_set_sharable();
if (this->get_allocator() == __s.get_allocator())
{
@@ -478,11 +445,12 @@ namespace std
__s._M_data(__tmp);
}
// The code below can usually be optimized away.
- else
+ else
{
- basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator());
- basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
- this->get_allocator());
+ const basic_string __tmp1(_M_ibegin(), _M_iend(),
+ __s.get_allocator());
+ const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
+ this->get_allocator());
*this = __tmp2;
__s = __tmp1;
}
@@ -491,26 +459,20 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
basic_string<_CharT, _Traits, _Alloc>::_Rep::
- _S_create(size_t __capacity, const _Alloc& __alloc)
+ _S_create(size_type __capacity, size_type __old_capacity,
+ const _Alloc& __alloc)
{
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 83. String::npos vs. string::max_size()
if (__capacity > _S_max_size)
-#else
- if (__capacity == npos)
-#endif
- __throw_length_error("basic_string::_S_create");
-
- // NB: Need an array of char_type[__capacity], plus a
- // terminating null char_type() element, plus enough for the
- // _Rep data structure. Whew. Seemingly so needy, yet so elemental.
- size_t __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+ __throw_length_error(__N("basic_string::_S_create"));
// The standard places no restriction on allocating more memory
// than is strictly needed within this layer at the moment or as
- // requested by an explicit application call to reserve(). Many
- // malloc implementations perform quite poorly when an
+ // requested by an explicit application call to reserve().
+
+ // Many malloc implementations perform quite poorly when an
// application attempts to allocate memory in a stepwise fashion
// growing each allocation size by only 1 char. Additionally,
// it makes little sense to allocate less linear memory than the
@@ -529,22 +491,44 @@ namespace std
// low-balling it (especially when this algorithm is used with
// malloc implementations that allocate memory blocks rounded up
// to a size which is a power of 2).
- const size_t __pagesize = 4096; // must be 2^i * __subpagesize
- const size_t __subpagesize = 128; // should be >> __malloc_header_size
- const size_t __malloc_header_size = 4 * sizeof (void*);
- if ((__size + __malloc_header_size) > __pagesize)
+ const size_type __pagesize = 4096; // must be 2^i * __subpagesize
+ const size_type __subpagesize = 128; // should be >> __malloc_header_size
+ const size_type __malloc_header_size = 4 * sizeof (void*);
+
+ // The below implements an exponential growth policy, necessary to
+ // meet amortized linear time requirements of the library: see
+ // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+ // It's active for allocations requiring an amount of memory above
+ // system pagesize. This is consistent with the requirements of the
+ // standard: http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html
+
+ // The biggest string which fits in a memory page
+ const size_type __page_capacity = ((__pagesize - __malloc_header_size
+ - sizeof(_Rep) - sizeof(_CharT))
+ / sizeof(_CharT));
+
+ if (__capacity > __old_capacity && __capacity < 2 * __old_capacity
+ && __capacity > __page_capacity)
+ __capacity = 2 * __old_capacity;
+
+ // NB: Need an array of char_type[__capacity], plus a terminating
+ // null char_type() element, plus enough for the _Rep data structure.
+ // Whew. Seemingly so needy, yet so elemental.
+ size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+
+ const size_type __adj_size = __size + __malloc_header_size;
+ if (__adj_size > __pagesize)
{
- size_t __extra =
- (__pagesize - ((__size + __malloc_header_size) % __pagesize))
- % __pagesize;
+ const size_type __extra = __pagesize - __adj_size % __pagesize;
__capacity += __extra / sizeof(_CharT);
+ // Never allocate a string bigger than _S_max_size.
+ if (__capacity > _S_max_size)
+ __capacity = _S_max_size;
__size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
}
else if (__size > __subpagesize)
{
- size_t __extra =
- (__subpagesize - ((__size + __malloc_header_size) % __subpagesize))
- % __subpagesize;
+ const size_type __extra = __subpagesize - __adj_size % __subpagesize;
__capacity += __extra / sizeof(_CharT);
__size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
}
@@ -565,43 +549,25 @@ namespace std
_M_clone(const _Alloc& __alloc, size_type __res)
{
// Requested capacity of the clone.
- const size_type __requested_cap = _M_length + __res;
- // See above (_S_create) for the meaning and value of these constants.
- const size_type __pagesize = 4096;
- const size_type __malloc_header_size = 4 * sizeof (void*);
- // The biggest string which fits in a memory page.
- const size_type __page_capacity =
- (__pagesize - __malloc_header_size - sizeof(_Rep) - sizeof(_CharT))
- / sizeof(_CharT);
- _Rep* __r;
- if (__requested_cap > _M_capacity && __requested_cap > __page_capacity)
- // Growing exponentially.
- __r = _Rep::_S_create(__requested_cap > 2*_M_capacity ?
- __requested_cap : 2*_M_capacity, __alloc);
- else
- __r = _Rep::_S_create(__requested_cap, __alloc);
-
- if (_M_length)
- {
- try
- { traits_type::copy(__r->_M_refdata(), _M_refdata(), _M_length); }
- catch(...)
- {
- __r->_M_destroy(__alloc);
- __throw_exception_again;
- }
- }
- __r->_M_length = _M_length;
+ const size_type __requested_cap = this->_M_length + __res;
+ _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
+ __alloc);
+ if (this->_M_length)
+ traits_type::copy(__r->_M_refdata(), _M_refdata(),
+ this->_M_length);
+
+ __r->_M_length = this->_M_length;
+ __r->_M_refdata()[this->_M_length] = _Rep::_S_terminal;
return __r->_M_refdata();
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::resize(size_type __n, _CharT __c)
{
if (__n > max_size())
- __throw_length_error("basic_string::resize");
- size_type __size = this->size();
+ __throw_length_error(__N("basic_string::resize"));
+ const size_type __size = this->size();
if (__size < __n)
this->append(__n - __size, __c);
else if (__n < __size)
@@ -609,76 +575,35 @@ namespace std
// else nothing (in particular, avoid calling _M_mutate() unnecessarily.)
}
- // This is the general replace helper, which currently gets instantiated both
- // for input iterators and reverse iterators. It buffers internally and then
- // calls _M_replace_safe.
template<typename _CharT, typename _Traits, typename _Alloc>
- template<typename _InputIter>
+ template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
- _M_replace(iterator __i1, iterator __i2, _InputIter __k1,
- _InputIter __k2, input_iterator_tag)
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, __false_type)
{
- // Save concerned source string data in a temporary.
- basic_string __s(__k1, __k2);
- return _M_replace_safe(__i1, __i2, __s._M_ibegin(), __s._M_iend());
- }
-
- // This is a special replace helper, which does not buffer internally
- // and can be used in "safe" situations involving forward iterators,
- // i.e., when source and destination ranges are known to not overlap.
- template<typename _CharT, typename _Traits, typename _Alloc>
- template<typename _ForwardIter>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
- _M_replace_safe(iterator __i1, iterator __i2, _ForwardIter __k1,
- _ForwardIter __k2)
- {
- size_type __dnew = static_cast<size_type>(std::distance(__k1, __k2));
- size_type __dold = __i2 - __i1;
- size_type __dmax = this->max_size();
-
- if (__dmax <= __dnew)
- __throw_length_error("basic_string::_M_replace");
- size_type __off = __i1 - _M_ibegin();
- _M_mutate(__off, __dold, __dnew);
-
- // Invalidated __i1, __i2
- if (__dnew)
- _S_copy_chars(_M_data() + __off, __k1, __k2);
-
- return *this;
+ const basic_string __s(__k1, __k2);
+ const size_type __n1 = __i2 - __i1;
+ if (this->max_size() - (this->size() - __n1) < __s.size())
+ __throw_length_error(__N("basic_string::_M_replace_dispatch"));
+ return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
+ __s.size());
}
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
- replace(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2)
- {
- const size_type __strsize = __str.size();
- if (__pos2 > __strsize)
- __throw_out_of_range("basic_string::replace");
- const bool __testn2 = __n2 < __strsize - __pos2;
- const size_type __foldn2 = __testn2 ? __n2 : __strsize - __pos2;
- return this->replace(__pos1, __n1,
- __str._M_data() + __pos2, __foldn2);
- }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
append(const basic_string& __str)
{
// Iff appending itself, string needs to pre-reserve the
// correct size so that _M_mutate does not clobber the
- // iterators formed here.
- size_type __size = __str.size();
- size_type __len = __size + this->size();
+ // pointer __str._M_data() formed here.
+ const size_type __size = __str.size();
+ const size_type __len = __size + this->size();
if (__len > this->capacity())
this->reserve(__len);
- return _M_replace_safe(_M_iend(), _M_iend(), __str._M_ibegin(),
- __str._M_iend());
+ return _M_replace_safe(this->size(), size_type(0), __str._M_data(),
+ __str.size());
}
template<typename _CharT, typename _Traits, typename _Alloc>
@@ -688,13 +613,14 @@ namespace std
{
// Iff appending itself, string needs to pre-reserve the
// correct size so that _M_mutate does not clobber the
- // iterators formed here.
- size_type __len = std::min(size_type(__str.size() - __pos),
- __n) + this->size();
+ // pointer __str._M_data() formed here.
+ __str._M_check(__pos, "basic_string::append");
+ __n = __str._M_limit(__pos, __n);
+ const size_type __len = __n + this->size();
if (__len > this->capacity())
this->reserve(__len);
- return _M_replace_safe(_M_iend(), _M_iend(), __str._M_check(__pos),
- __str._M_fold(__pos, __n));
+ return _M_replace_safe(this->size(), size_type(0), __str._M_data()
+ + __pos, __n);
}
template<typename _CharT, typename _Traits, typename _Alloc>
@@ -702,21 +628,11 @@ namespace std
basic_string<_CharT, _Traits, _Alloc>::
append(const _CharT* __s, size_type __n)
{
- size_type __len = __n + this->size();
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __len = __n + this->size();
if (__len > this->capacity())
this->reserve(__len);
- return _M_replace_safe(_M_iend(), _M_iend(), __s, __s + __n);
- }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
- append(size_type __n, _CharT __c)
- {
- size_type __len = __n + this->size();
- if (__len > this->capacity())
- this->reserve(__len);
- return this->replace(_M_iend(), _M_iend(), __n, __c);
+ return _M_replace_safe(this->size(), size_type(0), __s, __n);
}
template<typename _CharT, typename _Traits, typename _Alloc>
@@ -724,12 +640,13 @@ namespace std
operator+(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{
+ __glibcxx_requires_string(__lhs);
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
- __size_type __len = _Traits::length(__lhs);
+ const __size_type __len = _Traits::length(__lhs);
__string_type __str;
__str.reserve(__len + __rhs.size());
- __str.append(__lhs, __lhs + __len);
+ __str.append(__lhs, __len);
__str.append(__rhs);
return __str;
}
@@ -741,7 +658,7 @@ namespace std
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__string_type __str;
- __size_type __len = __rhs.size();
+ const __size_type __len = __rhs.size();
__str.reserve(__len + 1);
__str.append(__size_type(1), __lhs);
__str.append(__rhs);
@@ -749,33 +666,15 @@ namespace std
}
template<typename _CharT, typename _Traits, typename _Alloc>
- basic_string<_CharT, _Traits, _Alloc>&
- basic_string<_CharT, _Traits, _Alloc>::
- replace(iterator __i1, iterator __i2, size_type __n2, _CharT __c)
- {
- size_type __n1 = __i2 - __i1;
- size_type __off1 = __i1 - _M_ibegin();
- if (max_size() - (this->size() - __n1) <= __n2)
- __throw_length_error("basic_string::replace");
- _M_mutate (__off1, __n1, __n2);
- // Invalidated __i1, __i2
- if (__n2)
- traits_type::assign(_M_data() + __off1, __n2, __c);
- return *this;
- }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
copy(_CharT* __s, size_type __n, size_type __pos) const
{
- if (__pos > this->size())
- __throw_out_of_range("basic_string::copy");
-
- if (__n > this->size() - __pos)
- __n = this->size() - __pos;
-
- traits_type::copy(__s, _M_data() + __pos, __n);
+ _M_check(__pos, "basic_string::copy");
+ __n = _M_limit(__pos, __n);
+ __glibcxx_requires_string_len(__s, __n);
+ if (__n)
+ traits_type::copy(__s, _M_data() + __pos, __n);
// 21.3.5.7 par 3: do not append null. (good.)
return __n;
}
@@ -785,12 +684,12 @@ namespace std
basic_string<_CharT, _Traits, _Alloc>::
find(const _CharT* __s, size_type __pos, size_type __n) const
{
- size_type __size = this->size();
- size_t __xpos = __pos;
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
const _CharT* __data = _M_data();
- for (; __xpos + __n <= __size; ++__xpos)
- if (traits_type::compare(__data + __xpos, __s, __n) == 0)
- return __xpos;
+ for (; __pos + __n <= __size; ++__pos)
+ if (traits_type::compare(__data + __pos, __s, __n) == 0)
+ return __pos;
return npos;
}
@@ -799,12 +698,12 @@ namespace std
basic_string<_CharT, _Traits, _Alloc>::
find(_CharT __c, size_type __pos) const
{
- size_type __size = this->size();
+ const size_type __size = this->size();
size_type __ret = npos;
if (__pos < __size)
{
const _CharT* __data = _M_data();
- size_type __n = __size - __pos;
+ const size_type __n = __size - __pos;
const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
if (__p)
__ret = __p - __data;
@@ -812,27 +711,27 @@ namespace std
return __ret;
}
-
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
rfind(const _CharT* __s, size_type __pos, size_type __n) const
{
- size_type __size = this->size();
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
if (__n <= __size)
{
__pos = std::min(size_type(__size - __n), __pos);
const _CharT* __data = _M_data();
- do
+ do
{
if (traits_type::compare(__data + __pos, __s, __n) == 0)
return __pos;
- }
+ }
while (__pos-- > 0);
}
return npos;
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
@@ -841,22 +740,21 @@ namespace std
size_type __size = this->size();
if (__size)
{
- size_t __xpos = __size - 1;
- if (__xpos > __pos)
- __xpos = __pos;
-
- for (++__xpos; __xpos-- > 0; )
- if (traits_type::eq(_M_data()[__xpos], __c))
- return __xpos;
+ if (--__size > __pos)
+ __size = __pos;
+ for (++__size; __size-- > 0; )
+ if (traits_type::eq(_M_data()[__size], __c))
+ return __size;
}
return npos;
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
{
+ __glibcxx_requires_string_len(__s, __n);
for (; __n && __pos < this->size(); ++__pos)
{
const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
@@ -865,36 +763,37 @@ namespace std
}
return npos;
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
{
+ __glibcxx_requires_string_len(__s, __n);
size_type __size = this->size();
if (__size && __n)
- {
- if (--__size > __pos)
+ {
+ if (--__size > __pos)
__size = __pos;
do
{
if (traits_type::find(__s, __n, _M_data()[__size]))
return __size;
- }
+ }
while (__size-- != 0);
}
return npos;
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
- size_t __xpos = __pos;
- for (; __xpos < this->size(); ++__xpos)
- if (!traits_type::find(__s, __n, _M_data()[__xpos]))
- return __xpos;
+ __glibcxx_requires_string_len(__s, __n);
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::find(__s, __n, _M_data()[__pos]))
+ return __pos;
return npos;
}
@@ -903,10 +802,9 @@ namespace std
basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(_CharT __c, size_type __pos) const
{
- size_t __xpos = __pos;
- for (; __xpos < this->size(); ++__xpos)
- if (!traits_type::eq(_M_data()[__xpos], __c))
- return __xpos;
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::eq(_M_data()[__pos], __c))
+ return __pos;
return npos;
}
@@ -915,16 +813,17 @@ namespace std
basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
+ __glibcxx_requires_string_len(__s, __n);
size_type __size = this->size();
if (__size)
- {
- if (--__size > __pos)
+ {
+ if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::find(__s, __n, _M_data()[__size]))
return __size;
- }
+ }
while (__size--);
}
return npos;
@@ -937,34 +836,31 @@ namespace std
{
size_type __size = this->size();
if (__size)
- {
- if (--__size > __pos)
+ {
+ if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::eq(_M_data()[__size], __c))
return __size;
- }
+ }
while (__size--);
}
return npos;
}
-
+
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string<_CharT, _Traits, _Alloc>::
compare(size_type __pos, size_type __n, const basic_string& __str) const
{
- size_type __size = this->size();
- size_type __osize = __str.size();
- if (__pos > __size)
- __throw_out_of_range("basic_string::compare");
-
- size_type __rsize= std::min(size_type(__size - __pos), __n);
- size_type __len = std::min(__rsize, __osize);
+ _M_check(__pos, "basic_string::compare");
+ __n = _M_limit(__pos, __n);
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__n, __osize);
int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
if (!__r)
- __r = __rsize - __osize;
+ __r = __n - __osize;
return __r;
}
@@ -974,117 +870,96 @@ namespace std
compare(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2) const
{
- size_type __size = this->size();
- size_type __osize = __str.size();
- if (__pos1 > __size || __pos2 > __osize)
- __throw_out_of_range("basic_string::compare");
-
- size_type __rsize = std::min(size_type(__size - __pos1), __n1);
- size_type __rosize = std::min(size_type(__osize - __pos2), __n2);
- size_type __len = std::min(__rsize, __rosize);
- int __r = traits_type::compare(_M_data() + __pos1,
+ _M_check(__pos1, "basic_string::compare");
+ __str._M_check(__pos2, "basic_string::compare");
+ __n1 = _M_limit(__pos1, __n1);
+ __n2 = __str._M_limit(__pos2, __n2);
+ const size_type __len = std::min(__n1, __n2);
+ int __r = traits_type::compare(_M_data() + __pos1,
__str.data() + __pos2, __len);
if (!__r)
- __r = __rsize - __rosize;
+ __r = __n1 - __n2;
return __r;
}
-
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string<_CharT, _Traits, _Alloc>::
compare(const _CharT* __s) const
{
- size_type __size = this->size();
- size_type __osize = traits_type::length(__s);
- size_type __len = std::min(__size, __osize);
+ __glibcxx_requires_string(__s);
+ const size_type __size = this->size();
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__size, __osize);
int __r = traits_type::compare(_M_data(), __s, __len);
if (!__r)
__r = __size - __osize;
return __r;
}
-
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string <_CharT, _Traits, _Alloc>::
compare(size_type __pos, size_type __n1, const _CharT* __s) const
{
- size_type __size = this->size();
- if (__pos > __size)
- __throw_out_of_range("basic_string::compare");
-
- size_type __osize = traits_type::length(__s);
- size_type __rsize = std::min(size_type(__size - __pos), __n1);
- size_type __len = std::min(__rsize, __osize);
+ __glibcxx_requires_string(__s);
+ _M_check(__pos, "basic_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__n1, __osize);
int __r = traits_type::compare(_M_data() + __pos, __s, __len);
if (!__r)
- __r = __rsize - __osize;
+ __r = __n1 - __osize;
return __r;
}
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string <_CharT, _Traits, _Alloc>::
- compare(size_type __pos, size_type __n1, const _CharT* __s,
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const
{
- size_type __size = this->size();
- if (__pos > __size)
- __throw_out_of_range("basic_string::compare");
-
- size_type __osize = std::min(traits_type::length(__s), __n2);
- size_type __rsize = std::min(size_type(__size - __pos), __n1);
- size_type __len = std::min(__rsize, __osize);
+ __glibcxx_requires_string_len(__s, __n2);
+ _M_check(__pos, "basic_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __len = std::min(__n1, __n2);
int __r = traits_type::compare(_M_data() + __pos, __s, __len);
if (!__r)
- __r = __rsize - __osize;
+ __r = __n1 - __n2;
return __r;
}
- template <class _CharT, class _Traits, class _Alloc>
- void
- _S_string_copy(const basic_string<_CharT, _Traits, _Alloc>& __str,
- _CharT* __buf, typename _Alloc::size_type __bufsiz)
- {
- typedef typename _Alloc::size_type size_type;
- size_type __strsize = __str.size();
- size_type __bytes = std::min(__strsize, __bufsiz - 1);
- _Traits::copy(__buf, __str.data(), __bytes);
- __buf[__bytes] = _CharT();
- }
-
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_string<char>;
- extern template
- basic_istream<char>&
+ extern template
+ basic_istream<char>&
operator>>(basic_istream<char>&, string&);
- extern template
- basic_ostream<char>&
+ extern template
+ basic_ostream<char>&
operator<<(basic_ostream<char>&, const string&);
- extern template
- basic_istream<char>&
+ extern template
+ basic_istream<char>&
getline(basic_istream<char>&, string&, char);
- extern template
- basic_istream<char>&
+ extern template
+ basic_istream<char>&
getline(basic_istream<char>&, string&);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_string<wchar_t>;
- extern template
- basic_istream<wchar_t>&
+ extern template
+ basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
- extern template
- basic_ostream<wchar_t>&
+ extern template
+ basic_ostream<wchar_t>&
operator<<(basic_ostream<wchar_t>&, const wstring&);
- extern template
- basic_istream<wchar_t>&
+ extern template
+ basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&, wchar_t);
- extern template
- basic_istream<wchar_t>&
+ extern template
+ basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
#endif
#endif
diff --git a/contrib/libstdc++/include/bits/boost_concept_check.h b/contrib/libstdc++/include/bits/boost_concept_check.h
index d91c2e8..7c99838 100644
--- a/contrib/libstdc++/include/bits/boost_concept_check.h
+++ b/contrib/libstdc++/include/bits/boost_concept_check.h
@@ -1,4 +1,30 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
@@ -13,15 +39,15 @@
* You should not attempt to use it directly.
*/
-#ifndef _GLIBCPP_BOOST_CONCEPT_CHECK
-#define _GLIBCPP_BOOST_CONCEPT_CHECK 1
+#ifndef _BOOST_CONCEPT_CHECK_H
+#define _BOOST_CONCEPT_CHECK_H 1
#pragma GCC system_header
+
#include <cstddef> // for ptrdiff_t, used next
#include <bits/stl_iterator_base_types.h> // for traits and tags
#include <utility> // for pair<>
-
namespace __gnu_cxx
{
@@ -36,9 +62,15 @@ inline void __function_requires()
void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
}
+// No definition: if this is referenced, there's a problem with
+// the instantiating type not being one of the required integer types.
+// Unfortunately, this results in a link-time error, not a compile-time error.
+void __error_type_must_be_an_integer_type();
+void __error_type_must_be_an_unsigned_integer_type();
+void __error_type_must_be_a_signed_integer_type();
// ??? Should the "concept_checking*" structs begin with more than _ ?
-#define _GLIBCPP_CLASS_REQUIRES(_type_var, _ns, _concept) \
+#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
template <_func##_type_var##_concept _Tp1> \
struct _concept_checking##_type_var##_concept { }; \
@@ -46,7 +78,7 @@ inline void __function_requires()
&_ns::_concept <_type_var>::__constraints> \
_concept_checking_typedef##_type_var##_concept
-#define _GLIBCPP_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
+#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
template <_func##_type_var1##_type_var2##_concept _Tp1> \
struct _concept_checking##_type_var1##_type_var2##_concept { }; \
@@ -54,7 +86,7 @@ inline void __function_requires()
&_ns::_concept <_type_var1,_type_var2>::__constraints> \
_concept_checking_typedef##_type_var1##_type_var2##_concept
-#define _GLIBCPP_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
+#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
@@ -62,7 +94,7 @@ inline void __function_requires()
&_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \
_concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
-#define _GLIBCPP_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
+#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
@@ -87,7 +119,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <class _Tp>
struct _IntegerConcept {
- void __constraints() {
+ void __constraints() {
__error_type_must_be_an_integer_type();
}
};
@@ -103,7 +135,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <class _Tp>
struct _SignedIntegerConcept {
- void __constraints() {
+ void __constraints() {
__error_type_must_be_a_signed_integer_type();
}
};
@@ -114,7 +146,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <class _Tp>
struct _UnsignedIntegerConcept {
- void __constraints() {
+ void __constraints() {
__error_type_must_be_an_unsigned_integer_type();
}
};
@@ -162,7 +194,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
__const_constraints(__a);
}
void __const_constraints(const _Tp& __a) {
- _Tp __c(__a) _IsUnused; // require const copy constructor
+ _Tp __c _IsUnused(__a); // require const copy constructor
const _Tp* __ptr _IsUnused = &__a; // require const address of operator
}
_Tp __b;
@@ -173,12 +205,12 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
struct _SGIAssignableConcept
{
void __constraints() {
- _Tp __b(__a) _IsUnused;
+ _Tp __b _IsUnused(__a);
__a = __a; // require assignment operator
__const_constraints(__a);
}
void __const_constraints(const _Tp& __b) {
- _Tp __c(__b) _IsUnused;
+ _Tp __c _IsUnused(__b);
__a = __b; // const required for argument to assignment
}
_Tp __a;
@@ -213,7 +245,6 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
{
void __constraints() {
__aux_require_boolean_expr(__a == __b);
- __aux_require_boolean_expr(__a != __b);
}
_Tp __a, __b;
};
@@ -240,7 +271,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
_Tp __a, __b;
};
-#define _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
+#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
template <class _First, class _Second> \
struct _NAME { \
void __constraints() { (void)__constraints_(); } \
@@ -251,7 +282,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
_Second __b; \
}
-#define _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
+#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
template <class _Ret, class _First, class _Second> \
struct _NAME { \
void __constraints() { (void)__constraints_(); } \
@@ -262,21 +293,21 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
_Second __b; \
}
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
- _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
- _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
- _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
- _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
- _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
- _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
-#undef _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
-#undef _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT
+#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
+#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
//===========================================================================
// Function Object Concepts
@@ -313,7 +344,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <class _Func, class _Arg>
struct _UnaryFunctionConcept<_Func, void, _Arg> {
- void __constraints() {
+ void __constraints() {
__f(__arg); // require operator()
}
_Func __f;
@@ -323,7 +354,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <class _Func, class _Return, class _First, class _Second>
struct _BinaryFunctionConcept
{
- void __constraints() {
+ void __constraints() {
__r = __f(__first, __second); // require operator()
}
_Func __f;
@@ -367,7 +398,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
// use this when functor is used inside a container class like std::set
template <class _Func, class _First, class _Second>
struct _Const_BinaryPredicateConcept {
- void __constraints() {
+ void __constraints() {
__const_constraints(__f);
}
void __const_constraints(const _Func& __fun) {
@@ -387,7 +418,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
struct _TrivialIteratorConcept
{
void __constraints() {
- __function_requires< _DefaultConstructibleConcept<_Tp> >();
+// __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _AssignableConcept<_Tp> >();
__function_requires< _EqualityComparableConcept<_Tp> >();
// typedef typename std::iterator_traits<_Tp>::value_type _V;
@@ -412,9 +443,9 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
void __constraints() {
__function_requires< _TrivialIteratorConcept<_Tp> >();
// require iterator_traits typedef's
- typedef typename std::iterator_traits<_Tp>::difference_type _D;
-// __function_requires< _SignedIntegerConcept<_D> >();
- typedef typename std::iterator_traits<_Tp>::reference _R;
+ typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
+// __function_requires< _SignedIntegerConcept<_Diff> >();
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
typedef typename std::iterator_traits<_Tp>::pointer _Pt;
typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
__function_requires< _ConvertibleConcept<
@@ -444,11 +475,12 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
{
void __constraints() {
__function_requires< _InputIteratorConcept<_Tp> >();
+ __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _ConvertibleConcept<
typename std::iterator_traits<_Tp>::iterator_category,
std::forward_iterator_tag> >();
- typedef typename std::iterator_traits<_Tp>::reference _R;
- _R __r _IsUnused = *__i;
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
+ _Ref __r _IsUnused = *__i;
}
_Tp __i;
};
@@ -498,8 +530,8 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
__function_requires< _ConvertibleConcept<
typename std::iterator_traits<_Tp>::iterator_category,
std::random_access_iterator_tag> >();
- // ??? We don't use _R, are we just checking for "referenceability"?
- typedef typename std::iterator_traits<_Tp>::reference _R;
+ // ??? We don't use _Ref, are we just checking for "referenceability"?
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
__i += __n; // require assignment addition operator
__i = __i + __n; __i = __n + __i; // require addition with difference type
@@ -561,7 +593,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
typedef typename _Container::reference _Reference;
typedef typename _Container::iterator _Iterator;
typedef typename _Container::pointer _Pointer;
-
+
void __constraints() {
__function_requires< _ContainerConcept<_Container> >();
__function_requires< _AssignableConcept<_Value_type> >();
@@ -583,7 +615,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
typedef typename _ForwardContainer::const_iterator _Const_iterator;
__function_requires< _ForwardIteratorConcept<_Const_iterator> >();
}
- };
+ };
template <class _ForwardContainer>
struct _Mutable_ForwardContainerConcept
@@ -594,7 +626,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
typedef typename _ForwardContainer::iterator _Iterator;
__function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
}
- };
+ };
template <class _ReversibleContainer>
struct _ReversibleContainerConcept
@@ -694,10 +726,10 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
__function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
__function_requires< _DefaultConstructibleConcept<_Sequence> >();
- _Sequence
- __c(__n) _IsUnused,
- __c2(__n, __t) _IsUnused,
- __c3(__first, __last) _IsUnused;
+ _Sequence
+ __c _IsUnused(__n),
+ __c2 _IsUnused(__n, __t),
+ __c3 _IsUnused(__first, __last);
__c.insert(__p, __t);
__c.insert(__p, __n, __t);
@@ -759,7 +791,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
__function_requires< _ForwardContainerConcept<_AssociativeContainer> >();
__function_requires<
_DefaultConstructibleConcept<_AssociativeContainer> >();
-
+
__i = __c.find(__k);
__r = __c.equal_range(__k);
__c.erase(__k);
@@ -790,9 +822,9 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
void __constraints() {
__function_requires<
_AssociativeContainerConcept<_UniqueAssociativeContainer> >();
-
+
_UniqueAssociativeContainer __c(__first, __last);
-
+
__pos_flag = __c.insert(__t);
__c.insert(__first, __last);
}
@@ -809,12 +841,12 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
_AssociativeContainerConcept<_MultipleAssociativeContainer> >();
_MultipleAssociativeContainer __c(__first, __last);
-
+
__pos = __c.insert(__t);
__c.insert(__first, __last);
}
- typename _MultipleAssociativeContainer::iterator __pos _IsUnused;
+ typename _MultipleAssociativeContainer::iterator __pos;
typename _MultipleAssociativeContainer::value_type __t;
typename _MultipleAssociativeContainer::value_type *__first, *__last;
};
@@ -828,7 +860,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
typedef typename _SimpleAssociativeContainer::key_type _Key_type;
typedef typename _SimpleAssociativeContainer::value_type _Value_type;
typedef typename _Aux_require_same<_Key_type, _Value_type>::_Type
- _Requqired;
+ _Required;
}
};
@@ -856,15 +888,15 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
__function_requires<
_ReversibleContainerConcept<_SortedAssociativeContainer> >();
- _SortedAssociativeContainer
- __c(__kc) _IsUnused,
- __c2(__first, __last) _IsUnused,
- __c3(__first, __last, __kc) _IsUnused;
+ _SortedAssociativeContainer
+ __c _IsUnused(__kc),
+ __c2 _IsUnused(__first, __last),
+ __c3 _IsUnused(__first, __last, __kc);
__p = __c.upper_bound(__k);
__p = __c.lower_bound(__k);
__r = __c.equal_range(__k);
-
+
__c.insert(__p, __t);
}
void __const_constraints(const _SortedAssociativeContainer& __c) {
@@ -896,6 +928,6 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
#undef _IsUnused
-#endif // _GLIBCPP_BOOST_CONCEPT_CHECK
+#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
diff --git a/contrib/libstdc++/include/bits/c++config b/contrib/libstdc++/include/bits/c++config
index 9fdb8cc..80539b1 100644
--- a/contrib/libstdc++/include/bits/c++config
+++ b/contrib/libstdc++/include/bits/c++config
@@ -1,6 +1,6 @@
// Predefined symbols and macros -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -28,26 +28,18 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_CPPCONFIG
-#define _CPP_CPPCONFIG 1
+#ifndef _CXXCONFIG
+#define _CXXCONFIG 1
// Pick up any OS-specific definitions.
#include <bits/os_defines.h>
// The current version of the C++ library in compressed ISO date format.
-#define __GLIBCPP__ 20031106
+#define __GLIBCXX__ 20040728
-// This is necessary until GCC supports separate template compilation.
-#define _GLIBCPP_NO_TEMPLATE_EXPORT 1
-
-// This is a hack around not having either pre-compiled headers or
-// export compilation. If defined, the io, string, and valarray
-// headers will include all the necessary bits. If not defined, the
-// implementation optimizes the headers for the most commonly-used
-// types. For the io library, this means that larger, out-of-line
-// member functions are only declared, and definitions are not parsed
-// by the compiler, but instead instantiated into the library binary.
-#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
// Allow use of the GNU syntax extension, "extern template." This
// extension is fully documented in the g++ manual, but in a nutshell,
@@ -55,46 +47,49 @@
// library to avoid multiple weak definitions for required types that
// are already explicitly instantiated in the library binary. This
// substantially reduces the binary size of resulting executables.
-#ifndef _GLIBCPP_EXTERN_TEMPLATE
-#define _GLIBCPP_EXTERN_TEMPLATE 1
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
#endif
-// To enable older, ARM-style iostreams and other anachronisms use this.
-//#define _GLIBCPP_DEPRECATED 1
-
-// Use corrected code from the committee library group's issues list.
-#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1
-
-// Hopefully temporary workaround to autoconf/m4 issue with quoting '@'.
-#define _GLIBCPP_AT_AT "@@"
-
-// In those parts of the standard C++ library that use a mutex instead
-// of a spin-lock, we now unconditionally use GCC's gthr.h mutex
-// abstraction layer. All support to directly map to various
-// threading models has been removed. Note: gthr.h may well map to
-// gthr-single.h which is a correct way to express no threads support
-// in gcc. Support for the undocumented _NOTHREADS has been removed.
-
-// Default to the typically high-speed, pool-based allocator (as
-// libstdc++-v2) instead of the malloc-based allocator (libstdc++-v3
-// snapshots). See libstdc++-v3/docs/html/17_intro/howto.html for
-// details on why you don't want to override this setting. Ensure
-// that threads are properly configured on your platform before
-// assigning blame to the STL container-memory allocator. After doing
-// so, please report any possible issues to libstdc++@gcc.gnu.org .
-// Do not define __USE_MALLOC on the command line. Enforce it here:
-#ifdef __USE_MALLOC
-#error __USE_MALLOC should never be defined. Read the release notes.
+// Debug mode support. Debug mode basic_string is not allowed to be
+// associated with std, because of locale and exception link
+// dependence.
+namespace __gnu_debug_def { }
+
+namespace __gnu_debug
+{
+ using namespace __gnu_debug_def;
+}
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_STD __gnu_norm
+namespace __gnu_norm
+{
+ using namespace std;
+}
+namespace std
+{
+ using namespace __gnu_debug_def __attribute__ ((strong));
+}
+#else
+# define _GLIBCXX_STD std
#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
// Create a boolean flag to be used to determine if --fast-math is set.
#ifdef __FAST_MATH__
-#define _GLIBCPP_FAST_MATH 1
+# define _GLIBCXX_FAST_MATH 1
#else
-#define _GLIBCPP_FAST_MATH 0
+# define _GLIBCXX_FAST_MATH 0
#endif
-// The remainder of the prewritten config is mostly automatic; all the
-// user hooks are listed above.
+// This marks string literals in header files to be extracted for eventual
+// translation. It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc. We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid) (msgid)
// End of prewritten config; the discovered settings follow.
diff --git a/contrib/libstdc++/include/bits/char_traits.h b/contrib/libstdc++/include/bits/char_traits.h
index 2b733cd..323fdfb 100644
--- a/contrib/libstdc++/include/bits/char_traits.h
+++ b/contrib/libstdc++/include/bits/char_traits.h
@@ -1,6 +1,6 @@
// Character Traits for use by standard string and iostream -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,104 +37,219 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_CHAR_TRAITS_H
-#define _CPP_BITS_CHAR_TRAITS_H 1
+#ifndef _CHAR_TRAITS_H
+#define _CHAR_TRAITS_H 1
#pragma GCC system_header
#include <cstring> // For memmove, memset, memchr
-#include <bits/fpos.h> // For streampos
+#include <bits/stl_algobase.h>// For copy, lexicographical_compare, fill_n
+#include <bits/postypes.h> // For streampos
-namespace std
+namespace __gnu_cxx
{
- // 21.1
/**
- * @brief Basis for explicit traits specializations.
+ * @brief Mapping from character type to associated types.
*
- * @note For any given actual character type, this definition is
- * probably wrong.
+ *
+ * @note This is an implementation class for the generic version
+ * of char_traits. It defines int_type, off_type, pos_type, and
+ * state_type. By default these are unsigned long, streamoff,
+ * streampos, and mbstate_t. Users who need a different set of
+ * types, but who don't need to change the definitions of any function
+ * defined in char_traits, can specialize __gnu_cxx::_Char_types
+ * while leaving __gnu_cxx::char_traits alone. */
+ template <class _CharT>
+ struct _Char_types
+ {
+ typedef unsigned long int_type;
+ typedef std::streampos pos_type;
+ typedef std::streamoff off_type;
+ typedef std::mbstate_t state_type;
+ };
+
+
+ /**
+ * @brief Base class used to implement std::char_traits.
+ *
+ * @note For any given actual character type, this definition is
+ * probably wrong. (Most of the member functions are likely to be
+ * right, but the int_type and state_type typedefs, and the eof()
+ * member function, are likely to be wrong.) The reason this class
+ * exists is so users can specialize it. Classes in namespace std
+ * may not be specialized for fundamentl types, but classes in
+ * namespace __gnu_cxx may be.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
* for advice on how to make use of this class for "unusual" character
- * types.
- */
- template<class _CharT>
+ * types. Also, check out include/ext/pod_char_traits.h. */
+ template<typename _CharT>
struct char_traits
{
- typedef _CharT char_type;
- // Unsigned as wint_t is unsigned.
- typedef unsigned long int_type;
- typedef streampos pos_type;
- typedef streamoff off_type;
- typedef mbstate_t state_type;
-
- static void
- assign(char_type& __c1, const char_type& __c2);
+ typedef _CharT char_type;
+ typedef typename _Char_types<_CharT>::int_type int_type;
+ typedef typename _Char_types<_CharT>::pos_type pos_type;
+ typedef typename _Char_types<_CharT>::off_type off_type;
+ typedef typename _Char_types<_CharT>::state_type state_type;
- static bool
- eq(const char_type& __c1, const char_type& __c2);
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
- static bool
- lt(const char_type& __c1, const char_type& __c2);
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
- static int
- compare(const char_type* __s1, const char_type* __s2, size_t __n);
+ static int
+ compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
- static size_t
+ static std::size_t
length(const char_type* __s);
- static const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a);
+ static const char_type*
+ find(const char_type* __s, std::size_t __n, const char_type& __a);
- static char_type*
- move(char_type* __s1, const char_type* __s2, size_t __n);
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, std::size_t __n);
- static char_type*
- copy(char_type* __s1, const char_type* __s2, size_t __n);
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, std::size_t __n);
- static char_type*
- assign(char_type* __s, size_t __n, char_type __a);
+ static char_type*
+ assign(char_type* __s, std::size_t __n, char_type __a);
- static char_type
- to_char_type(const int_type& __c);
+ static char_type
+ to_char_type(const int_type& __c)
+ { return static_cast<char_type>(__c); }
- static int_type
- to_int_type(const char_type& __c);
+ static int_type
+ to_int_type(const char_type& __c)
+ { return static_cast<int_type>(__c); }
- static bool
- eq_int_type(const int_type& __c1, const int_type& __c2);
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
- static int_type
- eof();
+ static int_type
+ eof()
+ { return static_cast<int_type>(EOF); }
- static int_type
- not_eof(const int_type& __c);
+ static int_type
+ not_eof(const int_type& __c)
+ { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
};
+ template<typename _CharT>
+ int
+ char_traits<_CharT>::
+ compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (lt(__s1[__i], __s2[__i]))
+ return -1;
+ else if (lt(__s2[__i], __s1[__i]))
+ return 1;
+ return 0;
+ }
+
+ template<typename _CharT>
+ std::size_t
+ char_traits<_CharT>::
+ length(const char_type* __p)
+ {
+ std::size_t __i = 0;
+ while (!eq(__p[__i], char_type()))
+ ++__i;
+ return __i;
+ }
+
+ template<typename _CharT>
+ const typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ find(const char_type* __s, std::size_t __n, const char_type& __a)
+ {
+ for (std::size_t __i = 0; __i < __n; ++__i)
+ if (eq(__s[__i], __a))
+ return __s + __i;
+ return 0;
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ move(char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ return static_cast<_CharT*>(std::memmove(__s1, __s2,
+ __n * sizeof(char_type)));
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ copy(char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ std::copy(__s2, __s2 + __n, __s1);
+ return __s1;
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ assign(char_type* __s, std::size_t __n, char_type __a)
+ {
+ std::fill_n(__s, __n, __a);
+ return __s;
+ }
+}
+
+namespace std
+{
+ // 21.1
+ /**
+ * @brief Basis for explicit traits specializations.
+ *
+ * @note For any given actual character type, this definition is
+ * probably wrong. Since this is just a thin wrapper around
+ * __gnu_cxx::char_traits, it is possible to achieve a more
+ * appropriate definition by specializing __gnu_cxx::char_traits.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
+ * for advice on how to make use of this class for "unusual" character
+ * types. Also, check out include/ext/pod_char_traits.h.
+ */
+ template<class _CharT>
+ struct char_traits
+ : public __gnu_cxx::char_traits<_CharT>
+ { };
+
/// 21.1.3.1 char_traits specializations
template<>
struct char_traits<char>
{
- typedef char char_type;
- typedef int int_type;
- typedef streampos pos_type;
- typedef streamoff off_type;
- typedef mbstate_t state_type;
+ typedef char char_type;
+ typedef int int_type;
+ typedef streampos pos_type;
+ typedef streamoff off_type;
+ typedef mbstate_t state_type;
- static void
+ static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
- static bool
+ static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
- static bool
+ static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
- static int
+ static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{ return memcmp(__s1, __s2, __n); }
@@ -142,69 +257,69 @@ namespace std
length(const char_type* __s)
{ return strlen(__s); }
- static const char_type*
+ static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{ return static_cast<const char_type*>(memchr(__s, __a, __n)); }
- static char_type*
+ static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{ return static_cast<char_type*>(memmove(__s1, __s2, __n)); }
- static char_type*
+ static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
- { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
+ { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
- static char_type*
+ static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{ return static_cast<char_type*>(memset(__s, __a, __n)); }
- static char_type
+ static char_type
to_char_type(const int_type& __c)
{ return static_cast<char_type>(__c); }
// To keep both the byte 0xff and the eof symbol 0xffffffff
// from ending up as 0xffffffff.
- static int_type
+ static int_type
to_int_type(const char_type& __c)
{ return static_cast<int_type>(static_cast<unsigned char>(__c)); }
- static bool
+ static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
- static int_type
+ static int_type
eof() { return static_cast<int_type>(EOF); }
- static int_type
+ static int_type
not_eof(const int_type& __c)
{ return (__c == eof()) ? 0 : __c; }
};
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
/// 21.1.3.2 char_traits specializations
template<>
struct char_traits<wchar_t>
{
- typedef wchar_t char_type;
- typedef wint_t int_type;
- typedef streamoff off_type;
- typedef wstreampos pos_type;
- typedef mbstate_t state_type;
-
- static void
+ typedef wchar_t char_type;
+ typedef wint_t int_type;
+ typedef streamoff off_type;
+ typedef wstreampos pos_type;
+ typedef mbstate_t state_type;
+
+ static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
- static bool
+ static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
- static bool
+ static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
- static int
+ static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemcmp(__s1, __s2, __n); }
@@ -212,40 +327,40 @@ namespace std
length(const char_type* __s)
{ return wcslen(__s); }
- static const char_type*
+ static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{ return wmemchr(__s, __a, __n); }
- static char_type*
- move(char_type* __s1, const char_type* __s2, int_type __n)
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemmove(__s1, __s2, __n); }
- static char_type*
+ static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemcpy(__s1, __s2, __n); }
- static char_type*
+ static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{ return wmemset(__s, __a, __n); }
- static char_type
+ static char_type
to_char_type(const int_type& __c) { return char_type(__c); }
- static int_type
+ static int_type
to_int_type(const char_type& __c) { return int_type(__c); }
- static bool
+ static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
- static int_type
+ static int_type
eof() { return static_cast<int_type>(WEOF); }
- static int_type
+ static int_type
not_eof(const int_type& __c)
{ return eq_int_type(__c, eof()) ? 0 : __c; }
};
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
template<typename _CharT, typename _Traits>
struct _Char_traits_match
@@ -253,7 +368,7 @@ namespace std
_CharT _M_c;
_Char_traits_match(_CharT const& __c) : _M_c(__c) { }
- bool
+ bool
operator()(_CharT const& __a) { return _Traits::eq(_M_c, __a); }
};
} // namespace std
diff --git a/contrib/libstdc++/include/bits/codecvt.h b/contrib/libstdc++/include/bits/codecvt.h
index 9ab9f94..d31ebf2 100644
--- a/contrib/libstdc++/include/bits/codecvt.h
+++ b/contrib/libstdc++/include/bits/codecvt.h
@@ -1,6 +1,6 @@
// Locale support (codecvt) -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -38,12 +38,13 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_CODECVT_H
-#define _CPP_BITS_CODECVT_H 1
+#ifndef _CODECVT_H
+#define _CODECVT_H 1
#pragma GCC system_header
// 22.2.1.5 Template class codecvt
+ /// Base class for codecvt facet providing conversion result enum.
class codecvt_base
{
public:
@@ -60,148 +61,269 @@
// NB: An abstract base class that fills in the public inlines, so
// that the specializations don't have to re-copy the public
// interface.
+ /**
+ * @brief Common base for codecvt facet
+ *
+ * This template class provides implementations of the public functions
+ * that forward to the protected virtual functions.
+ *
+ * This template also provides abstract stubs for the protected virtual
+ * functions.
+ */
template<typename _InternT, typename _ExternT, typename _StateT>
- class __codecvt_abstract_base
+ class __codecvt_abstract_base
: public locale::facet, public codecvt_base
{
public:
// Types:
typedef codecvt_base::result result;
- typedef _InternT intern_type;
- typedef _ExternT extern_type;
- typedef _StateT state_type;
-
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+
// 22.2.1.5.1 codecvt members
+ /**
+ * @brief Convert from internal to external character set.
+ *
+ * Converts input string of intern_type to output string of
+ * extern_type. This is analogous to wcsrtombs. It does this by
+ * calling codecvt::do_out.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The characters in [from,from_end) are converted and written to
+ * [to,to_end). from_next and to_next are set to point to the
+ * character following the last successfully converted character,
+ * respectively. If the result needed no conversion, from_next and
+ * to_next are not affected.
+ *
+ * The @a state argument should be intialized if the input is at the
+ * beginning and carried from a previous call if continuing
+ * conversion. There are no guarantees about how @a state is used.
+ *
+ * The result returned is a member of codecvt_base::result. If all the
+ * input is converted, returns codecvt_base::ok. If no conversion is
+ * necessary, returns codecvt_base::noconv. If the input ends early or
+ * there is insufficient space in the output, returns codecvt_base::partial.
+ * Otherwise the conversion failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param from Start of input.
+ * @param from_end End of input.
+ * @param from_next Returns start of unconverted data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
result
- out(state_type& __state, const intern_type* __from,
+ out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
- extern_type* __to, extern_type* __to_end,
+ extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
- {
- return this->do_out(__state, __from, __from_end, __from_next,
- __to, __to_end, __to_next);
+ {
+ return this->do_out(__state, __from, __from_end, __from_next,
+ __to, __to_end, __to_next);
}
+ /**
+ * @brief Reset conversion state.
+ *
+ * Writes characters to output that would restore @a state to initial
+ * conditions. The idea is that if a partial conversion occurs, then
+ * the converting the characters written by this function would leave
+ * the state in initial conditions, rather than partial conversion
+ * state. It does this by calling codecvt::do_unshift().
+ *
+ * For example, if 4 external characters always converted to 1 internal
+ * character, and input to in() had 6 external characters with state
+ * saved, this function would write two characters to the output and
+ * set the state to initialized conditions.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The result returned is a member of codecvt_base::result. If the
+ * state could be reset and data written, returns codecvt_base::ok. If
+ * no conversion is necessary, returns codecvt_base::noconv. If the
+ * output has insufficient space, returns codecvt_base::partial.
+ * Otherwise the reset failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
result
unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{ return this->do_unshift(__state, __to,__to_end,__to_next); }
+ /**
+ * @brief Convert from external to internal character set.
+ *
+ * Converts input string of extern_type to output string of
+ * intern_type. This is analogous to mbsrtowcs. It does this by
+ * calling codecvt::do_in.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The characters in [from,from_end) are converted and written to
+ * [to,to_end). from_next and to_next are set to point to the
+ * character following the last successfully converted character,
+ * respectively. If the result needed no conversion, from_next and
+ * to_next are not affected.
+ *
+ * The @a state argument should be intialized if the input is at the
+ * beginning and carried from a previous call if continuing
+ * conversion. There are no guarantees about how @a state is used.
+ *
+ * The result returned is a member of codecvt_base::result. If all the
+ * input is converted, returns codecvt_base::ok. If no conversion is
+ * necessary, returns codecvt_base::noconv. If the input ends early or
+ * there is insufficient space in the output, returns codecvt_base::partial.
+ * Otherwise the conversion failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param from Start of input.
+ * @param from_end End of input.
+ * @param from_next Returns start of unconverted data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
result
- in(state_type& __state, const extern_type* __from,
+ in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
- intern_type* __to, intern_type* __to_end,
+ intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
- {
+ {
return this->do_in(__state, __from, __from_end, __from_next,
- __to, __to_end, __to_next);
+ __to, __to_end, __to_next);
}
- int
+ int
encoding() const throw()
{ return this->do_encoding(); }
- bool
+ bool
always_noconv() const throw()
{ return this->do_always_noconv(); }
int
- length(const state_type& __state, const extern_type* __from,
+ length(state_type& __state, const extern_type* __from,
const extern_type* __end, size_t __max) const
{ return this->do_length(__state, __from, __end, __max); }
- int
+ int
max_length() const throw()
{ return this->do_max_length(); }
protected:
- explicit
+ explicit
__codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
- virtual
+ virtual
~__codecvt_abstract_base() { }
+ /**
+ * @brief Convert from internal to external character set.
+ *
+ * Converts input string of intern_type to output string of
+ * extern_type. This function is a hook for derived classes to change
+ * the value returned. @see out for more information.
+ */
virtual result
- do_out(state_type& __state, const intern_type* __from,
+ do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const = 0;
virtual result
- do_unshift(state_type& __state, extern_type* __to,
+ do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const = 0;
-
+
virtual result
- do_in(state_type& __state, const extern_type* __from,
- const extern_type* __from_end, const extern_type*& __from_next,
- intern_type* __to, intern_type* __to_end,
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const = 0;
-
- virtual int
+
+ virtual int
do_encoding() const throw() = 0;
- virtual bool
+ virtual bool
do_always_noconv() const throw() = 0;
- virtual int
- do_length(const state_type&, const extern_type* __from,
+ virtual int
+ do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const = 0;
- virtual int
+ virtual int
do_max_length() const throw() = 0;
};
// 22.2.1.5 Template class codecvt
// NB: Generic, mostly useless implementation.
template<typename _InternT, typename _ExternT, typename _StateT>
- class codecvt
+ class codecvt
: public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
{
- public:
+ public:
// Types:
typedef codecvt_base::result result;
- typedef _InternT intern_type;
- typedef _ExternT extern_type;
- typedef _StateT state_type;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
public:
- static locale::id id;
+ static locale::id id;
- explicit
- codecvt(size_t __refs = 0)
+ explicit
+ codecvt(size_t __refs = 0)
: __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
protected:
- virtual
+ virtual
~codecvt() { }
virtual result
- do_out(state_type& __state, const intern_type* __from,
+ do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const;
virtual result
- do_unshift(state_type& __state, extern_type* __to,
+ do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const;
-
+
virtual result
- do_in(state_type& __state, const extern_type* __from,
- const extern_type* __from_end, const extern_type*& __from_next,
- intern_type* __to, intern_type* __to_end,
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const;
-
- virtual int
+
+ virtual int
do_encoding() const throw();
- virtual bool
+ virtual bool
do_always_noconv() const throw();
- virtual int
- do_length(const state_type&, const extern_type* __from,
+ virtual int
+ do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
- virtual int
+ virtual int
do_max_length() const throw();
};
@@ -210,79 +332,91 @@
// codecvt<char, char, mbstate_t> required specialization
template<>
- class codecvt<char, char, mbstate_t>
+ class codecvt<char, char, mbstate_t>
: public __codecvt_abstract_base<char, char, mbstate_t>
{
- public:
+ public:
// Types:
- typedef char intern_type;
- typedef char extern_type;
- typedef mbstate_t state_type;
+ typedef char intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
public:
static locale::id id;
- explicit
+ explicit
codecvt(size_t __refs = 0);
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
protected:
- virtual
+ virtual
~codecvt();
virtual result
- do_out(state_type& __state, const intern_type* __from,
+ do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const;
virtual result
- do_unshift(state_type& __state, extern_type* __to,
+ do_unshift(state_type& __state, extern_type* __to,
extern_type* __to_end, extern_type*& __to_next) const;
virtual result
- do_in(state_type& __state, const extern_type* __from,
+ do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
- intern_type* __to, intern_type* __to_end,
+ intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const;
- virtual int
+ virtual int
do_encoding() const throw();
- virtual bool
+ virtual bool
do_always_noconv() const throw();
- virtual int
- do_length(const state_type&, const extern_type* __from,
+ virtual int
+ do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
- virtual int
+ virtual int
do_max_length() const throw();
};
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
// codecvt<wchar_t, char, mbstate_t> required specialization
template<>
- class codecvt<wchar_t, char, mbstate_t>
+ class codecvt<wchar_t, char, mbstate_t>
: public __codecvt_abstract_base<wchar_t, char, mbstate_t>
{
public:
// Types:
- typedef wchar_t intern_type;
- typedef char extern_type;
- typedef mbstate_t state_type;
+ typedef wchar_t intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
public:
- static locale::id id;
+ static locale::id id;
- explicit
+ explicit
codecvt(size_t __refs = 0);
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
protected:
- virtual
+ virtual
~codecvt();
virtual result
- do_out(state_type& __state, const intern_type* __from,
+ do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const;
@@ -299,39 +433,46 @@
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const;
- virtual
+ virtual
int do_encoding() const throw();
- virtual
+ virtual
bool do_always_noconv() const throw();
- virtual
- int do_length(const state_type&, const extern_type* __from,
+ virtual
+ int do_length(state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const;
- virtual int
+ virtual int
do_max_length() const throw();
};
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
// 22.2.1.6 Template class codecvt_byname
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
{
public:
- explicit
- codecvt_byname(const char*, size_t __refs = 0)
- : codecvt<_InternT, _ExternT, _StateT>(__refs) { }
+ explicit
+ codecvt_byname(const char* __s, size_t __refs = 0)
+ : codecvt<_InternT, _ExternT, _StateT>(__refs)
+ {
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
+ this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
+ }
+ }
protected:
- virtual
+ virtual
~codecvt_byname() { }
};
// Include host and configuration specific partial specializations
// with additional functionality, if possible.
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
#include <bits/codecvt_specializations.h>
#endif
-#endif // _CPP_BITS_CODECVT_H
+#endif // _CODECVT_H
diff --git a/contrib/libstdc++/include/bits/concept_check.h b/contrib/libstdc++/include/bits/concept_check.h
index 88877eb..80c1439 100644
--- a/contrib/libstdc++/include/bits/concept_check.h
+++ b/contrib/libstdc++/include/bits/concept_check.h
@@ -32,8 +32,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _GLIBCPP_CONCEPT_CHECK
-#define _GLIBCPP_CONCEPT_CHECK 1
+#ifndef _CONCEPT_CHECK_H
+#define _CONCEPT_CHECK_H 1
#pragma GCC system_header
@@ -47,13 +47,13 @@
// Concept-checking code is off by default unless users turn it on via
// configure options or editing c++config.h.
-#ifndef _GLIBCPP_CONCEPT_CHECKS
+#ifndef _GLIBCXX_CONCEPT_CHECKS
-#define __glibcpp_function_requires(...)
-#define __glibcpp_class_requires(_a,_b)
-#define __glibcpp_class_requires2(_a,_b,_c)
-#define __glibcpp_class_requires3(_a,_b,_c,_d)
-#define __glibcpp_class_requires4(_a,_b,_c,_d,_e)
+#define __glibcxx_function_requires(...)
+#define __glibcxx_class_requires(_a,_b)
+#define __glibcxx_class_requires2(_a,_b,_c)
+#define __glibcxx_class_requires3(_a,_b,_c,_d)
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_e)
#else // the checks are on
@@ -61,7 +61,7 @@
// Note that the obvious and elegant approach of
//
-//#define glibcpp_function_requires(C) boost::function_requires< boost::C >()
+//#define glibcxx_function_requires(C) boost::function_requires< boost::C >()
//
// won't work due to concept templates with more than one parameter, e.g.,
// BinaryPredicateConcept. The preprocessor tries to split things up on
@@ -69,17 +69,17 @@
// parenthesis to hide the commas, because "boost::(Temp<Foo,Bar>)" isn't
// a valid instantiation pattern. Thus, we steal a feature from C99.
-#define __glibcpp_function_requires(...) \
+#define __glibcxx_function_requires(...) \
__gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
-#define __glibcpp_class_requires(_a,_C) \
- _GLIBCPP_CLASS_REQUIRES(_a, __gnu_cxx, _C);
-#define __glibcpp_class_requires2(_a,_b,_C) \
- _GLIBCPP_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
-#define __glibcpp_class_requires3(_a,_b,_c,_C) \
- _GLIBCPP_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
-#define __glibcpp_class_requires4(_a,_b,_c,_d,_C) \
- _GLIBCPP_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
+#define __glibcxx_class_requires(_a,_C) \
+ _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C);
+#define __glibcxx_class_requires2(_a,_b,_C) \
+ _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
+#define __glibcxx_class_requires3(_a,_b,_c,_C) \
+ _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \
+ _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
#endif // enable/disable
-#endif // _GLIBCPP_CONCEPT_CHECK
+#endif // _GLIBCXX_CONCEPT_CHECK
diff --git a/contrib/libstdc++/include/bits/concurrence.h b/contrib/libstdc++/include/bits/concurrence.h
new file mode 100644
index 0000000..c436a1b
--- /dev/null
+++ b/contrib/libstdc++/include/bits/concurrence.h
@@ -0,0 +1,95 @@
+// Support for concurrent programing -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _CONCURRENCE_H
+#define _CONCURRENCE_H 1
+
+// GCC's thread abstraction layer
+#include "bits/gthr.h"
+
+#if __GTHREADS
+
+# ifdef __GTHREAD_MUTEX_INIT
+# define __glibcxx_mutex_type __gthread_mutex_t
+# define __glibcxx_mutex_define_initialized(NAME) \
+__gthread_mutex_t NAME = __GTHREAD_MUTEX_INIT
+# define __glibcxx_mutex_lock(NAME) \
+__gthread_mutex_lock(&NAME)
+# else
+// Implies __GTHREAD_MUTEX_INIT_FUNCTION
+struct __glibcxx_mutex : public __gthread_mutex_t
+{
+ __glibcxx_mutex() { __GTHREAD_MUTEX_INIT_FUNCTION(this); }
+};
+
+# define __glibcxx_mutex_type __glibcxx_mutex
+# define __glibcxx_mutex_define_initialized(NAME) \
+__glibcxx_mutex NAME
+# define __glibcxx_mutex_lock(NAME) \
+__gthread_mutex_lock(&NAME)
+# endif
+
+# define __glibcxx_mutex_unlock(NAME) __gthread_mutex_unlock(&NAME)
+
+#else
+
+# define __glibcxx_mutex_type __gthread_mutex_t
+# define __glibcxx_mutex_define_initialized(NAME) __gthread_mutex_t NAME
+# define __glibcxx_mutex_lock(NAME)
+# define __glibcxx_mutex_unlock(NAME)
+
+#endif
+
+namespace __gnu_cxx
+{
+ typedef __glibcxx_mutex_type mutex_type;
+
+ // Scoped lock idiom.
+ // Acquire the mutex here with a constructor call, then release with
+ // the destructor call in accordance with RAII style.
+ class lock
+ {
+ // Externally defined and initialized.
+ mutex_type& device;
+
+ public:
+ explicit lock(mutex_type& name) : device(name)
+ { __glibcxx_mutex_lock(device); }
+
+ ~lock() throw()
+ { __glibcxx_mutex_unlock(device); }
+
+ private:
+ lock(const lock&);
+ lock& operator=(const lock&);
+ };
+}
+
+#endif
diff --git a/contrib/libstdc++/include/bits/cpp_type_traits.h b/contrib/libstdc++/include/bits/cpp_type_traits.h
index d66fe76..d4e4ea0 100644
--- a/contrib/libstdc++/include/bits/cpp_type_traits.h
+++ b/contrib/libstdc++/include/bits/cpp_type_traits.h
@@ -1,6 +1,6 @@
// The -*- C++ -*- type traits classes for internal use in libstdc++
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,8 +34,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_CPP_TYPE_TRAITS_H
-#define _CPP_BITS_CPP_TYPE_TRAITS_H 1
+#ifndef _CPP_TYPE_TRAITS_H
+#define _CPP_TYPE_TRAITS_H 1
#pragma GCC system_header
@@ -64,24 +64,69 @@
// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06.
//
+// NB: g++ can not compile these if declared within the class
+// __is_pod itself.
+namespace __gnu_internal
+{
+ typedef char __one;
+ typedef char __two[2];
+
+ template <typename _Tp>
+ __one __test_type (int _Tp::*);
+ template <typename _Tp>
+ __two& __test_type (...);
+} // namespace __gnu_internal
+
namespace std
{
+ // Compare for equality of types.
+ template<typename, typename>
+ struct __are_same
+ {
+ enum
+ {
+ _M_type = 0
+ };
+ };
+
+ template<typename _Tp>
+ struct __are_same<_Tp, _Tp>
+ {
+ enum
+ {
+ _M_type = 1
+ };
+ };
+
+ // Define a nested type if some predicate holds.
+ template<typename, bool>
+ struct __enable_if
+ {
+ };
+
+ template<typename _Tp>
+ struct __enable_if<_Tp, true>
+ {
+ typedef _Tp _M_type;
+ };
+
+ // Holds if the template-argument is a void type.
template<typename _Tp>
struct __is_void
{
enum
- {
- _M_type = 0
- };
+ {
+ _M_type = 0
+ };
};
template<>
struct __is_void<void>
{
enum
- {
- _M_type = 1
- };
+ {
+ _M_type = 1
+ };
};
//
@@ -91,9 +136,9 @@ namespace std
struct __is_integer
{
enum
- {
- _M_type = 0
- };
+ {
+ _M_type = 0
+ };
};
// Thirteen specializations (yes there are eleven standard integer
@@ -103,198 +148,198 @@ namespace std
struct __is_integer<bool>
{
enum
- {
- _M_type = 1
- };
+ {
+ _M_type = 1
+ };
};
-
+
template<>
struct __is_integer<char>
{
enum
- {
- _M_type = 1
- };
+ {
+ _M_type = 1
+ };
};
template<>
struct __is_integer<signed char>
{
enum
- {
- _M_type = 1
- };
+ {
+ _M_type = 1
+ };
};
-
+
template<>
- struct __is_integer<unsigned char>
- {
- enum
+ struct __is_integer<unsigned char>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
-# ifdef _GLIBCPP_USE_WCHAR_T
+# ifdef _GLIBCXX_USE_WCHAR_T
template<>
- struct __is_integer<wchar_t>
- {
- enum
+ struct __is_integer<wchar_t>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
# endif
-
+
template<>
- struct __is_integer<short>
- {
- enum
+ struct __is_integer<short>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<unsigned short>
- {
- enum
+ struct __is_integer<unsigned short>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<int>
- {
- enum
+ struct __is_integer<int>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<unsigned int>
- {
- enum
+ struct __is_integer<unsigned int>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<long>
- {
- enum
+ struct __is_integer<long>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<unsigned long>
- {
- enum
+ struct __is_integer<unsigned long>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<long long>
- {
- enum
+ struct __is_integer<long long>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_integer<unsigned long long>
- {
- enum
+ struct __is_integer<unsigned long long>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
//
// Floating point types
//
template<typename _Tp>
- struct __is_floating
- {
- enum
+ struct __is_floating
{
- _M_type = 0
+ enum
+ {
+ _M_type = 0
+ };
};
- };
// three specializations (float, double and 'long double')
template<>
- struct __is_floating<float>
- {
- enum
+ struct __is_floating<float>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_floating<double>
- {
- enum
+ struct __is_floating<double>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
template<>
- struct __is_floating<long double>
- {
- enum
+ struct __is_floating<long double>
{
- _M_type = 1
+ enum
+ {
+ _M_type = 1
+ };
};
- };
//
// An arithmetic type is an integer type or a floating point type
//
template<typename _Tp>
- struct __is_arithmetic
- {
- enum
+ struct __is_arithmetic
{
- _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type
+ enum
+ {
+ _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type
+ };
};
- };
-
+
//
// A fundamental type is `void' or and arithmetic type
//
template<typename _Tp>
- struct __is_fundamental
- {
- enum
+ struct __is_fundamental
{
- _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type
+ enum
+ {
+ _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type
+ };
};
- };
//
// For the immediate use, the following is a good approximation
//
template<typename _Tp>
- struct __is_pod
- {
- enum
+ struct __is_pod
{
- _M_type = __is_fundamental<_Tp>::_M_type
+ enum
+ {
+ _M_type = (sizeof(__gnu_internal::__test_type<_Tp>(0))
+ != sizeof(__gnu_internal::__one))
+ };
};
- };
} // namespace std
-
-#endif //_CPP_BITS_CPP_TYPE_TRAITS_H
+#endif //_CPP_TYPE_TRAITS_H
diff --git a/contrib/libstdc++/include/bits/deque.tcc b/contrib/libstdc++/include/bits/deque.tcc
index a8d43d0..e8e0438 100644
--- a/contrib/libstdc++/include/bits/deque.tcc
+++ b/contrib/libstdc++/include/bits/deque.tcc
@@ -1,6 +1,6 @@
// Deque implementation (out of line) -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,11 +58,11 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_DEQUE_TCC
-#define __GLIBCPP_INTERNAL_DEQUE_TCC
+#ifndef _DEQUE_TCC
+#define _DEQUE_TCC 1
-namespace std
-{
+namespace _GLIBCXX_STD
+{
template <typename _Tp, typename _Alloc>
deque<_Tp,_Alloc>&
deque<_Tp,_Alloc>::
@@ -70,125 +70,128 @@ namespace std
{
const size_type __len = size();
if (&__x != this)
- {
- if (__len >= __x.size())
- erase(copy(__x.begin(), __x.end(), _M_start), _M_finish);
- else
- {
- const_iterator __mid = __x.begin() + difference_type(__len);
- copy(__x.begin(), __mid, _M_start);
- insert(_M_finish, __mid, __x.end());
- }
- }
+ {
+ if (__len >= __x.size())
+ erase(std::copy(__x.begin(), __x.end(), this->_M_impl._M_start),
+ this->_M_impl._M_finish);
+ else
+ {
+ const_iterator __mid = __x.begin() + difference_type(__len);
+ std::copy(__x.begin(), __mid, this->_M_impl._M_start);
+ insert(this->_M_impl._M_finish, __mid, __x.end());
+ }
+ }
return *this;
- }
-
+ }
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
insert(iterator position, const value_type& __x)
{
- if (position._M_cur == _M_start._M_cur)
- {
- push_front(__x);
- return _M_start;
- }
- else if (position._M_cur == _M_finish._M_cur)
- {
- push_back(__x);
- iterator __tmp = _M_finish;
- --__tmp;
- return __tmp;
- }
+ if (position._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ push_front(__x);
+ return this->_M_impl._M_start;
+ }
+ else if (position._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ push_back(__x);
+ iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return __tmp;
+ }
else
return _M_insert_aux(position, __x);
}
-
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
erase(iterator __position)
{
iterator __next = __position;
++__next;
- size_type __index = __position - _M_start;
+ size_type __index = __position - this->_M_impl._M_start;
if (__index < (size() >> 1))
- {
- copy_backward(_M_start, __position, __next);
- pop_front();
- }
+ {
+ std::copy_backward(this->_M_impl._M_start, __position, __next);
+ pop_front();
+ }
else
- {
- copy(__next, _M_finish, __position);
- pop_back();
- }
- return _M_start + __index;
+ {
+ std::copy(__next, this->_M_impl._M_finish, __position);
+ pop_back();
+ }
+ return this->_M_impl._M_start + __index;
}
-
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
erase(iterator __first, iterator __last)
{
- if (__first == _M_start && __last == _M_finish)
- {
- clear();
- return _M_finish;
- }
+ if (__first == this->_M_impl._M_start && __last == this->_M_impl._M_finish)
+ {
+ clear();
+ return this->_M_impl._M_finish;
+ }
else
- {
- difference_type __n = __last - __first;
- difference_type __elems_before = __first - _M_start;
- if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
- {
- copy_backward(_M_start, __first, __last);
- iterator __new_start = _M_start + __n;
- _Destroy(_M_start, __new_start);
- _M_destroy_nodes(_M_start._M_node, __new_start._M_node);
- _M_start = __new_start;
- }
- else
- {
- copy(__last, _M_finish, __first);
- iterator __new_finish = _M_finish - __n;
- _Destroy(__new_finish, _M_finish);
- _M_destroy_nodes(__new_finish._M_node + 1, _M_finish._M_node + 1);
- _M_finish = __new_finish;
- }
- return _M_start + __elems_before;
- }
+ {
+ const difference_type __n = __last - __first;
+ const difference_type __elems_before = __first - this->_M_impl._M_start;
+ if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
+ {
+ std::copy_backward(this->_M_impl._M_start, __first, __last);
+ iterator __new_start = this->_M_impl._M_start + __n;
+ std::_Destroy(this->_M_impl._M_start, __new_start);
+ _M_destroy_nodes(this->_M_impl._M_start._M_node, __new_start._M_node);
+ this->_M_impl._M_start = __new_start;
+ }
+ else
+ {
+ std::copy(__last, this->_M_impl._M_finish, __first);
+ iterator __new_finish = this->_M_impl._M_finish - __n;
+ std::_Destroy(__new_finish, this->_M_impl._M_finish);
+ _M_destroy_nodes(__new_finish._M_node + 1,
+ this->_M_impl._M_finish._M_node + 1);
+ this->_M_impl._M_finish = __new_finish;
+ }
+ return this->_M_impl._M_start + __elems_before;
+ }
}
-
- template <typename _Tp, typename _Alloc>
+
+ template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
clear()
{
- for (_Map_pointer __node = _M_start._M_node + 1;
- __node < _M_finish._M_node;
+ for (_Map_pointer __node = this->_M_impl._M_start._M_node + 1;
+ __node < this->_M_impl._M_finish._M_node;
++__node)
- {
- _Destroy(*__node, *__node + _S_buffer_size());
- _M_deallocate_node(*__node);
- }
-
- if (_M_start._M_node != _M_finish._M_node)
- {
- _Destroy(_M_start._M_cur, _M_start._M_last);
- _Destroy(_M_finish._M_first, _M_finish._M_cur);
- _M_deallocate_node(_M_finish._M_first);
- }
+ {
+ std::_Destroy(*__node, *__node + _S_buffer_size());
+ _M_deallocate_node(*__node);
+ }
+
+ if (this->_M_impl._M_start._M_node != this->_M_impl._M_finish._M_node)
+ {
+ std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_start._M_last);
+ std::_Destroy(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur);
+ _M_deallocate_node(this->_M_impl._M_finish._M_first);
+ }
else
- _Destroy(_M_start._M_cur, _M_finish._M_cur);
-
- _M_finish = _M_start;
+ std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_finish._M_cur);
+
+ this->_M_impl._M_finish = this->_M_impl._M_start;
}
-
+
template <typename _Tp, class _Alloc>
- template <typename _InputIter>
+ template <typename _InputIterator>
void
deque<_Tp,_Alloc>
- ::_M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag)
+ ::_M_assign_aux(_InputIterator __first, _InputIterator __last,
+ input_iterator_tag)
{
iterator __cur = begin();
for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
@@ -198,44 +201,45 @@ namespace std
else
insert(end(), __first, __last);
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
{
- if (__pos._M_cur == _M_start._M_cur)
- {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- try
- {
- uninitialized_fill(__new_start, _M_start, __x);
- _M_start = __new_start;
- }
- catch(...)
- {
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
- __throw_exception_again;
- }
- }
- else if (__pos._M_cur == _M_finish._M_cur)
- {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- try
- {
- uninitialized_fill(_M_finish, __new_finish, __x);
- _M_finish = __new_finish;
- }
- catch(...)
- {
- _M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
- __throw_exception_again;
- }
- }
- else
+ if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ try
+ {
+ std::uninitialized_fill(__new_start, this->_M_impl._M_start, __x);
+ this->_M_impl._M_start = __new_start;
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ try
+ {
+ std::uninitialized_fill(this->_M_impl._M_finish, __new_finish, __x);
+ this->_M_impl._M_finish = __new_finish;
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
+ else
_M_insert_aux(__pos, __n, __x);
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -244,17 +248,21 @@ namespace std
_Map_pointer __cur;
try
{
- for (__cur = _M_start._M_node; __cur < _M_finish._M_node; ++__cur)
- uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
- uninitialized_fill(_M_finish._M_first, _M_finish._M_cur, __value);
+ for (__cur = this->_M_impl._M_start._M_node;
+ __cur < this->_M_impl._M_finish._M_node;
+ ++__cur)
+ std::uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
+ std::uninitialized_fill(this->_M_impl._M_finish._M_first,
+ this->_M_impl._M_finish._M_cur,
+ __value);
}
catch(...)
{
- _Destroy(_M_start, iterator(*__cur, __cur));
+ std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur));
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
@@ -262,7 +270,7 @@ namespace std
_M_range_initialize(_InputIterator __first, _InputIterator __last,
input_iterator_tag)
{
- _M_initialize_map(0);
+ this->_M_initialize_map(0);
try
{
for ( ; __first != __last; ++__first)
@@ -274,7 +282,7 @@ namespace std
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -282,31 +290,31 @@ namespace std
_M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag)
{
- size_type __n = distance(__first, __last);
- _M_initialize_map(__n);
-
+ const size_type __n = std::distance(__first, __last);
+ this->_M_initialize_map(__n);
+
_Map_pointer __cur_node;
try
{
- for (__cur_node = _M_start._M_node;
- __cur_node < _M_finish._M_node;
+ for (__cur_node = this->_M_impl._M_start._M_node;
+ __cur_node < this->_M_impl._M_finish._M_node;
++__cur_node)
{
_ForwardIterator __mid = __first;
- advance(__mid, _S_buffer_size());
- uninitialized_copy(__first, __mid, *__cur_node);
+ std::advance(__mid, _S_buffer_size());
+ std::uninitialized_copy(__first, __mid, *__cur_node);
__first = __mid;
}
- uninitialized_copy(__first, __last, _M_finish._M_first);
+ std::uninitialized_copy(__first, __last, this->_M_impl._M_finish._M_first);
}
catch(...)
{
- _Destroy(_M_start, iterator(*__cur_node, __cur_node));
+ std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node));
__throw_exception_again;
}
}
-
- // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
+
+ // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -314,44 +322,21 @@ namespace std
{
value_type __t_copy = __t;
_M_reserve_map_at_back();
- *(_M_finish._M_node + 1) = _M_allocate_node();
+ *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
try
{
- _Construct(_M_finish._M_cur, __t_copy);
- _M_finish._M_set_node(_M_finish._M_node + 1);
- _M_finish._M_cur = _M_finish._M_first;
+ std::_Construct(this->_M_impl._M_finish._M_cur, __t_copy);
+ this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + 1);
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
}
catch(...)
{
- _M_deallocate_node(*(_M_finish._M_node + 1));
+ _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
__throw_exception_again;
}
}
-
- #ifdef _GLIBCPP_DEPRECATED
- // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
- template <typename _Tp, typename _Alloc>
- void
- deque<_Tp,_Alloc>::
- _M_push_back_aux()
- {
- _M_reserve_map_at_back();
- *(_M_finish._M_node + 1) = _M_allocate_node();
- try
- {
- _Construct(_M_finish._M_cur);
- _M_finish._M_set_node(_M_finish._M_node + 1);
- _M_finish._M_cur = _M_finish._M_first;
- }
- catch(...)
- {
- _M_deallocate_node(*(_M_finish._M_node + 1));
- __throw_exception_again;
- }
- }
- #endif
-
- // Called only if _M_start._M_cur == _M_start._M_first.
+
+ // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -359,70 +344,46 @@ namespace std
{
value_type __t_copy = __t;
_M_reserve_map_at_front();
- *(_M_start._M_node - 1) = _M_allocate_node();
- try
- {
- _M_start._M_set_node(_M_start._M_node - 1);
- _M_start._M_cur = _M_start._M_last - 1;
- _Construct(_M_start._M_cur, __t_copy);
- }
- catch(...)
- {
- ++_M_start;
- _M_deallocate_node(*(_M_start._M_node - 1));
- __throw_exception_again;
- }
- }
-
- #ifdef _GLIBCPP_DEPRECATED
- // Called only if _M_start._M_cur == _M_start._M_first.
- template <typename _Tp, typename _Alloc>
- void
- deque<_Tp,_Alloc>::
- _M_push_front_aux()
- {
- _M_reserve_map_at_front();
- *(_M_start._M_node - 1) = _M_allocate_node();
+ *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
try
{
- _M_start._M_set_node(_M_start._M_node - 1);
- _M_start._M_cur = _M_start._M_last - 1;
- _Construct(_M_start._M_cur);
+ this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1);
+ this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
+ std::_Construct(this->_M_impl._M_start._M_cur, __t_copy);
}
catch(...)
{
- ++_M_start;
- _M_deallocate_node(*(_M_start._M_node - 1));
+ ++this->_M_impl._M_start;
+ _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
__throw_exception_again;
}
- }
- #endif
-
- // Called only if _M_finish._M_cur == _M_finish._M_first.
+ }
+
+ // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
template <typename _Tp, typename _Alloc>
void deque<_Tp,_Alloc>::
_M_pop_back_aux()
{
- _M_deallocate_node(_M_finish._M_first);
- _M_finish._M_set_node(_M_finish._M_node - 1);
- _M_finish._M_cur = _M_finish._M_last - 1;
- _Destroy(_M_finish._M_cur);
+ _M_deallocate_node(this->_M_impl._M_finish._M_first);
+ this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
+ std::_Destroy(this->_M_impl._M_finish._M_cur);
}
-
- // Called only if _M_start._M_cur == _M_start._M_last - 1. Note that
- // if the deque has at least one element (a precondition for this member
- // function), and if _M_start._M_cur == _M_start._M_last, then the deque
+
+ // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1. Note that
+ // if the deque has at least one element (a precondition for this member
+ // function), and if _M_impl._M_start._M_cur == _M_impl._M_start._M_last, then the deque
// must have at least two nodes.
template <typename _Tp, typename _Alloc>
void deque<_Tp,_Alloc>::
_M_pop_front_aux()
{
- _Destroy(_M_start._M_cur);
- _M_deallocate_node(_M_start._M_first);
- _M_start._M_set_node(_M_start._M_node + 1);
- _M_start._M_cur = _M_start._M_first;
- }
-
+ std::_Destroy(this->_M_impl._M_start._M_cur);
+ _M_deallocate_node(this->_M_impl._M_start._M_first);
+ this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
+ this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
+ }
+
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
@@ -430,10 +391,8 @@ namespace std
_M_range_insert_aux(iterator __pos,
_InputIterator __first, _InputIterator __last,
input_iterator_tag)
- {
- copy(__first, __last, inserter(*this, __pos));
- }
-
+ { std::copy(__first, __last, std::inserter(*this, __pos)); }
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -442,180 +401,149 @@ namespace std
_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag)
{
- size_type __n = distance(__first, __last);
- if (__pos._M_cur == _M_start._M_cur)
- {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- try
- {
- uninitialized_copy(__first, __last, __new_start);
- _M_start = __new_start;
- }
- catch(...)
- {
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
- __throw_exception_again;
- }
- }
- else if (__pos._M_cur == _M_finish._M_cur)
- {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- try
- {
- uninitialized_copy(__first, __last, _M_finish);
- _M_finish = __new_finish;
- }
- catch(...)
- {
- _M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
- __throw_exception_again;
- }
- }
+ size_type __n = std::distance(__first, __last);
+ if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ try
+ {
+ std::uninitialized_copy(__first, __last, __new_start);
+ this->_M_impl._M_start = __new_start;
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ try
+ {
+ std::uninitialized_copy(__first, __last, this->_M_impl._M_finish);
+ this->_M_impl._M_finish = __new_finish;
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
else
_M_insert_aux(__pos, __first, __last, __n);
}
-
+
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp,_Alloc>::
_M_insert_aux(iterator __pos, const value_type& __x)
{
- difference_type __index = __pos - _M_start;
+ difference_type __index = __pos - this->_M_impl._M_start;
value_type __x_copy = __x; // XXX copy
if (static_cast<size_type>(__index) < size() / 2)
- {
- push_front(front());
- iterator __front1 = _M_start;
- ++__front1;
- iterator __front2 = __front1;
- ++__front2;
- __pos = _M_start + __index;
- iterator __pos1 = __pos;
- ++__pos1;
- copy(__front2, __pos1, __front1);
- }
+ {
+ push_front(front());
+ iterator __front1 = this->_M_impl._M_start;
+ ++__front1;
+ iterator __front2 = __front1;
+ ++__front2;
+ __pos = this->_M_impl._M_start + __index;
+ iterator __pos1 = __pos;
+ ++__pos1;
+ std::copy(__front2, __pos1, __front1);
+ }
else
- {
- push_back(back());
- iterator __back1 = _M_finish;
- --__back1;
- iterator __back2 = __back1;
- --__back2;
- __pos = _M_start + __index;
- copy_backward(__pos, __back2, __back1);
- }
+ {
+ push_back(back());
+ iterator __back1 = this->_M_impl._M_finish;
+ --__back1;
+ iterator __back2 = __back1;
+ --__back2;
+ __pos = this->_M_impl._M_start + __index;
+ std::copy_backward(__pos, __back2, __back1);
+ }
*__pos = __x_copy;
return __pos;
}
-
- #ifdef _GLIBCPP_DEPRECATED
- // Nothing seems to actually use this. According to the pattern followed by
- // the rest of the SGI code, it would be called by the deprecated insert(pos)
- // function, but that has been replaced. We'll take our time removing this
- // anyhow; mark for 3.4. -pme
- template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
- deque<_Tp,_Alloc>::
- _M_insert_aux(iterator __pos)
- {
- difference_type __index = __pos - _M_start;
- if (static_cast<size_type>(__index) < size() / 2)
- {
- push_front(front());
- iterator __front1 = _M_start;
- ++__front1;
- iterator __front2 = __front1;
- ++__front2;
- __pos = _M_start + __index;
- iterator __pos1 = __pos;
- ++__pos1;
- copy(__front2, __pos1, __front1);
- }
- else
- {
- push_back(back());
- iterator __back1 = _M_finish;
- --__back1;
- iterator __back2 = __back1;
- --__back2;
- __pos = _M_start + __index;
- copy_backward(__pos, __back2, __back1);
- }
- *__pos = value_type();
- return __pos;
- }
- #endif
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
_M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
{
- const difference_type __elems_before = __pos - _M_start;
+ const difference_type __elems_before = __pos - this->_M_impl._M_start;
size_type __length = this->size();
value_type __x_copy = __x;
if (__elems_before < difference_type(__length / 2))
- {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- iterator __old_start = _M_start;
- __pos = _M_start + __elems_before;
- try
- {
- if (__elems_before >= difference_type(__n))
- {
- iterator __start_n = _M_start + difference_type(__n);
- uninitialized_copy(_M_start, __start_n, __new_start);
- _M_start = __new_start;
- copy(__start_n, __pos, __old_start);
- fill(__pos - difference_type(__n), __pos, __x_copy);
- }
- else
- {
- __uninitialized_copy_fill(_M_start, __pos, __new_start,
- _M_start, __x_copy);
- _M_start = __new_start;
- fill(__old_start, __pos, __x_copy);
- }
- }
- catch(...)
- {
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
- __throw_exception_again;
- }
- }
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_impl._M_start;
+ __pos = this->_M_impl._M_start + __elems_before;
+ try
+ {
+ if (__elems_before >= difference_type(__n))
+ {
+ iterator __start_n = this->_M_impl._M_start + difference_type(__n);
+ std::uninitialized_copy(this->_M_impl._M_start, __start_n,
+ __new_start);
+ this->_M_impl._M_start = __new_start;
+ std::copy(__start_n, __pos, __old_start);
+ fill(__pos - difference_type(__n), __pos, __x_copy);
+ }
+ else
+ {
+ std::__uninitialized_copy_fill(this->_M_impl._M_start, __pos,
+ __new_start,
+ this->_M_impl._M_start, __x_copy);
+ this->_M_impl._M_start = __new_start;
+ std::fill(__old_start, __pos, __x_copy);
+ }
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
else
- {
- iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = _M_finish;
- const difference_type __elems_after =
- difference_type(__length) - __elems_before;
- __pos = _M_finish - __elems_after;
- try
- {
- if (__elems_after > difference_type(__n))
- {
- iterator __finish_n = _M_finish - difference_type(__n);
- uninitialized_copy(__finish_n, _M_finish, _M_finish);
- _M_finish = __new_finish;
- copy_backward(__pos, __finish_n, __old_finish);
- fill(__pos, __pos + difference_type(__n), __x_copy);
- }
- else
- {
- __uninitialized_fill_copy(_M_finish, __pos + difference_type(__n),
- __x_copy, __pos, _M_finish);
- _M_finish = __new_finish;
- fill(__pos, __old_finish, __x_copy);
- }
- }
- catch(...)
- {
- _M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
- __throw_exception_again;
- }
- }
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_impl._M_finish;
+ const difference_type __elems_after =
+ difference_type(__length) - __elems_before;
+ __pos = this->_M_impl._M_finish - __elems_after;
+ try
+ {
+ if (__elems_after > difference_type(__n))
+ {
+ iterator __finish_n = this->_M_impl._M_finish - difference_type(__n);
+ std::uninitialized_copy(__finish_n, this->_M_impl._M_finish,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish = __new_finish;
+ std::copy_backward(__pos, __finish_n, __old_finish);
+ std::fill(__pos, __pos + difference_type(__n), __x_copy);
+ }
+ else
+ {
+ std::__uninitialized_fill_copy(this->_M_impl._M_finish,
+ __pos + difference_type(__n),
+ __x_copy, __pos,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish = __new_finish;
+ std::fill(__pos, __old_finish, __x_copy);
+ }
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -624,96 +552,101 @@ namespace std
_ForwardIterator __first, _ForwardIterator __last,
size_type __n)
{
- const difference_type __elemsbefore = __pos - _M_start;
+ const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
size_type __length = size();
if (static_cast<size_type>(__elemsbefore) < __length / 2)
- {
- iterator __new_start = _M_reserve_elements_at_front(__n);
- iterator __old_start = _M_start;
- __pos = _M_start + __elemsbefore;
- try
- {
- if (__elemsbefore >= difference_type(__n))
- {
- iterator __start_n = _M_start + difference_type(__n);
- uninitialized_copy(_M_start, __start_n, __new_start);
- _M_start = __new_start;
- copy(__start_n, __pos, __old_start);
- copy(__first, __last, __pos - difference_type(__n));
- }
- else
- {
- _ForwardIterator __mid = __first;
- advance(__mid, difference_type(__n) - __elemsbefore);
- __uninitialized_copy_copy(_M_start, __pos, __first, __mid,
- __new_start);
- _M_start = __new_start;
- copy(__mid, __last, __old_start);
- }
- }
- catch(...)
- {
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
- __throw_exception_again;
- }
- }
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_impl._M_start;
+ __pos = this->_M_impl._M_start + __elemsbefore;
+ try
+ {
+ if (__elemsbefore >= difference_type(__n))
+ {
+ iterator __start_n = this->_M_impl._M_start + difference_type(__n);
+ std::uninitialized_copy(this->_M_impl._M_start, __start_n,
+ __new_start);
+ this->_M_impl._M_start = __new_start;
+ std::copy(__start_n, __pos, __old_start);
+ std::copy(__first, __last, __pos - difference_type(__n));
+ }
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, difference_type(__n) - __elemsbefore);
+ std::__uninitialized_copy_copy(this->_M_impl._M_start, __pos,
+ __first, __mid, __new_start);
+ this->_M_impl._M_start = __new_start;
+ std::copy(__mid, __last, __old_start);
+ }
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
else
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
- iterator __old_finish = _M_finish;
- const difference_type __elemsafter =
+ iterator __old_finish = this->_M_impl._M_finish;
+ const difference_type __elemsafter =
difference_type(__length) - __elemsbefore;
- __pos = _M_finish - __elemsafter;
+ __pos = this->_M_impl._M_finish - __elemsafter;
try
{
if (__elemsafter > difference_type(__n))
- {
- iterator __finish_n = _M_finish - difference_type(__n);
- uninitialized_copy(__finish_n, _M_finish, _M_finish);
- _M_finish = __new_finish;
- copy_backward(__pos, __finish_n, __old_finish);
- copy(__first, __last, __pos);
- }
+ {
+ iterator __finish_n = this->_M_impl._M_finish - difference_type(__n);
+ std::uninitialized_copy(__finish_n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish = __new_finish;
+ std::copy_backward(__pos, __finish_n, __old_finish);
+ std::copy(__first, __last, __pos);
+ }
else
- {
- _ForwardIterator __mid = __first;
- advance(__mid, __elemsafter);
- __uninitialized_copy_copy(__mid, __last, __pos,
- _M_finish, _M_finish);
- _M_finish = __new_finish;
- copy(__first, __mid, __pos);
- }
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, __elemsafter);
+ std::__uninitialized_copy_copy(__mid, __last, __pos,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish = __new_finish;
+ std::copy(__first, __mid, __pos);
+ }
}
catch(...)
{
- _M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
__throw_exception_again;
}
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
_M_new_elements_at_front(size_type __new_elems)
{
size_type __new_nodes
- = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size();
+ = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size();
_M_reserve_map_at_front(__new_nodes);
size_type __i;
try
{
for (__i = 1; __i <= __new_nodes; ++__i)
- *(_M_start._M_node - __i) = _M_allocate_node();
+ *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
}
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
- _M_deallocate_node(*(_M_start._M_node - __j));
+ _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -726,54 +659,61 @@ namespace std
try
{
for (__i = 1; __i <= __new_nodes; ++__i)
- *(_M_finish._M_node + __i) = _M_allocate_node();
+ *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
}
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
- _M_deallocate_node(*(_M_finish._M_node + __j));
+ _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
_M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
{
- size_type __old_num_nodes = _M_finish._M_node - _M_start._M_node + 1;
+ size_type __old_num_nodes
+ = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
-
+
_Map_pointer __new_nstart;
- if (_M_map_size > 2 * __new_num_nodes)
- {
- __new_nstart = _M_map + (_M_map_size - __new_num_nodes) / 2
- + (__add_at_front ? __nodes_to_add : 0);
- if (__new_nstart < _M_start._M_node)
- copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart);
- else
- copy_backward(_M_start._M_node, _M_finish._M_node + 1,
- __new_nstart + __old_num_nodes);
- }
+ if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
+ {
+ __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
+ - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ if (__new_nstart < this->_M_impl._M_start._M_node)
+ std::copy(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart);
+ else
+ std::copy_backward(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart + __old_num_nodes);
+ }
else
- {
- size_type __new_map_size =
- _M_map_size + max(_M_map_size, __nodes_to_add) + 2;
-
- _Map_pointer __new_map = _M_allocate_map(__new_map_size);
- __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
- + (__add_at_front ? __nodes_to_add : 0);
- copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart);
- _M_deallocate_map(_M_map, _M_map_size);
-
- _M_map = __new_map;
- _M_map_size = __new_map_size;
- }
-
- _M_start._M_set_node(__new_nstart);
- _M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+ {
+ size_type __new_map_size = this->_M_impl._M_map_size
+ + std::max(this->_M_impl._M_map_size,
+ __nodes_to_add) + 2;
+
+ _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
+ __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ std::copy(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart);
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+
+ this->_M_impl._M_map = __new_map;
+ this->_M_impl._M_map_size = __new_map_size;
+ }
+
+ this->_M_impl._M_start._M_set_node(__new_nstart);
+ this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
}
-} // namespace std
-
-#endif /* __GLIBCPP_INTERNAL_DEQUE_TCC */
+} // namespace std
+#endif
diff --git a/contrib/libstdc++/include/bits/fstream.tcc b/contrib/libstdc++/include/bits/fstream.tcc
index c69ac9c..6c2e182 100644
--- a/contrib/libstdc++/include/bits/fstream.tcc
+++ b/contrib/libstdc++/include/bits/fstream.tcc
@@ -1,6 +1,6 @@
// File based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -32,8 +32,8 @@
// ISO C++ 14882: 27.8 File-based streams
//
-#ifndef _CPP_BITS_FSTREAM_TCC
-#define _CPP_BITS_FSTREAM_TCC 1
+#ifndef _FSTREAM_TCC
+#define _FSTREAM_TCC 1
#pragma GCC system_header
@@ -44,17 +44,15 @@ namespace std
basic_filebuf<_CharT, _Traits>::
_M_allocate_internal_buffer()
{
- if (!_M_buf && _M_buf_size_opt)
+ // Allocate internal buffer only if one doesn't already exist
+ // (either allocated or provided by the user via setbuf).
+ if (!_M_buf_allocated && !this->_M_buf)
{
- _M_buf_size = _M_buf_size_opt;
-
- // Allocate internal buffer.
- _M_buf = new char_type[_M_buf_size];
+ this->_M_buf = new char_type[this->_M_buf_size];
_M_buf_allocated = true;
}
}
- // Both close and setbuf need to deallocate internal buffers, if it exists.
template<typename _CharT, typename _Traits>
void
basic_filebuf<_CharT, _Traits>::
@@ -62,23 +60,33 @@ namespace std
{
if (_M_buf_allocated)
{
- delete [] _M_buf;
- _M_buf = NULL;
+ delete [] this->_M_buf;
+ this->_M_buf = NULL;
_M_buf_allocated = false;
- this->setg(NULL, NULL, NULL);
- this->setp(NULL, NULL);
}
+ delete [] _M_ext_buf;
+ _M_ext_buf = NULL;
+ _M_ext_buf_size = 0;
+ _M_ext_next = NULL;
+ _M_ext_end = NULL;
}
template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::
- basic_filebuf() : __streambuf_type(), _M_file(&_M_lock),
- _M_state_cur(__state_type()), _M_state_beg(__state_type()),
- _M_buf_allocated(false), _M_last_overflowed(false)
- { _M_buf_unified = true; }
+ basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
+ _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
+ _M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ),
+ _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(),
+ _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
+ _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
+ _M_ext_end(0)
+ {
+ if (has_facet<__codecvt_type>(this->_M_buf_locale))
+ _M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale);
+ }
template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+ typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
basic_filebuf<_CharT, _Traits>::
open(const char* __s, ios_base::openmode __mode)
{
@@ -89,27 +97,30 @@ namespace std
if (this->is_open())
{
_M_allocate_internal_buffer();
- _M_mode = __mode;
+ this->_M_mode = __mode;
- // Setup initial position of buffer.
- _M_set_indeterminate();
+ // Setup initial buffer to 'uncommitted' mode.
+ _M_reading = false;
+ _M_writing = false;
+ _M_set_buffer(-1);
- if ((__mode & ios_base::ate)
- && this->seekoff(0, ios_base::end, __mode) < 0)
- {
- // 27.8.1.3,4
- this->close();
- return __ret;
- }
+ // Reset to initial state.
+ _M_state_last = _M_state_cur = _M_state_beg;
- __ret = this;
+ // 27.8.1.3,4
+ if ((__mode & ios_base::ate)
+ && this->seekoff(0, ios_base::end, __mode)
+ == pos_type(off_type(-1)))
+ this->close();
+ else
+ __ret = this;
}
}
return __ret;
}
template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+ typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
basic_filebuf<_CharT, _Traits>::
close() throw()
{
@@ -119,31 +130,20 @@ namespace std
bool __testfail = false;
try
{
- const int_type __eof = traits_type::eof();
- bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
- if (__testput
- && traits_type::eq_int_type(_M_really_overflow(__eof),
- __eof))
+ if (!_M_terminate_output())
__testfail = true;
-
-#if 0
- // XXX not done
- if (_M_last_overflowed)
- {
- _M_output_unshift();
- _M_really_overflow(__eof);
- }
-#endif
}
catch(...)
- {
- __testfail = true;
- }
+ { __testfail = true; }
// NB: Do this here so that re-opened filebufs will be cool...
this->_M_mode = ios_base::openmode(0);
+ this->_M_pback_init = false;
_M_destroy_internal_buffer();
- _M_pback_destroy();
+ _M_reading = false;
+ _M_writing = false;
+ _M_set_buffer(-1);
+ _M_state_last = _M_state_cur = _M_state_beg;
if (!_M_file.close())
__testfail = true;
@@ -151,158 +151,311 @@ namespace std
if (!__testfail)
__ret = this;
}
- _M_last_overflowed = false;
return __ret;
}
template<typename _CharT, typename _Traits>
- streamsize
+ streamsize
basic_filebuf<_CharT, _Traits>::
showmanyc()
{
streamsize __ret = -1;
- bool __testin = _M_mode & ios_base::in;
- const locale __loc = this->getloc();
- const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc);
-
+ const bool __testin = this->_M_mode & ios_base::in;
if (__testin && this->is_open())
{
- __ret = _M_in_end - _M_in_cur;
- if (__cvt.always_noconv())
- __ret += _M_file.showmanyc_helper();
+ // For a stateful encoding (-1) the pending sequence might be just
+ // shift and unshift prefixes with no actual character.
+ __ret = this->egptr() - this->gptr();
+ if (__check_facet(_M_codecvt).encoding() >= 0)
+ __ret += _M_file.showmanyc() / _M_codecvt->max_length();
}
-
- _M_last_overflowed = false;
return __ret;
}
-
+
template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::int_type
+ typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>::
- pbackfail(int_type __i)
+ underflow()
{
int_type __ret = traits_type::eof();
- bool __testin = _M_mode & ios_base::in;
-
- if (__testin)
+ const bool __testin = this->_M_mode & ios_base::in;
+ if (__testin && !_M_writing)
{
- bool __testpb = _M_in_beg < _M_in_cur;
- char_type __c = traits_type::to_char_type(__i);
- bool __testeof = traits_type::eq_int_type(__i, __ret);
-
- if (__testpb)
+ // Check for pback madness, and if so swich back to the
+ // normal buffers and jet outta here before expensive
+ // fileops happen...
+ _M_destroy_pback();
+
+ if (this->gptr() < this->egptr())
+ return traits_type::to_int_type(*this->gptr());
+
+ // Get and convert input sequence.
+ const size_t __buflen = this->_M_buf_size > 1
+ ? this->_M_buf_size - 1 : 1;
+
+ // Will be set to true if ::read() returns 0 indicating EOF.
+ bool __got_eof = false;
+ // Number of internal characters produced.
+ streamsize __ilen = 0;
+ codecvt_base::result __r = codecvt_base::ok;
+ if (__check_facet(_M_codecvt).always_noconv())
{
- bool __testout = _M_mode & ios_base::out;
- bool __testeq = traits_type::eq(__c, this->gptr()[-1]);
-
- // Try to put back __c into input sequence in one of three ways.
- // Order these tests done in is unspecified by the standard.
- if (!__testeof && __testeq)
+ __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()),
+ __buflen);
+ if (__ilen == 0)
+ __got_eof = true;
+ }
+ else
+ {
+ // Worst-case number of external bytes.
+ // XXX Not done encoding() == -1.
+ const int __enc = _M_codecvt->encoding();
+ streamsize __blen; // Minimum buffer size.
+ streamsize __rlen; // Number of chars to read.
+ if (__enc > 0)
+ __blen = __rlen = __buflen * __enc;
+ else
{
- --_M_in_cur;
- if (__testout)
- --_M_out_cur;
- __ret = __i;
+ __blen = __buflen + _M_codecvt->max_length() - 1;
+ __rlen = __buflen;
}
- else if (__testeof)
+ const streamsize __remainder = _M_ext_end - _M_ext_next;
+ __rlen = __rlen > __remainder ? __rlen - __remainder : 0;
+
+ // An imbue in 'read' mode implies first converting the external
+ // chars already present.
+ if (_M_reading && this->egptr() == this->eback() && __remainder)
+ __rlen = 0;
+
+ // Allocate buffer if necessary and move unconverted
+ // bytes to front.
+ if (_M_ext_buf_size < __blen)
{
- --_M_in_cur;
- if (__testout)
- --_M_out_cur;
- __ret = traits_type::not_eof(__i);
+ char* __buf = new char[__blen];
+ if (__remainder)
+ std::memcpy(__buf, _M_ext_next, __remainder);
+
+ delete [] _M_ext_buf;
+ _M_ext_buf = __buf;
+ _M_ext_buf_size = __blen;
}
- else if (!__testeof)
+ else if (__remainder)
+ std::memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+ _M_ext_next = _M_ext_buf;
+ _M_ext_end = _M_ext_buf + __remainder;
+ _M_state_last = _M_state_cur;
+
+ do
{
- --_M_in_cur;
- if (__testout)
- --_M_out_cur;
- _M_pback_create();
- *_M_in_cur = __c;
- __ret = __i;
+ if (__rlen > 0)
+ {
+ // Sanity check!
+ // This may fail if the return value of
+ // codecvt::max_length() is bogus.
+ if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
+ {
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "codecvt::max_length() "
+ "is not valid"));
+ }
+ streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen);
+ if (__elen == 0)
+ __got_eof = true;
+ else if (__elen == -1)
+ break;
+ _M_ext_end += __elen;
+ }
+
+ char_type* __iend;
+ __r = _M_codecvt->in(_M_state_cur, _M_ext_next,
+ _M_ext_end, _M_ext_next, this->eback(),
+ this->eback() + __buflen, __iend);
+ if (__r == codecvt_base::noconv)
+ {
+ size_t __avail = _M_ext_end - _M_ext_buf;
+ __ilen = std::min(__avail, __buflen);
+ traits_type::copy(this->eback(),
+ reinterpret_cast<char_type*>(_M_ext_buf), __ilen);
+ _M_ext_next = _M_ext_buf + __ilen;
+ }
+ else
+ __ilen = __iend - this->eback();
+
+ // _M_codecvt->in may return error while __ilen > 0: this is
+ // ok, and actually occurs in case of mixed encodings (e.g.,
+ // XML files).
+ if (__r == codecvt_base::error)
+ break;
+
+ __rlen = 1;
}
+ while (__ilen == 0 && !__got_eof);
+ }
+
+ if (__ilen > 0)
+ {
+ _M_set_buffer(__ilen);
+ _M_reading = true;
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ else if (__got_eof)
+ {
+ // If the actual end of file is reached, set 'uncommitted'
+ // mode, thus allowing an immediate write without an
+ // intervening seek.
+ _M_set_buffer(-1);
+ _M_reading = false;
+ // However, reaching it while looping on partial means that
+ // the file has got an incomplete character.
+ if (__r == codecvt_base::partial)
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "incomplete character in file"));
+ }
+ else if (__r == codecvt_base::error)
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "invalid byte sequence in file"));
+ else
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "error reading the file"));
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::
+ pbackfail(int_type __i)
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = this->_M_mode & ios_base::in;
+ if (__testin && !_M_writing)
+ {
+ // Remember whether the pback buffer is active, otherwise below
+ // we may try to store in it a second char (libstdc++/9761).
+ const bool __testpb = this->_M_pback_init;
+ const bool __testeof = traits_type::eq_int_type(__i, __ret);
+ int_type __tmp;
+ if (this->eback() < this->gptr())
+ {
+ this->gbump(-1);
+ __tmp = traits_type::to_int_type(*this->gptr());
+ }
+ else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1)))
+ {
+ __tmp = this->underflow();
+ if (traits_type::eq_int_type(__tmp, __ret))
+ return __ret;
}
else
- {
- // At the beginning of the buffer, need to make a
- // putback position available.
- // But the seek may fail (f.i., at the beginning of
- // a file, see libstdc++/9439) and in that case
- // we return traits_type::eof()
- if (this->seekoff(-1, ios_base::cur) >= 0)
- {
- this->underflow();
- if (!__testeof)
- {
- if (!traits_type::eq(__c, *_M_in_cur))
- {
- _M_pback_create();
- *_M_in_cur = __c;
- }
- __ret = __i;
- }
- else
- __ret = traits_type::not_eof(__i);
- }
- }
+ {
+ // At the beginning of the buffer, need to make a
+ // putback position available. But the seek may fail
+ // (f.i., at the beginning of a file, see
+ // libstdc++/9439) and in that case we return
+ // traits_type::eof().
+ return __ret;
+ }
+
+ // Try to put back __i into input sequence in one of three ways.
+ // Order these tests done in is unspecified by the standard.
+ if (!__testeof && traits_type::eq_int_type(__i, __tmp))
+ __ret = __i;
+ else if (__testeof)
+ __ret = traits_type::not_eof(__i);
+ else if (!__testpb)
+ {
+ _M_create_pback();
+ _M_reading = true;
+ *this->gptr() = traits_type::to_char_type(__i);
+ __ret = __i;
+ }
}
- _M_last_overflowed = false;
return __ret;
}
template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::int_type
+ typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>::
overflow(int_type __c)
{
int_type __ret = traits_type::eof();
- bool __testput = _M_out_cur && _M_out_cur < _M_buf + _M_buf_size;
- bool __testout = _M_mode & ios_base::out;
-
- if (__testout)
+ const bool __testeof = traits_type::eq_int_type(__c, __ret);
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__testout && !_M_reading)
{
- if (traits_type::eq_int_type(__c, traits_type::eof()))
- __ret = traits_type::not_eof(__c);
- else if (__testput)
+ if (this->pbase() < this->pptr())
{
- *_M_out_cur = traits_type::to_char_type(__c);
- _M_out_cur_move(1);
+ // If appropriate, append the overflow char.
+ if (!__testeof)
+ {
+ *this->pptr() = traits_type::to_char_type(__c);
+ this->pbump(1);
+ }
+
+ // Convert pending sequence to external representation,
+ // and output.
+ if (_M_convert_to_external(this->pbase(),
+ this->pptr() - this->pbase())
+ && (!__testeof || !_M_file.sync()))
+ {
+ _M_set_buffer(0);
+ __ret = traits_type::not_eof(__c);
+ }
+ }
+ else if (this->_M_buf_size > 1)
+ {
+ // Overflow in 'uncommitted' mode: set _M_writing, set
+ // the buffer to the initial 'write' mode, and put __c
+ // into the buffer.
+ _M_set_buffer(0);
+ _M_writing = true;
+ if (!__testeof)
+ {
+ *this->pptr() = traits_type::to_char_type(__c);
+ this->pbump(1);
+ }
__ret = traits_type::not_eof(__c);
}
- else
- __ret = this->_M_really_overflow(__c);
+ else
+ {
+ // Unbuffered.
+ char_type __conv = traits_type::to_char_type(__c);
+ if (__testeof || _M_convert_to_external(&__conv, 1))
+ {
+ _M_writing = true;
+ __ret = traits_type::not_eof(__c);
+ }
+ }
}
-
- _M_last_overflowed = false; // Set in _M_really_overflow, below.
return __ret;
}
-
+
template<typename _CharT, typename _Traits>
- void
+ bool
basic_filebuf<_CharT, _Traits>::
- _M_convert_to_external(_CharT* __ibuf, streamsize __ilen,
- streamsize& __elen, streamsize& __plen)
+ _M_convert_to_external(_CharT* __ibuf, streamsize __ilen)
{
- const locale __loc = this->getloc();
- const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc);
-
- if (__cvt.always_noconv() && __ilen)
+ // Sizes of external and pending output.
+ streamsize __elen;
+ streamsize __plen;
+ if (__check_facet(_M_codecvt).always_noconv())
{
- __elen += _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
- __plen += __ilen;
+ __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
+ __plen = __ilen;
}
else
{
// Worst-case number of external bytes needed.
- int __ext_multiplier = __cvt.encoding();
- if (__ext_multiplier == -1 || __ext_multiplier == 0)
- __ext_multiplier = sizeof(char_type);
- streamsize __blen = __ilen * __ext_multiplier;
+ // XXX Not done encoding() == -1.
+ streamsize __blen = __ilen * _M_codecvt->max_length();
char* __buf = static_cast<char*>(__builtin_alloca(__blen));
+
char* __bend;
const char_type* __iend;
codecvt_base::result __r;
- __r = __cvt.out(_M_state_cur, __ibuf, __ibuf + __ilen,
- __iend, __buf, __buf + __blen, __bend);
+ __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen,
+ __iend, __buf, __buf + __blen, __bend);
if (__r == codecvt_base::ok || __r == codecvt_base::partial)
__blen = __bend - __buf;
@@ -313,225 +466,340 @@ namespace std
__blen = __ilen;
}
else
- {
- // Result == error
- __blen = 0;
- }
-
- if (__blen)
- {
- __elen += _M_file.xsputn(__buf, __blen);
- __plen += __blen;
- }
+ __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+ "conversion error"));
+
+ __elen = _M_file.xsputn(__buf, __blen);
+ __plen = __blen;
// Try once more for partial conversions.
- if (__r == codecvt_base::partial)
+ if (__r == codecvt_base::partial && __elen == __plen)
{
const char_type* __iresume = __iend;
- streamsize __rlen = _M_out_end - __iend;
- __r = __cvt.out(_M_state_cur, __iresume, __iresume + __rlen,
- __iend, __buf, __buf + __blen, __bend);
+ streamsize __rlen = this->pptr() - __iend;
+ __r = _M_codecvt->out(_M_state_cur, __iresume,
+ __iresume + __rlen, __iend, __buf,
+ __buf + __blen, __bend);
if (__r != codecvt_base::error)
{
__rlen = __bend - __buf;
- __elen += _M_file.xsputn(__buf, __rlen);
- __plen += __rlen;
+ __elen = _M_file.xsputn(__buf, __rlen);
+ __plen = __rlen;
}
+ else
+ __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+ "conversion error"));
}
}
+ return __elen == __plen;
}
- template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::int_type
- basic_filebuf<_CharT, _Traits>::
- _M_really_overflow(int_type __c)
- {
- int_type __ret = traits_type::eof();
- bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
- bool __testunbuffered = _M_file.is_open() && !_M_buf_size;
-
- if (__testput || __testunbuffered)
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_filebuf<_CharT, _Traits>::
+ xsputn(const _CharT* __s, streamsize __n)
+ {
+ // Optimization in the always_noconv() case, to be generalized in the
+ // future: when __n is sufficiently large we write directly instead of
+ // using the buffer.
+ streamsize __ret = 0;
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__testout && !_M_reading
+ && __check_facet(_M_codecvt).always_noconv())
{
- // Sizes of external and pending output.
- streamsize __elen = 0;
- streamsize __plen = 0;
-
- // Need to restore current position. The position of the external
- // byte sequence (_M_file) corresponds to _M_filepos, and we need
- // to move it to _M_out_beg for the write.
- if (_M_filepos && _M_filepos != _M_out_beg)
- {
- off_type __off = _M_out_beg - _M_filepos;
- _M_file.seekoff(__off, ios_base::cur);
- }
+ // Measurement would reveal the best choice.
+ const streamsize __chunk = 1ul << 10;
+ streamsize __bufavail = this->epptr() - this->pptr();
- // Convert internal buffer to external representation, output.
- // NB: In the unbuffered case, no internal buffer exists.
- if (!__testunbuffered)
- _M_convert_to_external(_M_out_beg, _M_out_end - _M_out_beg,
- __elen, __plen);
-
- // Checks for codecvt.out failures and _M_file.xsputn failures,
- // respectively, inside _M_convert_to_external.
- if (__testunbuffered || (__elen && __elen == __plen))
- {
- // Convert pending sequence to external representation, output.
- // If eof, then just attempt sync.
- if (!traits_type::eq_int_type(__c, traits_type::eof()))
+ // Don't mistake 'uncommitted' mode buffered with unbuffered.
+ if (!_M_writing && this->_M_buf_size > 1)
+ __bufavail = this->_M_buf_size - 1;
+
+ const streamsize __limit = std::min(__chunk, __bufavail);
+ if (__n >= __limit)
+ {
+ const streamsize __buffill = this->pptr() - this->pbase();
+ const char* __buf = reinterpret_cast<const char*>(this->pbase());
+ __ret = _M_file.xsputn_2(__buf, __buffill,
+ reinterpret_cast<const char*>(__s),
+ __n);
+ if (__ret == __buffill + __n)
{
- char_type __pending = traits_type::to_char_type(__c);
- _M_convert_to_external(&__pending, 1, __elen, __plen);
-
- // User code must flush when switching modes (thus
- // don't sync).
- if (__elen == __plen && __elen)
- {
- _M_set_indeterminate();
- __ret = traits_type::not_eof(__c);
- }
+ _M_set_buffer(0);
+ _M_writing = true;
}
- else if (!_M_file.sync())
- {
- _M_set_indeterminate();
- __ret = traits_type::not_eof(__c);
- }
- }
+ if (__ret > __buffill)
+ __ret -= __buffill;
+ else
+ __ret = 0;
+ }
+ else
+ __ret = __streambuf_type::xsputn(__s, __n);
}
- _M_last_overflowed = true;
- return __ret;
+ else
+ __ret = __streambuf_type::xsputn(__s, __n);
+ return __ret;
}
template<typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
+ typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
basic_filebuf<_CharT, _Traits>::
setbuf(char_type* __s, streamsize __n)
{
- if (!this->is_open() && __s == 0 && __n == 0)
- _M_buf_size_opt = 0;
- else if (__s && __n)
- {
- // This is implementation-defined behavior, and assumes
- // that an external char_type array of length (__s + __n)
- // exists and has been pre-allocated. If this is not the
- // case, things will quickly blow up.
- // Step 1: Destroy the current internal array.
- _M_destroy_internal_buffer();
-
- // Step 2: Use the external array.
- _M_buf = __s;
- _M_buf_size_opt = _M_buf_size = __n;
- _M_set_indeterminate();
- }
- _M_last_overflowed = false;
- return this;
+ if (!this->is_open())
+ if (__s == 0 && __n == 0)
+ this->_M_buf_size = 1;
+ else if (__s && __n > 0)
+ {
+ // This is implementation-defined behavior, and assumes that
+ // an external char_type array of length __n exists and has
+ // been pre-allocated. If this is not the case, things will
+ // quickly blow up. When __n > 1, __n - 1 positions will be
+ // used for the get area, __n - 1 for the put area and 1
+ // position to host the overflow char of a full put area.
+ // When __n == 1, 1 position will be used for the get area
+ // and 0 for the put area, as in the unbuffered case above.
+ this->_M_buf = __s;
+ this->_M_buf_size = __n;
+ }
+ return this;
}
-
+
+
+ // According to 27.8.1.4 p11 - 13, seekoff should ignore the last
+ // argument (of type openmode).
template<typename _CharT, typename _Traits>
typename basic_filebuf<_CharT, _Traits>::pos_type
basic_filebuf<_CharT, _Traits>::
- seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+ seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode)
{
- pos_type __ret = pos_type(off_type(-1));
- bool __testin = (ios_base::in & _M_mode & __mode) != 0;
- bool __testout = (ios_base::out & _M_mode & __mode) != 0;
-
int __width = 0;
- if (has_facet<__codecvt_type>(this->_M_buf_locale))
- __width = use_facet<__codecvt_type>(this->_M_buf_locale).encoding();
+ if (_M_codecvt)
+ __width = _M_codecvt->encoding();
if (__width < 0)
__width = 0;
- bool __testfail = __off != 0 && __width <= 0;
- if (this->is_open() && !__testfail && (__testin || __testout))
+ pos_type __ret = pos_type(off_type(-1));
+ const bool __testfail = __off != 0 && __width <= 0;
+ if (this->is_open() && !__testfail)
{
// Ditch any pback buffers to avoid confusion.
- _M_pback_destroy();
-
- if (__way != ios_base::cur || __off != 0)
- {
- off_type __computed_off = __width * __off;
-
- bool __testget = _M_in_cur && _M_in_beg < _M_in_end;
- bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
- // Sync the internal and external streams.
- // out
- if (__testput || _M_last_overflowed)
- {
- // Part one: update the output sequence.
- this->sync();
- // Part two: output unshift sequence.
- _M_output_unshift();
- }
- //in
- else if (__testget && __way == ios_base::cur)
- __computed_off += _M_in_cur - _M_filepos;
-
- // Return pos_type(off_type(-1)) in case of failure.
- __ret = _M_file.seekoff(__computed_off, __way, __mode);
- _M_set_indeterminate();
- }
- // NB: Need to do this in case _M_file in indeterminate
- // state, ie _M_file._offset == -1
- else
+ _M_destroy_pback();
+
+ // Correct state at destination. Note that this is the correct
+ // state for the current position during output, because
+ // codecvt::unshift() returns the state to the initial state.
+ // This is also the correct state at the end of the file because
+ // an unshift sequence should have been written at the end.
+ __state_type __state = _M_state_beg;
+ off_type __computed_off = __off * __width;
+ if (_M_reading && __way == ios_base::cur)
{
- pos_type __tmp =
- _M_file.seekoff(__off, ios_base::cur, __mode);
- if (__tmp >= 0)
+ if (_M_codecvt->always_noconv())
+ __computed_off += this->gptr() - this->egptr();
+ else
{
- // Seek successful.
- __ret = __tmp;
- __ret += max(_M_out_cur, _M_in_cur) - _M_filepos;
+ // Calculate offset from _M_ext_buf that corresponds
+ // to gptr(). Note: uses _M_state_last, which
+ // corresponds to eback().
+ const int __gptr_off =
+ _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+ this->gptr() - this->eback());
+ __computed_off += _M_ext_buf + __gptr_off - _M_ext_end;
+
+ // _M_state_last is modified by codecvt::length() so
+ // it now corresponds to gptr().
+ __state = _M_state_last;
}
}
+ __ret = _M_seek(__computed_off, __way, __state);
}
- _M_last_overflowed = false;
return __ret;
}
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 171. Strange seekpos() semantics due to joint position
+ // According to the resolution of DR 171, seekpos should ignore the last
+ // argument (of type openmode).
template<typename _CharT, typename _Traits>
typename basic_filebuf<_CharT, _Traits>::pos_type
basic_filebuf<_CharT, _Traits>::
- seekpos(pos_type __pos, ios_base::openmode __mode)
+ seekpos(pos_type __pos, ios_base::openmode)
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 171. Strange seekpos() semantics due to joint position
- return this->seekoff(off_type(__pos), ios_base::beg, __mode);
-#endif
+ pos_type __ret = pos_type(off_type(-1));
+ if (this->is_open())
+ {
+ // Ditch any pback buffers to avoid confusion.
+ _M_destroy_pback();
+ __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state());
+ }
+ return __ret;
}
template<typename _CharT, typename _Traits>
- void
+ typename basic_filebuf<_CharT, _Traits>::pos_type
basic_filebuf<_CharT, _Traits>::
- _M_output_unshift()
- { }
+ _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ if (_M_terminate_output())
+ {
+ // Returns pos_type(off_type(-1)) in case of failure.
+ __ret = pos_type(_M_file.seekoff(__off, __way));
+ _M_reading = false;
+ _M_writing = false;
+ _M_ext_next = _M_ext_end = _M_ext_buf;
+ _M_set_buffer(-1);
+ _M_state_cur = __state;
+ __ret.state(_M_state_cur);
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ bool
+ basic_filebuf<_CharT, _Traits>::
+ _M_terminate_output()
+ {
+ // Part one: update the output sequence.
+ bool __testvalid = true;
+ if (this->pbase() < this->pptr())
+ {
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __testvalid = false;
+ }
+
+ // Part two: output unshift sequence.
+ if (_M_writing && !__check_facet(_M_codecvt).always_noconv()
+ && __testvalid)
+ {
+ // Note: this value is arbitrary, since there is no way to
+ // get the length of the unshift sequence from codecvt,
+ // without calling unshift.
+ const size_t __blen = 128;
+ char __buf[__blen];
+ codecvt_base::result __r;
+ streamsize __ilen = 0;
+
+ do
+ {
+ char* __next;
+ __r = _M_codecvt->unshift(_M_state_cur, __buf,
+ __buf + __blen, __next);
+ if (__r == codecvt_base::error)
+ __testvalid = false;
+ else if (__r == codecvt_base::ok ||
+ __r == codecvt_base::partial)
+ {
+ __ilen = __next - __buf;
+ if (__ilen > 0)
+ {
+ const streamsize __elen = _M_file.xsputn(__buf, __ilen);
+ if (__elen != __ilen)
+ __testvalid = false;
+ }
+ }
+ }
+ while (__r == codecvt_base::partial && __ilen > 0 && __testvalid);
+
+ if (__testvalid)
+ {
+ // This second call to overflow() is required by the standard,
+ // but it's not clear why it's needed, since the output buffer
+ // should be empty by this point (it should have been emptied
+ // in the first call to overflow()).
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __testvalid = false;
+ }
+ }
+ return __testvalid;
+ }
+
+ template<typename _CharT, typename _Traits>
+ int
+ basic_filebuf<_CharT, _Traits>::
+ sync()
+ {
+ // Make sure that the internal buffer resyncs its idea of
+ // the file position with the external file.
+ // NB: _M_file.sync() will be called within.
+ int __ret = 0;
+ if (this->pbase() < this->pptr())
+ {
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __ret = -1;
+ }
+ return __ret;
+ }
template<typename _CharT, typename _Traits>
void
basic_filebuf<_CharT, _Traits>::
imbue(const locale& __loc)
{
- bool __testbeg = gptr() == eback() && pptr() == pbase();
+ bool __testvalid = true;
- if (__testbeg && _M_buf_locale != __loc)
- _M_buf_locale = __loc;
+ const __codecvt_type* _M_codecvt_tmp = 0;
+ if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))
+ _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);
- // NB this may require the reconversion of previously
- // converted chars. This in turn may cause the reconstruction
- // of the original file. YIKES!!
- // XXX The part in the above comment is not done.
- _M_last_overflowed = false;
+ if (this->is_open())
+ {
+ // encoding() == -1 is ok only at the beginning.
+ if ((_M_reading || _M_writing)
+ && __check_facet(_M_codecvt).encoding() == -1)
+ __testvalid = false;
+ else
+ {
+ if (_M_reading)
+ {
+ if (__check_facet(_M_codecvt).always_noconv())
+ {
+ if (_M_codecvt_tmp
+ && !__check_facet(_M_codecvt_tmp).always_noconv())
+ __testvalid = this->seekoff(0, ios_base::cur, this->_M_mode)
+ != pos_type(off_type(-1));
+ }
+ else
+ {
+ // External position corresponding to gptr().
+ _M_ext_next = _M_ext_buf
+ + _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+ this->gptr() - this->eback());
+ const streamsize __remainder = _M_ext_end - _M_ext_next;
+ if (__remainder)
+ std::memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+ _M_ext_next = _M_ext_buf;
+ _M_ext_end = _M_ext_buf + __remainder;
+ _M_set_buffer(-1);
+ _M_state_last = _M_state_cur = _M_state_beg;
+ }
+ }
+ else if (_M_writing && (__testvalid = _M_terminate_output()))
+ _M_set_buffer(-1);
+ }
+ }
+
+ if (__testvalid)
+ _M_codecvt = _M_codecvt_tmp;
+ else
+ _M_codecvt = 0;
}
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_filebuf<char>;
extern template class basic_ifstream<char>;
extern template class basic_ofstream<char>;
extern template class basic_fstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_filebuf<wchar_t>;
extern template class basic_ifstream<wchar_t>;
extern template class basic_ofstream<wchar_t>;
@@ -540,4 +808,4 @@ namespace std
#endif
} // namespace std
-#endif
+#endif
diff --git a/contrib/libstdc++/include/bits/functexcept.h b/contrib/libstdc++/include/bits/functexcept.h
index eac2c95..8b1d16c 100644
--- a/contrib/libstdc++/include/bits/functexcept.h
+++ b/contrib/libstdc++/include/bits/functexcept.h
@@ -35,22 +35,22 @@
namespace std
{
- // Helper for exception objects in <except>
+ // Helper for exception objects in <except>
void
__throw_bad_exception(void);
- // Helper for exception objects in <new>
+ // Helper for exception objects in <new>
void
__throw_bad_alloc(void);
- // Helper for exception objects in <typeinfo>
+ // Helper for exception objects in <typeinfo>
void
__throw_bad_cast(void);
void
__throw_bad_typeid(void);
- // Helpers for exception objects in <stdexcept>
+ // Helpers for exception objects in <stdexcept>
void
__throw_logic_error(const char* __s);
diff --git a/contrib/libstdc++/include/bits/gslice.h b/contrib/libstdc++/include/bits/gslice.h
index 95781f9..78f8a67 100644
--- a/contrib/libstdc++/include/bits/gslice.h
+++ b/contrib/libstdc++/include/bits/gslice.h
@@ -1,6 +1,7 @@
// The template and inlines for the -*- C++ -*- gslice class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,61 +35,101 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_GSLICE_H
-#define _CPP_BITS_GSLICE_H 1
+#ifndef _GSLICE_H
+#define _GSLICE_H 1
#pragma GCC system_header
namespace std {
-
+
+ /**
+ * @brief Class defining multi-dimensional subset of an array.
+ *
+ * The slice class represents a multi-dimensional subset of an array,
+ * specified by three parameter sets: start offset, size array, and stride
+ * array. The start offset is the index of the first element of the array
+ * that is part of the subset. The size and stride array describe each
+ * dimension of the slice. Size is the number of elements in that
+ * dimension, and stride is the distance in the array between successive
+ * elements in that dimension. Each dimension's size and stride is taken
+ * to begin at an array element described by the previous dimension. The
+ * size array and stride array must be the same size.
+ *
+ * For example, if you have offset==3, stride[0]==11, size[1]==3,
+ * stride[1]==3, then slice[0,0]==array[3], slice[0,1]==array[6],
+ * slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17],
+ * slice[1,2]==array[20].
+ */
class gslice
{
public:
- gslice ();
- gslice (size_t, const valarray<size_t>&, const valarray<size_t>&);
- // XXX: the IS says the copy-ctor and copy-assignment operators are
- // synthetized by the compiler but they are just unsuitable
- // for a ref-counted semantic
- gslice(const gslice&);
- ~gslice();
-
- // XXX: See the note above.
- gslice& operator= (const gslice&);
-
- size_t start () const;
- valarray<size_t> size () const;
- valarray<size_t> stride () const;
-
+ /// Construct an empty slice.
+ gslice ();
+
+ /**
+ * @brief Construct a slice.
+ *
+ * Constructs a slice with as many dimensions as the length of the @a l
+ * and @a s arrays.
+ *
+ * @param o Offset in array of first element.
+ * @param l Array of dimension lengths.
+ * @param s Array of dimension strides between array elements.
+ */
+ gslice(size_t, const valarray<size_t>&, const valarray<size_t>&);
+
+ // XXX: the IS says the copy-ctor and copy-assignment operators are
+ // synthetized by the compiler but they are just unsuitable
+ // for a ref-counted semantic
+ /// Copy constructor.
+ gslice(const gslice&);
+
+ /// Destructor.
+ ~gslice();
+
+ // XXX: See the note above.
+ /// Assignment operator.
+ gslice& operator=(const gslice&);
+
+ /// Return array offset of first slice element.
+ size_t start() const;
+
+ /// Return array of sizes of slice dimensions.
+ valarray<size_t> size() const;
+
+ /// Return array of array strides for each dimension.
+ valarray<size_t> stride() const;
+
private:
- struct _Indexer {
- size_t _M_count;
- size_t _M_start;
- valarray<size_t> _M_size;
- valarray<size_t> _M_stride;
- valarray<size_t> _M_index;
- _Indexer(size_t, const valarray<size_t>&,
- const valarray<size_t>&);
- void _M_increment_use() { ++_M_count; }
- size_t _M_decrement_use() { return --_M_count; }
- };
-
- _Indexer* _M_index;
-
- template<typename _Tp> friend class valarray;
+ struct _Indexer {
+ size_t _M_count;
+ size_t _M_start;
+ valarray<size_t> _M_size;
+ valarray<size_t> _M_stride;
+ valarray<size_t> _M_index; // Linear array of referenced indices
+ _Indexer(size_t, const valarray<size_t>&,
+ const valarray<size_t>&);
+ void _M_increment_use() { ++_M_count; }
+ size_t _M_decrement_use() { return --_M_count; }
+ };
+
+ _Indexer* _M_index;
+
+ template<typename _Tp> friend class valarray;
};
-
+
inline size_t
gslice::start () const
{ return _M_index ? _M_index->_M_start : 0; }
-
+
inline valarray<size_t>
gslice::size () const
{ return _M_index ? _M_index->_M_size : valarray<size_t>(); }
-
+
inline valarray<size_t>
gslice::stride () const
{ return _M_index ? _M_index->_M_stride : valarray<size_t>(); }
-
+
inline gslice::gslice () : _M_index(0) {}
inline
@@ -99,7 +140,7 @@ namespace std {
inline
gslice::gslice(const gslice& __g) : _M_index(__g._M_index)
{ if (_M_index) _M_index->_M_increment_use(); }
-
+
inline
gslice::~gslice()
{ if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; }
@@ -112,12 +153,12 @@ namespace std {
_M_index = __g._M_index;
return *this;
}
-
-
+
+
} // std::
-#endif /* _CPP_BITS_GSLICE_H */
+#endif /* _GSLICE_H */
// Local Variables:
// mode:c++
diff --git a/contrib/libstdc++/include/bits/gslice_array.h b/contrib/libstdc++/include/bits/gslice_array.h
index 1116e9c..7e2e684 100644
--- a/contrib/libstdc++/include/bits/gslice_array.h
+++ b/contrib/libstdc++/include/bits/gslice_array.h
@@ -1,6 +1,7 @@
// The template and inlines for the -*- C++ -*- gslice_array class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,30 +35,65 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_GSLICE_ARRAY
-#define _CPP_BITS_GSLICE_ARRAY 1
+#ifndef _GSLICE_ARRAY_H
+#define _GSLICE_ARRAY_H 1
#pragma GCC system_header
namespace std {
+ /**
+ * @brief Reference to multi-dimensional subset of an array.
+ *
+ * A gslice_array is a reference to the actual elements of an array
+ * specified by a gslice. The way to get a gslice_array is to call
+ * operator[](gslice) on a valarray. The returned gslice_array then
+ * permits carrying operations out on the referenced subset of elements in
+ * the original valarray. For example, operator+=(valarray) will add
+ * values to the subset of elements in the underlying valarray this
+ * gslice_array refers to.
+ *
+ * @param Tp Element type.
+ */
template<typename _Tp>
class gslice_array
{
public:
typedef _Tp value_type;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ gslice_array(const gslice_array&);
+
+ /// Assignment operator. Assigns slice elements to corresponding
+ /// elements of @a a.
+ gslice_array& operator=(const gslice_array&);
+
+ /// Assign slice elements to corresponding elements of @a v.
void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
void operator=(const _Tp&) const;
template<class _Dom>
@@ -82,50 +118,56 @@ namespace std {
void operator<<=(const _Expr<_Dom,_Tp>&) const;
template<class _Dom>
void operator>>=(const _Expr<_Dom,_Tp>&) const;
-
+
private:
_Array<_Tp> _M_array;
const valarray<size_t>& _M_index;
-
+
friend class valarray<_Tp>;
-
- gslice_array(_Array<_Tp>, const valarray<size_t>&);
- // this constructor needs to be implemented.
- gslice_array(const gslice_array&);
+ gslice_array(_Array<_Tp>, const valarray<size_t>&);
// not implemented
gslice_array();
- gslice_array& operator= (const gslice_array&);
};
template<typename _Tp>
inline
gslice_array<_Tp>::gslice_array(_Array<_Tp> __a,
const valarray<size_t>& __i)
- : _M_array(__a), _M_index(__i) {}
+ : _M_array(__a), _M_index(__i) {}
template<typename _Tp>
inline
gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a)
- : _M_array(__a._M_array), _M_index(__a._M_index) {}
+ : _M_array(__a._M_array), _M_index(__a._M_index) {}
+
+
+ template<typename _Tp>
+ inline gslice_array<_Tp>&
+ gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a)
+ {
+ std::__valarray_copy(_Array<_Tp>(__a._M_array),
+ _Array<size_t>(__a._M_index), _M_index.size(),
+ _M_array, _Array<size_t>(_M_index));
+ return *this;
+ }
-
template<typename _Tp>
inline void
gslice_array<_Tp>::operator=(const _Tp& __t) const
- {
- __valarray_fill(_M_array, _Array<size_t>(_M_index),
- _M_index.size(), __t);
+ {
+ std::__valarray_fill(_M_array, _Array<size_t>(_M_index),
+ _M_index.size(), __t);
}
template<typename _Tp>
inline void
gslice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
{
- __valarray_copy(_Array<_Tp>(__v), __v.size(),
- _M_array, _Array<size_t>(_M_index));
+ std::__valarray_copy(_Array<_Tp>(__v), __v.size(),
+ _M_array, _Array<size_t>(_M_index));
}
template<typename _Tp>
@@ -133,8 +175,8 @@ namespace std {
inline void
gslice_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
{
- __valarray_copy (__e, _M_index.size(), _M_array,
- _Array<size_t>(_M_index));
+ std::__valarray_copy (__e, _M_index.size(), _M_array,
+ _Array<size_t>(_M_index));
}
#undef _DEFINE_VALARRAY_OPERATOR
@@ -148,8 +190,8 @@ namespace std {
} \
\
template<typename _Tp> \
- template<class _Dom> \
- inline void \
+ template<class _Dom> \
+ inline void \
gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
{ \
_Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
@@ -157,9 +199,9 @@ namespace std {
}
_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
-_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
_DEFINE_VALARRAY_OPERATOR(%, __modulus)
-_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
_DEFINE_VALARRAY_OPERATOR(-, __minus)
_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
@@ -171,7 +213,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
} // std::
-#endif /* _CPP_BITS_GSLICE_ARRAY */
+#endif /* _GSLICE_ARRAY_H */
// Local Variables:
// mode:c++
diff --git a/contrib/libstdc++/include/bits/indirect_array.h b/contrib/libstdc++/include/bits/indirect_array.h
index 9fc973e..912f522 100644
--- a/contrib/libstdc++/include/bits/indirect_array.h
+++ b/contrib/libstdc++/include/bits/indirect_array.h
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- indirect_array class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,90 +35,124 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_INDIRECT_ARRAY_H
-#define _CPP_BITS_INDIRECT_ARRAY_H 1
+#ifndef _INDIRECT_ARRAY_H
+#define _INDIRECT_ARRAY_H 1
#pragma GCC system_header
namespace std
{
+ /**
+ * @brief Reference to arbitrary subset of an array.
+ *
+ * An indirect_array is a reference to the actual elements of an array
+ * specified by an ordered array of indices. The way to get an indirect_array is to
+ * call operator[](valarray<size_t>) on a valarray. The returned
+ * indirect_array then permits carrying operations out on the referenced
+ * subset of elements in the original valarray.
+ *
+ * For example, if an indirect_array is obtained using the array (4,2,0) as
+ * an argument, and then assigned to an array containing (1,2,3), then the
+ * underlying array will have array[0]==3, array[2]==2, and array[4]==1.
+ *
+ * @param Tp Element type.
+ */
template <class _Tp>
- class indirect_array
- {
- public:
- typedef _Tp value_type;
-
- // XXX: This is a proposed resolution for DR-253.
- indirect_array& operator=(const indirect_array&);
-
- void operator=(const valarray<_Tp>&) const;
- void operator*=(const valarray<_Tp>&) const;
- void operator/=(const valarray<_Tp>&) const;
- void operator%=(const valarray<_Tp>&) const;
- void operator+=(const valarray<_Tp>&) const;
- void operator-=(const valarray<_Tp>&) const;
- void operator^=(const valarray<_Tp>&) const;
- void operator&=(const valarray<_Tp>&) const;
- void operator|=(const valarray<_Tp>&) const;
- void operator<<=(const valarray<_Tp>&) const;
- void operator>>=(const valarray<_Tp>&) const;
- void operator= (const _Tp&) const;
- // ~indirect_array();
-
- template<class _Dom>
- void operator=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator*=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator/=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator%=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator+=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator-=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator^=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator&=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator|=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator<<=(const _Expr<_Dom, _Tp>&) const;
- template<class _Dom>
- void operator>>=(const _Expr<_Dom, _Tp>&) const;
-
- private:
- indirect_array(const indirect_array&);
- indirect_array(_Array<_Tp>, size_t, _Array<size_t>);
-
- friend class valarray<_Tp>;
- friend class gslice_array<_Tp>;
-
- const size_t _M_sz;
- const _Array<size_t> _M_index;
- const _Array<_Tp> _M_array;
-
- // not implemented
- indirect_array();
- };
+ class indirect_array
+ {
+ public:
+ typedef _Tp value_type;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ indirect_array(const indirect_array&);
+
+ /// Assignment operator. Assigns elements to corresponding elements
+ /// of @a a.
+ indirect_array& operator=(const indirect_array&);
+
+ /// Assign slice elements to corresponding elements of @a v.
+ void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
+ void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
+ void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
+ void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
+ void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
+ void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
+ void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
+ void operator= (const _Tp&) const;
+ // ~indirect_array();
+
+ template<class _Dom>
+ void operator=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator*=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator/=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator%=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator+=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator-=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator^=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator&=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator|=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator<<=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+ private:
+ /// Copy constructor. Both slices refer to the same underlying array.
+ indirect_array(_Array<_Tp>, size_t, _Array<size_t>);
+
+ friend class valarray<_Tp>;
+ friend class gslice_array<_Tp>;
+
+ const size_t _M_sz;
+ const _Array<size_t> _M_index;
+ const _Array<_Tp> _M_array;
+
+ // not implemented
+ indirect_array();
+ };
template<typename _Tp>
- inline
+ inline
indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
- : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {}
+ : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {}
template<typename _Tp>
inline
- indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s,
+ indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s,
_Array<size_t> __i)
- : _M_sz(__s), _M_index(__i), _M_array(__a) {}
+ : _M_sz(__s), _M_index(__i), _M_array(__a) {}
template<typename _Tp>
inline indirect_array<_Tp>&
indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a)
{
- __valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array, _M_index);
+ std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array, _M_index);
return *this;
}
@@ -126,18 +160,18 @@ namespace std
template<typename _Tp>
inline void
indirect_array<_Tp>::operator=(const _Tp& __t) const
- { __valarray_fill(_M_array, _M_index, _M_sz, __t); }
+ { std::__valarray_fill(_M_array, _M_index, _M_sz, __t); }
template<typename _Tp>
inline void
indirect_array<_Tp>::operator=(const valarray<_Tp>& __v) const
- { __valarray_copy(_Array<_Tp>(__v), _M_sz, _M_array, _M_index); }
+ { std::__valarray_copy(_Array<_Tp>(__v), _M_sz, _M_array, _M_index); }
template<typename _Tp>
template<class _Dom>
inline void
indirect_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
- { __valarray_copy(__e, _M_sz, _M_array, _M_index); }
+ { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); }
#undef _DEFINE_VALARRAY_OPERATOR
#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
@@ -171,7 +205,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
} // std::
-#endif /* _CPP_BITS_INDIRECT_ARRAY_H */
+#endif /* _INDIRECT_ARRAY_H */
// Local Variables:
// mode:c++
diff --git a/contrib/libstdc++/include/bits/ios_base.h b/contrib/libstdc++/include/bits/ios_base.h
index 3437f84..694785d 100644
--- a/contrib/libstdc++/include/bits/ios_base.h
+++ b/contrib/libstdc++/include/bits/ios_base.h
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -29,7 +29,7 @@
// the GNU General Public License.
//
-// ISO C++ 14882: 27.8 File-based streams
+// ISO C++ 14882: 27.4 Iostreams base classes
//
/** @file ios_base.h
@@ -37,8 +37,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_IOSBASE_H
-#define _CPP_BITS_IOSBASE_H 1
+#ifndef _IOS_BASE_H
+#define _IOS_BASE_H 1
#pragma GCC system_header
@@ -52,99 +52,99 @@ namespace std
// as permitted (but not required) in the standard, in order to provide
// better type safety in iostream calls. A side effect is that
// expressions involving them are no longer compile-time constants.
- enum _Ios_Fmtflags { _M_ios_fmtflags_end = 1L << 16 };
+ enum _Ios_Fmtflags { _S_ios_fmtflags_end = 1L << 16 };
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a | __b; }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a & __b; }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a ^ __b; }
- inline _Ios_Fmtflags
+ inline _Ios_Fmtflags
operator~(_Ios_Fmtflags __a)
{ return _Ios_Fmtflags(~static_cast<int>(__a)); }
- enum _Ios_Openmode { _M_ios_openmode_end = 1L << 16 };
+ enum _Ios_Openmode { _S_ios_openmode_end = 1L << 16 };
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator&(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator|(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator^(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a | __b; }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a & __b; }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a ^ __b; }
- inline _Ios_Openmode
+ inline _Ios_Openmode
operator~(_Ios_Openmode __a)
{ return _Ios_Openmode(~static_cast<int>(__a)); }
- enum _Ios_Iostate { _M_ios_iostate_end = 1L << 16 };
+ enum _Ios_Iostate { _S_ios_iostate_end = 1L << 16 };
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator&(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator|(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator^(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a | __b; }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a & __b; }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a ^ __b; }
- inline _Ios_Iostate
+ inline _Ios_Iostate
operator~(_Ios_Iostate __a)
{ return _Ios_Iostate(~static_cast<int>(__a)); }
- enum _Ios_Seekdir { _M_ios_seekdir_end = 1L << 16 };
+ enum _Ios_Seekdir { _S_ios_seekdir_end = 1L << 16 };
// 27.4.2 Class ios_base
/**
@@ -158,29 +158,27 @@ namespace std
class ios_base
{
public:
-
+
// 27.4.2.1.1 Class ios_base::failure
/// These are thrown to indicate problems. Doc me.
class failure : public exception
{
public:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //48. Use of non-existent exception constructor
- explicit
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 48. Use of non-existent exception constructor
+ explicit
failure(const string& __str) throw();
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
- virtual
+ virtual
~failure() throw();
virtual const char*
what() const throw();
-
+
private:
- enum { _M_bufsize = 256 };
- char _M_name[_M_bufsize];
-#endif
+ string _M_msg;
};
// 27.4.2.1.2 Type ios_base::fmtflags
@@ -210,47 +208,65 @@ namespace std
* - floatfield
*/
typedef _Ios_Fmtflags fmtflags;
+
/// Insert/extract @c bool in alphabetic rather than numeric format.
static const fmtflags boolalpha = fmtflags(__ios_flags::_S_boolalpha);
+
/// Converts integer input or generates integer output in decimal base.
static const fmtflags dec = fmtflags(__ios_flags::_S_dec);
+
/// Generate floating-point output in fixed-point notation.
static const fmtflags fixed = fmtflags(__ios_flags::_S_fixed);
+
/// Converts integer input or generates integer output in hexadecimal base.
static const fmtflags hex = fmtflags(__ios_flags::_S_hex);
+
/// Adds fill characters at a designated internal point in certain
/// generated output, or identical to @c right if no such point is
/// designated.
static const fmtflags internal = fmtflags(__ios_flags::_S_internal);
+
/// Adds fill characters on the right (final positions) of certain
/// generated output. (I.e., the thing you print is flush left.)
static const fmtflags left = fmtflags(__ios_flags::_S_left);
+
/// Converts integer input or generates integer output in octal base.
static const fmtflags oct = fmtflags(__ios_flags::_S_oct);
+
/// Adds fill characters on the left (initial positions) of certain
/// generated output. (I.e., the thing you print is flush right.)
static const fmtflags right = fmtflags(__ios_flags::_S_right);
+
/// Generates floating-point output in scientific notation.
static const fmtflags scientific = fmtflags(__ios_flags::_S_scientific);
+
/// Generates a prefix indicating the numeric base of generated integer
/// output.
static const fmtflags showbase = fmtflags(__ios_flags::_S_showbase);
+
/// Generates a decimal-point character unconditionally in generated
/// floating-point output.
static const fmtflags showpoint = fmtflags(__ios_flags::_S_showpoint);
+
/// Generates a + sign in non-negative generated numeric output.
static const fmtflags showpos = fmtflags(__ios_flags::_S_showpos);
+
/// Skips leading white space before certain input operations.
static const fmtflags skipws = fmtflags(__ios_flags::_S_skipws);
+
/// Flushes output after each output operation.
static const fmtflags unitbuf = fmtflags(__ios_flags::_S_unitbuf);
+
/// Replaces certain lowercase letters with their uppercase equivalents
/// in generated output.
static const fmtflags uppercase = fmtflags(__ios_flags::_S_uppercase);
+
/// A mask of left|right|internal. Useful for the 2-arg form of @c setf.
static const fmtflags adjustfield = fmtflags(__ios_flags::_S_adjustfield);
+
/// A mask of dec|oct|hex. Useful for the 2-arg form of @c setf.
static const fmtflags basefield = fmtflags(__ios_flags::_S_basefield);
+
/// A mask of scientific|fixed. Useful for the 2-arg form of @c setf.
static const fmtflags floatfield = fmtflags(__ios_flags::_S_floatfield);
@@ -267,17 +283,21 @@ namespace std
* - goodbit
*/
typedef _Ios_Iostate iostate;
+
/// Indicates a loss of integrity in an input or output sequence (such
/// as an irrecoverable read error from a file).
- static const iostate badbit = iostate(__ios_flags::_S_badbit);
+ static const iostate badbit = iostate(__ios_flags::_S_badbit);
+
/// Indicates that an input operation reached the end of an input sequence.
- static const iostate eofbit = iostate(__ios_flags::_S_eofbit);
+ static const iostate eofbit = iostate(__ios_flags::_S_eofbit);
+
/// Indicates that an input operation failed to read the expected
/// characters, or that an output operation failed to generate the
/// desired characters.
- static const iostate failbit = iostate(__ios_flags::_S_failbit);
+ static const iostate failbit = iostate(__ios_flags::_S_failbit);
+
/// Indicates all is well.
- static const iostate goodbit = iostate(0);
+ static const iostate goodbit = iostate(0);
// 27.4.2.1.4 Type ios_base::openmode
/**
@@ -294,21 +314,27 @@ namespace std
* - trunc
*/
typedef _Ios_Openmode openmode;
+
/// Seek to end before each write.
- static const openmode app = openmode(__ios_flags::_S_app);
+ static const openmode app = openmode(__ios_flags::_S_app);
+
/// Open and seek to end immediately after opening.
- static const openmode ate = openmode(__ios_flags::_S_ate);
+ static const openmode ate = openmode(__ios_flags::_S_ate);
+
/// Perform input and output in binary mode (as opposed to text mode).
/// This is probably not what you think it is; see
/// http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#3 and
/// http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#7 for more.
- static const openmode binary = openmode(__ios_flags::_S_bin);
+ static const openmode binary = openmode(__ios_flags::_S_bin);
+
/// Open for input. Default for @c ifstream and fstream.
- static const openmode in = openmode(__ios_flags::_S_in);
+ static const openmode in = openmode(__ios_flags::_S_in);
+
/// Open for output. Default for @c ofstream and fstream.
- static const openmode out = openmode(__ios_flags::_S_out);
+ static const openmode out = openmode(__ios_flags::_S_out);
+
/// Open for input. Default for @c ofstream.
- static const openmode trunc = openmode(__ios_flags::_S_trunc);
+ static const openmode trunc = openmode(__ios_flags::_S_trunc);
// 27.4.2.1.5 Type ios_base::seekdir
/**
@@ -321,26 +347,32 @@ namespace std
* - end, equivalent to @c SEEK_END in the C standard library.
*/
typedef _Ios_Seekdir seekdir;
+
/// Request a seek relative to the beginning of the stream.
- static const seekdir beg = seekdir(0);
+ static const seekdir beg = seekdir(0);
+
/// Request a seek relative to the current position within the sequence.
- static const seekdir cur = seekdir(SEEK_CUR);
+ static const seekdir cur = seekdir(SEEK_CUR);
+
/// Request a seek relative to the current end of the sequence.
- static const seekdir end = seekdir(SEEK_END);
+ static const seekdir end = seekdir(SEEK_END);
-#ifdef _GLIBCPP_DEPRECATED
+#ifdef _GLIBCXX_DEPRECATED
// Annex D.6
typedef int io_state;
typedef int open_mode;
typedef int seek_dir;
-
+
typedef std::streampos streampos;
typedef std::streamoff streamoff;
#endif
// Callbacks;
/**
- * @doctodo
+ * @brief The set of events that may be passed to an event callback.
+ *
+ * erase_event is used during ~ios() and copyfmt(). imbue_event is used
+ * during imbue(). copyfmt_event is used during copyfmt().
*/
enum event
{
@@ -350,14 +382,28 @@ namespace std
};
/**
- * @doctodo
+ * @brief The type of an event callback function.
+ * @param event One of the members of the event enum.
+ * @param ios_base Reference to the ios_base object.
+ * @param int The integer provided when the callback was registered.
+ *
+ * Event callbacks are user defined functions that get called during
+ * several ios_base and basic_ios functions, specifically imbue(),
+ * copyfmt(), and ~ios().
*/
typedef void (*event_callback) (event, ios_base&, int);
/**
- * @doctodo
+ * @brief Add the callback __fn with parameter __index.
+ * @param __fn The function to add.
+ * @param __index The integer to pass to the function when invoked.
+ *
+ * Registers a function as an event callback with an integer parameter to
+ * be passed to the function when invoked. Multiple copies of the
+ * function are allowed. If there are multiple callbacks, they are
+ * invoked in the order they were registered.
*/
- void
+ void
register_callback(event_callback __fn, int __index);
protected:
@@ -367,11 +413,11 @@ namespace std
* ios_base data members (doc me)
* @endif
*/
- streamsize _M_precision;
- streamsize _M_width;
- fmtflags _M_flags;
- iostate _M_exception;
- iostate _M_streambuf_state;
+ streamsize _M_precision;
+ streamsize _M_width;
+ fmtflags _M_flags;
+ iostate _M_exception;
+ iostate _M_streambuf_state;
//@}
// 27.4.2.6 Members for callbacks
@@ -379,58 +425,59 @@ namespace std
struct _Callback_list
{
// Data Members
- _Callback_list* _M_next;
- ios_base::event_callback _M_fn;
- int _M_index;
+ _Callback_list* _M_next;
+ ios_base::event_callback _M_fn;
+ int _M_index;
_Atomic_word _M_refcount; // 0 means one reference.
-
- _Callback_list(ios_base::event_callback __fn, int __index,
+
+ _Callback_list(ios_base::event_callback __fn, int __index,
_Callback_list* __cb)
: _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
-
- void
- _M_add_reference() { __atomic_add(&_M_refcount, 1); }
+
+ void
+ _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
// 0 => OK to delete.
- int
- _M_remove_reference() { return __exchange_and_add(&_M_refcount, -1); }
+ int
+ _M_remove_reference()
+ { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); }
};
- _Callback_list* _M_callbacks;
+ _Callback_list* _M_callbacks;
- void
+ void
_M_call_callbacks(event __ev) throw();
- void
+ void
_M_dispose_callbacks(void);
// 27.4.2.5 Members for iword/pword storage
- struct _Words
- {
- void* _M_pword;
- long _M_iword;
+ struct _Words
+ {
+ void* _M_pword;
+ long _M_iword;
_Words() : _M_pword(0), _M_iword(0) { }
};
// Only for failed iword/pword calls.
- _Words _M_word_zero;
+ _Words _M_word_zero;
// Guaranteed storage.
// The first 5 iword and pword slots are reserved for internal use.
- static const int _S_local_word_size = 8;
- _Words _M_local_word[_S_local_word_size];
+ static const int _S_local_word_size = 8;
+ _Words _M_local_word[_S_local_word_size];
// Allocated storage.
- int _M_word_size;
- _Words* _M_word;
-
- _Words&
- _M_grow_words(int __index);
+ int _M_word_size;
+ _Words* _M_word;
+
+ _Words&
+ _M_grow_words(int __index, bool __iword);
// Members for locale and locale caching.
- locale _M_ios_locale;
+ locale _M_ios_locale;
- void
+ void
_M_init();
public:
@@ -438,29 +485,17 @@ namespace std
// 27.4.2.1.6 Class ios_base::Init
// Used to initialize standard streams. In theory, g++ could use
// -finit-priority to order this stuff correctly without going
- // through these machinations.
- class Init
+ // through these machinations.
+ class Init
{
friend class ios_base;
public:
Init();
~Init();
-
- static void
- _S_ios_create(bool __sync);
-
- static void
- _S_ios_destroy();
-
- // NB: Allows debugger applications use of the standard streams
- // from operator new. _S_ios_base_init must be incremented in
- // _S_ios_create _after_ initialization is completed.
- static bool
- _S_initialized() { return _S_ios_base_init; }
private:
- static int _S_ios_base_init;
- static bool _S_synced_with_stdio;
+ static _Atomic_word _S_refcount;
+ static bool _S_synced_with_stdio;
};
// [27.4.2.2] fmtflags state functions
@@ -468,7 +503,7 @@ namespace std
* @brief Access to format flags.
* @return The format control flags for both input and output.
*/
- inline fmtflags
+ inline fmtflags
flags() const { return _M_flags; }
/**
@@ -478,12 +513,12 @@ namespace std
*
* This function overwrites all the format flags with @a fmtfl.
*/
- inline fmtflags
+ inline fmtflags
flags(fmtflags __fmtfl)
- {
- fmtflags __old = _M_flags;
- _M_flags = __fmtfl;
- return __old;
+ {
+ fmtflags __old = _M_flags;
+ _M_flags = __fmtfl;
+ return __old;
}
/**
@@ -494,12 +529,12 @@ namespace std
* This function sets additional flags in format control. Flags that
* were previously set remain set.
*/
- inline fmtflags
+ inline fmtflags
setf(fmtflags __fmtfl)
- {
- fmtflags __old = _M_flags;
- _M_flags |= __fmtfl;
- return __old;
+ {
+ fmtflags __old = _M_flags;
+ _M_flags |= __fmtfl;
+ return __old;
}
/**
@@ -511,7 +546,7 @@ namespace std
* This function clears @a mask in the format flags, then sets
* @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield.
*/
- inline fmtflags
+ inline fmtflags
setf(fmtflags __fmtfl, fmtflags __mask)
{
fmtflags __old = _M_flags;
@@ -526,7 +561,7 @@ namespace std
*
* This function clears @a mask in the format flags.
*/
- inline void
+ inline void
unsetf(fmtflags __mask) { _M_flags &= ~__mask; }
/**
@@ -538,7 +573,7 @@ namespace std
* DR 189.
* @endif
*/
- inline streamsize
+ inline streamsize
precision() const { return _M_precision; }
/**
@@ -546,12 +581,12 @@ namespace std
* @param prec The new precision value.
* @return The previous value of precision().
*/
- inline streamsize
+ inline streamsize
precision(streamsize __prec)
- {
- streamsize __old = _M_precision;
- _M_precision = __prec;
- return __old;
+ {
+ streamsize __old = _M_precision;
+ _M_precision = __prec;
+ return __old;
}
/**
@@ -560,7 +595,7 @@ namespace std
*
* "Minimum field width" refers to the number of characters.
*/
- inline streamsize
+ inline streamsize
width() const { return _M_width; }
/**
@@ -568,12 +603,12 @@ namespace std
* @param wide The new width value.
* @return The previous value of width().
*/
- inline streamsize
+ inline streamsize
width(streamsize __wide)
- {
- streamsize __old = _M_width;
- _M_width = __wide;
- return __old;
+ {
+ streamsize __old = _M_width;
+ _M_width = __wide;
+ return __old;
}
// [27.4.2.4] ios_base static members
@@ -587,7 +622,7 @@ namespace std
* cout). User-declared streams are unaffected. See
* http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8 for more.
*/
- static bool
+ static bool
sync_with_stdio(bool __sync = true);
// [27.4.2.3] ios_base locale functions
@@ -596,10 +631,10 @@ namespace std
* @param loc The new locale.
* @return The previous locale.
*
- * Sets the new locale for this stream, and
- * [XXX does something with callbacks].
+ * Sets the new locale for this stream, and then invokes each callback
+ * with imbue_event.
*/
- locale
+ locale
imbue(const locale& __loc);
/**
@@ -610,7 +645,7 @@ namespace std
* returns @c loc. Otherwise, it returns a copy of @c std::locale(),
* the global C++ locale.
*/
- inline locale
+ inline locale
getloc() const { return _M_ios_locale; }
/**
@@ -620,61 +655,95 @@ namespace std
* Like getloc above, but returns a reference instead of
* generating a copy.
*/
- inline const locale&
+ inline const locale&
_M_getloc() const { return _M_ios_locale; }
// [27.4.2.5] ios_base storage functions
/**
- * @doctodo
+ * @brief Access to unique indices.
+ * @return An integer different from all previous calls.
+ *
+ * This function returns a unique integer every time it is called. It
+ * can be used for any purpose, but is primarily intended to be a unique
+ * index for the iword and pword functions. The expectation is that an
+ * application calls xalloc in order to obtain an index in the iword and
+ * pword arrays that can be used without fear of conflict.
+ *
+ * The implementation maintains a static variable that is incremented and
+ * returned on each invocation. xalloc is guaranteed to return an index
+ * that is safe to use in the iword and pword arrays.
*/
- static int
+ static int
xalloc() throw();
/**
- * @doctodo
+ * @brief Access to integer array.
+ * @param __ix Index into the array.
+ * @return A reference to an integer associated with the index.
+ *
+ * The iword function provides access to an array of integers that can be
+ * used for any purpose. The array grows as required to hold the
+ * supplied index. All integers in the array are initialized to 0.
+ *
+ * The implementation reserves several indices. You should use xalloc to
+ * obtain an index that is safe to use. Also note that since the array
+ * can grow dynamically, it is not safe to hold onto the reference.
*/
- inline long&
+ inline long&
iword(int __ix)
{
- _Words& __word = (__ix < _M_word_size)
- ? _M_word[__ix] : _M_grow_words(__ix);
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, true);
return __word._M_iword;
}
/**
- * @doctodo
+ * @brief Access to void pointer array.
+ * @param __ix Index into the array.
+ * @return A reference to a void* associated with the index.
+ *
+ * The pword function provides access to an array of pointers that can be
+ * used for any purpose. The array grows as required to hold the
+ * supplied index. All pointers in the array are initialized to 0.
+ *
+ * The implementation reserves several indices. You should use xalloc to
+ * obtain an index that is safe to use. Also note that since the array
+ * can grow dynamically, it is not safe to hold onto the reference.
*/
- inline void*&
+ inline void*&
pword(int __ix)
{
- _Words& __word = (__ix < _M_word_size)
- ? _M_word[__ix] : _M_grow_words(__ix);
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, false);
return __word._M_pword;
}
// Destructor
/**
- * Destroys local storage and
- * [XXX does something with callbacks].
+ * Invokes each callback with erase_event. Destroys local storage.
+ *
+ * Note that the ios_base object for the standard streams never gets
+ * destroyed. As a result, any callbacks registered with the standard
+ * streams will not get invoked with erase_event (unless copyfmt is
+ * used).
*/
- ~ios_base();
+ virtual ~ios_base();
protected:
ios_base();
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //50. Copy constructor and assignment operator of ios_base
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 50. Copy constructor and assignment operator of ios_base
private:
ios_base(const ios_base&);
- ios_base&
+ ios_base&
operator=(const ios_base&);
-#endif
};
-
+
// [27.4.5.1] fmtflags manipulators
/// Calls base.setf(ios_base::boolalpha).
- inline ios_base&
+ inline ios_base&
boolalpha(ios_base& __base)
{
__base.setf(ios_base::boolalpha);
@@ -682,7 +751,7 @@ namespace std
}
/// Calls base.unsetf(ios_base::boolalpha).
- inline ios_base&
+ inline ios_base&
noboolalpha(ios_base& __base)
{
__base.unsetf(ios_base::boolalpha);
@@ -690,7 +759,7 @@ namespace std
}
/// Calls base.setf(ios_base::showbase).
- inline ios_base&
+ inline ios_base&
showbase(ios_base& __base)
{
__base.setf(ios_base::showbase);
@@ -698,7 +767,7 @@ namespace std
}
/// Calls base.unsetf(ios_base::showbase).
- inline ios_base&
+ inline ios_base&
noshowbase(ios_base& __base)
{
__base.unsetf(ios_base::showbase);
@@ -706,7 +775,7 @@ namespace std
}
/// Calls base.setf(ios_base::showpoint).
- inline ios_base&
+ inline ios_base&
showpoint(ios_base& __base)
{
__base.setf(ios_base::showpoint);
@@ -714,7 +783,7 @@ namespace std
}
/// Calls base.unsetf(ios_base::showpoint).
- inline ios_base&
+ inline ios_base&
noshowpoint(ios_base& __base)
{
__base.unsetf(ios_base::showpoint);
@@ -722,7 +791,7 @@ namespace std
}
/// Calls base.setf(ios_base::showpos).
- inline ios_base&
+ inline ios_base&
showpos(ios_base& __base)
{
__base.setf(ios_base::showpos);
@@ -730,7 +799,7 @@ namespace std
}
/// Calls base.unsetf(ios_base::showpos).
- inline ios_base&
+ inline ios_base&
noshowpos(ios_base& __base)
{
__base.unsetf(ios_base::showpos);
@@ -738,15 +807,15 @@ namespace std
}
/// Calls base.setf(ios_base::skipws).
- inline ios_base&
+ inline ios_base&
skipws(ios_base& __base)
{
__base.setf(ios_base::skipws);
return __base;
}
-
+
/// Calls base.unsetf(ios_base::skipws).
- inline ios_base&
+ inline ios_base&
noskipws(ios_base& __base)
{
__base.unsetf(ios_base::skipws);
@@ -754,7 +823,7 @@ namespace std
}
/// Calls base.setf(ios_base::uppercase).
- inline ios_base&
+ inline ios_base&
uppercase(ios_base& __base)
{
__base.setf(ios_base::uppercase);
@@ -762,7 +831,7 @@ namespace std
}
/// Calls base.unsetf(ios_base::uppercase).
- inline ios_base&
+ inline ios_base&
nouppercase(ios_base& __base)
{
__base.unsetf(ios_base::uppercase);
@@ -770,57 +839,57 @@ namespace std
}
/// Calls base.setf(ios_base::unitbuf).
- inline ios_base&
+ inline ios_base&
unitbuf(ios_base& __base)
{
- __base.setf(ios_base::unitbuf);
+ __base.setf(ios_base::unitbuf);
return __base;
}
/// Calls base.unsetf(ios_base::unitbuf).
- inline ios_base&
+ inline ios_base&
nounitbuf(ios_base& __base)
{
__base.unsetf(ios_base::unitbuf);
- return __base;
+ return __base;
}
// [27.4.5.2] adjustfield anipulators
/// Calls base.setf(ios_base::internal, ios_base::adjustfield).
- inline ios_base&
+ inline ios_base&
internal(ios_base& __base)
{
__base.setf(ios_base::internal, ios_base::adjustfield);
- return __base;
+ return __base;
}
/// Calls base.setf(ios_base::left, ios_base::adjustfield).
- inline ios_base&
+ inline ios_base&
left(ios_base& __base)
{
__base.setf(ios_base::left, ios_base::adjustfield);
return __base;
}
-
+
/// Calls base.setf(ios_base::right, ios_base::adjustfield).
- inline ios_base&
+ inline ios_base&
right(ios_base& __base)
{
__base.setf(ios_base::right, ios_base::adjustfield);
return __base;
}
-
+
// [27.4.5.3] basefield anipulators
/// Calls base.setf(ios_base::dec, ios_base::basefield).
- inline ios_base&
+ inline ios_base&
dec(ios_base& __base)
{
__base.setf(ios_base::dec, ios_base::basefield);
return __base;
}
-
+
/// Calls base.setf(ios_base::hex, ios_base::basefield).
- inline ios_base&
+ inline ios_base&
hex(ios_base& __base)
{
__base.setf(ios_base::hex, ios_base::basefield);
@@ -828,16 +897,16 @@ namespace std
}
/// Calls base.setf(ios_base::oct, ios_base::basefield).
- inline ios_base&
+ inline ios_base&
oct(ios_base& __base)
{
__base.setf(ios_base::oct, ios_base::basefield);
return __base;
}
-
+
// [27.4.5.4] floatfield anipulators
/// Calls base.setf(ios_base::fixed, ios_base::floatfield).
- inline ios_base&
+ inline ios_base&
fixed(ios_base& __base)
{
__base.setf(ios_base::fixed, ios_base::floatfield);
@@ -845,14 +914,13 @@ namespace std
}
/// Calls base.setf(ios_base::scientific, ios_base::floatfield).
- inline ios_base&
+ inline ios_base&
scientific(ios_base& __base)
{
__base.setf(ios_base::scientific, ios_base::floatfield);
return __base;
}
-
} // namespace std
-#endif /* _CPP_BITS_IOSBASE_H */
+#endif /* _IOS_BASE_H */
diff --git a/contrib/libstdc++/include/bits/istream.tcc b/contrib/libstdc++/include/bits/istream.tcc
index ae0c507..6417e95 100644
--- a/contrib/libstdc++/include/bits/istream.tcc
+++ b/contrib/libstdc++/include/bits/istream.tcc
@@ -1,6 +1,6 @@
// istream classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -29,482 +29,409 @@
// the GNU General Public License.
//
-// ISO C++ 14882: 27.6.2 Output streams
+// ISO C++ 14882: 27.6.1 Input streams
//
+#ifndef _ISTREAM_TCC
+#define _ISTREAM_TCC 1
+
#pragma GCC system_header
#include <locale>
#include <ostream> // For flush()
-namespace std
+namespace std
{
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>::sentry::
- sentry(basic_istream<_CharT, _Traits>& __in, bool __noskipws)
+ sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
{
- if (__in.good())
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ if (__in.good())
{
if (__in.tie())
__in.tie()->flush();
- if (!__noskipws && (__in.flags() & ios_base::skipws))
- {
+ if (!__noskip && (__in.flags() & ios_base::skipws))
+ {
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
__int_type __c = __sb->sgetc();
- if (__in._M_check_facet(__in._M_fctype))
- while (!traits_type::eq_int_type(__c, __eof)
- && __in._M_fctype->is(ctype_base::space,
- traits_type::to_char_type(__c)))
- __c = __sb->snextc();
+ const __ctype_type& __ct = __check_facet(__in._M_ctype);
+ while (!traits_type::eq_int_type(__c, __eof)
+ && __ct.is(ctype_base::space,
+ traits_type::to_char_type(__c)))
+ __c = __sb->snextc();
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//195. Should basic_istream::sentry's constructor ever set eofbit?
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 195. Should basic_istream::sentry's constructor ever
+ // set eofbit?
if (traits_type::eq_int_type(__c, __eof))
- __in.setstate(ios_base::eofbit);
-#endif
+ __err |= ios_base::eofbit;
}
}
- if (__in.good())
+ if (__in.good() && __err == ios_base::goodbit)
_M_ok = true;
else
{
- _M_ok = false;
- __in.setstate(ios_base::failbit);
+ __err |= ios_base::failbit;
+ __in.setstate(__err);
}
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(__istream_type& (*__pf)(__istream_type&))
- {
- __pf(*this);
- return *this;
- }
+ { return __pf(*this); }
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(__ios_type& (*__pf)(__ios_type&))
{
__pf(*this);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(ios_base& (*__pf)(ios_base&))
{
__pf(*this);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(bool& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(short& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
long __l;
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __l);
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __l);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions.
if (!(__err & ios_base::failbit)
- && (numeric_limits<short>::min() <= __l
+ && (numeric_limits<short>::min() <= __l
&& __l <= numeric_limits<short>::max()))
__n = __l;
else
__err |= ios_base::failbit;
-#endif
- this->setstate(__err);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(unsigned short& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(int& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
long __l;
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __l);
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __l);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions.
if (!(__err & ios_base::failbit)
- && (numeric_limits<int>::min() <= __l
+ && (numeric_limits<int>::min() <= __l
&& __l <= numeric_limits<int>::max()))
__n = __l;
else
__err |= ios_base::failbit;
-#endif
- this->setstate(__err);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(unsigned int& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(long& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(unsigned long& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(long long& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(unsigned long long& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
#endif
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(float& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(double& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(long double& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(void*& __n)
{
sentry __cerb(*this, false);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
- if (_M_check_facet(_M_fnumget))
- _M_fnumget->get(*this, 0, *this, __err, __n);
- this->setstate(__err);
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __n);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(__streambuf_type* __sbout)
{
- sentry __cerb(*this, false);
- if (__cerb)
- {
- try
- {
- streamsize __xtrct = 0;
- if (__sbout)
- {
- __streambuf_type* __sbin = this->rdbuf();
- __xtrct = __copy_streambufs(*this, __sbin, __sbout);
- }
- if (!__sbout || !__xtrct)
- this->setstate(ios_base::failbit);
- }
- catch(...)
- {
- // 27.6.2.5.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
- }
- return *this;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, false);
+ if (__cerb && __sbout)
+ {
+ try
+ {
+ if (!__copy_streambufs(this->rdbuf(), __sbout))
+ __err |= ios_base::failbit;
+ }
+ catch(...)
+ { this->_M_setstate(ios_base::failbit); }
+ }
+ else if (!__sbout)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
}
template<typename _CharT, typename _Traits>
@@ -515,27 +442,26 @@ namespace std
const int_type __eof = traits_type::eof();
int_type __c = __eof;
_M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ try
{
__c = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
if (!traits_type::eq_int_type(__c, __eof))
_M_gcount = 1;
else
- this->setstate(ios_base::eofbit | ios_base::failbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
}
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
return __c;
}
@@ -545,31 +471,29 @@ namespace std
get(char_type& __c)
{
_M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ try
{
- const int_type __eof = traits_type::eof();
- int_type __bufval = this->rdbuf()->sbumpc();
+ const int_type __cb = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
- if (!traits_type::eq_int_type(__bufval, __eof))
+ if (!traits_type::eq_int_type(__cb, traits_type::eof()))
{
_M_gcount = 1;
- __c = traits_type::to_char_type(__bufval);
+ __c = traits_type::to_char_type(__cb);
}
else
- this->setstate(ios_base::eofbit | ios_base::failbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
}
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -579,39 +503,36 @@ namespace std
get(char_type* __s, streamsize __n, char_type __delim)
{
_M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
- int_type __c = __sb->sgetc();
-
- while (_M_gcount + 1 < __n
+ int_type __c = __sb->sgetc();
+
+ while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
*__s++ = traits_type::to_char_type(__c);
- __c = __sb->snextc();
++_M_gcount;
+ __c = __sb->snextc();
}
if (traits_type::eq_int_type(__c, __eof))
- this->setstate(ios_base::eofbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
}
*__s = char_type();
if (!_M_gcount)
- this->setstate(ios_base::failbit);
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -621,19 +542,20 @@ namespace std
get(__streambuf_type& __sb, char_type __delim)
{
_M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ try
{
const int_type __idelim = traits_type::to_int_type(__delim);
- const int_type __eof = traits_type::eof();
+ const int_type __eof = traits_type::eof();
__streambuf_type* __this_sb = this->rdbuf();
int_type __c = __this_sb->sgetc();
char_type __c2 = traits_type::to_char_type(__c);
-
- while (!traits_type::eq_int_type(__c, __eof)
- && !traits_type::eq_int_type(__c, __idelim)
+
+ while (!traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __idelim)
&& !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
{
++_M_gcount;
@@ -641,19 +563,15 @@ namespace std
__c2 = traits_type::to_char_type(__c);
}
if (traits_type::eq_int_type(__c, __eof))
- this->setstate(ios_base::eofbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
- this->setstate(ios_base::failbit);
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -663,52 +581,66 @@ namespace std
getline(char_type* __s, streamsize __n, char_type __delim)
{
_M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
-
- while (_M_gcount + 1 < __n
+
+ while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
- *__s++ = traits_type::to_char_type(__c);
- __c = __sb->snextc();
- ++_M_gcount;
- }
- if (traits_type::eq_int_type(__c, __eof))
- this->setstate(ios_base::eofbit);
- else
- {
- if (traits_type::eq_int_type(__c, __idelim))
+ streamsize __size = std::min(streamsize(__sb->egptr()
+ - __sb->gptr()),
+ __n - _M_gcount - 1);
+ if (__size > 1)
{
- __sb->sbumpc();
- ++_M_gcount;
+ const char_type* __p = traits_type::find(__sb->gptr(),
+ __size,
+ __delim);
+ if (__p)
+ __size = __p - __sb->gptr();
+ traits_type::copy(__s, __sb->gptr(), __size);
+ __s += __size;
+ __sb->gbump(__size);
+ _M_gcount += __size;
+ __c = __sb->sgetc();
}
else
- this->setstate(ios_base::failbit);
+ {
+ *__s++ = traits_type::to_char_type(__c);
+ ++_M_gcount;
+ __c = __sb->snextc();
+ }
}
+
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ else if (traits_type::eq_int_type(__c, __idelim))
+ {
+ ++_M_gcount;
+ __sb->sbumpc();
+ }
+ else
+ __err |= ios_base::failbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
}
*__s = char_type();
if (!_M_gcount)
- this->setstate(ios_base::failbit);
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
@@ -716,16 +648,18 @@ namespace std
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__cerb && __n > 0)
+ if (__cerb && __n > 0)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c;
-
- __n = min(__n, numeric_limits<streamsize>::max());
- while (_M_gcount < __n
+
+ if (__n != numeric_limits<streamsize>::max())
+ --__n;
+ while (_M_gcount <= __n
&& !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof))
{
++_M_gcount;
@@ -733,20 +667,16 @@ namespace std
break;
}
if (traits_type::eq_int_type(__c, __eof))
- this->setstate(ios_base::eofbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
-
+
template<typename _CharT, typename _Traits>
typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>::
@@ -757,21 +687,18 @@ namespace std
sentry __cerb(*this, true);
if (__cerb)
{
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
__c = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__c, traits_type::eof()))
- this->setstate(ios_base::eofbit);
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
return __c;
}
@@ -782,195 +709,180 @@ namespace std
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
_M_gcount = this->rdbuf()->sgetn(__s, __n);
if (_M_gcount != __n)
- this->setstate(ios_base::eofbit | ios_base::failbit);
- }
- catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
+ __err |= (ios_base::eofbit | ios_base::failbit);
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
- else
- this->setstate(ios_base::failbit);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
- streamsize
+ streamsize
basic_istream<_CharT, _Traits>::
readsome(char_type* __s, streamsize __n)
{
_M_gcount = 0;
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
// Cannot compare int_type with streamsize generically.
- streamsize __num = this->rdbuf()->in_avail();
- if (__num >= 0)
- {
- __num = min(__num, __n);
- if (__num)
- _M_gcount = this->rdbuf()->sgetn(__s, __num);
- }
- else
- this->setstate(ios_base::eofbit);
+ const streamsize __num = this->rdbuf()->in_avail();
+ if (__num > 0)
+ _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
+ else if (__num == -1)
+ __err |= ios_base::eofbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
- else
- this->setstate(ios_base::failbit);
return _M_gcount;
}
-
+
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
putback(char_type __c)
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 60. What is a formatted input function?
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 60. What is a formatted input function?
_M_gcount = 0;
-#endif
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
- if (!__sb
+ if (!__sb
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
- this->setstate(ios_base::badbit);
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
- else
- this->setstate(ios_base::failbit);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
unget(void)
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 60. What is a formatted input function?
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 60. What is a formatted input function?
_M_gcount = 0;
-#endif
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
- if (!__sb
+ if (!__sb
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
- this->setstate(ios_base::badbit);
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
- else
- this->setstate(ios_base::failbit);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
int
basic_istream<_CharT, _Traits>::
sync(void)
{
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
int __ret = -1;
sentry __cerb(*this, true);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
__streambuf_type* __sb = this->rdbuf();
if (__sb)
{
if (__sb->pubsync() == -1)
- this->setstate(ios_base::badbit);
- else
+ __err |= ios_base::badbit;
+ else
__ret = 0;
}
}
catch(...)
- {
- // 27.6.1.3 paragraph 1
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return __ret;
}
-
+
template<typename _CharT, typename _Traits>
typename basic_istream<_CharT, _Traits>::pos_type
basic_istream<_CharT, _Traits>::
tellg(void)
{
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
pos_type __ret = pos_type(-1);
- if (!this->fail())
- __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
+ try
+ {
+ if (!this->fail())
+ __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
+ }
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
return __ret;
}
-
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
seekg(pos_type __pos)
{
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
- if (!this->fail())
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 136. seekp, seekg setting wrong streams?
- pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in);
+ if (!this->fail())
+ {
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+ ios_base::in);
-// 129. Need error indication from seekp() and seekg()
- if (__err == pos_type(off_type(-1)))
- this->setstate(ios_base::failbit);
-#endif
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -979,19 +891,26 @@ namespace std
basic_istream<_CharT, _Traits>::
seekg(off_type __off, ios_base::seekdir __dir)
{
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
- if (!this->fail())
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 136. seekp, seekg setting wrong streams?
- pos_type __err = this->rdbuf()->pubseekoff(__off, __dir,
- ios_base::in);
-
-// 129. Need error indication from seekp() and seekg()
- if (__err == pos_type(off_type(-1)))
- this->setstate(ios_base::failbit);
-#endif
+ if (!this->fail())
+ {
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+ ios_base::in);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -1000,23 +919,26 @@ namespace std
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
{
- typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::int_type __int_type;
+
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
- try
- { __in.get(__c); }
- catch(...)
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __in._M_setstate(ios_base::badbit);
- if ((__in.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
+ const __int_type __cb = __in.rdbuf()->sbumpc();
+ if (!_Traits::eq_int_type(__cb, _Traits::eof()))
+ __c = _Traits::to_char_type(__cb);
+ else
+ __err |= (ios_base::eofbit | ios_base::failbit);
}
+ catch(...)
+ { __in._M_setstate(ios_base::badbit); }
+ if (__err)
+ __in.setstate(__err);
}
- else
- __in.setstate(ios_base::failbit);
return __in;
}
@@ -1024,81 +946,78 @@ namespace std
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
{
- typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::__streambuf_type __streambuf_type;
- typedef typename _Traits::int_type int_type;
- typedef _CharT char_type;
- typedef ctype<_CharT> __ctype_type;
- streamsize __extracted = 0;
+ typedef typename _Traits::int_type int_type;
+ typedef _CharT char_type;
+ typedef ctype<_CharT> __ctype_type;
+ streamsize __extracted = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
- try
+ try
{
// Figure out how many characters to extract.
streamsize __num = __in.width();
if (__num <= 0)
__num = numeric_limits<streamsize>::max();
-
- const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
+
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+
const int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
int_type __c = __sb->sgetc();
-
- while (__extracted < __num - 1
+
+ while (__extracted < __num - 1
&& !_Traits::eq_int_type(__c, __eof)
- && !__ctype.is(ctype_base::space, _Traits::to_char_type(__c)))
+ && !__ct.is(ctype_base::space,
+ _Traits::to_char_type(__c)))
{
*__s++ = _Traits::to_char_type(__c);
++__extracted;
__c = __sb->snextc();
}
if (_Traits::eq_int_type(__c, __eof))
- __in.setstate(ios_base::eofbit);
+ __err |= ios_base::eofbit;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//68. Extractors for char* should store null at end
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 68. Extractors for char* should store null at end
*__s = char_type();
-#endif
__in.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __in._M_setstate(ios_base::badbit);
- if ((__in.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
- __in.setstate(ios_base::failbit);
+ __err |= ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
return __in;
}
// 27.6.1.4 Standard basic_istream manipulators
template<typename _CharT, typename _Traits>
- basic_istream<_CharT,_Traits>&
+ basic_istream<_CharT,_Traits>&
ws(basic_istream<_CharT,_Traits>& __in)
{
- typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::__streambuf_type __streambuf_type;
- typedef typename __istream_type::__ctype_type __ctype_type;
- typedef typename __istream_type::int_type __int_type;
+ typedef typename __istream_type::__ctype_type __ctype_type;
+ typedef typename __istream_type::int_type __int_type;
- const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
- const __int_type __eof = _Traits::eof();
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+ const __int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
__int_type __c = __sb->sgetc();
- while (!_Traits::eq_int_type(__c, __eof)
- && __ctype.is(ctype_base::space, _Traits::to_char_type(__c)))
+ while (!_Traits::eq_int_type(__c, __eof)
+ && __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
__c = __sb->snextc();
if (_Traits::eq_int_type(__c, __eof))
- __in.setstate(ios_base::eofbit);
-
+ __in.setstate(ios_base::eofbit);
return __in;
}
@@ -1108,44 +1027,64 @@ namespace std
operator>>(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT, _Traits, _Alloc>& __str)
{
- typedef basic_istream<_CharT, _Traits> __istream_type;
- typedef typename __istream_type::int_type __int_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::int_type __int_type;
typedef typename __istream_type::__streambuf_type __streambuf_type;
- typedef typename __istream_type::__ctype_type __ctype_type;
- typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __istream_type::__ctype_type __ctype_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
- __size_type __extracted = 0;
+ __size_type __extracted = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
typename __istream_type::sentry __cerb(__in, false);
- if (__cerb)
+ if (__cerb)
{
- __str.erase();
- streamsize __w = __in.width();
- __size_type __n;
- __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size();
-
- const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
- const __int_type __eof = _Traits::eof();
- __streambuf_type* __sb = __in.rdbuf();
- __int_type __c = __sb->sgetc();
-
- while (__extracted < __n
- && !_Traits::eq_int_type(__c, __eof)
- && !__ctype.is(ctype_base::space, _Traits::to_char_type(__c)))
+ try
{
- __str += _Traits::to_char_type(__c);
- ++__extracted;
- __c = __sb->snextc();
+ // Avoid reallocation for common case.
+ __str.erase();
+ _CharT __buf[128];
+ __size_type __len = 0;
+ const streamsize __w = __in.width();
+ const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
+ : __str.max_size();
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+ const __int_type __eof = _Traits::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ __int_type __c = __sb->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !__ct.is(ctype_base::space, _Traits::to_char_type(__c)))
+ {
+ if (__len == sizeof(__buf) / sizeof(_CharT))
+ {
+ __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+ __len = 0;
+ }
+ __buf[__len++] = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __sb->snextc();
+ }
+ __str.append(__buf, __len);
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ __in.width(0);
+ }
+ catch(...)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(ios_base::badbit);
}
- if (_Traits::eq_int_type(__c, __eof))
- __in.setstate(ios_base::eofbit);
- __in.width(0);
}
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//211. operator>>(istream&, string&) doesn't set failbit
+ // 211. operator>>(istream&, string&) doesn't set failbit
if (!__extracted)
- __in.setstate (ios_base::failbit);
-#endif
+ __err |= ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
return __in;
}
@@ -1154,54 +1093,80 @@ namespace std
getline(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
{
- typedef basic_istream<_CharT, _Traits> __istream_type;
- typedef typename __istream_type::int_type __int_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::int_type __int_type;
typedef typename __istream_type::__streambuf_type __streambuf_type;
- typedef typename __istream_type::__ctype_type __ctype_type;
- typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __istream_type::__ctype_type __ctype_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__size_type __extracted = 0;
- bool __testdelim = false;
+ const __size_type __n = __str.max_size();
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
typename __istream_type::sentry __cerb(__in, true);
- if (__cerb)
+ if (__cerb)
{
- __str.erase();
- __size_type __n = __str.max_size();
-
- __int_type __idelim = _Traits::to_int_type(__delim);
- __streambuf_type* __sb = __in.rdbuf();
- __int_type __c = __sb->sbumpc();
- const __int_type __eof = _Traits::eof();
- __testdelim = _Traits::eq_int_type(__c, __idelim);
-
- while (__extracted <= __n
- && !_Traits::eq_int_type(__c, __eof)
- && !__testdelim)
+ try
+ {
+ // Avoid reallocation for common case.
+ __str.erase();
+ _CharT __buf[128];
+ __size_type __len = 0;
+ const __int_type __idelim = _Traits::to_int_type(__delim);
+ const __int_type __eof = _Traits::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ __int_type __c = __sb->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !_Traits::eq_int_type(__c, __idelim))
+ {
+ if (__len == sizeof(__buf) / sizeof(_CharT))
+ {
+ __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+ __len = 0;
+ }
+ __buf[__len++] = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __sb->snextc();
+ }
+ __str.append(__buf, __len);
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ else if (_Traits::eq_int_type(__c, __idelim))
+ {
+ ++__extracted;
+ __sb->sbumpc();
+ }
+ else
+ __err |= ios_base::failbit;
+ }
+ catch(...)
{
- __str += _Traits::to_char_type(__c);
- ++__extracted;
- __c = __sb->sbumpc();
- __testdelim = _Traits::eq_int_type(__c, __idelim);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(ios_base::badbit);
}
- if (_Traits::eq_int_type(__c, __eof))
- __in.setstate(ios_base::eofbit);
}
- if (!__extracted && !__testdelim)
- __in.setstate(ios_base::failbit);
+ if (!__extracted)
+ __err |= ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
return __in;
}
template<class _CharT, class _Traits, class _Alloc>
inline basic_istream<_CharT,_Traits>&
- getline(basic_istream<_CharT, _Traits>& __in,
+ getline(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT,_Traits,_Alloc>& __str)
{ return getline(__in, __str, __in.widen('\n')); }
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_istream<char>;
extern template istream& ws(istream&);
extern template istream& operator>>(istream&, char&);
@@ -1211,7 +1176,7 @@ namespace std
extern template istream& operator>>(istream&, unsigned char*);
extern template istream& operator>>(istream&, signed char*);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_istream<wchar_t>;
extern template wistream& ws(wistream&);
extern template wistream& operator>>(wistream&, wchar_t&);
@@ -1219,3 +1184,5 @@ namespace std
#endif
#endif
} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/list.tcc b/contrib/libstdc++/include/bits/list.tcc
index 898a502..aaaa8c3 100644
--- a/contrib/libstdc++/include/bits/list.tcc
+++ b/contrib/libstdc++/include/bits/list.tcc
@@ -1,6 +1,6 @@
// List implementation (out of line) -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,57 +58,47 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_LIST_TCC
-#define __GLIBCPP_INTERNAL_LIST_TCC
+#ifndef _LIST_TCC
+#define _LIST_TCC 1
-namespace std
+namespace _GLIBCXX_STD
{
template<typename _Tp, typename _Alloc>
void
_List_base<_Tp,_Alloc>::
- __clear()
+ _M_clear()
{
typedef _List_node<_Tp> _Node;
- _Node* __cur = static_cast<_Node*>(_M_node->_M_next);
- while (__cur != _M_node)
+ _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
+ while (__cur != &this->_M_impl._M_node)
{
_Node* __tmp = __cur;
__cur = static_cast<_Node*>(__cur->_M_next);
- _Destroy(&__tmp->_M_data);
+ std::_Destroy(&__tmp->_M_data);
_M_put_node(__tmp);
}
- _M_node->_M_next = _M_node;
- _M_node->_M_prev = _M_node;
}
-
+
template<typename _Tp, typename _Alloc>
typename list<_Tp,_Alloc>::iterator
list<_Tp,_Alloc>::
insert(iterator __position, const value_type& __x)
{
_Node* __tmp = _M_create_node(__x);
- __tmp->_M_next = __position._M_node;
- __tmp->_M_prev = __position._M_node->_M_prev;
- __position._M_node->_M_prev->_M_next = __tmp;
- __position._M_node->_M_prev = __tmp;
+ __tmp->hook(__position._M_node);
return __tmp;
}
-
+
template<typename _Tp, typename _Alloc>
typename list<_Tp,_Alloc>::iterator
list<_Tp,_Alloc>::
erase(iterator __position)
{
- _List_node_base* __next_node = __position._M_node->_M_next;
- _List_node_base* __prev_node = __position._M_node->_M_prev;
- _Node* __n = static_cast<_Node*>(__position._M_node);
- __prev_node->_M_next = __next_node;
- __next_node->_M_prev = __prev_node;
- _Destroy(&__n->_M_data);
- _M_put_node(__n);
- return iterator(static_cast<_Node*>(__next_node));
+ iterator __ret = __position._M_node->_M_next;
+ _M_erase(__position);
+ return __ret;
}
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
@@ -123,28 +113,28 @@ namespace std
else // __i == end()
insert(end(), __new_size - __len, __x);
}
-
+
template<typename _Tp, typename _Alloc>
list<_Tp,_Alloc>&
list<_Tp,_Alloc>::
operator=(const list& __x)
{
if (this != &__x)
- {
- iterator __first1 = begin();
- iterator __last1 = end();
- const_iterator __first2 = __x.begin();
- const_iterator __last2 = __x.end();
- while (__first1 != __last1 && __first2 != __last2)
- *__first1++ = *__first2++;
- if (__first2 == __last2)
- erase(__first1, __last1);
- else
- insert(__last1, __first2, __last2);
- }
+ {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ const_iterator __first2 = __x.begin();
+ const_iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ *__first1++ = *__first2++;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
return *this;
}
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
@@ -158,23 +148,25 @@ namespace std
else
erase(__i, end());
}
-
+
template<typename _Tp, typename _Alloc>
- template <typename _InputIter>
+ template <typename _InputIterator>
void
list<_Tp,_Alloc>::
- _M_assign_dispatch(_InputIter __first2, _InputIter __last2, __false_type)
+ _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
+ __false_type)
{
iterator __first1 = begin();
iterator __last1 = end();
- for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
+ for (; __first1 != __last1 && __first2 != __last2;
+ ++__first1, ++__first2)
*__first1 = *__first2;
if (__first2 == __last2)
erase(__first1, __last1);
else
insert(__last1, __first2, __last2);
}
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
@@ -187,11 +179,11 @@ namespace std
iterator __next = __first;
++__next;
if (*__first == __value)
- erase(__first);
+ _M_erase(__first);
__first = __next;
}
}
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
@@ -199,81 +191,83 @@ namespace std
{
iterator __first = begin();
iterator __last = end();
- if (__first == __last) return;
+ if (__first == __last)
+ return;
iterator __next = __first;
while (++__next != __last)
{
if (*__first == *__next)
- erase(__next);
+ _M_erase(__next);
else
__first = __next;
__next = __first;
}
}
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
merge(list& __x)
{
- iterator __first1 = begin();
- iterator __last1 = end();
- iterator __first2 = __x.begin();
- iterator __last2 = __x.end();
- while (__first1 != __last1 && __first2 != __last2)
- if (*__first2 < *__first1)
- {
- iterator __next = __first2;
- _M_transfer(__first1, __first2, ++__next);
- __first2 = __next;
- }
- else
- ++__first1;
- if (__first2 != __last2)
- _M_transfer(__last1, __first2, __last2);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ iterator __first2 = __x.begin();
+ iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first2 < *__first1)
+ {
+ iterator __next = __first2;
+ _M_transfer(__first1, __first2, ++__next);
+ __first2 = __next;
+ }
+ else
+ ++__first1;
+ if (__first2 != __last2)
+ _M_transfer(__last1, __first2, __last2);
+ }
}
-
- // FIXME put this somewhere else
- inline void
- __List_base_reverse(_List_node_base* __p)
- {
- _List_node_base* __tmp = __p;
- do {
- std::swap(__tmp->_M_next, __tmp->_M_prev);
- __tmp = __tmp->_M_prev; // Old next node is now prev.
- } while (__tmp != __p);
- }
-
+
template<typename _Tp, typename _Alloc>
void
list<_Tp,_Alloc>::
sort()
{
// Do nothing if the list has length 0 or 1.
- if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node)
+ if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+ && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
{
list __carry;
- list __counter[64];
- int __fill = 0;
- while (!empty())
- {
- __carry.splice(__carry.begin(), *this, begin());
- int __i = 0;
- while(__i < __fill && !__counter[__i].empty())
- {
- __counter[__i].merge(__carry);
- __carry.swap(__counter[__i++]);
- }
- __carry.swap(__counter[__i]);
- if (__i == __fill) ++__fill;
- }
-
- for (int __i = 1; __i < __fill; ++__i)
- __counter[__i].merge(__counter[__i-1]);
- swap(__counter[__fill-1]);
+ list __tmp[64];
+ list * __fill = &__tmp[0];
+ list * __counter;
+
+ do
+ {
+ __carry.splice(__carry.begin(), *this, begin());
+
+ for(__counter = &__tmp[0];
+ (__counter != __fill) && !__counter->empty();
+ ++__counter)
+ {
+ __counter->merge(__carry);
+ __carry.swap(*__counter);
+ }
+ __carry.swap(*__counter);
+ if (__counter == __fill)
+ ++__fill;
+ }
+ while ( !empty() );
+
+ for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+ __counter->merge( *(__counter-1) );
+ swap( *(__fill-1) );
}
}
-
+
template<typename _Tp, typename _Alloc>
template <typename _Predicate>
void
@@ -286,11 +280,12 @@ namespace std
{
iterator __next = __first;
++__next;
- if (__pred(*__first)) erase(__first);
+ if (__pred(*__first))
+ _M_erase(__first);
__first = __next;
}
}
-
+
template<typename _Tp, typename _Alloc>
template <typename _BinaryPredicate>
void
@@ -304,65 +299,79 @@ namespace std
while (++__next != __last)
{
if (__binary_pred(*__first, *__next))
- erase(__next);
+ _M_erase(__next);
else
__first = __next;
__next = __first;
}
}
-
+
template<typename _Tp, typename _Alloc>
template <typename _StrictWeakOrdering>
void
list<_Tp,_Alloc>::
merge(list& __x, _StrictWeakOrdering __comp)
{
- iterator __first1 = begin();
- iterator __last1 = end();
- iterator __first2 = __x.begin();
- iterator __last2 = __x.end();
- while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first2, *__first1))
- {
- iterator __next = __first2;
- _M_transfer(__first1, __first2, ++__next);
- __first2 = __next;
- }
- else
- ++__first1;
- if (__first2 != __last2) _M_transfer(__last1, __first2, __last2);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ iterator __first2 = __x.begin();
+ iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__comp(*__first2, *__first1))
+ {
+ iterator __next = __first2;
+ _M_transfer(__first1, __first2, ++__next);
+ __first2 = __next;
+ }
+ else
+ ++__first1;
+ if (__first2 != __last2)
+ _M_transfer(__last1, __first2, __last2);
+ }
}
-
+
template<typename _Tp, typename _Alloc>
template <typename _StrictWeakOrdering>
- void
- list<_Tp,_Alloc>::
- sort(_StrictWeakOrdering __comp)
- {
- // Do nothing if the list has length 0 or 1.
- if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node)
+ void
+ list<_Tp,_Alloc>::
+ sort(_StrictWeakOrdering __comp)
{
- list __carry;
- list __counter[64];
- int __fill = 0;
- while (!empty())
- {
- __carry.splice(__carry.begin(), *this, begin());
- int __i = 0;
- while(__i < __fill && !__counter[__i].empty())
- {
- __counter[__i].merge(__carry, __comp);
- __carry.swap(__counter[__i++]);
- }
- __carry.swap(__counter[__i]);
- if (__i == __fill) ++__fill;
- }
-
- for (int __i = 1; __i < __fill; ++__i)
- __counter[__i].merge(__counter[__i-1], __comp);
- swap(__counter[__fill-1]);
+ // Do nothing if the list has length 0 or 1.
+ if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+ && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
+ {
+ list __carry;
+ list __tmp[64];
+ list * __fill = &__tmp[0];
+ list * __counter;
+
+ do
+ {
+ __carry.splice(__carry.begin(), *this, begin());
+
+ for(__counter = &__tmp[0];
+ (__counter != __fill) && !__counter->empty();
+ ++__counter)
+ {
+ __counter->merge(__carry, __comp);
+ __carry.swap(*__counter);
+ }
+ __carry.swap(*__counter);
+ if (__counter == __fill)
+ ++__fill;
+ }
+ while ( !empty() );
+
+ for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+ __counter->merge( *(__counter-1), __comp );
+ swap( *(__fill-1) );
+ }
}
- }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_LIST_TCC */
+#endif /* _LIST_TCC */
+
diff --git a/contrib/libstdc++/include/bits/locale_classes.h b/contrib/libstdc++/include/bits/locale_classes.h
index ddd23fb..95d9c03 100644
--- a/contrib/libstdc++/include/bits/locale_classes.h
+++ b/contrib/libstdc++/include/bits/locale_classes.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,8 +37,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_LOCALE_CLASSES_H
-#define _CPP_BITS_LOCALE_CLASSES_H 1
+#ifndef _LOCALE_CLASSES_H
+#define _LOCALE_CLASSES_H 1
#pragma GCC system_header
@@ -46,18 +46,30 @@
#include <cstring> // For strcmp.
#include <string>
#include <bits/atomicity.h>
+#include <bits/gthr.h>
namespace std
{
- class __locale_cache_base;
- template<typename _Facet> class __locale_cache;
-
// 22.1.1 Class locale
+ /**
+ * @brief Container class for localization functionality.
+ *
+ * The locale class is first a class wrapper for C library locales. It is
+ * also an extensible container for user-defined localization. A locale is
+ * a collection of facets that implement various localization features such
+ * as money, time, and number printing.
+ *
+ * Constructing C++ locales does not change the C library locale.
+ *
+ * This library supports efficient construction and copying of locales
+ * through a reference counting implementation of the locale class.
+ */
class locale
{
public:
// Types:
- typedef unsigned int category;
+ /// Definition of locale::category.
+ typedef int category;
// Forward decls and friends:
class facet;
@@ -68,118 +80,249 @@ namespace std
friend class _Impl;
template<typename _Facet>
- friend const _Facet&
- use_facet(const locale&);
-
- template<typename _Facet>
- friend bool
+ friend bool
has_facet(const locale&) throw();
-
+
template<typename _Facet>
- friend const __locale_cache<_Facet>&
- __use_cache(const locale&);
+ friend const _Facet&
+ use_facet(const locale&);
- // Category values:
- // NB: Order must match _S_facet_categories definition in locale.cc
+ template<typename _Cache>
+ friend struct __use_cache;
+
+ //@{
+ /**
+ * @brief Category values.
+ *
+ * The standard category values are none, ctype, numeric, collate, time,
+ * monetary, and messages. They form a bitmask that supports union and
+ * intersection. The category all is the union of these values.
+ *
+ * @if maint
+ * NB: Order must match _S_facet_categories definition in locale.cc
+ * @endif
+ */
static const category none = 0;
- static const category ctype = 1L << 0;
- static const category numeric = 1L << 1;
- static const category collate = 1L << 2;
- static const category time = 1L << 3;
- static const category monetary = 1L << 4;
- static const category messages = 1L << 5;
- static const category all = (ctype | numeric | collate |
- time | monetary | messages);
+ static const category ctype = 1L << 0;
+ static const category numeric = 1L << 1;
+ static const category collate = 1L << 2;
+ static const category time = 1L << 3;
+ static const category monetary = 1L << 4;
+ static const category messages = 1L << 5;
+ static const category all = (ctype | numeric | collate |
+ time | monetary | messages);
+ //@}
// Construct/copy/destroy:
+
+ /**
+ * @brief Default constructor.
+ *
+ * Constructs a copy of the global locale. If no locale has been
+ * explicitly set, this is the "C" locale.
+ */
locale() throw();
+ /**
+ * @brief Copy constructor.
+ *
+ * Constructs a copy of @a other.
+ *
+ * @param other The locale to copy.
+ */
locale(const locale& __other) throw();
- explicit
+ /**
+ * @brief Named locale constructor.
+ *
+ * Constructs a copy of the named C library locale.
+ *
+ * @param s Name of the locale to construct.
+ * @throw std::runtime_error if s is null or an undefined locale.
+ */
+ explicit
locale(const char* __s);
+ /**
+ * @brief Construct locale with facets from another locale.
+ *
+ * Constructs a copy of the locale @a base. The facets specified by @a
+ * cat are replaced with those from the locale named by @a s. If base is
+ * named, this locale instance will also be named.
+ *
+ * @param base The locale to copy.
+ * @param s Name of the locale to use facets from.
+ * @param cat Set of categories defining the facets to use from s.
+ * @throw std::runtime_error if s is null or an undefined locale.
+ */
locale(const locale& __base, const char* __s, category __cat);
+ /**
+ * @brief Construct locale with facets from another locale.
+ *
+ * Constructs a copy of the locale @a base. The facets specified by @a
+ * cat are replaced with those from the locale @a add. If @a base and @a
+ * add are named, this locale instance will also be named.
+ *
+ * @param base The locale to copy.
+ * @param add The locale to use facets from.
+ * @param cat Set of categories defining the facets to use from add.
+ */
locale(const locale& __base, const locale& __add, category __cat);
+ /**
+ * @brief Construct locale with another facet.
+ *
+ * Constructs a copy of the locale @a other. The facet @f is added to
+ * @other, replacing an existing facet of type Facet if there is one. If
+ * @f is null, this locale is a copy of @a other.
+ *
+ * @param other The locale to copy.
+ * @param f The facet to add in.
+ */
template<typename _Facet>
locale(const locale& __other, _Facet* __f);
+ /// Locale destructor.
~locale() throw();
- const locale&
+ /**
+ * @brief Assignment operator.
+ *
+ * Set this locale to be a copy of @a other.
+ *
+ * @param other The locale to copy.
+ * @return A reference to this locale.
+ */
+ const locale&
operator=(const locale& __other) throw();
+ /**
+ * @brief Construct locale with another facet.
+ *
+ * Constructs and returns a new copy of this locale. Adds or replaces an
+ * existing facet of type Facet from the locale @a other into the new
+ * locale.
+ *
+ * @param Facet The facet type to copy from other
+ * @param other The locale to copy from.
+ * @return Newly constructed locale.
+ * @throw std::runtime_error if other has no facet of type Facet.
+ */
template<typename _Facet>
- locale
+ locale
combine(const locale& __other) const;
// Locale operations:
- string
+ /**
+ * @brief Return locale name.
+ * @return Locale name or "*" if unnamed.
+ */
+ string
name() const;
- bool
+ /**
+ * @brief Locale equality.
+ *
+ * @param other The locale to compare against.
+ * @return True if other and this refer to the same locale instance, are
+ * copies, or have the same name. False otherwise.
+ */
+ bool
operator==(const locale& __other) const throw ();
- inline bool
+ /**
+ * @brief Locale inequality.
+ *
+ * @param other The locale to compare against.
+ * @return ! (*this == other)
+ */
+ inline bool
operator!=(const locale& __other) const throw ()
{ return !(this->operator==(__other)); }
+ /**
+ * @brief Compare two strings according to collate.
+ *
+ * Template operator to compare two strings using the compare function of
+ * the collate facet in this locale. One use is to provide the locale to
+ * the sort function. For example, a vector v of strings could be sorted
+ * according to locale loc by doing:
+ * @code
+ * std::sort(v.begin(), v.end(), loc);
+ * @endcode
+ *
+ * @param s1 First string to compare.
+ * @param s2 Second string to compare.
+ * @return True if collate<Char> facet compares s1 < s2, else false.
+ */
template<typename _Char, typename _Traits, typename _Alloc>
- bool
+ bool
operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
const basic_string<_Char, _Traits, _Alloc>& __s2) const;
// Global locale objects:
- static locale
+ /**
+ * @brief Set global locale
+ *
+ * This function sets the global locale to the argument and returns a
+ * copy of the previous global locale. If the argument has a name, it
+ * will also call std::setlocale(LC_ALL, loc.name()).
+ *
+ * @param locale The new locale to make global.
+ * @return Copy of the old global locale.
+ */
+ static locale
global(const locale&);
- static const locale&
+ /**
+ * @brief Return reference to the "C" locale.
+ */
+ static const locale&
classic();
private:
// The (shared) implementation
- _Impl* _M_impl;
+ _Impl* _M_impl;
// The "C" reference locale
- static _Impl* _S_classic;
+ static _Impl* _S_classic;
// Current global locale
- static _Impl* _S_global;
+ static _Impl* _S_global;
+
+ // Names of underlying locale categories.
+ // NB: locale::global() has to know how to modify all the
+ // underlying categories, not just the ones required by the C++
+ // standard.
+ static const char* const* const _S_categories;
// Number of standard categories. For C++, these categories are
// collate, ctype, monetary, numeric, time, and messages. These
// directly correspond to ISO C99 macros LC_COLLATE, LC_CTYPE,
// LC_MONETARY, LC_NUMERIC, and LC_TIME. In addition, POSIX (IEEE
// 1003.1-2001) specifies LC_MESSAGES.
- static const size_t _S_categories_size = 6;
-
// In addition to the standard categories, the underlying
// operating system is allowed to define extra LC_*
// macros. For GNU systems, the following are also valid:
// LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT,
// and LC_IDENTIFICATION.
- static const size_t _S_extra_categories_size = _GLIBCPP_NUM_CATEGORIES;
+ static const size_t _S_categories_size = 6 + _GLIBCXX_NUM_CATEGORIES;
- // Names of underlying locale categories.
- // NB: locale::global() has to know how to modify all the
- // underlying categories, not just the ones required by the C++
- // standard.
- static const char* _S_categories[_S_categories_size
- + _S_extra_categories_size];
+#ifdef __GTHREADS
+ static __gthread_once_t _S_once;
+#endif
- explicit
+ explicit
locale(_Impl*) throw();
- static inline void
- _S_initialize()
- {
- if (!_S_classic)
- classic();
- }
+ static void
+ _S_initialize();
+
+ static void
+ _S_initialize_once();
- static category
+ static category
_S_normalize_category(category);
void
@@ -187,7 +330,146 @@ namespace std
};
- // Implementation object for locale
+ // 22.1.1.1.2 Class locale::facet
+ /**
+ * @brief Localization functionality base class.
+ *
+ * The facet class is the base class for a localization feature, such as
+ * money, time, and number printing. It provides common support for facets
+ * and reference management.
+ *
+ * Facets may not be copied or assigned.
+ */
+ class locale::facet
+ {
+ private:
+ friend class locale;
+ friend class locale::_Impl;
+
+ mutable _Atomic_word _M_refcount;
+
+ // Contains data from the underlying "C" library for the classic locale.
+ static __c_locale _S_c_locale;
+
+ // String literal for the name of the classic locale.
+ static const char _S_c_name[2];
+
+#ifdef __GTHREADS
+ static __gthread_once_t _S_once;
+#endif
+
+ static void
+ _S_initialize_once();
+
+ protected:
+ /**
+ * @brief Facet constructor.
+ *
+ * This is the constructor provided by the standard. If refs is 0, the
+ * facet is destroyed when the last referencing locale is destroyed.
+ * Otherwise the facet will never be destroyed.
+ *
+ * @param refs The initial value for reference count.
+ */
+ explicit
+ facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
+ { }
+
+ /// Facet destructor.
+ virtual
+ ~facet();
+
+ static void
+ _S_create_c_locale(__c_locale& __cloc, const char* __s,
+ __c_locale __old = 0);
+
+ static __c_locale
+ _S_clone_c_locale(__c_locale& __cloc);
+
+ static void
+ _S_destroy_c_locale(__c_locale& __cloc);
+
+ // Returns data from the underlying "C" library data for the
+ // classic locale.
+ static __c_locale
+ _S_get_c_locale();
+
+ static const char*
+ _S_get_c_name();
+
+ private:
+ inline void
+ _M_add_reference() const throw()
+ { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
+
+ inline void
+ _M_remove_reference() const throw()
+ {
+ if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1)
+ {
+ try
+ { delete this; }
+ catch (...)
+ { }
+ }
+ }
+
+ facet(const facet&); // Not defined.
+
+ facet&
+ operator=(const facet&); // Not defined.
+ };
+
+
+ // 22.1.1.1.3 Class locale::id
+ /**
+ * @brief Facet ID class.
+ *
+ * The ID class provides facets with an index used to identify them.
+ * Every facet class must define a public static member locale::id, or be
+ * derived from a facet that provides this member, otherwise the facet
+ * cannot be used in a locale. The locale::id ensures that each class
+ * type gets a unique identifier.
+ */
+ class locale::id
+ {
+ private:
+ friend class locale;
+ friend class locale::_Impl;
+
+ template<typename _Facet>
+ friend const _Facet&
+ use_facet(const locale&);
+
+ template<typename _Facet>
+ friend bool
+ has_facet(const locale&) throw ();
+
+ // NB: There is no accessor for _M_index because it may be used
+ // before the constructor is run; the effect of calling a member
+ // function (even an inline) would be undefined.
+ mutable size_t _M_index;
+
+ // Last id number assigned.
+ static _Atomic_word _S_refcount;
+
+ void
+ operator=(const id&); // Not defined.
+
+ id(const id&); // Not defined.
+
+ public:
+ // NB: This class is always a static data member, and thus can be
+ // counted on to be zero-initialized.
+ /// Constructor.
+ id() { }
+
+ size_t
+ _M_id() const;
+ };
+
+
+ // Implementation object for locale.
class locale::_Impl
{
public:
@@ -196,209 +478,122 @@ namespace std
friend class locale::facet;
template<typename _Facet>
- friend const _Facet&
- use_facet(const locale&);
-
- template<typename _Facet>
- friend bool
+ friend bool
has_facet(const locale&) throw();
template<typename _Facet>
- friend const __locale_cache<_Facet>&
- __use_cache(const locale&);
+ friend const _Facet&
+ use_facet(const locale&);
+
+ template<typename _Cache>
+ friend struct __use_cache;
private:
// Data Members.
- _Atomic_word _M_references;
- facet** _M_facets;
- size_t _M_facets_size;
-
- char* _M_names[_S_categories_size
- + _S_extra_categories_size];
- static const locale::id* const _S_id_ctype[];
- static const locale::id* const _S_id_numeric[];
- static const locale::id* const _S_id_collate[];
- static const locale::id* const _S_id_time[];
- static const locale::id* const _S_id_monetary[];
- static const locale::id* const _S_id_messages[];
+ _Atomic_word _M_refcount;
+ const facet** _M_facets;
+ size_t _M_facets_size;
+ const facet** _M_caches;
+ char** _M_names;
+ static const locale::id* const _S_id_ctype[];
+ static const locale::id* const _S_id_numeric[];
+ static const locale::id* const _S_id_collate[];
+ static const locale::id* const _S_id_time[];
+ static const locale::id* const _S_id_monetary[];
+ static const locale::id* const _S_id_messages[];
static const locale::id* const* const _S_facet_categories[];
- inline void
+ inline void
_M_add_reference() throw()
- { __atomic_add(&_M_references, 1); }
+ { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
- inline void
+ inline void
_M_remove_reference() throw()
{
- if (__exchange_and_add(&_M_references, -1) == 1)
+ if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1)
{
- try
- { delete this; }
- catch(...)
+ try
+ { delete this; }
+ catch(...)
{ }
}
}
_Impl(const _Impl&, size_t);
_Impl(const char*, size_t);
- _Impl(facet**, size_t, bool);
+ _Impl(size_t) throw();
~_Impl() throw();
_Impl(const _Impl&); // Not defined.
- void
+ void
operator=(const _Impl&); // Not defined.
inline bool
_M_check_same_name()
{
bool __ret = true;
- for (size_t __i = 0;
- __ret && __i < _S_categories_size + _S_extra_categories_size - 1;
- ++__i)
- __ret &= (strcmp(_M_names[__i], _M_names[__i + 1]) == 0);
+ for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
+ __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
return __ret;
}
- void
+ void
_M_replace_categories(const _Impl*, category);
- void
+ void
_M_replace_category(const _Impl*, const locale::id* const*);
- void
+ void
_M_replace_facet(const _Impl*, const locale::id*);
- void
- _M_install_facet(const locale::id*, facet*);
+ void
+ _M_install_facet(const locale::id*, const facet*);
template<typename _Facet>
- inline void
+ inline void
_M_init_facet(_Facet* __facet)
- { _M_install_facet(&_Facet::id, __facet); }
-
- // Retrieve the cache at __index. 0 is returned if the cache is
- // missing. Cache is actually located at __index +
- // _M_facets_size. __index must be < _M_facets_size.
- inline __locale_cache_base*
- _M_get_cache(size_t __index)
- {
- return (__locale_cache_base*)_M_facets[__index + _M_facets_size];
- }
-
- // Save the supplied cache at __id. Assumes _M_get_cache has been
- // called.
+ { _M_install_facet(&_Facet::id, __facet); }
+
void
- _M_install_cache(__locale_cache_base* __cache, int __id)
+ _M_install_cache(const facet* __cache, size_t __index) throw()
{
- _M_facets[__id + _M_facets_size] =
- reinterpret_cast<locale::facet*>(__cache);
+ __cache->_M_add_reference();
+ _M_caches[__index] = __cache;
}
-
};
template<typename _Facet>
locale::locale(const locale& __other, _Facet* __f)
{
_M_impl = new _Impl(*__other._M_impl, 1);
- _M_impl->_M_install_facet(&_Facet::id, __f);
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
+
+ char* _M_tmp_names[_S_categories_size];
+ size_t __i = 0;
+ try
{
- delete [] _M_impl->_M_names[__i];
- char* __new = new char[2];
- strcpy(__new, "*");
- _M_impl->_M_names[__i] = __new;
+ for (; __i < _S_categories_size; ++__i)
+ {
+ _M_tmp_names[__i] = new char[2];
+ std::strcpy(_M_tmp_names[__i], "*");
+ }
+ _M_impl->_M_install_facet(&_Facet::id, __f);
+ }
+ catch(...)
+ {
+ _M_impl->_M_remove_reference();
+ for (size_t __j = 0; __j < __i; ++__j)
+ delete [] _M_tmp_names[__j];
+ __throw_exception_again;
}
- }
-
-
- // 22.1.1.1.2 Class locale::facet
- class locale::facet
- {
- private:
- friend class locale;
- friend class locale::_Impl;
-
- _Atomic_word _M_references;
-
- protected:
- // Contains data from the underlying "C" library for the classic locale.
- static __c_locale _S_c_locale;
-
- // String literal for the name of the classic locale.
- static char _S_c_name[2];
-
- explicit
- facet(size_t __refs = 0) throw();
-
- virtual
- ~facet();
-
- static void
- _S_create_c_locale(__c_locale& __cloc, const char* __s,
- __c_locale __old = 0);
-
- static __c_locale
- _S_clone_c_locale(__c_locale& __cloc);
-
- static void
- _S_destroy_c_locale(__c_locale& __cloc);
-
- private:
- void
- _M_add_reference() throw();
-
- void
- _M_remove_reference() throw();
-
- facet(const facet&); // Not defined.
-
- void
- operator=(const facet&); // Not defined.
- };
-
-
- // 22.1.1.1.3 Class locale::id
- class locale::id
- {
- private:
- friend class locale;
- friend class locale::_Impl;
- template<typename _Facet>
- friend const _Facet&
- use_facet(const locale&);
- template<typename _Facet>
- friend bool
- has_facet(const locale&) throw ();
-
- // NB: There is no accessor for _M_index because it may be used
- // before the constructor is run; the effect of calling a member
- // function (even an inline) would be undefined.
- mutable size_t _M_index;
-
- // Last id number assigned.
- static _Atomic_word _S_highwater;
-
- void
- operator=(const id&); // Not defined.
-
- id(const id&); // Not defined.
-
- public:
- // NB: This class is always a static data member, and thus can be
- // counted on to be zero-initialized.
- id();
- inline size_t
- _M_id() const
- {
- if (!_M_index)
- _M_index = 1 + __exchange_and_add(&_S_highwater, 1);
- return _M_index - 1;
+ for (size_t __k = 0; __k < _S_categories_size; ++__k)
+ {
+ delete [] _M_impl->_M_names[__k];
+ _M_impl->_M_names[__k] = _M_tmp_names[__k];
+ }
}
- };
} // namespace std
#endif
diff --git a/contrib/libstdc++/include/bits/locale_facets.h b/contrib/libstdc++/include/bits/locale_facets.h
index 37f6875..60db8a4 100644
--- a/contrib/libstdc++/include/bits/locale_facets.h
+++ b/contrib/libstdc++/include/bits/locale_facets.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,8 +37,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_LOCFACETS_H
-#define _CPP_BITS_LOCFACETS_H 1
+#ifndef _LOCALE_FACETS_H
+#define _LOCALE_FACETS_H 1
#pragma GCC system_header
@@ -51,57 +51,35 @@
namespace std
{
// NB: Don't instantiate required wchar_t facets if no wchar_t support.
-#ifdef _GLIBCPP_USE_WCHAR_T
-# define _GLIBCPP_NUM_FACETS 28
+#ifdef _GLIBCXX_USE_WCHAR_T
+# define _GLIBCXX_NUM_FACETS 28
#else
-# define _GLIBCPP_NUM_FACETS 14
+# define _GLIBCXX_NUM_FACETS 14
#endif
- // Convert string to numeric value of type _Tv and store results.
+ // Convert string to numeric value of type _Tv and store results.
// NB: This is specialized for all required types, there is no
// generic definition.
template<typename _Tv>
void
- __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err,
- const __c_locale& __cloc, int __base = 10);
+ __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err,
+ const __c_locale& __cloc);
// Explicit specializations for required types.
template<>
void
- __convert_to_v(const char*, long&, ios_base::iostate&,
- const __c_locale&, int);
+ __convert_to_v(const char*, float&, ios_base::iostate&,
+ const __c_locale&);
template<>
void
- __convert_to_v(const char*, unsigned long&, ios_base::iostate&,
- const __c_locale&, int);
+ __convert_to_v(const char*, double&, ios_base::iostate&,
+ const __c_locale&);
-#ifdef _GLIBCPP_USE_LONG_LONG
template<>
void
- __convert_to_v(const char*, long long&, ios_base::iostate&,
- const __c_locale&, int);
-
- template<>
- void
- __convert_to_v(const char*, unsigned long long&, ios_base::iostate&,
- const __c_locale&, int);
-#endif
-
- template<>
- void
- __convert_to_v(const char*, float&, ios_base::iostate&,
- const __c_locale&, int);
-
- template<>
- void
- __convert_to_v(const char*, double&, ios_base::iostate&,
- const __c_locale&, int);
-
- template<>
- void
- __convert_to_v(const char*, long double&, ios_base::iostate&,
- const __c_locale&, int);
+ __convert_to_v(const char*, long double&, ios_base::iostate&,
+ const __c_locale&);
// NB: __pad is a struct, rather than a function, so it can be
// partially-specialized.
@@ -109,33 +87,20 @@ namespace std
struct __pad
{
static void
- _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
- const _CharT* __olds, const streamsize __newlen,
+ _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
+ const _CharT* __olds, const streamsize __newlen,
const streamsize __oldlen, const bool __num);
};
// Used by both numeric and monetary facets.
- // Check to make sure that the __grouping_tmp string constructed in
- // money_get or num_get matches the canonical grouping for a given
- // locale.
- // __grouping_tmp is parsed L to R
- // 1,222,444 == __grouping_tmp of "\1\3\3"
- // __grouping is parsed R to L
- // 1,222,444 == __grouping of "\3" == "\3\3\3"
- template<typename _CharT>
- bool
- __verify_grouping(const basic_string<_CharT>& __grouping,
- basic_string<_CharT>& __grouping_tmp);
-
- // Used by both numeric and monetary facets.
// Inserts "group separator" characters into an array of characters.
// It's recursive, one iteration per group. It moves the characters
// in the buffer this way: "xxxx12345" -> "12,345xxx". Call this
- // only with __gbeg != __gend.
+ // only with __glen != 0.
template<typename _CharT>
_CharT*
- __add_grouping(_CharT* __s, _CharT __sep,
- const char* __gbeg, const char* __gend,
+ __add_grouping(_CharT* __s, _CharT __sep,
+ const char* __gbeg, size_t __gsize,
const _CharT* __first, const _CharT* __last);
// This template permits specializing facet output code for
@@ -161,135 +126,501 @@ namespace std
return __s;
}
+
// 22.2.1.1 Template class ctype
// Include host and configuration specific ctype enums for ctype_base.
#include <bits/ctype_base.h>
- // Common base for ctype<_CharT>.
+ // Common base for ctype<_CharT>.
+ /**
+ * @brief Common base for ctype facet
+ *
+ * This template class provides implementations of the public functions
+ * that forward to the protected virtual functions.
+ *
+ * This template also provides abtract stubs for the protected virtual
+ * functions.
+ */
template<typename _CharT>
class __ctype_abstract_base : public locale::facet, public ctype_base
{
public:
// Types:
+ /// Typedef for the template parameter
typedef _CharT char_type;
- bool
+ /**
+ * @brief Test char_type classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ * It does so by returning the value of ctype<char_type>::do_is().
+ *
+ * @param c The char_type to compare the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ bool
is(mask __m, char_type __c) const
{ return this->do_is(__m, __c); }
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char_type in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the char array. It does so by returning the value of
+ * ctype<char_type>::do_is().
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
const char_type*
- is(const char_type *__lo, const char_type *__hi, mask *__vec) const
+ is(const char_type *__lo, const char_type *__hi, mask *__vec) const
{ return this->do_is(__lo, __hi, __vec); }
+ /**
+ * @brief Find char_type matching a mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is true. It does so by returning
+ * ctype<char_type>::do_scan_is().
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to matching char_type if found, else @a hi.
+ */
const char_type*
scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_is(__m, __lo, __hi); }
+ /**
+ * @brief Find char_type not matching a mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is false. It does so by returning
+ * ctype<char_type>::do_scan_not().
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to non-matching char if found, else @a hi.
+ */
const char_type*
scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_not(__m, __lo, __hi); }
- char_type
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This function converts the argument to uppercase if possible.
+ * If not possible (for example, '2'), returns the argument. It does
+ * so by returning ctype<char_type>::do_toupper().
+ *
+ * @param c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a c.
+ */
+ char_type
toupper(char_type __c) const
{ return this->do_toupper(__c); }
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This function converts each char_type in the range [lo,hi) to
+ * uppercase if possible. Other elements remain untouched. It does so
+ * by returning ctype<char_type>:: do_toupper(lo, hi).
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
{ return this->do_toupper(__lo, __hi); }
- char_type
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This function converts the argument to lowercase if possible. If
+ * not possible (for example, '2'), returns the argument. It does so
+ * by returning ctype<char_type>::do_tolower(c).
+ *
+ * @param c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a c.
+ */
+ char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This function converts each char_type in the range [lo,hi) to
+ * lowercase if possible. Other elements remain untouched. It does so
+ * by returning ctype<char_type>:: do_tolower(lo, hi).
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
{ return this->do_tolower(__lo, __hi); }
- char_type
+ /**
+ * @brief Widen char to char_type
+ *
+ * This function converts the char argument to char_type using the
+ * simplest reasonable transformation. It does so by returning
+ * ctype<char_type>::do_widen(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted char_type.
+ */
+ char_type
widen(char __c) const
{ return this->do_widen(__c); }
+ /**
+ * @brief Widen array to char_type
+ *
+ * This function converts each char in the input to char_type using the
+ * simplest reasonable transformation. It does so by returning
+ * ctype<char_type>::do_widen(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
{ return this->do_widen(__lo, __hi, __to); }
- char
+ /**
+ * @brief Narrow char_type to char
+ *
+ * This function converts the char_type to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. It does so by returning
+ * ctype<char_type>::do_narrow(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char_type to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ char
narrow(char_type __c, char __dfault) const
{ return this->do_narrow(__c, __dfault); }
+ /**
+ * @brief Narrow array to char array
+ *
+ * This function converts each char_type in the input to char using the
+ * simplest reasonable transformation and writes the results to the
+ * destination array. For any char_type in the input that cannot be
+ * converted, @a dfault is used instead. It does so by returning
+ * ctype<char_type>::do_narrow(lo, hi, dfault, to).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char *__to) const
{ return this->do_narrow(__lo, __hi, __dfault, __to); }
protected:
- explicit
- __ctype_abstract_base(size_t __refs = 0): locale::facet(__refs) { }
+ explicit
+ __ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
- virtual
+ virtual
~__ctype_abstract_base() { }
-
- virtual bool
+
+ /**
+ * @brief Test char_type classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param c The char_type to find the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ virtual bool
do_is(mask __m, char_type __c) const = 0;
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char_type in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the input.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
virtual const char_type*
- do_is(const char_type* __lo, const char_type* __hi,
+ do_is(const char_type* __lo, const char_type* __hi,
mask* __vec) const = 0;
+ /**
+ * @brief Find char_type matching mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is true.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching char_type if found, else @a hi.
+ */
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
+ /**
+ * @brief Find char_type not matching mask
+ *
+ * This function searches for and returns a pointer to the first
+ * char_type c of [lo,hi) for which is(m,c) is false.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching char_type if found, else @a hi.
+ */
virtual const char_type*
- do_scan_not(mask __m, const char_type* __lo,
+ do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
- virtual char_type
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the char_type argument to uppercase
+ * if possible. If not possible (for example, '2'), returns the
+ * argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a c.
+ */
+ virtual char_type
do_toupper(char_type) const = 0;
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each char_type in the range [lo,hi)
+ * to uppercase if possible. Other elements remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const = 0;
- virtual char_type
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a c.
+ */
+ virtual char_type
do_tolower(char_type) const = 0;
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each char_type in the range [lo,hi)
+ * to lowercase if possible. Other elements remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const = 0;
-
- virtual char_type
+
+ /**
+ * @brief Widen char
+ *
+ * This virtual function converts the char to char_type using the
+ * simplest reasonable transformation.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted char_type
+ */
+ virtual char_type
do_widen(char) const = 0;
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the input to char_type using the
+ * simplest reasonable transformation.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char*
- do_widen(const char* __lo, const char* __hi,
+ do_widen(const char* __lo, const char* __hi,
char_type* __dest) const = 0;
- virtual char
+ /**
+ * @brief Narrow char_type to char
+ *
+ * This virtual function converts the argument to char using the
+ * simplest reasonable transformation. If the conversion fails, dfault
+ * is returned instead.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char_type to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
do_narrow(char_type, char __dfault) const = 0;
+ /**
+ * @brief Narrow char_type array to char
+ *
+ * This virtual function converts each char_type in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any element in the input that
+ * cannot be converted, @a dfault is used instead.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char* __dest) const = 0;
+ char __dfault, char* __dest) const = 0;
};
// NB: Generic, mostly useless implementation.
+ /**
+ * @brief Template ctype facet
+ *
+ * This template class defines classification and conversion functions for
+ * character sets. It wraps <cctype> functionality. Ctype gets used by
+ * streams for many I/O operations.
+ *
+ * This template provides the protected virtual functions the developer
+ * will have to replace in a derived class or specialization to make a
+ * working facet. The public functions that access them are defined in
+ * __ctype_abstract_base, to allow for implementation flexibility. See
+ * ctype<wchar_t> for an example. The functions are documented in
+ * __ctype_abstract_base.
+ *
+ * Note: implementations are provided for all the protected virtual
+ * functions, but will likely not be useful.
+ */
template<typename _CharT>
class ctype : public __ctype_abstract_base<_CharT>
{
public:
// Types:
- typedef _CharT char_type;
- typedef typename ctype::mask mask;
+ typedef _CharT char_type;
+ typedef typename __ctype_abstract_base<_CharT>::mask mask;
- static locale::id id;
+ /// The facet id for ctype<char_type>
+ static locale::id id;
- explicit
+ explicit
ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
protected:
- virtual
+ virtual
~ctype();
- virtual bool
+ virtual bool
do_is(mask __m, char_type __c) const;
virtual const char_type*
@@ -302,25 +633,25 @@ namespace std
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
- virtual char_type
+ virtual char_type
do_toupper(char_type __c) const;
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
- virtual char_type
+ virtual char_type
do_tolower(char_type __c) const;
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
- virtual char_type
+ virtual char_type
do_widen(char __c) const;
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
- virtual char
+ virtual char
do_narrow(char_type, char __dfault) const;
virtual const char_type*
@@ -332,172 +663,850 @@ namespace std
locale::id ctype<_CharT>::id;
// 22.2.1.3 ctype<char> specialization.
+ /**
+ * @brief The ctype<char> specialization.
+ *
+ * This class defines classification and conversion functions for
+ * the char type. It gets used by char streams for many I/O
+ * operations. The char specialization provides a number of
+ * optimizations as well.
+ */
template<>
- class ctype<char> : public __ctype_abstract_base<char>
+ class ctype<char> : public locale::facet, public ctype_base
{
public:
// Types:
- typedef char char_type;
+ /// Typedef for the template parameter char.
+ typedef char char_type;
protected:
// Data Members:
__c_locale _M_c_locale_ctype;
- bool _M_del;
- __to_type _M_toupper;
- __to_type _M_tolower;
- const mask* _M_table;
-
+ bool _M_del;
+ __to_type _M_toupper;
+ __to_type _M_tolower;
+ const mask* _M_table;
+ mutable char _M_widen_ok;
+ mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow_ok; // 0 uninitialized, 1 init,
+ // 2 non-consecutive
+
public:
+ /// The facet id for ctype<char>
static locale::id id;
+ /// The size of the mask table. It is SCHAR_MAX + 1.
static const size_t table_size = 1 + static_cast<unsigned char>(-1);
- explicit
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param table If non-zero, table is used as the per-char mask.
+ * Else classic_table() is used.
+ * @param del If true, passes ownership of table to this facet.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
- explicit
- ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
+ /**
+ * @brief Constructor performs static initialization.
+ *
+ * This constructor is used to construct the initial C locale facet.
+ *
+ * @param cloc Handle to C locale data.
+ * @param table If non-zero, table is used as the per-char mask.
+ * @param del If true, passes ownership of table to this facet.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
size_t __refs = 0);
- inline bool
+ /**
+ * @brief Test char classification.
+ *
+ * This function compares the mask table[c] to @a m.
+ *
+ * @param c The char to compare the mask of.
+ * @param m The mask to compare against.
+ * @return True if m & table[c] is true, false otherwise.
+ */
+ inline bool
is(mask __m, char __c) const;
-
+
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char in the range [lo, hi) and
+ * successively writes it to vec. vec must have as many elements as
+ * the char array.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
inline const char*
is(const char* __lo, const char* __hi, mask* __vec) const;
-
+
+ /**
+ * @brief Find char matching a mask
+ *
+ * This function searches for and returns the first char in [lo,hi) for
+ * which is(m,char) is true.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching char if found, else @a hi.
+ */
inline const char*
scan_is(mask __m, const char* __lo, const char* __hi) const;
+ /**
+ * @brief Find char not matching a mask
+ *
+ * This function searches for and returns a pointer to the first char
+ * in [lo,hi) for which is(m,char) is false.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching char if found, else @a hi.
+ */
inline const char*
scan_not(mask __m, const char* __lo, const char* __hi) const;
-
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This function converts the char argument to uppercase if possible.
+ * If not possible (for example, '2'), returns the argument.
+ *
+ * toupper() acts as if it returns ctype<char>::do_toupper(c).
+ * do_toupper() must always return the same result for the same input.
+ *
+ * @param c The char to convert.
+ * @return The uppercase char if convertible, else @a c.
+ */
+ char_type
+ toupper(char_type __c) const
+ { return this->do_toupper(__c); }
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This function converts each char in the range [lo,hi) to uppercase
+ * if possible. Other chars remain untouched.
+ *
+ * toupper() acts as if it returns ctype<char>:: do_toupper(lo, hi).
+ * do_toupper() must always return the same result for the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This function converts the char argument to lowercase if possible.
+ * If not possible (for example, '2'), returns the argument.
+ *
+ * tolower() acts as if it returns ctype<char>::do_tolower(c).
+ * do_tolower() must always return the same result for the same input.
+ *
+ * @param c The char to convert.
+ * @return The lowercase char if convertible, else @a c.
+ */
+ char_type
+ tolower(char_type __c) const
+ { return this->do_tolower(__c); }
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This function converts each char in the range [lo,hi) to lowercase
+ * if possible. Other chars remain untouched.
+ *
+ * tolower() acts as if it returns ctype<char>:: do_tolower(lo, hi).
+ * do_tolower() must always return the same result for the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
+
+ /**
+ * @brief Widen char
+ *
+ * This function converts the char to char_type using the simplest
+ * reasonable transformation. For an underived ctype<char> facet, the
+ * argument will be returned unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_widen(c).
+ * do_widen() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted character.
+ */
+ char_type
+ widen(char __c) const
+ {
+ if (_M_widen_ok) return _M_widen[static_cast<unsigned char>(__c)];
+ this->_M_widen_init();
+ return this->do_widen(__c);
+ }
+
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the input to char using the
+ * simplest reasonable transformation. For an underived ctype<char>
+ * facet, the argument will be copied unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_widen(c).
+ * do_widen() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char*
+ widen(const char* __lo, const char* __hi, char_type* __to) const
+ {
+ if (_M_widen_ok == 1)
+ {
+ memcpy(__to, __lo, __hi - __lo);
+ return __hi;
+ }
+ if (!_M_widen_ok) _M_widen_init();
+ return this->do_widen(__lo, __hi, __to);
+ }
+
+ /**
+ * @brief Narrow char
+ *
+ * This function converts the char to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. For an underived ctype<char> facet, @a c
+ * will be returned unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_narrow(c).
+ * do_narrow() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted character.
+ */
+ char
+ narrow(char_type __c, char __dfault) const
+ {
+ if (_M_narrow[static_cast<unsigned char>(__c)])
+ return _M_narrow[static_cast<unsigned char>(__c)];
+ const char __t = do_narrow(__c, __dfault);
+ if (__t != __dfault) _M_narrow[static_cast<unsigned char>(__c)] = __t;
+ return __t;
+ }
+
+ /**
+ * @brief Narrow char array
+ *
+ * This function converts each char in the input to char using the
+ * simplest reasonable transformation and writes the results to the
+ * destination array. For any char in the input that cannot be
+ * converted, @a dfault is used instead. For an underived ctype<char>
+ * facet, the argument will be copied unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_narrow(lo, hi,
+ * dfault, to). do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char_type*
+ narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char *__to) const
+ {
+ if (__builtin_expect(_M_narrow_ok == 1,true))
+ {
+ memcpy(__to, __lo, __hi - __lo);
+ return __hi;
+ }
+ if (!_M_narrow_ok)
+ _M_narrow_init();
+ return this->do_narrow(__lo, __hi, __dfault, __to);
+ }
+
protected:
- const mask*
+ /// Returns a pointer to the mask table provided to the constructor, or
+ /// the default from classic_table() if none was provided.
+ const mask*
table() const throw()
{ return _M_table; }
- static const mask*
+ /// Returns a pointer to the C locale mask table.
+ static const mask*
classic_table() throw();
- virtual
+ /**
+ * @brief Destructor.
+ *
+ * This function deletes table() if @a del was true in the
+ * constructor.
+ */
+ virtual
~ctype();
- virtual bool
- do_is(mask __m, char_type __c) const;
-
- virtual const char_type*
- do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
-
- virtual const char_type*
- do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
-
- virtual const char_type*
- do_scan_not(mask __m, const char_type* __lo,
- const char_type* __hi) const;
-
- virtual char_type
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the char argument to uppercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The char to convert.
+ * @return The uppercase char if convertible, else @a c.
+ */
+ virtual char_type
do_toupper(char_type) const;
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * uppercase if possible. Other chars remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
- virtual char_type
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the char argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The char to convert.
+ * @return The lowercase char if convertible, else @a c.
+ */
+ virtual char_type
do_tolower(char_type) const;
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * lowercase if possible. Other chars remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
-
- virtual char_type
- do_widen(char) const;
+ /**
+ * @brief Widen char
+ *
+ * This virtual function converts the char to char using the simplest
+ * reasonable transformation. For an underived ctype<char> facet, the
+ * argument will be returned unchanged.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted character.
+ */
+ virtual char_type
+ do_widen(char __c) const
+ { return __c; }
+
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the range [lo,hi) to char using
+ * the simplest reasonable transformation. For an underived
+ * ctype<char> facet, the argument will be copied unchanged.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char*
- do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
-
- virtual char
- do_narrow(char_type, char __dfault) const;
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ {
+ memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+ /**
+ * @brief Narrow char
+ *
+ * This virtual function converts the char to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. For an underived ctype<char> facet, @a c will be
+ * returned unchanged.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
+ do_narrow(char_type __c, char) const
+ { return __c; }
+
+ /**
+ * @brief Narrow char array to char array
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any char in the input that
+ * cannot be converted, @a dfault is used instead. For an underived
+ * ctype<char> facet, the argument will be copied unchanged.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char* __dest) const;
+ char, char* __dest) const
+ {
+ memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+
+ private:
+
+ void _M_widen_init() const
+ {
+ char __tmp[sizeof(_M_widen)];
+ for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
+ __tmp[__i] = __i;
+ do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen);
+
+ _M_widen_ok = 1;
+ // Set _M_widen_ok to 2 if memcpy can't be used.
+ for (size_t __j = 0; __j < sizeof(_M_widen); ++__j)
+ if (__tmp[__j] != _M_widen[__j])
+ {
+ _M_widen_ok = 2;
+ break;
+ }
+ }
+
+ // Fill in the narrowing cache and flag whether all values are
+ // valid or not. _M_narrow_ok is set to 1 if the whole table is
+ // narrowed, 2 if only some values could be narrowed.
+ void _M_narrow_init() const
+ {
+ char __tmp[sizeof(_M_narrow)];
+ for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i)
+ __tmp[__i] = __i;
+ do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow);
+
+ // Check if any default values were created. Do this by
+ // renarrowing with a different default value and comparing.
+ bool __consecutive = true;
+ for (size_t __j = 0; __j < sizeof(_M_narrow); ++__j)
+ if (!_M_narrow[__j])
+ {
+ char __c;
+ do_narrow(__tmp + __j, __tmp + __j + 1, 1, &__c);
+ if (__c == 1)
+ {
+ __consecutive = false;
+ break;
+ }
+ }
+ _M_narrow_ok = __consecutive ? 1 : 2;
+ }
};
-
+
template<>
const ctype<char>&
use_facet<ctype<char> >(const locale& __loc);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
// 22.2.1.3 ctype<wchar_t> specialization
+ /**
+ * @brief The ctype<wchar_t> specialization.
+ *
+ * This class defines classification and conversion functions for the
+ * wchar_t type. It gets used by wchar_t streams for many I/O operations.
+ * The wchar_t specialization provides a number of optimizations as well.
+ *
+ * ctype<wchar_t> inherits its public methods from
+ * __ctype_abstract_base<wchar_t>.
+ */
template<>
class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
{
public:
// Types:
- typedef wchar_t char_type;
- typedef wctype_t __wmask_type;
+ /// Typedef for the template parameter wchar_t.
+ typedef wchar_t char_type;
+ typedef wctype_t __wmask_type;
protected:
__c_locale _M_c_locale_ctype;
+ // Pre-computed narrowed and widened chars.
+ bool _M_narrow_ok;
+ char _M_narrow[128];
+ wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
+
+ // Pre-computed elements for do_is.
+ mask _M_bit[16];
+ __wmask_type _M_wmask[16];
+
public:
// Data Members:
- static locale::id id;
+ /// The facet id for ctype<wchar_t>
+ static locale::id id;
- explicit
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
ctype(size_t __refs = 0);
- explicit
+ /**
+ * @brief Constructor performs static initialization.
+ *
+ * This constructor is used to construct the initial C locale facet.
+ *
+ * @param cloc Handle to C locale data.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
ctype(__c_locale __cloc, size_t __refs = 0);
protected:
__wmask_type
_M_convert_to_wmask(const mask __m) const;
- virtual
+ /// Destructor
+ virtual
~ctype();
- virtual bool
+ /**
+ * @brief Test wchar_t classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param c The wchar_t to find the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ virtual bool
do_is(mask __m, char_type __c) const;
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each wchar_t in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the input.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+ /**
+ * @brief Find wchar_t matching mask
+ *
+ * This function searches for and returns the first wchar_t c in
+ * [lo,hi) for which is(m,c) is true.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching wchar_t if found, else @a hi.
+ */
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+ /**
+ * @brief Find wchar_t not matching mask
+ *
+ * This function searches for and returns a pointer to the first
+ * wchar_t c of [lo,hi) for which is(m,c) is false.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching wchar_t if found, else @a hi.
+ */
virtual const char_type*
- do_scan_not(mask __m, const char_type* __lo,
+ do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
- virtual char_type
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the wchar_t argument to uppercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The wchar_t to convert.
+ * @return The uppercase wchar_t if convertible, else @a c.
+ */
+ virtual char_type
do_toupper(char_type) const;
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * uppercase if possible. Other elements remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
- virtual char_type
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The wchar_t to convert.
+ * @return The lowercase wchar_t if convertible, else @a c.
+ */
+ virtual char_type
do_tolower(char_type) const;
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * lowercase if possible. Other elements remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
-
- virtual char_type
+
+ /**
+ * @brief Widen char to wchar_t
+ *
+ * This virtual function converts the char to wchar_t using the
+ * simplest reasonable transformation. For an underived ctype<wchar_t>
+ * facet, the argument will be cast to wchar_t.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted wchar_t.
+ */
+ virtual char_type
do_widen(char) const;
+ /**
+ * @brief Widen char array to wchar_t array
+ *
+ * This function converts each char in the input to wchar_t using the
+ * simplest reasonable transformation. For an underived ctype<wchar_t>
+ * facet, the argument will be copied, casting each element to wchar_t.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
- virtual char
+ /**
+ * @brief Narrow wchar_t to char
+ *
+ * This virtual function converts the argument to char using
+ * the simplest reasonable transformation. If the conversion
+ * fails, dfault is returned instead. For an underived
+ * ctype<wchar_t> facet, @a c will be cast to char and
+ * returned.
+ *
+ * do_narrow() is a hook for a derived facet to change the
+ * behavior of narrowing. do_narrow() must always return the
+ * same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The wchar_t to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
do_narrow(char_type, char __dfault) const;
+ /**
+ * @brief Narrow wchar_t array to char array
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any wchar_t in the input that
+ * cannot be converted, @a dfault is used instead. For an underived
+ * ctype<wchar_t> facet, the argument will be copied, casting each
+ * element to char.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const;
+ // For use at construction time only.
+ void
+ _M_initialize_ctype();
};
template<>
const ctype<wchar_t>&
use_facet<ctype<wchar_t> >(const locale& __loc);
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
// Include host and configuration specific ctype inlines.
#include <bits/ctype_inline.h>
@@ -507,13 +1516,13 @@ namespace std
class ctype_byname : public ctype<_CharT>
{
public:
- typedef _CharT char_type;
+ typedef _CharT char_type;
- explicit
+ explicit
ctype_byname(const char* __s, size_t __refs = 0);
protected:
- virtual
+ virtual
~ctype_byname() { };
};
@@ -528,26 +1537,26 @@ namespace std
#include <bits/codecvt.h>
// 22.2.2 The numeric category.
- class __num_base
+ class __num_base
{
public:
// NB: Code depends on the order of _S_atoms_out elements.
// Below are the indices into _S_atoms_out.
- enum
- {
- _S_minus,
- _S_plus,
- _S_x,
- _S_X,
- _S_digits,
- _S_digits_end = _S_digits + 16,
- _S_udigits = _S_digits_end,
- _S_udigits_end = _S_udigits + 16,
- _S_e = _S_digits + 14, // For scientific notation, 'e'
- _S_E = _S_udigits + 14, // For scientific notation, 'E'
- _S_end = _S_udigits_end
+ enum
+ {
+ _S_ominus,
+ _S_oplus,
+ _S_ox,
+ _S_oX,
+ _S_odigits,
+ _S_odigits_end = _S_odigits + 16,
+ _S_oudigits = _S_odigits_end,
+ _S_oudigits_end = _S_oudigits + 16,
+ _S_oe = _S_odigits + 14, // For scientific notation, 'e'
+ _S_oE = _S_oudigits + 14, // For scientific notation, 'E'
+ _S_oend = _S_oudigits_end
};
-
+
// A list of valid numeric literals for output. This array
// contains chars that will be passed through the current locale's
// ctype<_CharT>.widen() and then used to render numbers.
@@ -555,126 +1564,326 @@ namespace std
// "-+xX0123456789abcdef0123456789ABCDEF".
static const char* _S_atoms_out;
- protected:
// String literal of acceptable (narrow) input, for num_get.
- // "0123456789eEabcdfABCDF"
+ // "-+xX0123456789abcdefABCDEF"
static const char* _S_atoms_in;
- enum
- {
- _M_zero,
- _M_e = _M_zero + 10,
- _M_E = _M_zero + 11,
- _M_size = 21 + 1
+ enum
+ {
+ _S_iminus,
+ _S_iplus,
+ _S_ix,
+ _S_iX,
+ _S_izero,
+ _S_ie = _S_izero + 14,
+ _S_iE = _S_izero + 20,
+ _S_iend = 26
};
// num_put
// Construct and return valid scanf format for floating point types.
static void
- _S_format_float(const ios_base& __io, char* __fptr, char __mod,
- streamsize __prec);
-
- // Construct and return valid scanf format for integer types.
- static void
- _S_format_int(const ios_base& __io, char* __fptr, char __mod, char __modl);
+ _S_format_float(const ios_base& __io, char* __fptr, char __mod);
};
+ template<typename _CharT>
+ struct __numpunct_cache : public locale::facet
+ {
+ const char* _M_grouping;
+ size_t _M_grouping_size;
+ bool _M_use_grouping;
+ const _CharT* _M_truename;
+ size_t _M_truename_size;
+ const _CharT* _M_falsename;
+ size_t _M_falsename_size;
+ _CharT _M_decimal_point;
+ _CharT _M_thousands_sep;
+
+ // A list of valid numeric literals for output: in the standard
+ // "C" locale, this is "-+xX0123456789abcdef0123456789ABCDEF".
+ // This array contains the chars after having been passed
+ // through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms_out[__num_base::_S_oend];
+
+ // A list of valid numeric literals for input: in the standard
+ // "C" locale, this is "-+xX0123456789abcdefABCDEF"
+ // This array contains the chars after having been passed
+ // through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms_in[__num_base::_S_iend];
+
+ bool _M_allocated;
+
+ __numpunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+ _M_truename(NULL), _M_truename_size(0), _M_falsename(NULL),
+ _M_falsename_size(0), _M_decimal_point(_CharT()),
+ _M_thousands_sep(_CharT()), _M_allocated(false)
+ { }
+
+ ~__numpunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __numpunct_cache&
+ operator=(const __numpunct_cache&);
+
+ explicit
+ __numpunct_cache(const __numpunct_cache&);
+ };
template<typename _CharT>
- class __locale_cache;
+ __numpunct_cache<_CharT>::~__numpunct_cache()
+ {
+ if (_M_allocated)
+ {
+ delete [] _M_grouping;
+ delete [] _M_truename;
+ delete [] _M_falsename;
+ }
+ }
+ /**
+ * @brief Numpunct facet.
+ *
+ * This facet stores several pieces of information related to printing and
+ * scanning numbers, such as the decimal point character. It takes a
+ * template parameter specifying the char type. The numpunct facet is
+ * used by streams for many I/O operations involving numbers.
+ *
+ * The numpunct template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from a numpunct facet.
+ */
template<typename _CharT>
class numpunct : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
-
- friend class __locale_cache<numpunct<_CharT> >;
-
- static locale::id id;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+ typedef __numpunct_cache<_CharT> __cache_type;
- private:
- char_type _M_decimal_point;
- char_type _M_thousands_sep;
- const char* _M_grouping;
- const char_type* _M_truename;
- const char_type* _M_falsename;
+ protected:
+ __cache_type* _M_data;
public:
- explicit
- numpunct(size_t __refs = 0) : locale::facet(__refs)
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Numpunct constructor.
+ *
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+ { _M_initialize_numpunct(); }
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up the
+ * predefined locale facets.
+ *
+ * @param cache __numpunct_cache object.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
{ _M_initialize_numpunct(); }
- explicit
- numpunct(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs)
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_data(NULL)
{ _M_initialize_numpunct(__cloc); }
- char_type
+ /**
+ * @brief Return decimal point character.
+ *
+ * This function returns a char_type to use as a decimal point. It
+ * does so by returning returning
+ * numpunct<char_type>::do_decimal_point().
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ char_type
decimal_point() const
{ return this->do_decimal_point(); }
- char_type
+ /**
+ * @brief Return thousands separator character.
+ *
+ * This function returns a char_type to use as a thousands
+ * separator. It does so by returning returning
+ * numpunct<char_type>::do_thousands_sep().
+ *
+ * @return char_type representing a thousands separator.
+ */
+ char_type
thousands_sep() const
{ return this->do_thousands_sep(); }
- string
+ /**
+ * @brief Return grouping specification.
+ *
+ * This function returns a string representing groupings for the
+ * integer part of a number. Groupings indicate where thousands
+ * separators should be inserted in the integer part of a number.
+ *
+ * Each char in the return string is interpret as an integer
+ * rather than a character. These numbers represent the number
+ * of digits in a group. The first char in the string
+ * represents the number of digits in the least significant
+ * group. If a char is negative, it indicates an unlimited
+ * number of digits for the group. If more chars from the
+ * string are required to group a number, the last char is used
+ * repeatedly.
+ *
+ * For example, if the grouping() returns "\003\002" and is
+ * applied to the number 123456789, this corresponds to
+ * 12,34,56,789. Note that if the string was "32", this would
+ * put more than 50 digits into the least significant group if
+ * the character set is ASCII.
+ *
+ * The string is returned by calling
+ * numpunct<char_type>::do_grouping().
+ *
+ * @return string representing grouping specification.
+ */
+ string
grouping() const
{ return this->do_grouping(); }
- string_type
+ /**
+ * @brief Return string representation of bool true.
+ *
+ * This function returns a string_type containing the text
+ * representation for true bool variables. It does so by calling
+ * numpunct<char_type>::do_truename().
+ *
+ * @return string_type representing printed form of true.
+ */
+ string_type
truename() const
{ return this->do_truename(); }
- string_type
+ /**
+ * @brief Return string representation of bool false.
+ *
+ * This function returns a string_type containing the text
+ * representation for false bool variables. It does so by calling
+ * numpunct<char_type>::do_falsename().
+ *
+ * @return string_type representing printed form of false.
+ */
+ string_type
falsename() const
{ return this->do_falsename(); }
protected:
- virtual
+ /// Destructor.
+ virtual
~numpunct();
- virtual char_type
+ /**
+ * @brief Return decimal point character.
+ *
+ * Returns a char_type to use as a decimal point. This function is a
+ * hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ virtual char_type
do_decimal_point() const
- { return _M_decimal_point; }
-
- virtual char_type
+ { return _M_data->_M_decimal_point; }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * Returns a char_type to use as a thousands separator. This function
+ * is a hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a thousands separator.
+ */
+ virtual char_type
do_thousands_sep() const
- { return _M_thousands_sep; }
-
+ { return _M_data->_M_thousands_sep; }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * Returns a string representing groupings for the integer part of a
+ * number. This function is a hook for derived classes to change the
+ * value returned. @see grouping() for details.
+ *
+ * @return String representing grouping specification.
+ */
virtual string
do_grouping() const
- { return _M_grouping; }
-
- virtual string_type
+ { return _M_data->_M_grouping; }
+
+ /**
+ * @brief Return string representation of bool true.
+ *
+ * Returns a string_type containing the text representation for true
+ * bool variables. This function is a hook for derived classes to
+ * change the value returned.
+ *
+ * @return string_type representing printed form of true.
+ */
+ virtual string_type
do_truename() const
- { return _M_truename; }
-
- virtual string_type
+ { return _M_data->_M_truename; }
+
+ /**
+ * @brief Return string representation of bool false.
+ *
+ * Returns a string_type containing the text representation for false
+ * bool variables. This function is a hook for derived classes to
+ * change the value returned.
+ *
+ * @return string_type representing printed form of false.
+ */
+ virtual string_type
do_falsename() const
- { return _M_falsename; }
+ { return _M_data->_M_falsename; }
// For use at construction time only.
- void
+ void
_M_initialize_numpunct(__c_locale __cloc = NULL);
};
template<typename _CharT>
locale::id numpunct<_CharT>::id;
- template<>
+ template<>
numpunct<char>::~numpunct();
- template<>
+ template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
-#ifdef _GLIBCPP_USE_WCHAR_T
- template<>
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
numpunct<wchar_t>::~numpunct();
- template<>
+ template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
#endif
@@ -682,342 +1891,675 @@ namespace std
template<typename _CharT>
class numpunct_byname : public numpunct<_CharT>
{
- // Data Member.
- __c_locale _M_c_locale_numpunct;
-
public:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
- explicit
+ explicit
numpunct_byname(const char* __s, size_t __refs = 0)
: numpunct<_CharT>(__refs)
{
- _S_create_c_locale(_M_c_locale_numpunct, __s);
- _M_initialize_numpunct(_M_c_locale_numpunct);
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ __c_locale __tmp;
+ this->_S_create_c_locale(__tmp, __s);
+ this->_M_initialize_numpunct(__tmp);
+ this->_S_destroy_c_locale(__tmp);
+ }
}
protected:
- virtual
- ~numpunct_byname()
- { _S_destroy_c_locale(_M_c_locale_numpunct); }
+ virtual
+ ~numpunct_byname() { }
};
+ /**
+ * @brief Facet for parsing number strings.
+ *
+ * This facet encapsulates the code to parse and return a number
+ * from a string. It is used by the istream numeric extraction
+ * operators.
+ *
+ * The num_get template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the num_get facet.
+ */
template<typename _CharT, typename _InIter>
- class num_get : public locale::facet, public __num_base
+ class num_get : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef _InIter iter_type;
-
- static locale::id id;
-
- explicit
- num_get(size_t __refs = 0) : locale::facet(__refs) { }
-
- iter_type
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ num_get(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the bool @a v. It does so by calling
+ * num_put::do_put().
+ *
+ * If ios_base::boolalpha is set, attempts to read
+ * ctype<CharT>::truename() or ctype<CharT>::falsename(). Sets
+ * @a v to true or false if successful. Sets err to
+ * ios_base::failbit if reading the string fails. Sets err to
+ * ios_base::eofbit if the stream is emptied.
+ *
+ * If ios_base::boolalpha is not set, proceeds as with reading a long,
+ * except if the value is 1, sets @a v to true, if the value is 0, sets
+ * @a v to false, and otherwise set err to ios_base::failbit.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, bool& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the integral variable @a v. It does so
+ * by calling num_put::do_put().
+ *
+ * Parsing is affected by the flag settings in @a io.
+ *
+ * The basic parse is affected by the value of io.flags() &
+ * ios_base::basefield. If equal to ios_base::oct, parses like the
+ * scanf %o specifier. Else if equal to ios_base::hex, parses like %X
+ * specifier. Else if basefield equal to 0, parses like the %i
+ * specifier. Otherwise, parses like %d for signed and %u for unsigned
+ * types. The matching type length modifier is also used.
+ *
+ * Digit grouping is intrepreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
iter_type
- get(iter_type __in, iter_type __end, ios_base& __io,
+ get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned short& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned int& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
-#ifdef _GLIBCPP_USE_LONG_LONG
- iter_type
+#ifdef _GLIBCXX_USE_LONG_LONG
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#endif
-
- iter_type
+ //@}
+
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the integral variable @a v. It does so
+ * by calling num_put::do_put().
+ *
+ * The input characters are parsed like the scanf %g specifier. The
+ * matching type length modifier is also used.
+ *
+ * The decimal point character used is numpunct::decimal_point().
+ * Digit grouping is intrepreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, float& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, double& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
- iter_type
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long double& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
-
- iter_type
+ //@}
+
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the pointer variable @a v. It does so
+ * by calling num_put::do_put().
+ *
+ * The input characters are parsed like the scanf %p specifier.
+ *
+ * Digit grouping is intrepreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * Note that the digit grouping effect for pointers is a bit ambiguous
+ * in the standard and shouldn't be relied on. See DR 344.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, void*& __v) const
- { return this->do_get(__in, __end, __io, __err, __v); }
+ { return this->do_get(__in, __end, __io, __err, __v); }
protected:
+ /// Destructor.
virtual ~num_get() { }
- iter_type
- _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ iter_type
+ _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
string& __xtrc) const;
- iter_type
- _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
- string& __xtrc, int& __base) const;
-
- virtual iter_type
+ template<typename _ValueT>
+ iter_type
+ _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ _ValueT& __v) const;
+
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the variable @a v. This function is a
+ * hook for derived classes to change the value returned. @see get()
+ * for more details.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
- virtual iter_type
+ virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
unsigned short&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
unsigned int&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
unsigned long&) const;
-#ifdef _GLIBCPP_USE_LONG_LONG
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+#ifdef _GLIBCXX_USE_LONG_LONG
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
long long&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
unsigned long long&) const;
#endif
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
float&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
double&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
long double&) const;
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
void*&) const;
+ //@}
};
template<typename _CharT, typename _InIter>
locale::id num_get<_CharT, _InIter>::id;
-#if 0
- // Partial specialization for istreambuf_iterator, so can use traits_type.
- template<typename _CharT>
- class num_get<_CharT, istreambuf_iterator<_CharT> >;
-
- iter_type
- _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
- string& __xtrc) const;
-
- iter_type
- _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
- string& __xtrc, int& __base) const;
-
- virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
-#endif
+ /**
+ * @brief Facet for converting numbers to strings.
+ *
+ * This facet encapsulates the code to convert a number to a string. It is
+ * used by the ostream numeric insertion operators.
+ *
+ * The num_put template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the num_put facet.
+ */
template<typename _CharT, typename _OutIter>
- class num_put : public locale::facet, public __num_base
+ class num_put : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef _OutIter iter_type;
- static locale::id id;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ //@}
- explicit
- num_put(size_t __refs = 0) : locale::facet(__refs) { }
+ /// Numpunct facet id.
+ static locale::id id;
- iter_type
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ num_put(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the boolean @a v and inserts it into a stream. It does so
+ * by calling num_put::do_put().
+ *
+ * If ios_base::boolalpha is set, writes ctype<CharT>::truename() or
+ * ctype<CharT>::falsename(). Otherwise formats @a v as an int.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
{ return this->do_put(__s, __f, __fill, __v); }
- iter_type
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the integral value @a v and inserts it into a
+ * stream. It does so by calling num_put::do_put().
+ *
+ * Formatting is affected by the flag settings in @a io.
+ *
+ * The basic format is affected by the value of io.flags() &
+ * ios_base::basefield. If equal to ios_base::oct, formats like the
+ * printf %o specifier. Else if equal to ios_base::hex, formats like
+ * %x or %X with ios_base::uppercase unset or set respectively.
+ * Otherwise, formats like %d, %ld, %lld for signed and %u, %lu, %llu
+ * for unsigned values. Note that if both oct and hex are set, neither
+ * will take effect.
+ *
+ * If ios_base::showpos is set, '+' is output before positive values.
+ * If ios_base::showbase is set, '0' precedes octal values (except 0)
+ * and '0[xX]' precedes hex values.
+ *
+ * Thousands separators are inserted according to numpunct::grouping()
+ * and numpunct::thousands_sep(). The decimal point character used is
+ * numpunct::decimal_point().
+ *
+ * If io.width() is non-zero, enough @a fill characters are inserted to
+ * make the result at least that wide. If
+ * (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+ * padded at the end. If ios_base::internal, then padding occurs
+ * immediately after either a '+' or '-' or after '0x' or '0X'.
+ * Otherwise, padding occurs at the beginning.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
- iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
unsigned long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
-#ifdef _GLIBCPP_USE_LONG_LONG
- iter_type
+#ifdef _GLIBCXX_USE_LONG_LONG
+ iter_type
put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
- iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
unsigned long long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#endif
-
- iter_type
+ //@}
+
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the floating point value @a v and inserts it into a stream.
+ * It does so by calling num_put::do_put().
+ *
+ * Formatting is affected by the flag settings in @a io.
+ *
+ * The basic format is affected by the value of io.flags() &
+ * ios_base::floatfield. If equal to ios_base::fixed, formats like the
+ * printf %f specifier. Else if equal to ios_base::scientific, formats
+ * like %e or %E with ios_base::uppercase unset or set respectively.
+ * Otherwise, formats like %g or %G depending on uppercase. Note that
+ * if both fixed and scientific are set, the effect will also be like
+ * %g or %G.
+ *
+ * The output precision is given by io.precision(). This precision is
+ * capped at numeric_limits::digits10 + 2 (different for double and
+ * long double). The default precision is 6.
+ *
+ * If ios_base::showpos is set, '+' is output before positive values.
+ * If ios_base::showpoint is set, a decimal point will always be
+ * output.
+ *
+ * Thousands separators are inserted according to numpunct::grouping()
+ * and numpunct::thousands_sep(). The decimal point character used is
+ * numpunct::decimal_point().
+ *
+ * If io.width() is non-zero, enough @a fill characters are inserted to
+ * make the result at least that wide. If
+ * (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+ * padded at the end. If ios_base::internal, then padding occurs
+ * immediately after either a '+' or '-' or after '0x' or '0X'.
+ * Otherwise, padding occurs at the beginning.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
{ return this->do_put(__s, __f, __fill, __v); }
- iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
long double __v) const
{ return this->do_put(__s, __f, __fill, __v); }
-
- iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ //@}
+
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the pointer value @a v and inserts it into a stream. It
+ * does so by calling num_put::do_put().
+ *
+ * This function formats @a v as an unsigned long with ios_base::hex
+ * and ios_base::showbase set.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
const void* __v) const
{ return this->do_put(__s, __f, __fill, __v); }
protected:
template<typename _ValueT>
iter_type
- _M_convert_float(iter_type, ios_base& __io, char_type __fill,
- char __mod, _ValueT __v) const;
+ _M_insert_float(iter_type, ios_base& __io, char_type __fill,
+ char __mod, _ValueT __v) const;
void
- _M_group_float(const string& __grouping, char_type __sep,
- const char_type* __p, char_type* __new, char_type* __cs,
- int& __len) const;
+ _M_group_float(const char* __grouping, size_t __grouping_size,
+ char_type __sep, const char_type* __p, char_type* __new,
+ char_type* __cs, int& __len) const;
template<typename _ValueT>
iter_type
- _M_convert_int(iter_type, ios_base& __io, char_type __fill,
- _ValueT __v) const;
+ _M_insert_int(iter_type, ios_base& __io, char_type __fill,
+ _ValueT __v) const;
void
- _M_group_int(const string& __grouping, char_type __sep,
- ios_base& __io, char_type* __new, char_type* __cs,
- int& __len) const;
+ _M_group_int(const char* __grouping, size_t __grouping_size,
+ char_type __sep, ios_base& __io, char_type* __new,
+ char_type* __cs, int& __len) const;
void
- _M_pad(char_type __fill, streamsize __w, ios_base& __io,
+ _M_pad(char_type __fill, streamsize __w, ios_base& __io,
char_type* __new, const char_type* __cs, int& __len) const;
-#if 1
- // XXX GLIBCXX_ABI Deprecated, compatibility only.
- template<typename _ValueT>
- iter_type
- _M_convert_int(iter_type, ios_base& __io, char_type __fill,
- char __mod, char __modl, _ValueT __v) const;
-
- iter_type
- _M_widen_float(iter_type, ios_base& __io, char_type __fill, char* __cs,
- int __len) const;
-
- iter_type
- _M_widen_int(iter_type, ios_base& __io, char_type __fill, char* __cs,
- int __len) const;
-
- iter_type
- _M_insert(iter_type, ios_base& __io, char_type __fill,
- const char_type* __ws, int __len) const;
-#endif
-
- virtual
+ /// Destructor.
+ virtual
~num_put() { };
- virtual iter_type
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * These functions do the work of formatting numeric values and
+ * inserting them into a stream. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
- virtual iter_type
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, long __v) const;
- virtual iter_type
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, unsigned long) const;
-#ifdef _GLIBCPP_USE_LONG_LONG
- virtual iter_type
+#ifdef _GLIBCXX_USE_LONG_LONG
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, long long __v) const;
virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const;
#endif
- virtual iter_type
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, double __v) const;
- virtual iter_type
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
- virtual iter_type
+ virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+ //@}
};
template <typename _CharT, typename _OutIter>
locale::id num_put<_CharT, _OutIter>::id;
+ /**
+ * @brief Facet for localized string comparison.
+ *
+ * This facet encapsulates the code to compare strings in a localized
+ * manner.
+ *
+ * The collate template uses protected virtual functions to provide
+ * the actual results. The public accessors forward the call to
+ * the virtual functions. These virtual functions are hooks for
+ * developers to implement the behavior they require from the
+ * collate facet.
+ */
template<typename _CharT>
class collate : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
protected:
// Underlying "C" library locale information saved from
// initialization, needed by collate_byname as well.
__c_locale _M_c_locale_collate;
-
- public:
- static locale::id id;
- explicit
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
collate(size_t __refs = 0)
- : locale::facet(__refs)
- { _M_c_locale_collate = _S_c_locale; }
+ : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
+ { }
- explicit
- collate(__c_locale __cloc, size_t __refs = 0)
- : locale::facet(__refs)
- { _M_c_locale_collate = _S_clone_c_locale(__cloc); }
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ collate(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
+ { }
- int
+ /**
+ * @brief Compare two strings.
+ *
+ * This function compares two strings and returns the result by calling
+ * collate::do_compare().
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ int
compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const
{ return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
- string_type
+ /**
+ * @brief Transform string to comparable form.
+ *
+ * This function is a wrapper for strxfrm functionality. It takes the
+ * input string and returns a modified string that can be directly
+ * compared to other transformed strings. In the "C" locale, this
+ * function just returns a copy of the input string. In some other
+ * locales, it may replace two chars with one, change a char for
+ * another, etc. It does so by returning collate::do_transform().
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Transformed string_type.
+ */
+ string_type
transform(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_transform(__lo, __hi); }
- long
+ /**
+ * @brief Return hash of a string.
+ *
+ * This function computes and returns a hash on the input string. It
+ * does so by returning collate::do_hash().
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Hash value.
+ */
+ long
hash(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_hash(__lo, __hi); }
-
+
// Used to abstract out _CharT bits in virtual member functions, below.
int
_M_compare(const _CharT*, const _CharT*) const;
@@ -1026,18 +2568,53 @@ namespace std
_M_transform(_CharT*, const _CharT*, size_t) const;
protected:
+ /// Destructor.
virtual
- ~collate()
+ ~collate()
{ _S_destroy_c_locale(_M_c_locale_collate); }
- virtual int
+ /**
+ * @brief Compare two strings.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see compare().
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ virtual int
do_compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const;
- virtual string_type
+ /**
+ * @brief Transform string to comparable form.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned.
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ virtual string_type
do_transform(const _CharT* __lo, const _CharT* __hi) const;
- virtual long
+ /**
+ * @brief Return hash of a string.
+ *
+ * This function computes and returns a hash on the input string. This
+ * function is a hook for derived classes to change the value returned.
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Hash value.
+ */
+ virtual long
do_hash(const _CharT* __lo, const _CharT* __hi) const;
};
@@ -1046,16 +2623,16 @@ namespace std
// Specializations.
template<>
- int
+ int
collate<char>::_M_compare(const char*, const char*) const;
template<>
size_t
collate<char>::_M_transform(char*, const char*, size_t) const;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
- int
+ int
collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const;
template<>
@@ -1067,23 +2644,35 @@ namespace std
class collate_byname : public collate<_CharT>
{
public:
+ //@{
+ /// Public typedefs
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
+ //@}
- explicit
+ explicit
collate_byname(const char* __s, size_t __refs = 0)
- : collate<_CharT>(__refs)
- {
- _S_destroy_c_locale(_M_c_locale_collate);
- _S_create_c_locale(_M_c_locale_collate, __s);
+ : collate<_CharT>(__refs)
+ {
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_collate);
+ this->_S_create_c_locale(this->_M_c_locale_collate, __s);
+ }
}
protected:
- virtual
+ virtual
~collate_byname() { }
};
+ /**
+ * @brief Time format ordering data.
+ *
+ * This class provides an enum representing different orderings of day,
+ * month, and year.
+ */
class time_base
{
public:
@@ -1091,183 +2680,263 @@ namespace std
};
template<typename _CharT>
- class __timepunct : public locale::facet
+ struct __timepunct_cache : public locale::facet
{
- public:
- // Types:
- typedef _CharT __char_type;
- typedef basic_string<_CharT> __string_type;
-
- static locale::id id;
-
// List of all known timezones, with GMT first.
- static const _CharT* _S_timezones[14];
+ static const _CharT* _S_timezones[14];
- protected:
- __c_locale _M_c_locale_timepunct;
- char* _M_name_timepunct;
- const _CharT* _M_date_format;
- const _CharT* _M_date_era_format;
- const _CharT* _M_time_format;
- const _CharT* _M_time_era_format;
+ const _CharT* _M_date_format;
+ const _CharT* _M_date_era_format;
+ const _CharT* _M_time_format;
+ const _CharT* _M_time_era_format;
const _CharT* _M_date_time_format;
const _CharT* _M_date_time_era_format;
- const _CharT* _M_am;
- const _CharT* _M_pm;
+ const _CharT* _M_am;
+ const _CharT* _M_pm;
const _CharT* _M_am_pm_format;
// Day names, starting with "C"'s Sunday.
- const _CharT* _M_day1;
- const _CharT* _M_day2;
- const _CharT* _M_day3;
- const _CharT* _M_day4;
- const _CharT* _M_day5;
- const _CharT* _M_day6;
- const _CharT* _M_day7;
+ const _CharT* _M_day1;
+ const _CharT* _M_day2;
+ const _CharT* _M_day3;
+ const _CharT* _M_day4;
+ const _CharT* _M_day5;
+ const _CharT* _M_day6;
+ const _CharT* _M_day7;
// Abbreviated day names, starting with "C"'s Sun.
- const _CharT* _M_day_a1;
- const _CharT* _M_day_a2;
- const _CharT* _M_day_a3;
- const _CharT* _M_day_a4;
- const _CharT* _M_day_a5;
- const _CharT* _M_day_a6;
- const _CharT* _M_day_a7;
+ const _CharT* _M_aday1;
+ const _CharT* _M_aday2;
+ const _CharT* _M_aday3;
+ const _CharT* _M_aday4;
+ const _CharT* _M_aday5;
+ const _CharT* _M_aday6;
+ const _CharT* _M_aday7;
// Month names, starting with "C"'s January.
- const _CharT* _M_month01;
- const _CharT* _M_month02;
- const _CharT* _M_month03;
- const _CharT* _M_month04;
- const _CharT* _M_month05;
- const _CharT* _M_month06;
- const _CharT* _M_month07;
- const _CharT* _M_month08;
- const _CharT* _M_month09;
- const _CharT* _M_month10;
- const _CharT* _M_month11;
- const _CharT* _M_month12;
+ const _CharT* _M_month01;
+ const _CharT* _M_month02;
+ const _CharT* _M_month03;
+ const _CharT* _M_month04;
+ const _CharT* _M_month05;
+ const _CharT* _M_month06;
+ const _CharT* _M_month07;
+ const _CharT* _M_month08;
+ const _CharT* _M_month09;
+ const _CharT* _M_month10;
+ const _CharT* _M_month11;
+ const _CharT* _M_month12;
// Abbreviated month names, starting with "C"'s Jan.
- const _CharT* _M_month_a01;
- const _CharT* _M_month_a02;
- const _CharT* _M_month_a03;
- const _CharT* _M_month_a04;
- const _CharT* _M_month_a05;
- const _CharT* _M_month_a06;
- const _CharT* _M_month_a07;
- const _CharT* _M_month_a08;
- const _CharT* _M_month_a09;
- const _CharT* _M_month_a10;
- const _CharT* _M_month_a11;
- const _CharT* _M_month_a12;
+ const _CharT* _M_amonth01;
+ const _CharT* _M_amonth02;
+ const _CharT* _M_amonth03;
+ const _CharT* _M_amonth04;
+ const _CharT* _M_amonth05;
+ const _CharT* _M_amonth06;
+ const _CharT* _M_amonth07;
+ const _CharT* _M_amonth08;
+ const _CharT* _M_amonth09;
+ const _CharT* _M_amonth10;
+ const _CharT* _M_amonth11;
+ const _CharT* _M_amonth12;
+
+ bool _M_allocated;
+
+ __timepunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_date_format(NULL), _M_date_era_format(NULL), _M_time_format(NULL),
+ _M_time_era_format(NULL), _M_date_time_format(NULL),
+ _M_date_time_era_format(NULL), _M_am(NULL), _M_pm(NULL),
+ _M_am_pm_format(NULL), _M_day1(NULL), _M_day2(NULL), _M_day3(NULL),
+ _M_day4(NULL), _M_day5(NULL), _M_day6(NULL), _M_day7(NULL),
+ _M_aday1(NULL), _M_aday2(NULL), _M_aday3(NULL), _M_aday4(NULL),
+ _M_aday5(NULL), _M_aday6(NULL), _M_aday7(NULL), _M_month01(NULL),
+ _M_month02(NULL), _M_month03(NULL), _M_month04(NULL), _M_month05(NULL),
+ _M_month06(NULL), _M_month07(NULL), _M_month08(NULL), _M_month09(NULL),
+ _M_month10(NULL), _M_month11(NULL), _M_month12(NULL), _M_amonth01(NULL),
+ _M_amonth02(NULL), _M_amonth03(NULL), _M_amonth04(NULL),
+ _M_amonth05(NULL), _M_amonth06(NULL), _M_amonth07(NULL),
+ _M_amonth08(NULL), _M_amonth09(NULL), _M_amonth10(NULL),
+ _M_amonth11(NULL), _M_amonth12(NULL), _M_allocated(false)
+ { }
+
+ ~__timepunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __timepunct_cache&
+ operator=(const __timepunct_cache&);
+
+ explicit
+ __timepunct_cache(const __timepunct_cache&);
+ };
+
+ template<typename _CharT>
+ __timepunct_cache<_CharT>::~__timepunct_cache()
+ {
+ if (_M_allocated)
+ {
+ // Unused.
+ }
+ }
+
+ // Specializations.
+ template<>
+ const char*
+ __timepunct_cache<char>::_S_timezones[14];
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ const wchar_t*
+ __timepunct_cache<wchar_t>::_S_timezones[14];
+#endif
+
+ // Generic.
+ template<typename _CharT>
+ const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
+
+ template<typename _CharT>
+ class __timepunct : public locale::facet
+ {
public:
- explicit
+ // Types:
+ typedef _CharT __char_type;
+ typedef basic_string<_CharT> __string_type;
+ typedef __timepunct_cache<_CharT> __cache_type;
+
+ protected:
+ __cache_type* _M_data;
+ __c_locale _M_c_locale_timepunct;
+ const char* _M_name_timepunct;
+
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ explicit
__timepunct(size_t __refs = 0);
- explicit
+ explicit
+ __timepunct(__cache_type* __cache, size_t __refs = 0);
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
__timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
void
- _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
+ _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
const tm* __tm) const;
void
_M_date_formats(const _CharT** __date) const
{
// Always have default first.
- __date[0] = _M_date_format;
- __date[1] = _M_date_era_format;
+ __date[0] = _M_data->_M_date_format;
+ __date[1] = _M_data->_M_date_era_format;
}
void
_M_time_formats(const _CharT** __time) const
{
// Always have default first.
- __time[0] = _M_time_format;
- __time[1] = _M_time_era_format;
+ __time[0] = _M_data->_M_time_format;
+ __time[1] = _M_data->_M_time_era_format;
}
void
- _M_ampm(const _CharT** __ampm) const
- {
- __ampm[0] = _M_am;
- __ampm[1] = _M_pm;
- }
-
- void
_M_date_time_formats(const _CharT** __dt) const
{
// Always have default first.
- __dt[0] = _M_date_time_format;
- __dt[1] = _M_date_time_era_format;
+ __dt[0] = _M_data->_M_date_time_format;
+ __dt[1] = _M_data->_M_date_time_era_format;
+ }
+
+ void
+ _M_am_pm_format(const _CharT* __ampm) const
+ { __ampm = _M_data->_M_am_pm_format; }
+
+ void
+ _M_am_pm(const _CharT** __ampm) const
+ {
+ __ampm[0] = _M_data->_M_am;
+ __ampm[1] = _M_data->_M_pm;
}
void
_M_days(const _CharT** __days) const
- {
- __days[0] = _M_day1;
- __days[1] = _M_day2;
- __days[2] = _M_day3;
- __days[3] = _M_day4;
- __days[4] = _M_day5;
- __days[5] = _M_day6;
- __days[6] = _M_day7;
+ {
+ __days[0] = _M_data->_M_day1;
+ __days[1] = _M_data->_M_day2;
+ __days[2] = _M_data->_M_day3;
+ __days[3] = _M_data->_M_day4;
+ __days[4] = _M_data->_M_day5;
+ __days[5] = _M_data->_M_day6;
+ __days[6] = _M_data->_M_day7;
}
void
_M_days_abbreviated(const _CharT** __days) const
- {
- __days[0] = _M_day_a1;
- __days[1] = _M_day_a2;
- __days[2] = _M_day_a3;
- __days[3] = _M_day_a4;
- __days[4] = _M_day_a5;
- __days[5] = _M_day_a6;
- __days[6] = _M_day_a7;
+ {
+ __days[0] = _M_data->_M_aday1;
+ __days[1] = _M_data->_M_aday2;
+ __days[2] = _M_data->_M_aday3;
+ __days[3] = _M_data->_M_aday4;
+ __days[4] = _M_data->_M_aday5;
+ __days[5] = _M_data->_M_aday6;
+ __days[6] = _M_data->_M_aday7;
}
void
_M_months(const _CharT** __months) const
- {
- __months[0] = _M_month01;
- __months[1] = _M_month02;
- __months[2] = _M_month03;
- __months[3] = _M_month04;
- __months[4] = _M_month05;
- __months[5] = _M_month06;
- __months[6] = _M_month07;
- __months[7] = _M_month08;
- __months[8] = _M_month09;
- __months[9] = _M_month10;
- __months[10] = _M_month11;
- __months[11] = _M_month12;
+ {
+ __months[0] = _M_data->_M_month01;
+ __months[1] = _M_data->_M_month02;
+ __months[2] = _M_data->_M_month03;
+ __months[3] = _M_data->_M_month04;
+ __months[4] = _M_data->_M_month05;
+ __months[5] = _M_data->_M_month06;
+ __months[6] = _M_data->_M_month07;
+ __months[7] = _M_data->_M_month08;
+ __months[8] = _M_data->_M_month09;
+ __months[9] = _M_data->_M_month10;
+ __months[10] = _M_data->_M_month11;
+ __months[11] = _M_data->_M_month12;
}
void
_M_months_abbreviated(const _CharT** __months) const
- {
- __months[0] = _M_month_a01;
- __months[1] = _M_month_a02;
- __months[2] = _M_month_a03;
- __months[3] = _M_month_a04;
- __months[4] = _M_month_a05;
- __months[5] = _M_month_a06;
- __months[6] = _M_month_a07;
- __months[7] = _M_month_a08;
- __months[8] = _M_month_a09;
- __months[9] = _M_month_a10;
- __months[10] = _M_month_a11;
- __months[11] = _M_month_a12;
+ {
+ __months[0] = _M_data->_M_amonth01;
+ __months[1] = _M_data->_M_amonth02;
+ __months[2] = _M_data->_M_amonth03;
+ __months[3] = _M_data->_M_amonth04;
+ __months[4] = _M_data->_M_amonth05;
+ __months[5] = _M_data->_M_amonth06;
+ __months[6] = _M_data->_M_amonth07;
+ __months[7] = _M_data->_M_amonth08;
+ __months[8] = _M_data->_M_amonth09;
+ __months[9] = _M_data->_M_amonth10;
+ __months[10] = _M_data->_M_amonth11;
+ __months[11] = _M_data->_M_amonth12;
}
protected:
- virtual
+ virtual
~__timepunct();
// For use at construction time only.
- void
+ void
_M_initialize_timepunct(__c_locale __cloc = NULL);
};
@@ -1275,11 +2944,7 @@ namespace std
locale::id __timepunct<_CharT>::id;
// Specializations.
- template<>
- const char*
- __timepunct<char>::_S_timezones[14];
-
- template<>
+ template<>
void
__timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
@@ -1287,117 +2952,338 @@ namespace std
void
__timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const;
-#ifdef _GLIBCPP_USE_WCHAR_T
- template<>
- const wchar_t*
- __timepunct<wchar_t>::_S_timezones[14];
-
- template<>
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
void
__timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
template<>
void
- __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
+ __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
const tm*) const;
#endif
- // Generic.
- template<typename _CharT>
- const _CharT* __timepunct<_CharT>::_S_timezones[14];
-
// Include host and configuration specific timepunct functions.
#include <bits/time_members.h>
+ /**
+ * @brief Facet for parsing dates and times.
+ *
+ * This facet encapsulates the code to parse and return a date or
+ * time from a string. It is used by the istream numeric
+ * extraction operators.
+ *
+ * The time_get template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the time_get facet.
+ */
template<typename _CharT, typename _InIter>
class time_get : public locale::facet, public time_base
{
public:
// Types:
- typedef _CharT char_type;
- typedef _InIter iter_type;
- typedef basic_string<_CharT> __string_type;
-
- static locale::id id;
-
- explicit
- time_get(size_t __refs = 0)
- : locale::facet (__refs) { }
-
- dateorder
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ //@}
+ typedef basic_string<_CharT> __string_type;
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ time_get(size_t __refs = 0)
+ : facet (__refs) { }
+
+ /**
+ * @brief Return preferred order of month, day, and year.
+ *
+ * This function returns an enum from timebase::dateorder giving the
+ * preferred ordering if the format "x" given to time_put::put() only
+ * uses month, day, and year. If the format "x" for the associated
+ * locale uses other fields, this function returns
+ * timebase::dateorder::noorder.
+ *
+ * NOTE: The library always returns noorder at the moment.
+ *
+ * @return A member of timebase::dateorder.
+ */
+ dateorder
date_order() const
{ return this->do_date_order(); }
- iter_type
- get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ /**
+ * @brief Parse input time string.
+ *
+ * This function parses a time according to the format "x" and puts the
+ * results into a user-supplied struct tm. The result is returned by
+ * calling time_get::do_get_time().
+ *
+ * If there is a valid time string according to format "x", @a tm will
+ * be filled in accordingly and the returned iterator will point to the
+ * first character beyond the time string. If an error occurs before
+ * the end, err |= ios_base::failbit. If parsing reads all the
+ * characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond time string.
+ */
+ iter_type
+ get_time(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{ return this->do_get_time(__beg, __end, __io, __err, __tm); }
- iter_type
+ /**
+ * @brief Parse input date string.
+ *
+ * This function parses a date according to the format "X" and puts the
+ * results into a user-supplied struct tm. The result is returned by
+ * calling time_get::do_get_date().
+ *
+ * If there is a valid date string according to format "X", @a tm will
+ * be filled in accordingly and the returned iterator will point to the
+ * first character beyond the date string. If an error occurs before
+ * the end, err |= ios_base::failbit. If parsing reads all the
+ * characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond date string.
+ */
+ iter_type
get_date(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{ return this->do_get_date(__beg, __end, __io, __err, __tm); }
- iter_type
+ /**
+ * @brief Parse input weekday string.
+ *
+ * This function parses a weekday name and puts the results into a
+ * user-supplied struct tm. The result is returned by calling
+ * time_get::do_get_weekday().
+ *
+ * Parsing starts by parsing an abbreviated weekday name. If a valid
+ * abbreviation is followed by a character that would lead to the full
+ * weekday name, parsing continues until the full name is found or an
+ * error occurs. Otherwise parsing finishes at the end of the
+ * abbreviated name.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond weekday name.
+ */
+ iter_type
get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{ return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
- iter_type
- get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
+ /**
+ * @brief Parse input month string.
+ *
+ * This function parses a month name and puts the results into a
+ * user-supplied struct tm. The result is returned by calling
+ * time_get::do_get_monthname().
+ *
+ * Parsing starts by parsing an abbreviated month name. If a valid
+ * abbreviation is followed by a character that would lead to the full
+ * month name, parsing continues until the full name is found or an
+ * error occurs. Otherwise parsing finishes at the end of the
+ * abbreviated name.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |=
+ * ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond month name.
+ */
+ iter_type
+ get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{ return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
- iter_type
+ /**
+ * @brief Parse input year string.
+ *
+ * This function reads up to 4 characters to parse a year string and
+ * puts the results into a user-supplied struct tm. The result is
+ * returned by calling time_get::do_get_year().
+ *
+ * 4 consecutive digits are interpreted as a full year. If there are
+ * exactly 2 consecutive digits, the library interprets this as the
+ * number of years since 1900.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond year.
+ */
+ iter_type
get_year(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{ return this->do_get_year(__beg, __end, __io, __err, __tm); }
protected:
- virtual
+ /// Destructor.
+ virtual
~time_get() { }
- virtual dateorder
+ /**
+ * @brief Return preferred order of month, day, and year.
+ *
+ * This function returns an enum from timebase::dateorder giving the
+ * preferred ordering if the format "x" given to time_put::put() only
+ * uses month, day, and year. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @return A member of timebase::dateorder.
+ */
+ virtual dateorder
do_date_order() const;
- virtual iter_type
+ /**
+ * @brief Parse input time string.
+ *
+ * This function parses a time according to the format "x" and puts the
+ * results into a user-supplied struct tm. This function is a hook for
+ * derived classes to change the value returned. @see get_time() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond time string.
+ */
+ virtual iter_type
do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const;
- virtual iter_type
+ /**
+ * @brief Parse input date string.
+ *
+ * This function parses a date according to the format "X" and puts the
+ * results into a user-supplied struct tm. This function is a hook for
+ * derived classes to change the value returned. @see get_date() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond date string.
+ */
+ virtual iter_type
do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const;
- virtual iter_type
+ /**
+ * @brief Parse input weekday string.
+ *
+ * This function parses a weekday name and puts the results into a
+ * user-supplied struct tm. This function is a hook for derived
+ * classes to change the value returned. @see get_weekday() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond weekday name.
+ */
+ virtual iter_type
do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
ios_base::iostate& __err, tm* __tm) const;
- virtual iter_type
- do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
+ /**
+ * @brief Parse input month string.
+ *
+ * This function parses a month name and puts the results into a
+ * user-supplied struct tm. This function is a hook for derived
+ * classes to change the value returned. @see get_monthname() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond month name.
+ */
+ virtual iter_type
+ do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
ios_base::iostate& __err, tm* __tm) const;
- virtual iter_type
+ /**
+ * @brief Parse input year string.
+ *
+ * This function reads up to 4 characters to parse a year string and
+ * puts the results into a user-supplied struct tm. This function is a
+ * hook for derived classes to change the value returned. @see
+ * get_year() for details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond year.
+ */
+ virtual iter_type
do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const;
// Extract numeric component of length __len.
- void
- _M_extract_num(iter_type& __beg, iter_type& __end, int& __member,
+ iter_type
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
int __min, int __max, size_t __len,
- const ctype<_CharT>& __ctype,
- ios_base::iostate& __err) const;
-
+ ios_base& __io, ios_base::iostate& __err) const;
+
// Extract day or month name, or any unique array of string
// literals in a const _CharT* array.
- void
- _M_extract_name(iter_type& __beg, iter_type& __end, int& __member,
- const _CharT** __names, size_t __indexlen,
- ios_base::iostate& __err) const;
+ iter_type
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const;
// Extract on a component-by-component basis, via __format argument.
- void
- _M_extract_via_format(iter_type& __beg, iter_type& __end, ios_base& __io,
- ios_base::iostate& __err, tm* __tm,
+ iter_type
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
const _CharT* __format) const;
};
@@ -1409,48 +3295,118 @@ namespace std
{
public:
// Types:
- typedef _CharT char_type;
- typedef _InIter iter_type;
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
- explicit
- time_get_byname(const char*, size_t __refs = 0)
+ explicit
+ time_get_byname(const char*, size_t __refs = 0)
: time_get<_CharT, _InIter>(__refs) { }
protected:
- virtual
+ virtual
~time_get_byname() { }
};
+ /**
+ * @brief Facet for outputting dates and times.
+ *
+ * This facet encapsulates the code to format and output dates and times
+ * according to formats used by strftime().
+ *
+ * The time_put template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the time_put facet.
+ */
template<typename _CharT, typename _OutIter>
- class time_put : public locale::facet, public time_base
+ class time_put : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef _OutIter iter_type;
-
- static locale::id id;
-
- explicit
- time_put(size_t __refs = 0)
- : locale::facet(__refs) { }
-
- iter_type
- put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ time_put(size_t __refs = 0)
+ : facet(__refs) { }
+
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format string. The format string is interpreted as by
+ * strftime().
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param beg Start of format string.
+ * @param end End of format string.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
const _CharT* __beg, const _CharT* __end) const;
- iter_type
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format char and optional modifier. The format and modifier
+ * are interpreted as by strftime(). It does so by returning
+ * time_put::do_put().
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param format Format char.
+ * @param mod Optional modifier char.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, ios_base& __io, char_type __fill,
const tm* __tm, char __format, char __mod = 0) const
{ return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
protected:
- virtual
+ /// Destructor.
+ virtual
~time_put()
{ }
- virtual iter_type
- do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format char and optional modifier. This function is a hook
+ * for derived classes to change the value returned. @see put() for
+ * more details.
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param format Format char.
+ * @param mod Optional modifier char.
+ * @return Iterator after writing.
+ */
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
char __format, char __mod) const;
};
@@ -1462,20 +3418,30 @@ namespace std
{
public:
// Types:
- typedef _CharT char_type;
- typedef _OutIter iter_type;
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
- explicit
- time_put_byname(const char* /*__s*/, size_t __refs = 0)
- : time_put<_CharT, _OutIter>(__refs)
+ explicit
+ time_put_byname(const char*, size_t __refs = 0)
+ : time_put<_CharT, _OutIter>(__refs)
{ };
protected:
- virtual
+ virtual
~time_put_byname() { }
};
+ /**
+ * @brief Money format ordering data.
+ *
+ * This class contains an ordered array of 4 fields to represent the
+ * pattern for formatting a money amount. Each field may contain one entry
+ * from the part enum. symbol, sign, and value must be present and the
+ * remaining field must contain either none or space. @see
+ * moneypunct::pos_format() and moneypunct::neg_format() for details of how
+ * these fields are interpreted.
+ */
class money_base
{
public:
@@ -1484,123 +3450,435 @@ namespace std
static const pattern _S_default_pattern;
+ enum
+ {
+ _S_minus,
+ _S_zero,
+ _S_end = 11
+ };
+
+ // String literal of acceptable (narrow) input/output, for
+ // money_get/money_put. "-0123456789"
+ static const char* _S_atoms;
+
// Construct and return valid pattern consisting of some combination of:
// space none symbol sign value
- static pattern
+ static pattern
_S_construct_pattern(char __precedes, char __space, char __posn);
};
template<typename _CharT, bool _Intl>
+ struct __moneypunct_cache : public locale::facet
+ {
+ const char* _M_grouping;
+ size_t _M_grouping_size;
+ bool _M_use_grouping;
+ _CharT _M_decimal_point;
+ _CharT _M_thousands_sep;
+ const _CharT* _M_curr_symbol;
+ size_t _M_curr_symbol_size;
+ const _CharT* _M_positive_sign;
+ size_t _M_positive_sign_size;
+ const _CharT* _M_negative_sign;
+ size_t _M_negative_sign_size;
+ int _M_frac_digits;
+ money_base::pattern _M_pos_format;
+ money_base::pattern _M_neg_format;
+
+ // A list of valid numeric literals for input and output: in the standard
+ // "C" locale, this is "-0123456789". This array contains the chars after
+ // having been passed through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms[money_base::_S_end];
+
+ bool _M_allocated;
+
+ __moneypunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+ _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
+ _M_curr_symbol(NULL), _M_curr_symbol_size(0),
+ _M_positive_sign(NULL), _M_positive_sign_size(0),
+ _M_negative_sign(NULL), _M_negative_sign_size(0),
+ _M_frac_digits(0),
+ _M_pos_format(money_base::pattern()),
+ _M_neg_format(money_base::pattern()), _M_allocated(false)
+ { }
+
+ ~__moneypunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __moneypunct_cache&
+ operator=(const __moneypunct_cache&);
+
+ explicit
+ __moneypunct_cache(const __moneypunct_cache&);
+ };
+
+ template<typename _CharT, bool _Intl>
+ __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
+ {
+ if (_M_allocated)
+ {
+ delete [] _M_grouping;
+ delete [] _M_curr_symbol;
+ delete [] _M_positive_sign;
+ delete [] _M_negative_sign;
+ }
+ }
+
+ /**
+ * @brief Facet for formatting data for money amounts.
+ *
+ * This facet encapsulates the punctuation, grouping and other formatting
+ * features of money amount string representations.
+ */
+ template<typename _CharT, bool _Intl>
class moneypunct : public locale::facet, public money_base
{
public:
// Types:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
-
- static const bool intl = _Intl;
- static locale::id id;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
private:
- const char* _M_grouping;
- char_type _M_decimal_point;
- char_type _M_thousands_sep;
- const char_type* _M_curr_symbol;
- const char_type* _M_positive_sign;
- const char_type* _M_negative_sign;
- int _M_frac_digits;
- pattern _M_pos_format;
- pattern _M_neg_format;
+ __cache_type* _M_data;
public:
- explicit
- moneypunct(size_t __refs = 0) : locale::facet(__refs)
+ /// This value is provided by the standard, but no reason for its
+ /// existence.
+ static const bool intl = _Intl;
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+ { _M_initialize_moneypunct(); }
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is an internal constructor.
+ *
+ * @param cache Cache for optimization.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
{ _M_initialize_moneypunct(); }
- explicit
- moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
- : locale::facet(__refs)
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
+ : facet(__refs), _M_data(NULL)
{ _M_initialize_moneypunct(__cloc, __s); }
+ /**
+ * @brief Return decimal point character.
+ *
+ * This function returns a char_type to use as a decimal point. It
+ * does so by returning returning
+ * moneypunct<char_type>::do_decimal_point().
+ *
+ * @return @a char_type representing a decimal point.
+ */
char_type
decimal_point() const
{ return this->do_decimal_point(); }
-
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * This function returns a char_type to use as a thousands
+ * separator. It does so by returning returning
+ * moneypunct<char_type>::do_thousands_sep().
+ *
+ * @return char_type representing a thousands separator.
+ */
char_type
thousands_sep() const
{ return this->do_thousands_sep(); }
-
- string
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * This function returns a string representing groupings for the
+ * integer part of an amount. Groupings indicate where thousands
+ * separators should be inserted.
+ *
+ * Each char in the return string is interpret as an integer rather
+ * than a character. These numbers represent the number of digits in a
+ * group. The first char in the string represents the number of digits
+ * in the least significant group. If a char is negative, it indicates
+ * an unlimited number of digits for the group. If more chars from the
+ * string are required to group a number, the last char is used
+ * repeatedly.
+ *
+ * For example, if the grouping() returns "\003\002" and is applied to
+ * the number 123456789, this corresponds to 12,34,56,789. Note that
+ * if the string was "32", this would put more than 50 digits into the
+ * least significant group if the character set is ASCII.
+ *
+ * The string is returned by calling
+ * moneypunct<char_type>::do_grouping().
+ *
+ * @return string representing grouping specification.
+ */
+ string
grouping() const
{ return this->do_grouping(); }
- string_type
+ /**
+ * @brief Return currency symbol string.
+ *
+ * This function returns a string_type to use as a currency symbol. It
+ * does so by returning returning
+ * moneypunct<char_type>::do_curr_symbol().
+ *
+ * @return @a string_type representing a currency symbol.
+ */
+ string_type
curr_symbol() const
{ return this->do_curr_symbol(); }
- string_type
+ /**
+ * @brief Return positive sign string.
+ *
+ * This function returns a string_type to use as a sign for positive
+ * amounts. It does so by returning returning
+ * moneypunct<char_type>::do_positive_sign().
+ *
+ * If the return value contains more than one character, the first
+ * character appears in the position indicated by pos_format() and the
+ * remainder appear at the end of the formatted string.
+ *
+ * @return @a string_type representing a positive sign.
+ */
+ string_type
positive_sign() const
{ return this->do_positive_sign(); }
- string_type
+ /**
+ * @brief Return negative sign string.
+ *
+ * This function returns a string_type to use as a sign for negative
+ * amounts. It does so by returning returning
+ * moneypunct<char_type>::do_negative_sign().
+ *
+ * If the return value contains more than one character, the first
+ * character appears in the position indicated by neg_format() and the
+ * remainder appear at the end of the formatted string.
+ *
+ * @return @a string_type representing a negative sign.
+ */
+ string_type
negative_sign() const
{ return this->do_negative_sign(); }
- int
+ /**
+ * @brief Return number of digits in fraction.
+ *
+ * This function returns the exact number of digits that make up the
+ * fractional part of a money amount. It does so by returning
+ * returning moneypunct<char_type>::do_frac_digits().
+ *
+ * The fractional part of a money amount is optional. But if it is
+ * present, there must be frac_digits() digits.
+ *
+ * @return Number of digits in amount fraction.
+ */
+ int
frac_digits() const
{ return this->do_frac_digits(); }
- pattern
+ //@{
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * positive or negative valued money amount. It does so by returning
+ * returning moneypunct<char_type>::do_pos_format() or
+ * moneypunct<char_type>::do_neg_format().
+ *
+ * The pattern has 4 fields describing the ordering of symbol, sign,
+ * value, and none or space. There must be one of each in the pattern.
+ * The none and space enums may not appear in the first field and space
+ * may not appear in the final field.
+ *
+ * The parts of a money string must appear in the order indicated by
+ * the fields of the pattern. The symbol field indicates that the
+ * value of curr_symbol() may be present. The sign field indicates
+ * that the value of positive_sign() or negative_sign() must be
+ * present. The value field indicates that the absolute value of the
+ * money amount is present. none indicates 0 or more whitespace
+ * characters, except at the end, where it permits no whitespace.
+ * space indicates that 1 or more whitespace characters must be
+ * present.
+ *
+ * For example, for the US locale and pos_format() pattern
+ * {symbol,sign,value,none}, curr_symbol() == '$' positive_sign() ==
+ * '+', and value 10.01, and options set to force the symbol, the
+ * corresponding string is "$+10.01".
+ *
+ * @return Pattern for money values.
+ */
+ pattern
pos_format() const
{ return this->do_pos_format(); }
- pattern
+ pattern
neg_format() const
{ return this->do_neg_format(); }
+ //@}
protected:
- virtual
+ /// Destructor.
+ virtual
~moneypunct();
+ /**
+ * @brief Return decimal point character.
+ *
+ * Returns a char_type to use as a decimal point. This function is a
+ * hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a decimal point.
+ */
virtual char_type
do_decimal_point() const
- { return _M_decimal_point; }
-
+ { return _M_data->_M_decimal_point; }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * Returns a char_type to use as a thousands separator. This function
+ * is a hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a thousands separator.
+ */
virtual char_type
do_thousands_sep() const
- { return _M_thousands_sep; }
-
- virtual string
+ { return _M_data->_M_thousands_sep; }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * Returns a string representing groupings for the integer part of a
+ * number. This function is a hook for derived classes to change the
+ * value returned. @see grouping() for details.
+ *
+ * @return String representing grouping specification.
+ */
+ virtual string
do_grouping() const
- { return _M_grouping; }
-
- virtual string_type
+ { return _M_data->_M_grouping; }
+
+ /**
+ * @brief Return currency symbol string.
+ *
+ * This function returns a string_type to use as a currency symbol.
+ * This function is a hook for derived classes to change the value
+ * returned. @see curr_symbol() for details.
+ *
+ * @return @a string_type representing a currency symbol.
+ */
+ virtual string_type
do_curr_symbol() const
- { return _M_curr_symbol; }
-
- virtual string_type
+ { return _M_data->_M_curr_symbol; }
+
+ /**
+ * @brief Return positive sign string.
+ *
+ * This function returns a string_type to use as a sign for positive
+ * amounts. This function is a hook for derived classes to change the
+ * value returned. @see positive_sign() for details.
+ *
+ * @return @a string_type representing a positive sign.
+ */
+ virtual string_type
do_positive_sign() const
- { return _M_positive_sign; }
-
- virtual string_type
+ { return _M_data->_M_positive_sign; }
+
+ /**
+ * @brief Return negative sign string.
+ *
+ * This function returns a string_type to use as a sign for negative
+ * amounts. This function is a hook for derived classes to change the
+ * value returned. @see negative_sign() for details.
+ *
+ * @return @a string_type representing a negative sign.
+ */
+ virtual string_type
do_negative_sign() const
- { return _M_negative_sign; }
-
- virtual int
+ { return _M_data->_M_negative_sign; }
+
+ /**
+ * @brief Return number of digits in fraction.
+ *
+ * This function returns the exact number of digits that make up the
+ * fractional part of a money amount. This function is a hook for
+ * derived classes to change the value returned. @see frac_digits()
+ * for details.
+ *
+ * @return Number of digits in amount fraction.
+ */
+ virtual int
do_frac_digits() const
- { return _M_frac_digits; }
-
- virtual pattern
+ { return _M_data->_M_frac_digits; }
+
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * positive valued money amount. This function is a hook for derived
+ * classes to change the value returned. @see pos_format() for
+ * details.
+ *
+ * @return Pattern for money values.
+ */
+ virtual pattern
do_pos_format() const
- { return _M_pos_format; }
-
- virtual pattern
+ { return _M_data->_M_pos_format; }
+
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * negative valued money amount. This function is a hook for derived
+ * classes to change the value returned. @see neg_format() for
+ * details.
+ *
+ * @return Pattern for money values.
+ */
+ virtual pattern
do_neg_format() const
- { return _M_neg_format; }
+ { return _M_data->_M_neg_format; }
// For use at construction time only.
- void
- _M_initialize_moneypunct(__c_locale __cloc = NULL,
+ void
+ _M_initialize_moneypunct(__c_locale __cloc = NULL,
const char* __name = NULL);
};
@@ -1616,196 +3894,513 @@ namespace std
template<>
moneypunct<char, false>::~moneypunct();
- template<>
+ template<>
void
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
- template<>
+ template<>
void
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
moneypunct<wchar_t, true>::~moneypunct();
template<>
moneypunct<wchar_t, false>::~moneypunct();
- template<>
+ template<>
void
- moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
const char*);
- template<>
+ template<>
void
- moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
const char*);
#endif
template<typename _CharT, bool _Intl>
class moneypunct_byname : public moneypunct<_CharT, _Intl>
{
- __c_locale _M_c_locale_moneypunct;
-
public:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
static const bool intl = _Intl;
- explicit
+ explicit
moneypunct_byname(const char* __s, size_t __refs = 0)
: moneypunct<_CharT, _Intl>(__refs)
{
- _S_create_c_locale(_M_c_locale_moneypunct, __s);
- _M_initialize_moneypunct(_M_c_locale_moneypunct);
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ __c_locale __tmp;
+ this->_S_create_c_locale(__tmp, __s);
+ this->_M_initialize_moneypunct(__tmp);
+ this->_S_destroy_c_locale(__tmp);
+ }
}
protected:
- virtual
- ~moneypunct_byname()
- { _S_destroy_c_locale(_M_c_locale_moneypunct); }
+ virtual
+ ~moneypunct_byname() { }
};
template<typename _CharT, bool _Intl>
const bool moneypunct_byname<_CharT, _Intl>::intl;
+ /**
+ * @brief Facet for parsing monetary amounts.
+ *
+ * This facet encapsulates the code to parse and return a monetary
+ * amount from a string.
+ *
+ * The money_get template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the money_get facet.
+ */
template<typename _CharT, typename _InIter>
class money_get : public locale::facet
{
public:
// Types:
- typedef _CharT char_type;
- typedef _InIter iter_type;
- typedef basic_string<_CharT> string_type;
-
- static locale::id id;
-
- explicit
- money_get(size_t __refs = 0) : locale::facet(__refs) { }
-
- iter_type
- get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ money_get(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads characters from @a s, interprets them as a
+ * monetary value according to moneypunct and ctype facets retrieved
+ * from io.getloc(), and returns the result in @a units as an integral
+ * value moneypunct::frac_digits() * the actual amount. For example,
+ * the string $10.01 in a US locale would store 1001 in @a units.
+ *
+ * Any characters not part of a valid money amount are not consumed.
+ *
+ * If a money value cannot be parsed from the input stream, sets
+ * err=(err|io.failbit). If the stream is consumed before finishing
+ * parsing, sets err=(err|io.failbit|io.eofbit). @a units is
+ * unchanged if parsing fails.
+ *
+ * This function works by returning the result of do_get().
+ *
+ * @param s Start of characters to parse.
+ * @param end End of characters to parse.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param err Error field to set if parsing fails.
+ * @param units Place to store result of parsing.
+ * @return Iterator referencing first character beyond valid money
+ * amount.
+ */
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
ios_base::iostate& __err, long double& __units) const
{ return this->do_get(__s, __end, __intl, __io, __err, __units); }
- iter_type
- get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads characters from @a s, interprets them as a
+ * monetary value according to moneypunct and ctype facets retrieved
+ * from io.getloc(), and returns the result in @a digits. For example,
+ * the string $10.01 in a US locale would store "1001" in @a digits.
+ *
+ * Any characters not part of a valid money amount are not consumed.
+ *
+ * If a money value cannot be parsed from the input stream, sets
+ * err=(err|io.failbit). If the stream is consumed before finishing
+ * parsing, sets err=(err|io.failbit|io.eofbit).
+ *
+ * This function works by returning the result of do_get().
+ *
+ * @param s Start of characters to parse.
+ * @param end End of characters to parse.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param err Error field to set if parsing fails.
+ * @param digits Place to store result of parsing.
+ * @return Iterator referencing first character beyond valid money
+ * amount.
+ */
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
ios_base::iostate& __err, string_type& __digits) const
{ return this->do_get(__s, __end, __intl, __io, __err, __digits); }
protected:
- virtual
+ /// Destructor.
+ virtual
~money_get() { }
- virtual iter_type
- do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads and parses characters representing a monetary
+ * value. This function is a hook for derived classes to change the
+ * value returned. @see get() for details.
+ */
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
ios_base::iostate& __err, long double& __units) const;
- virtual iter_type
- do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads and parses characters representing a monetary
+ * value. This function is a hook for derived classes to change the
+ * value returned. @see get() for details.
+ */
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
ios_base::iostate& __err, string_type& __digits) const;
+
+ template<bool _Intl>
+ iter_type
+ _M_extract(iter_type __s, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __digits) const;
};
template<typename _CharT, typename _InIter>
locale::id money_get<_CharT, _InIter>::id;
+ /**
+ * @brief Facet for outputting monetary amounts.
+ *
+ * This facet encapsulates the code to format and output a monetary
+ * amount.
+ *
+ * The money_put template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the money_put facet.
+ */
template<typename _CharT, typename _OutIter>
class money_put : public locale::facet
{
public:
- typedef _CharT char_type;
- typedef _OutIter iter_type;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
typedef basic_string<_CharT> string_type;
-
- static locale::id id;
-
- explicit
- money_put(size_t __refs = 0) : locale::facet(__refs) { }
-
- iter_type
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ money_put(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a units as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the value 1001 in a
+ * US locale would write "$10.01" to @a s.
+ *
+ * This function works by returning the result of do_put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, bool __intl, ios_base& __io,
char_type __fill, long double __units) const
{ return this->do_put(__s, __intl, __io, __fill, __units); }
- iter_type
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a digits as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the string "1001" in
+ * a US locale would write "$10.01" to @a s.
+ *
+ * This function works by returning the result of do_put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ iter_type
put(iter_type __s, bool __intl, ios_base& __io,
char_type __fill, const string_type& __digits) const
{ return this->do_put(__s, __intl, __io, __fill, __digits); }
protected:
- virtual
+ /// Destructor.
+ virtual
~money_put() { }
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a units as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the value 1001 in a
+ * US locale would write "$10.01" to @a s.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
virtual iter_type
do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
long double __units) const;
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a digits as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the string "1001" in
+ * a US locale would write "$10.01" to @a s.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
virtual iter_type
do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
const string_type& __digits) const;
+
+ template<bool _Intl>
+ iter_type
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
};
template<typename _CharT, typename _OutIter>
locale::id money_put<_CharT, _OutIter>::id;
-
+ /**
+ * @brief Messages facet base class providing catalog typedef.
+ */
struct messages_base
{
typedef int catalog;
};
+ /**
+ * @brief Facet for handling message catalogs
+ *
+ * This facet encapsulates the code to retrieve messages from
+ * message catalogs. The only thing defined by the standard for this facet
+ * is the interface. All underlying functionality is
+ * implementation-defined.
+ *
+ * This library currently implements 3 versions of the message facet. The
+ * first version (gnu) is a wrapper around gettext, provided by libintl.
+ * The second version (ieee) is a wrapper around catgets. The final
+ * version (default) does no actual translation. These implementations are
+ * only provided for char and wchar_t instantiations.
+ *
+ * The messages template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the messages facet.
+ */
template<typename _CharT>
class messages : public locale::facet, public messages_base
{
public:
// Types:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
protected:
// Underlying "C" library locale information saved from
// initialization, needed by messages_byname as well.
__c_locale _M_c_locale_messages;
- char* _M_name_messages;
+ const char* _M_name_messages;
public:
- static locale::id id;
-
- explicit
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
messages(size_t __refs = 0);
// Non-standard.
- explicit
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
- catalog
+ /*
+ * @brief Open a message catalog.
+ *
+ * This function opens and returns a handle to a message catalog by
+ * returning do_open(s, loc).
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @return Handle to the catalog or value < 0 if open fails.
+ */
+ catalog
open(const basic_string<char>& __s, const locale& __loc) const
{ return this->do_open(__s, __loc); }
// Non-standard and unorthodox, yet effective.
- catalog
+ /*
+ * @brief Open a message catalog.
+ *
+ * This non-standard function opens and returns a handle to a message
+ * catalog by returning do_open(s, loc). The third argument provides a
+ * message catalog root directory for gnu gettext and is ignored
+ * otherwise.
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @param dir Message catalog root directory.
+ * @return Handle to the catalog or value < 0 if open fails.
+ */
+ catalog
open(const basic_string<char>&, const locale&, const char*) const;
- string_type
+ /*
+ * @brief Look up a string in a message catalog.
+ *
+ * This function retrieves and returns a message from a catalog by
+ * returning do_get(c, set, msgid, s).
+ *
+ * For gnu, @a set and @a msgid are ignored. Returns gettext(s).
+ * For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+ *
+ * @param c The catalog to access.
+ * @param set Implementation-defined.
+ * @param msgid Implementation-defined.
+ * @param s Default return value if retrieval fails.
+ * @return Retrieved message or @a s if get fails.
+ */
+ string_type
get(catalog __c, int __set, int __msgid, const string_type& __s) const
{ return this->do_get(__c, __set, __msgid, __s); }
- void
+ /*
+ * @brief Close a message catalog.
+ *
+ * Closes catalog @a c by calling do_close(c).
+ *
+ * @param c The catalog to close.
+ */
+ void
close(catalog __c) const
{ return this->do_close(__c); }
protected:
- virtual
+ /// Destructor.
+ virtual
~messages();
- virtual catalog
+ /*
+ * @brief Open a message catalog.
+ *
+ * This function opens and returns a handle to a message catalog in an
+ * implementation-defined manner. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @return Handle to the opened catalog, value < 0 if open failed.
+ */
+ virtual catalog
do_open(const basic_string<char>&, const locale&) const;
- virtual string_type
+ /*
+ * @brief Look up a string in a message catalog.
+ *
+ * This function retrieves and returns a message from a catalog in an
+ * implementation-defined manner. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * For gnu, @a set and @a msgid are ignored. Returns gettext(s).
+ * For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+ *
+ * @param c The catalog to access.
+ * @param set Implementation-defined.
+ * @param msgid Implementation-defined.
+ * @param s Default return value if retrieval fails.
+ * @return Retrieved message or @a s if get fails.
+ */
+ virtual string_type
do_get(catalog, int, int, const string_type& __dfault) const;
- virtual void
+ /*
+ * @brief Close a message catalog.
+ *
+ * @param c The catalog to close.
+ */
+ virtual void
do_close(catalog) const;
// Returns a locale and codeset-converted string, given a char* message.
@@ -1818,23 +4413,24 @@ namespace std
// Returns a locale and codeset-converted string, given a char* message.
string_type
- _M_convert_from_char(char* __msg) const
+ _M_convert_from_char(char*) const
{
+#if 0
// Length of message string without terminating null.
size_t __len = char_traits<char>::length(__msg) - 1;
// "everybody can easily convert the string using
// mbsrtowcs/wcsrtombs or with iconv()"
-#if 0
+
// Convert char* to _CharT in locale used to open catalog.
// XXX need additional template parameter on messages class for this..
// typedef typename codecvt<char, _CharT, _StateT> __codecvt_type;
- typedef typename codecvt<char, _CharT, mbstate_t> __codecvt_type;
+ typedef typename codecvt<char, _CharT, mbstate_t> __codecvt_type;
__codecvt_type::state_type __state;
// XXX may need to initialize state.
//initialize_state(__state._M_init());
-
+
char* __from_next;
// XXX what size for this string?
_CharT* __to = static_cast<_CharT*>(__builtin_alloca(__len + 1));
@@ -1865,7 +4461,7 @@ namespace std
string
messages<char>::do_get(catalog, int, int, const string&) const;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
@@ -1875,15 +4471,15 @@ namespace std
class messages_byname : public messages<_CharT>
{
public:
- typedef _CharT char_type;
- typedef basic_string<_CharT> string_type;
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
- explicit
+ explicit
messages_byname(const char* __s, size_t __refs = 0);
protected:
- virtual
- ~messages_byname()
+ virtual
+ ~messages_byname()
{ }
};
@@ -1895,23 +4491,25 @@ namespace std
// NB: These are inline because, when used in a loop, some compilers
// can hoist the body out of the loop; then it's just as fast as the
// C is*() function.
+ //@{
+ /// Convenience interface to ctype.is().
template<typename _CharT>
- inline bool
+ inline bool
isspace(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isprint(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
template<typename _CharT>
- inline bool
+ inline bool
iscntrl(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isupper(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
@@ -1920,131 +4518,45 @@ namespace std
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isalpha(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isdigit(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
template<typename _CharT>
- inline bool
+ inline bool
ispunct(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isxdigit(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isalnum(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
template<typename _CharT>
- inline bool
+ inline bool
isgraph(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
template<typename _CharT>
- inline _CharT
+ inline _CharT
toupper(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
template<typename _CharT>
- inline _CharT
+ inline _CharT
tolower(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
-
- /**
- * @if maint
- * __locale_cache objects hold information extracted from facets in
- * a form optimized for parsing and formatting. They are stored in
- * a locale's facet array and accessed via __use_cache<_Facet>.
- *
- * The intent twofold: to avoid the costs of creating a locale
- * object and to avoid calling the virtual functions in a locale's
- * facet to look up data.
- * @endif
- */
- class __locale_cache_base
- {
- friend class std::locale::_Impl;
- friend class locale;
-
- public:
- virtual
- ~__locale_cache_base() { }
-
- };
-
- // This template doesn't really get used for anything except a
- // placeholder for specializations
- template<typename _Facet>
- class __locale_cache : public __locale_cache_base
- {
- // ctor
- __locale_cache(const locale&) {}
- };
-
- template<typename _CharT>
- class __locale_cache<numpunct<_CharT> > : public __locale_cache_base
- {
- // Types:
- typedef _CharT char_type;
- typedef char_traits<_CharT> traits_type;
- typedef basic_string<_CharT> string_type;
-
- public:
- // Data Members:
-
- // The sign used to separate decimal values: for standard US
- // locales, this would usually be: "." Abstracted from
- // numpunct::decimal_point().
- _CharT _M_decimal_point;
-
- // The sign used to separate groups of digits into smaller
- // strings that the eye can parse with less difficulty: for
- // standard US locales, this would usually be: "," Abstracted
- // from numpunct::thousands_sep().
- _CharT _M_thousands_sep;
-
- // However the US's "false" and "true" are translated. From
- // numpunct::truename() and numpunct::falsename(), respectively.
- const _CharT* _M_truename;
- const _CharT* _M_falsename;
-
- // If we are checking groupings. This should be equivalent to
- // numpunct::groupings().size() != 0
- bool _M_use_grouping;
-
- // If we are using numpunct's groupings, this is the current
- // grouping string in effect (from numpunct::grouping()).
- const char* _M_grouping;
-
- // A list of valid numeric literals: for the standard "C"
- // locale, this is "-+xX0123456789abcdef0123456789ABCDEF". This
- // array contains the chars after having been passed through the
- // current locale's ctype<_CharT>.widen().
-
- // Copied here from __locale_cache<ctype> to save multiple cache
- // access in num_put functions.
- _CharT _M_atoms_out[__num_base::_S_end];
-
- // ctor
- __locale_cache(const locale& __loc);
- __locale_cache(const locale& __loc, bool);
-
- ~__locale_cache()
- {
- delete [] _M_truename;
- delete [] _M_falsename;
- delete [] _M_grouping;
- }
- };
+ //@}
} // namespace std
#endif
diff --git a/contrib/libstdc++/include/bits/locale_facets.tcc b/contrib/libstdc++/include/bits/locale_facets.tcc
index 2563a95..f0f5e3a 100644
--- a/contrib/libstdc++/include/bits/locale_facets.tcc
+++ b/contrib/libstdc++/include/bits/locale_facets.tcc
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -30,18 +30,13 @@
// Warning: this file is not meant for user inclusion. Use <locale>.
-#ifndef _CPP_BITS_LOCFACETS_TCC
-#define _CPP_BITS_LOCFACETS_TCC 1
+#ifndef _LOCALE_FACETS_TCC
+#define _LOCALE_FACETS_TCC 1
#pragma GCC system_header
-#include <cerrno>
-#include <clocale> // For localeconv
-#include <cstdlib> // For strof, strtold
-#include <cmath> // For ceil
-#include <cctype> // For isspace
-#include <limits> // For numeric_limits
-#include <typeinfo> // For bad_cast.
+#include <limits> // For numeric_limits
+#include <typeinfo> // For bad_cast.
#include <bits/streambuf_iterator.h>
namespace std
@@ -51,7 +46,15 @@ namespace std
locale::combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
- __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+ try
+ {
+ __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+ }
+ catch(...)
+ {
+ __tmp->_M_remove_reference();
+ __throw_exception_again;
+ }
return locale(__tmp);
}
@@ -66,158 +69,335 @@ namespace std
__s2.data(), __s2.data() + __s2.length()) < 0);
}
+ /**
+ * @brief Test for the presence of a facet.
+ *
+ * has_facet tests the locale argument for the presence of the facet type
+ * provided as the template parameter. Facets derived from the facet
+ * parameter will also return true.
+ *
+ * @param Facet The facet type to test the presence of.
+ * @param locale The locale to test.
+ * @return true if locale contains a facet of type Facet, else false.
+ */
+ template<typename _Facet>
+ inline bool
+ has_facet(const locale& __loc) throw()
+ {
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
+ return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
+ }
+
+ /**
+ * @brief Return a facet.
+ *
+ * use_facet looks for and returns a reference to a facet of type Facet
+ * where Facet is the template parameter. If has_facet(locale) is true,
+ * there is a suitable facet to return. It throws std::bad_cast if the
+ * locale doesn't contain a facet of type Facet.
+ *
+ * @param Facet The facet type to access.
+ * @param locale The locale to use.
+ * @return Reference to facet of type Facet.
+ * @throw std::bad_cast if locale doesn't contain a facet of type Facet.
+ */
template<typename _Facet>
- const _Facet&
+ inline const _Facet&
use_facet(const locale& __loc)
{
- size_t __i = _Facet::id._M_id();
- locale::facet** __facets = __loc._M_impl->_M_facets;
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i]))
__throw_bad_cast();
return static_cast<const _Facet&>(*__facets[__i]);
}
+ // Routine to access a cache for the facet. If the cache didn't
+ // exist before, it gets constructed on the fly.
template<typename _Facet>
- bool
- has_facet(const locale& __loc) throw()
+ struct __use_cache
{
- size_t __i = _Facet::id._M_id();
- locale::facet** __facets = __loc._M_impl->_M_facets;
- return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
+ const _Facet*
+ operator() (const locale& __loc) const;
+ };
+
+ // Specializations.
+ template<typename _CharT>
+ struct __use_cache<__numpunct_cache<_CharT> >
+ {
+ const __numpunct_cache<_CharT>*
+ operator() (const locale& __loc) const
+ {
+ const size_t __i = numpunct<_CharT>::id._M_id();
+ const locale::facet** __caches = __loc._M_impl->_M_caches;
+ if (!__caches[__i])
+ {
+ __numpunct_cache<_CharT>* __tmp = NULL;
+ try
+ {
+ __tmp = new __numpunct_cache<_CharT>;
+ __tmp->_M_cache(__loc);
+ }
+ catch(...)
+ {
+ delete __tmp;
+ __throw_exception_again;
+ }
+ __loc._M_impl->_M_install_cache(__tmp, __i);
+ }
+ return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
+ }
+ };
+
+ template<typename _CharT, bool _Intl>
+ struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
+ {
+ const __moneypunct_cache<_CharT, _Intl>*
+ operator() (const locale& __loc) const
+ {
+ const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
+ const locale::facet** __caches = __loc._M_impl->_M_caches;
+ if (!__caches[__i])
+ {
+ __moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
+ try
+ {
+ __tmp = new __moneypunct_cache<_CharT, _Intl>;
+ __tmp->_M_cache(__loc);
+ }
+ catch(...)
+ {
+ delete __tmp;
+ __throw_exception_again;
+ }
+ __loc._M_impl->_M_install_cache(__tmp, __i);
+ }
+ return static_cast<
+ const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
+ }
+ };
+
+ template<typename _CharT>
+ void
+ __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
+ {
+ _M_allocated = true;
+
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+
+ _M_grouping_size = __np.grouping().size();
+ char* __grouping = new char[_M_grouping_size];
+ __np.grouping().copy(__grouping, _M_grouping_size);
+ _M_grouping = __grouping;
+ _M_use_grouping = _M_grouping_size && __np.grouping()[0] != 0;
+
+ _M_truename_size = __np.truename().size();
+ _CharT* __truename = new _CharT[_M_truename_size];
+ __np.truename().copy(__truename, _M_truename_size);
+ _M_truename = __truename;
+
+ _M_falsename_size = __np.falsename().size();
+ _CharT* __falsename = new _CharT[_M_falsename_size];
+ __np.falsename().copy(__falsename, _M_falsename_size);
+ _M_falsename = __falsename;
+
+ _M_decimal_point = __np.decimal_point();
+ _M_thousands_sep = __np.thousands_sep();
+
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+ __ct.widen(__num_base::_S_atoms_out,
+ __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out);
+ __ct.widen(__num_base::_S_atoms_in,
+ __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in);
}
- // Routine to access a cache for the locale. If the cache didn't
- // exist before, it gets constructed on the fly.
- template<typename _Facet>
- inline const __locale_cache<_Facet>&
- __use_cache(const locale& __loc)
+ template<typename _CharT, bool _Intl>
+ void
+ __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
{
- size_t __i = _Facet::id._M_id();
- if (__builtin_expect(__i >= __loc._M_impl->_M_facets_size,false))
- __throw_bad_cast();
- __locale_cache_base* __cache = __loc._M_impl->_M_get_cache(__i);
- if (__builtin_expect(!__cache, false))
- {
- __cache = new __locale_cache<_Facet>(__loc);
- __loc._M_impl->_M_install_cache(__cache, __i);
- }
- return static_cast<const __locale_cache<_Facet>&>(*__cache);
+ _M_allocated = true;
+
+ const moneypunct<_CharT, _Intl>& __mp =
+ use_facet<moneypunct<_CharT, _Intl> >(__loc);
+
+ _M_grouping_size = __mp.grouping().size();
+ char* __grouping = new char[_M_grouping_size];
+ __mp.grouping().copy(__grouping, _M_grouping_size);
+ _M_grouping = __grouping;
+ _M_use_grouping = _M_grouping_size && __mp.grouping()[0] != 0;
+
+ _M_decimal_point = __mp.decimal_point();
+ _M_thousands_sep = __mp.thousands_sep();
+ _M_frac_digits = __mp.frac_digits();
+
+ _M_curr_symbol_size = __mp.curr_symbol().size();
+ _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size];
+ __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
+ _M_curr_symbol = __curr_symbol;
+
+ _M_positive_sign_size = __mp.positive_sign().size();
+ _CharT* __positive_sign = new _CharT[_M_positive_sign_size];
+ __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
+ _M_positive_sign = __positive_sign;
+
+ _M_negative_sign_size = __mp.negative_sign().size();
+ _CharT* __negative_sign = new _CharT[_M_negative_sign_size];
+ __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
+ _M_negative_sign = __negative_sign;
+
+ _M_pos_format = __mp.pos_format();
+ _M_neg_format = __mp.neg_format();
+
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+ __ct.widen(money_base::_S_atoms,
+ money_base::_S_atoms + money_base::_S_end, _M_atoms);
}
- // Stage 1: Determine a conversion specifier.
+
+ // Used by both numeric and monetary facets.
+ // Check to make sure that the __grouping_tmp string constructed in
+ // money_get or num_get matches the canonical grouping for a given
+ // locale.
+ // __grouping_tmp is parsed L to R
+ // 1,222,444 == __grouping_tmp of "\1\3\3"
+ // __grouping is parsed R to L
+ // 1,222,444 == __grouping of "\3" == "\3\3\3"
+ static bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp);
+
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
_M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
ios_base::iostate& __err, string& __xtrc) const
{
- typedef char_traits<_CharT> __traits_type;
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_in;
+
+ // True if a mantissa is found.
+ bool __found_mantissa = false;
// First check for sign.
- const char_type __plus = __ctype.widen('+');
- const char_type __minus = __ctype.widen('-');
- int __pos = 0;
- char_type __c = *__beg;
- if ((__traits_type::eq(__c, __plus) || __traits_type::eq(__c, __minus))
- && __beg != __end)
+ if (__beg != __end)
{
- __xtrc += __ctype.narrow(__c, char());
- ++__pos;
- __c = *(++__beg);
+ const char_type __c = *__beg;
+ const bool __plus = __c == __lit[__num_base::_S_iplus];
+ if ((__plus || __c == __lit[__num_base::_S_iminus])
+ && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ && !(__c == __lc->_M_decimal_point))
+ {
+ __xtrc += __plus ? '+' : '-';
+ ++__beg;
+ }
}
- // Next, strip leading zeros.
- const char_type __zero = __ctype.widen(_S_atoms_in[_M_zero]);
- bool __found_zero = false;
- while (__traits_type::eq(__c, __zero) && __beg != __end)
- {
- __c = *(++__beg);
- __found_zero = true;
- }
- if (__found_zero)
+ // Next, look for leading zeros.
+ while (__beg != __end)
{
- __xtrc += _S_atoms_in[_M_zero];
- ++__pos;
+ const char_type __c = *__beg;
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
+ || __c == __lc->_M_decimal_point)
+ break;
+ else if (__c == __lit[__num_base::_S_izero])
+ {
+ if (!__found_mantissa)
+ {
+ __xtrc += '0';
+ __found_mantissa = true;
+ }
+ ++__beg;
+ }
+ else
+ break;
}
// Only need acceptable digits for floating point numbers.
- const size_t __len = _M_E - _M_zero + 1;
- char_type __watoms[__len];
- __ctype.widen(_S_atoms_in, _S_atoms_in + __len, __watoms);
bool __found_dec = false;
bool __found_sci = false;
- const char_type __dec = __np.decimal_point();
-
string __found_grouping;
- const string __grouping = __np.grouping();
- bool __check_grouping = __grouping.size();
+ if (__lc->_M_use_grouping)
+ __found_grouping.reserve(32);
int __sep_pos = 0;
- const char_type __sep = __np.thousands_sep();
-
+ const char_type* __lit_zero = __lit + __num_base::_S_izero;
+ const char_type* __q;
while (__beg != __end)
{
- // Only look in digits.
- const char_type* __p = __traits_type::find(__watoms, 10, __c);
-
- // NB: strchr returns true for __c == 0x0
- if (__p && !__traits_type::eq(__c, char_type()))
+ // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+ // and decimal_point.
+ const char_type __c = *__beg;
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
{
- // Try first for acceptable digit; record it if found.
- ++__pos;
- __xtrc += _S_atoms_in[__p - __watoms];
- ++__sep_pos;
- __c = *(++__beg);
- }
- else if (__traits_type::eq(__c, __sep)
- && __check_grouping && !__found_dec)
- {
- // NB: Thousands separator at the beginning of a string
- // is a no-no, as is two consecutive thousands separators.
- if (__sep_pos)
- {
- __found_grouping += static_cast<char>(__sep_pos);
- __sep_pos = 0;
- __c = *(++__beg);
- }
- else
+ if (!__found_dec && !__found_sci)
{
- __err |= ios_base::failbit;
- break;
+ // NB: Thousands separator at the beginning of a string
+ // is a no-no, as is two consecutive thousands separators.
+ if (__sep_pos)
+ {
+ __found_grouping += static_cast<char>(__sep_pos);
+ __sep_pos = 0;
+ ++__beg;
+ }
+ else
+ {
+ __err |= ios_base::failbit;
+ break;
+ }
}
+ else
+ break;
}
- else if (__traits_type::eq(__c, __dec) && !__found_dec)
+ else if (__c == __lc->_M_decimal_point)
{
- // According to the standard, if no grouping chars are seen,
- // no grouping check is applied. Therefore __found_grouping
- // must be adjusted only if __dec comes after some __sep.
- if (__found_grouping.size())
- __found_grouping += static_cast<char>(__sep_pos);
- ++__pos;
- __xtrc += '.';
- __c = *(++__beg);
- __found_dec = true;
+ if (!__found_dec && !__found_sci)
+ {
+ // If no grouping chars are seen, no grouping check
+ // is applied. Therefore __found_grouping is adjusted
+ // only if decimal_point comes after some thousands_sep.
+ if (__found_grouping.size())
+ __found_grouping += static_cast<char>(__sep_pos);
+ __xtrc += '.';
+ __found_dec = true;
+ ++__beg;
+ }
+ else
+ break;
+ }
+ else if (__q = __traits_type::find(__lit_zero, 10, __c))
+ {
+ __xtrc += __num_base::_S_atoms_in[__q - __lit];
+ __found_mantissa = true;
+ ++__sep_pos;
+ ++__beg;
}
- else if ((__traits_type::eq(__c, __watoms[_M_e])
- || __traits_type::eq(__c, __watoms[_M_E]))
- && !__found_sci && __pos)
+ else if ((__c == __lit[__num_base::_S_ie]
+ || __c == __lit[__num_base::_S_iE])
+ && __found_mantissa && !__found_sci)
{
// Scientific notation.
- ++__pos;
- __xtrc += __ctype.narrow(__c, char());
- __c = *(++__beg);
+ if (__found_grouping.size() && !__found_dec)
+ __found_grouping += static_cast<char>(__sep_pos);
+ __xtrc += 'e';
+ __found_sci = true;
// Remove optional plus or minus sign, if they exist.
- if (__traits_type::eq(__c, __plus)
- || __traits_type::eq(__c, __minus))
+ if (++__beg != __end)
{
- ++__pos;
- __xtrc += __ctype.narrow(__c, char());
- __c = *(++__beg);
+ const bool __plus = *__beg == __lit[__num_base::_S_iplus];
+ if ((__plus || *__beg == __lit[__num_base::_S_iminus])
+ && !(__lc->_M_use_grouping
+ && *__beg == __lc->_M_thousands_sep)
+ && !(*__beg == __lc->_M_decimal_point))
+ {
+ __xtrc += __plus ? '+' : '-';
+ ++__beg;
+ }
}
- __found_sci = true;
}
else
// Not a valid input item.
@@ -226,345 +406,340 @@ namespace std
// Digit grouping is checked. If grouping and found_grouping don't
// match, then get very very upset, and set failbit.
- if (__check_grouping && __found_grouping.size())
+ if (__lc->_M_use_grouping && __found_grouping.size())
{
- // Add the ending grouping if a decimal wasn't found.
- if (!__found_dec)
+ // Add the ending grouping if a decimal or 'e'/'E' wasn't found.
+ if (!__found_dec && !__found_sci)
__found_grouping += static_cast<char>(__sep_pos);
- if (!__verify_grouping(__grouping, __found_grouping))
+
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __found_grouping))
__err |= ios_base::failbit;
}
- // Finish up
- __xtrc += char();
+ // Finish up.
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
}
- // Stage 1: Determine a conversion specifier.
template<typename _CharT, typename _InIter>
- _InIter
- num_get<_CharT, _InIter>::
- _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
- ios_base::iostate& __err, string& __xtrc, int& __base) const
- {
- typedef char_traits<_CharT> __traits_type;
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
-
- // NB: Iff __basefield == 0, this can change based on contents.
- ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield;
- if (__basefield == ios_base::oct)
- __base = 8;
- else if (__basefield == ios_base::hex)
- __base = 16;
- else
- __base = 10;
-
- // First check for sign.
- int __pos = 0;
- char_type __c = *__beg;
- const char_type __plus = __ctype.widen('+');
- const char_type __minus = __ctype.widen('-');
-
- if ((__traits_type::eq(__c, __plus) || __traits_type::eq(__c, __minus))
- && __beg != __end)
- {
- __xtrc += __ctype.narrow(__c, char());
- ++__pos;
- __c = *(++__beg);
- }
+ template<typename _ValueT>
+ _InIter
+ num_get<_CharT, _InIter>::
+ _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
+ ios_base::iostate& __err, _ValueT& __v) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_in;
+
+ // NB: Iff __basefield == 0, __base can change based on contents.
+ const ios_base::fmtflags __basefield = __io.flags()
+ & ios_base::basefield;
+ const bool __oct = __basefield == ios_base::oct;
+ int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
+
+ // True if numeric digits are found.
+ bool __found_num = false;
+
+ // First check for sign.
+ bool __negative = false;
+ if (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ if (numeric_limits<_ValueT>::is_signed)
+ __negative = __c == __lit[__num_base::_S_iminus];
+ if ((__negative || __c == __lit[__num_base::_S_iplus])
+ && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ && !(__c == __lc->_M_decimal_point))
+ ++__beg;
+ }
- // Next, strip leading zeros and check required digits for base formats.
- const char_type __zero = __ctype.widen(_S_atoms_in[_M_zero]);
- const char_type __x = __ctype.widen('x');
- const char_type __X = __ctype.widen('X');
- if (__base == 10)
- {
- bool __found_zero = false;
- while (__traits_type::eq(__c, __zero) && __beg != __end)
- {
- __c = *(++__beg);
- __found_zero = true;
- }
- if (__found_zero)
- {
- __xtrc += _S_atoms_in[_M_zero];
- ++__pos;
- if (__basefield == 0)
- {
- if ((__traits_type::eq(__c, __x)
- || __traits_type::eq(__c, __X))
- && __beg != __end)
- {
- __xtrc += __ctype.narrow(__c, char());
- ++__pos;
- __c = *(++__beg);
+ // Next, look for leading zeros and check required digits
+ // for base formats.
+ while (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
+ || __c == __lc->_M_decimal_point)
+ break;
+ else if (__c == __lit[__num_base::_S_izero]
+ && (!__found_num || __base == 10))
+ {
+ __found_num = true;
+ ++__beg;
+ }
+ else if (__found_num)
+ {
+ if (__c == __lit[__num_base::_S_ix]
+ || __c == __lit[__num_base::_S_iX])
+ {
+ if (__basefield == 0)
__base = 16;
- }
- else
- __base = 8;
- }
- }
- }
- else if (__base == 16)
- {
- if (__traits_type::eq(__c, __zero) && __beg != __end)
- {
- __xtrc += _S_atoms_in[_M_zero];
- ++__pos;
- __c = *(++__beg);
- if ((__traits_type::eq(__c, __x) || __traits_type::eq(__c, __X))
- && __beg != __end)
- {
- __xtrc += __ctype.narrow(__c, char());
- ++__pos;
- __c = *(++__beg);
- }
- }
- }
+ if (__base == 16)
+ {
+ __found_num = false;
+ ++__beg;
+ }
+ }
+ else if (__basefield == 0)
+ __base = 8;
+ break;
+ }
+ else
+ break;
+ }
- // At this point, base is determined. If not hex, only allow
- // base digits as valid input.
- size_t __len;
- if (__base == 16)
- __len = _M_size;
- else
- __len = __base;
+ // At this point, base is determined. If not hex, only allow
+ // base digits as valid input.
+ const size_t __len = __base == 16 ? (__num_base::_S_iend
+ - __num_base::_S_izero)
+ : __base;
+
+ // Extract.
+ string __found_grouping;
+ if (__lc->_M_use_grouping)
+ __found_grouping.reserve(32);
+ int __sep_pos = 0;
+ bool __overflow = false;
+ _ValueT __result = 0;
+ const char_type* __lit_zero = __lit + __num_base::_S_izero;
+ const char_type* __q;
+ if (__negative)
+ {
+ const _ValueT __min = numeric_limits<_ValueT>::min() / __base;
+ for (; __beg != __end; ++__beg)
+ {
+ // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+ // and decimal_point.
+ const char_type __c = *__beg;
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ {
+ // NB: Thousands separator at the beginning of a string
+ // is a no-no, as is two consecutive thousands separators.
+ if (__sep_pos)
+ {
+ __found_grouping += static_cast<char>(__sep_pos);
+ __sep_pos = 0;
+ }
+ else
+ {
+ __err |= ios_base::failbit;
+ break;
+ }
+ }
+ else if (__c == __lc->_M_decimal_point)
+ break;
+ else if (__q = __traits_type::find(__lit_zero, __len, __c))
+ {
+ int __digit = __q - __lit_zero;
+ if (__digit > 15)
+ __digit -= 6;
+ if (__result < __min)
+ __overflow = true;
+ else
+ {
+ const _ValueT __new_result = __result * __base
+ - __digit;
+ __overflow |= __new_result > __result;
+ __result = __new_result;
+ ++__sep_pos;
+ __found_num = true;
+ }
+ }
+ else
+ // Not a valid input item.
+ break;
+ }
+ }
+ else
+ {
+ const _ValueT __max = numeric_limits<_ValueT>::max() / __base;
+ for (; __beg != __end; ++__beg)
+ {
+ const char_type __c = *__beg;
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ {
+ if (__sep_pos)
+ {
+ __found_grouping += static_cast<char>(__sep_pos);
+ __sep_pos = 0;
+ }
+ else
+ {
+ __err |= ios_base::failbit;
+ break;
+ }
+ }
+ else if (__c == __lc->_M_decimal_point)
+ break;
+ else if (__q = __traits_type::find(__lit_zero, __len, __c))
+ {
+ int __digit = __q - __lit_zero;
+ if (__digit > 15)
+ __digit -= 6;
+ if (__result > __max)
+ __overflow = true;
+ else
+ {
+ const _ValueT __new_result = __result * __base
+ + __digit;
+ __overflow |= __new_result < __result;
+ __result = __new_result;
+ ++__sep_pos;
+ __found_num = true;
+ }
+ }
+ else
+ break;
+ }
+ }
- // Extract.
- char_type __watoms[_M_size];
- __ctype.widen(_S_atoms_in, _S_atoms_in + __len, __watoms);
- string __found_grouping;
- const string __grouping = __np.grouping();
- bool __check_grouping = __grouping.size();
- int __sep_pos = 0;
- const char_type __sep = __np.thousands_sep();
- while (__beg != __end)
- {
- const char_type* __p = __traits_type::find(__watoms, __len, __c);
+ // Digit grouping is checked. If grouping and found_grouping don't
+ // match, then get very very upset, and set failbit.
+ if (__lc->_M_use_grouping && __found_grouping.size())
+ {
+ // Add the ending grouping.
+ __found_grouping += static_cast<char>(__sep_pos);
- // NB: strchr returns true for __c == 0x0
- if (__p && !__traits_type::eq(__c, char_type()))
- {
- // Try first for acceptable digit; record it if found.
- __xtrc += _S_atoms_in[__p - __watoms];
- ++__pos;
- ++__sep_pos;
- __c = *(++__beg);
- }
- else if (__traits_type::eq(__c, __sep) && __check_grouping)
- {
- // NB: Thousands separator at the beginning of a string
- // is a no-no, as is two consecutive thousands separators.
- if (__sep_pos)
- {
- __found_grouping += static_cast<char>(__sep_pos);
- __sep_pos = 0;
- __c = *(++__beg);
- }
- else
- {
- __err |= ios_base::failbit;
- break;
- }
- }
- else
- // Not a valid input item.
- break;
- }
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __found_grouping))
+ __err |= ios_base::failbit;
+ }
- // Digit grouping is checked. If grouping and found_grouping don't
- // match, then get very very upset, and set failbit.
- if (__check_grouping && __found_grouping.size())
- {
- // Add the ending grouping.
- __found_grouping += static_cast<char>(__sep_pos);
- if (!__verify_grouping(__grouping, __found_grouping))
- __err |= ios_base::failbit;
- }
+ if (!(__err & ios_base::failbit) && !__overflow
+ && __found_num)
+ __v = __result;
+ else
+ __err |= ios_base::failbit;
- // Finish up.
- __xtrc += char();
- if (__beg == __end)
- __err |= ios_base::eofbit;
- return __beg;
- }
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //17. Bad bool parsing
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 17. Bad bool parsing
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, bool& __v) const
{
- // Parse bool values as unsigned long
if (!(__io.flags() & ios_base::boolalpha))
{
+ // Parse bool values as long.
// NB: We can't just call do_get(long) here, as it might
// refer to a derived class.
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
-
- unsigned long __ul;
- __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
- if (!(__err & ios_base::failbit) && __ul <= 1)
- __v = __ul;
- else
+ long __l = -1;
+ __beg = _M_extract_int(__beg, __end, __io, __err, __l);
+ if (__l == 0 || __l == 1)
+ __v = __l;
+ else
__err |= ios_base::failbit;
}
-
- // Parse bool values as alphanumeric
else
{
- typedef char_traits<_CharT> __traits_type;
- typedef basic_string<_CharT> __string_type;
-
- locale __loc = __io.getloc();
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
- const __string_type __true = __np.truename();
- const __string_type __false = __np.falsename();
- const char_type* __trues = __true.c_str();
- const char_type* __falses = __false.c_str();
- const size_t __truen = __true.size() - 1;
- const size_t __falsen = __false.size() - 1;
-
- for (size_t __n = 0; __beg != __end; ++__n)
+ // Parse bool values as alphanumeric.
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+
+ bool __testf = true;
+ bool __testt = true;
+ size_t __n;
+ for (__n = 0; __beg != __end; ++__n, ++__beg)
{
- char_type __c = *__beg++;
- bool __testf = __n <= __falsen
- ? __traits_type::eq(__c, __falses[__n]) : false;
- bool __testt = __n <= __truen
- ? __traits_type::eq(__c, __trues[__n]) : false;
- if (!(__testf || __testt))
- {
- __err |= ios_base::failbit;
- break;
- }
- else if (__testf && __n == __falsen)
- {
- __v = 0;
- break;
- }
- else if (__testt && __n == __truen)
- {
- __v = 1;
- break;
- }
+ if (__testf)
+ if (__n < __lc->_M_falsename_size)
+ __testf = *__beg == __lc->_M_falsename[__n];
+ else
+ break;
+
+ if (__testt)
+ if (__n < __lc->_M_truename_size)
+ __testt = *__beg == __lc->_M_truename[__n];
+ else
+ break;
+
+ if (!__testf && !__testt)
+ break;
}
+ if (__testf && __n == __lc->_M_falsename_size)
+ __v = 0;
+ else if (__testt && __n == __lc->_M_truename_size)
+ __v = 1;
+ else
+ __err |= ios_base::failbit;
+
if (__beg == __end)
__err |= ios_base::eofbit;
}
return __beg;
}
-#endif
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned short& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- unsigned long __ul;
- __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
- if (!(__err & ios_base::failbit)
- && __ul <= numeric_limits<unsigned short>::max())
- __v = static_cast<unsigned short>(__ul);
- else
- __err |= ios_base::failbit;
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned int& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- unsigned long __ul;
- __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
- if (!(__err & ios_base::failbit)
- && __ul <= numeric_limits<unsigned int>::max())
- __v = static_cast<unsigned int>(__ul);
- else
- __err |= ios_base::failbit;
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long long& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long long& __v) const
- {
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
- return __beg;
- }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
#endif
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
- do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, float& __v) const
{
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
return __beg;
}
@@ -577,7 +752,7 @@ namespace std
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
return __beg;
}
@@ -590,7 +765,7 @@ namespace std
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
- __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
return __beg;
}
@@ -600,25 +775,20 @@ namespace std
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, void*& __v) const
{
- // Prepare for hex formatted input
+ // Prepare for hex formatted input.
typedef ios_base::fmtflags fmtflags;
- fmtflags __fmt = __io.flags();
- fmtflags __fmtmask = ~(ios_base::showpos | ios_base::basefield
- | ios_base::uppercase | ios_base::internal);
- __io.flags(__fmt & __fmtmask | (ios_base::hex | ios_base::showbase));
+ const fmtflags __fmt = __io.flags();
+ __io.flags(__fmt & ~ios_base::basefield | ios_base::hex);
- string __xtrc;
- int __base;
- __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+ unsigned long __ul;
+ __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
- // Reset from hex formatted input
+ // Reset from hex formatted input.
__io.flags(__fmt);
- unsigned long __ul;
- __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
if (!(__err & ios_base::failbit))
__v = reinterpret_cast<void*>(__ul);
- else
+ else
__err |= ios_base::failbit;
return __beg;
}
@@ -628,12 +798,12 @@ namespace std
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
- _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
+ _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
_CharT* __new, const _CharT* __cs, int& __len) const
{
// [22.2.2.2.2] Stage 3.
// If necessary, pad.
- __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs,
+ __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs,
__w, __len, true);
__len = static_cast<int>(__w);
}
@@ -641,141 +811,143 @@ namespace std
// Forwarding functions to peel signed from unsigned integer types.
template<typename _CharT>
inline int
- __int_to_char(_CharT* __out, const int __size, long __v,
- const _CharT* __lit, ios_base::fmtflags __flags)
+ __int_to_char(_CharT* __bufend, long __v, const _CharT* __lit,
+ ios_base::fmtflags __flags)
{
unsigned long __ul = static_cast<unsigned long>(__v);
bool __neg = false;
- if (__v < 0)
+ if (__v < 0)
{
__ul = -__ul;
__neg = true;
}
- return __int_to_char(__out, __size, __ul, __lit, __flags, __neg);
+ return __int_to_char(__bufend, __ul, __lit, __flags, __neg);
}
template<typename _CharT>
inline int
- __int_to_char(_CharT* __out, const int __size, unsigned long __v,
- const _CharT* __lit, ios_base::fmtflags __flags)
- { return __int_to_char(__out, __size, __v, __lit, __flags, false); }
+ __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit,
+ ios_base::fmtflags __flags)
+ {
+ // About showpos, see Table 60 and C99 7.19.6.1, p6 (+).
+ return __int_to_char(__bufend, __v, __lit,
+ __flags & ~ios_base::showpos, false);
+ }
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
template<typename _CharT>
inline int
- __int_to_char(_CharT* __out, const int __size, long long __v,
- const _CharT* __lit, ios_base::fmtflags __flags)
- {
+ __int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit,
+ ios_base::fmtflags __flags)
+ {
unsigned long long __ull = static_cast<unsigned long long>(__v);
bool __neg = false;
- if (__v < 0)
+ if (__v < 0)
{
__ull = -__ull;
__neg = true;
}
- return __int_to_char(__out, __size, __ull, __lit, __flags, __neg);
+ return __int_to_char(__bufend, __ull, __lit, __flags, __neg);
}
template<typename _CharT>
inline int
- __int_to_char(_CharT* __out, const int __size, unsigned long long __v,
- const _CharT* __lit, ios_base::fmtflags __flags)
- { return __int_to_char(__out, __size, __v, __lit, __flags, false); }
+ __int_to_char(_CharT* __bufend, unsigned long long __v,
+ const _CharT* __lit, ios_base::fmtflags __flags)
+ { return __int_to_char(__bufend, __v, __lit,
+ __flags & ~ios_base::showpos, false); }
#endif
-
+
template<typename _CharT, typename _ValueT>
int
- __int_to_char(_CharT* __out, const int __size, _ValueT __v,
- const _CharT* __lit, ios_base::fmtflags __flags, bool __neg)
+ __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
+ ios_base::fmtflags __flags, bool __neg)
{
// Don't write base if already 0.
const bool __showbase = (__flags & ios_base::showbase) && __v;
const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
- _CharT* __buf = __out + __size - 1;
- _CharT* __bufend = __out + __size;
+ _CharT* __buf = __bufend - 1;
if (__builtin_expect(__basefield != ios_base::oct &&
__basefield != ios_base::hex, true))
{
// Decimal.
- do
+ do
{
- *__buf-- = __lit[(__v % 10) + __num_base::_S_digits];
+ *__buf-- = __lit[(__v % 10) + __num_base::_S_odigits];
__v /= 10;
- }
+ }
while (__v != 0);
if (__neg)
- *__buf-- = __lit[__num_base::_S_minus];
+ *__buf-- = __lit[__num_base::_S_ominus];
else if (__flags & ios_base::showpos)
- *__buf-- = __lit[__num_base::_S_plus];
+ *__buf-- = __lit[__num_base::_S_oplus];
}
else if (__basefield == ios_base::oct)
{
// Octal.
- do
+ do
{
- *__buf-- = __lit[(__v & 0x7) + __num_base::_S_digits];
+ *__buf-- = __lit[(__v & 0x7) + __num_base::_S_odigits];
__v >>= 3;
- }
+ }
while (__v != 0);
if (__showbase)
- *__buf-- = __lit[__num_base::_S_digits];
+ *__buf-- = __lit[__num_base::_S_odigits];
}
else
{
// Hex.
const bool __uppercase = __flags & ios_base::uppercase;
- int __case_offset = __uppercase
- ? __num_base::_S_udigits : __num_base::_S_digits;
- do
+ const int __case_offset = __uppercase ? __num_base::_S_oudigits
+ : __num_base::_S_odigits;
+ do
{
*__buf-- = __lit[(__v & 0xf) + __case_offset];
__v >>= 4;
- }
+ }
while (__v != 0);
if (__showbase)
{
// 'x' or 'X'
- *__buf-- = __lit[__num_base::_S_x + __uppercase];
+ *__buf-- = __lit[__num_base::_S_ox + __uppercase];
// '0'
- *__buf-- = __lit[__num_base::_S_digits];
+ *__buf-- = __lit[__num_base::_S_odigits];
}
}
- int __ret = __bufend - __buf - 1;
- return __ret;
+ return __bufend - __buf - 1;
}
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
- _M_group_int(const string& __grouping, _CharT __sep, ios_base& __io,
- _CharT* __new, _CharT* __cs, int& __len) const
+ _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
+ ios_base& __io, _CharT* __new, _CharT* __cs, int& __len) const
{
- // By itself __add_grouping cannot deal correctly with __ws when
+ // By itself __add_grouping cannot deal correctly with __cs when
// ios::showbase is set and ios_base::oct || ios_base::hex.
// Therefore we take care "by hand" of the initial 0, 0x or 0X.
// However, remember that the latter do not occur if the number
// printed is '0' (__len == 1).
streamsize __off = 0;
- const ios_base::fmtflags __basefield = __io.flags()
+ const ios_base::fmtflags __basefield = __io.flags()
& ios_base::basefield;
if ((__io.flags() & ios_base::showbase) && __len > 1)
if (__basefield == ios_base::oct)
{
__off = 1;
- *__new = *__cs;
+ __new[0] = __cs[0];
}
else if (__basefield == ios_base::hex)
{
__off = 2;
- *__new = *__cs;
- *(__new + 1) = *(__cs + 1);
+ __new[0] = __cs[0];
+ __new[1] = __cs[1];
}
_CharT* __p;
- __p = __add_grouping(__new + __off, __sep,
- __grouping.c_str(),
- __grouping.c_str() + __grouping.size(),
- __cs + __off, __cs + __len);
+ __p = std::__add_grouping(__new + __off, __sep, __grouping,
+ __grouping_size, __cs + __off,
+ __cs + __len);
__len = __p - __new;
}
@@ -783,45 +955,44 @@ namespace std
template<typename _ValueT>
_OutIter
num_put<_CharT, _OutIter>::
- _M_convert_int(_OutIter __s, ios_base& __io, _CharT __fill,
- _ValueT __v) const
+ _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
+ _ValueT __v) const
{
- typedef numpunct<_CharT> __facet_type;
- typedef __locale_cache<numpunct<_CharT> > __cache_type;
- const locale& __loc = __io._M_getloc();
- const __cache_type& __lc = __use_cache<__facet_type>(__loc);
- const _CharT* __lit = __lc._M_atoms_out;
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_out;
// Long enough to hold hex, dec, and octal representations.
- int __ilen = 4 * sizeof(_ValueT);
- _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ const int __ilen = 4 * sizeof(_ValueT);
+ _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __ilen));
+
// [22.2.2.2.2] Stage 1, numeric conversion to character.
// Result is returned right-justified in the buffer.
int __len;
- __len = __int_to_char(&__cs[0], __ilen, __v, __lit, __io.flags());
- __cs = __cs + __ilen - __len;
-
- // Add grouping, if necessary.
- _CharT* __cs2;
- if (__lc._M_use_grouping)
+ __len = __int_to_char(__cs + __ilen, __v, __lit, __io.flags());
+ __cs += __ilen - __len;
+
+ // Add grouping, if necessary.
+ if (__lc->_M_use_grouping)
{
// Grouping can add (almost) as many separators as the
// number of digits, but no more.
- __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len * 2));
- _M_group_int(__lc._M_grouping, __lc._M_thousands_sep, __io,
- __cs2, __cs, __len);
+ _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __len * 2));
+ _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
+ __lc->_M_thousands_sep, __io, __cs2, __cs, __len);
__cs = __cs2;
}
-
+
// Pad.
- _CharT* __cs3;
- streamsize __w = __io.width();
+ const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
- __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __w));
+ _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
_M_pad(__fill, __w, __io, __cs3, __cs, __len);
__cs = __cs3;
}
@@ -829,38 +1000,36 @@ namespace std
// [22.2.2.2.2] Stage 4.
// Write resulting, fully-formatted string to output iterator.
- return __write(__s, __cs, __len);
- }
+ return std::__write(__s, __cs, __len);
+ }
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
- _M_group_float(const string& __grouping, _CharT __sep, const _CharT* __p,
- _CharT* __new, _CharT* __cs, int& __len) const
+ _M_group_float(const char* __grouping, size_t __grouping_size,
+ _CharT __sep, const _CharT* __p, _CharT* __new,
+ _CharT* __cs, int& __len) const
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //282. What types does numpunct grouping refer to?
- // Add grouping, if necessary.
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 282. What types does numpunct grouping refer to?
+ // Add grouping, if necessary.
_CharT* __p2;
- int __declen = __p ? __p - __cs : __len;
- __p2 = __add_grouping(__new, __sep,
- __grouping.c_str(),
- __grouping.c_str() + __grouping.size(),
- __cs, __cs + __declen);
-
+ const int __declen = __p ? __p - __cs : __len;
+ __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size,
+ __cs, __cs + __declen);
+
// Tack on decimal part.
int __newlen = __p2 - __new;
if (__p)
{
char_traits<_CharT>::copy(__p2, __p, __len - __declen);
__newlen += __len - __declen;
- }
+ }
__len = __newlen;
-#endif
}
// The following code uses snprintf (or sprintf(), when
- // _GLIBCPP_USE_C99 is not defined) to convert floating point values
+ // _GLIBCXX_USE_C99 is not defined) to convert floating point values
// for insertion into a stream. An optimization would be to replace
// them with code that works directly on a wide buffer and then use
// __pad to do the padding. It would be good to replace them anyway
@@ -873,113 +1042,105 @@ namespace std
template<typename _ValueT>
_OutIter
num_put<_CharT, _OutIter>::
- _M_convert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
+ _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
_ValueT __v) const
{
- // Note: digits10 is rounded down: add 1 to ensure the maximum
- // available precision. Then, in general, one more 1 needs to
- // be added since, when the %{g,G} conversion specifiers are
- // chosen inside _S_format_float, the precision field is "the
- // maximum number of significant digits", *not* the "number of
- // digits to appear after the decimal point", as happens for
- // %{e,E,f,F} (C99, 7.19.6.1,4).
- const int __max_digits = numeric_limits<_ValueT>::digits10 + 2;
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
// Use default precision if out of range.
streamsize __prec = __io.precision();
- if (__prec > static_cast<streamsize>(__max_digits))
- __prec = static_cast<streamsize>(__max_digits);
- else if (__prec < static_cast<streamsize>(0))
+ if (__prec < static_cast<streamsize>(0))
__prec = static_cast<streamsize>(6);
- typedef numpunct<_CharT> __facet_type;
- typedef __locale_cache<numpunct<_CharT> > __cache_type;
- const locale __loc = __io._M_getloc();
- const __cache_type& __lc = __use_cache<__facet_type>(__loc);
+ const int __max_digits = numeric_limits<_ValueT>::digits10;
// [22.2.2.2.2] Stage 1, numeric conversion to character.
int __len;
// Long enough for the max format spec.
char __fbuf[16];
-#ifdef _GLIBCPP_USE_C99
- // First try a buffer perhaps big enough (for sure sufficient
+#ifdef _GLIBCXX_USE_C99
+ // First try a buffer perhaps big enough (most probably sufficient
// for non-ios_base::fixed outputs)
int __cs_size = __max_digits * 3;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- _S_format_float(__io, __fbuf, __mod, __prec);
- __len = __convert_from_v(__cs, __cs_size, __fbuf, __v,
- _S_c_locale, __prec);
+ __num_base::_S_format_float(__io, __fbuf, __mod);
+ __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v,
+ _S_get_c_locale(), __prec);
// If the buffer was not large enough, try again with the correct size.
if (__len >= __cs_size)
{
- __cs_size = __len + 1;
+ __cs_size = __len + 1;
__cs = static_cast<char*>(__builtin_alloca(__cs_size));
- __len = __convert_from_v(__cs, __cs_size, __fbuf, __v,
- _S_c_locale, __prec);
+ __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v,
+ _S_get_c_locale(), __prec);
}
#else
// Consider the possibility of long ios_base::fixed outputs
const bool __fixed = __io.flags() & ios_base::fixed;
const int __max_exp = numeric_limits<_ValueT>::max_exponent10;
- // ios_base::fixed outputs may need up to __max_exp+1 chars
- // for the integer part + up to __max_digits chars for the
- // fractional part + 3 chars for sign, decimal point, '\0'. On
- // the other hand, for non-fixed outputs __max_digits*3 chars
- // are largely sufficient.
- const int __cs_size = __fixed ? __max_exp + __max_digits + 4
- : __max_digits * 3;
+ // The size of the output string is computed as follows.
+ // ios_base::fixed outputs may need up to __max_exp + 1 chars
+ // for the integer part + __prec chars for the fractional part
+ // + 3 chars for sign, decimal point, '\0'. On the other hand,
+ // for non-fixed outputs __max_digits * 2 + __prec chars are
+ // largely sufficient.
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- _S_format_float(__io, __fbuf, __mod, __prec);
- __len = __convert_from_v(__cs, 0, __fbuf, __v, _S_c_locale, __prec);
+ __num_base::_S_format_float(__io, __fbuf, __mod);
+ __len = std::__convert_from_v(__cs, 0, __fbuf, __v,
+ _S_get_c_locale(), __prec);
#endif
// [22.2.2.2.2] Stage 2, convert to char_type, using correct
// numpunct.decimal_point() values for '.' and adding grouping.
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __len));
__ctype.widen(__cs, __cs + __len, __ws);
-
+
// Replace decimal point.
const _CharT __cdec = __ctype.widen('.');
- const _CharT __dec = __lc._M_decimal_point;
+ const _CharT __dec = __lc->_M_decimal_point;
const _CharT* __p;
if (__p = char_traits<_CharT>::find(__ws, __len, __cdec))
__ws[__p - __ws] = __dec;
- // Add grouping, if necessary.
- _CharT* __ws2;
- if (__lc._M_use_grouping)
+ // Add grouping, if necessary.
+ if (__lc->_M_use_grouping)
{
- // Grouping can add (almost) as many separators as the
- // number of digits, but no more.
- __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len * 2));
- _M_group_float(__lc._M_grouping, __lc._M_thousands_sep, __p,
- __ws2, __ws, __len);
- __ws = __ws2;
+ // Grouping can add (almost) as many separators as the
+ // number of digits, but no more.
+ _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __len * 2));
+ _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
+ __lc->_M_thousands_sep, __p, __ws2, __ws, __len);
+ __ws = __ws2;
}
// Pad.
- _CharT* __ws3;
- streamsize __w = __io.width();
+ const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
- __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+ _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
_M_pad(__fill, __w, __io, __ws3, __ws, __len);
__ws = __ws3;
}
__io.width(0);
-
+
// [22.2.2.2.2] Stage 4.
// Write resulting, fully-formatted string to output iterator.
- return __write(__s, __ws, __len);
+ return std::__write(__s, __ws, __len);
}
template<typename _CharT, typename _OutIter>
@@ -987,39 +1148,35 @@ namespace std
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
{
- ios_base::fmtflags __flags = __io.flags();
+ const ios_base::fmtflags __flags = __io.flags();
if ((__flags & ios_base::boolalpha) == 0)
{
unsigned long __uv = __v;
- __s = _M_convert_int(__s, __io, __fill, __uv);
+ __s = _M_insert_int(__s, __io, __fill, __uv);
}
else
{
- typedef numpunct<_CharT> __facet_type;
- typedef __locale_cache<numpunct<_CharT> > __cache_type;
- const locale __loc = __io._M_getloc();
- const __cache_type& __lc = __use_cache<__facet_type>(__loc);
-
- typedef basic_string<_CharT> __string_type;
- __string_type __name;
- if (__v)
- __name = __lc._M_truename;
- else
- __name = __lc._M_falsename;
-
- const _CharT* __cs = __name.c_str();
- int __len = __name.size();
- _CharT* __cs3;
- streamsize __w = __io.width();
+ typedef typename numpunct<_CharT>::__cache_type __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+
+ const _CharT* __name = __v ? __lc->_M_truename
+ : __lc->_M_falsename;
+ int __len = __v ? __lc->_M_truename_size
+ : __lc->_M_falsename_size;
+
+ const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
- __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __w));
- _M_pad(__fill, __w, __io, __cs3, __cs, __len);
- __cs = __cs3;
+ _CharT* __cs
+ = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
+ _M_pad(__fill, __w, __io, __cs, __name, __len);
+ __name = __cs;
}
__io.width(0);
- __s = __write(__s, __cs, __len);
+ __s = std::__write(__s, __name, __len);
}
return __s;
}
@@ -1028,42 +1185,42 @@ namespace std
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
- { return _M_convert_int(__s, __io, __fill, __v); }
+ { return _M_insert_int(__s, __io, __fill, __v); }
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long __v) const
- { return _M_convert_int(__s, __io, __fill, __v); }
+ { return _M_insert_int(__s, __io, __fill, __v); }
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __b, char_type __fill, long long __v) const
- { return _M_convert_int(__s, __b, __fill, __v); }
+ { return _M_insert_int(__s, __b, __fill, __v); }
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long long __v) const
- { return _M_convert_int(__s, __io, __fill, __v); }
+ { return _M_insert_int(__s, __io, __fill, __v); }
#endif
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
- { return _M_convert_float(__s, __io, __fill, char(), __v); }
+ { return _M_insert_float(__s, __io, __fill, char(), __v); }
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
- do_put(iter_type __s, ios_base& __io, char_type __fill,
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
long double __v) const
- { return _M_convert_float(__s, __io, __fill, 'L', __v); }
+ { return _M_insert_float(__s, __io, __fill, 'L', __v); }
template<typename _CharT, typename _OutIter>
_OutIter
@@ -1071,274 +1228,475 @@ namespace std
do_put(iter_type __s, ios_base& __io, char_type __fill,
const void* __v) const
{
- ios_base::fmtflags __flags = __io.flags();
- ios_base::fmtflags __fmt = ~(ios_base::showpos | ios_base::basefield
- | ios_base::uppercase | ios_base::internal);
+ const ios_base::fmtflags __flags = __io.flags();
+ const ios_base::fmtflags __fmt = ~(ios_base::showpos
+ | ios_base::basefield
+ | ios_base::uppercase
+ | ios_base::internal);
__io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase));
- try
- {
- __s = _M_convert_int(__s, __io, __fill,
- reinterpret_cast<unsigned long>(__v));
- __io.flags(__flags);
- }
- catch (...)
- {
- __io.flags(__flags);
- __throw_exception_again;
- }
- return __s;
- }
-
- template<typename _CharT, typename _InIter>
- _InIter
- money_get<_CharT, _InIter>::
- do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
- ios_base::iostate& __err, long double& __units) const
- {
- string_type __str;
- __beg = this->do_get(__beg, __end, __intl, __io, __err, __str);
-
- const int __cs_size = __str.size() + 1;
- char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- const _CharT* __wcs = __str.c_str();
- __ctype.narrow(__wcs, __wcs + __cs_size, char(), __cs);
- __convert_to_v(__cs, __units, __err, _S_c_locale);
- return __beg;
+ __s = _M_insert_int(__s, __io, __fill,
+ reinterpret_cast<unsigned long>(__v));
+ __io.flags(__flags);
+ return __s;
}
template<typename _CharT, typename _InIter>
- _InIter
- money_get<_CharT, _InIter>::
- do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
- ios_base::iostate& __err, string_type& __units) const
- {
- // These contortions are quite unfortunate.
- typedef moneypunct<_CharT, true> __money_true;
- typedef moneypunct<_CharT, false> __money_false;
- typedef money_base::part part;
- typedef typename string_type::size_type size_type;
-
- const locale __loc = __io.getloc();
- const __money_true& __mpt = use_facet<__money_true>(__loc);
- const __money_false& __mpf = use_facet<__money_false>(__loc);
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
-
- const money_base::pattern __p = __intl ? __mpt.neg_format()
- : __mpf.neg_format();
-
- const string_type __pos_sign =__intl ? __mpt.positive_sign()
- : __mpf.positive_sign();
- const string_type __neg_sign =__intl ? __mpt.negative_sign()
- : __mpf.negative_sign();
- const char_type __d = __intl ? __mpt.decimal_point()
- : __mpf.decimal_point();
- const char_type __sep = __intl ? __mpt.thousands_sep()
- : __mpf.thousands_sep();
-
- const string __grouping = __intl ? __mpt.grouping() : __mpf.grouping();
-
- // Set to deduced positive or negative sign, depending.
- string_type __sign;
- // String of grouping info from thousands_sep plucked from __units.
- string __grouping_tmp;
- // Marker for thousands_sep position.
- int __sep_pos = 0;
- // If input iterator is in a valid state.
- bool __testvalid = true;
- // Flag marking when a decimal point is found.
- bool __testdecfound = false;
-
- // The tentative returned string is stored here.
- string_type __temp_units;
-
- char_type __c = *__beg;
- char_type __eof = static_cast<char_type>(char_traits<char_type>::eof());
- for (int __i = 0; __beg != __end && __i < 4 && __testvalid; ++__i)
- {
- part __which = static_cast<part>(__p.field[__i]);
- switch (__which)
- {
- case money_base::symbol:
- if (__io.flags() & ios_base::showbase
- || __i < 2 || __sign.size() > 1
- || ((static_cast<part>(__p.field[3]) != money_base::none)
- && __i == 2))
- {
- // According to 22.2.6.1.2.2, symbol is required
- // if (__io.flags() & ios_base::showbase),
- // otherwise is optional and consumed only if
- // other characters are needed to complete the
- // format.
- const string_type __symbol = __intl ? __mpt.curr_symbol()
- : __mpf.curr_symbol();
- size_type __len = __symbol.size();
- size_type __j = 0;
- while (__beg != __end
- && __j < __len && __symbol[__j] == __c)
- {
- __c = *(++__beg);
- ++__j;
- }
- // When (__io.flags() & ios_base::showbase)
- // symbol is required.
- if (__j != __len && (__io.flags() & ios_base::showbase))
- __testvalid = false;
- }
- break;
- case money_base::sign:
- // Sign might not exist, or be more than one character long.
- if (__pos_sign.size() && __neg_sign.size())
+ template<bool _Intl>
+ _InIter
+ money_get<_CharT, _InIter>::
+ _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __units) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef moneypunct<_CharT, _Intl> __moneypunct_type;
+ typedef typename __moneypunct_type::__cache_type __cache_type;
+
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+
+ // Deduced sign.
+ bool __negative = false;
+ // Sign size.
+ size_type __sign_size = 0;
+ // True if sign is mandatory.
+ const bool __mandatory_sign = (__lc->_M_positive_sign_size
+ && __lc->_M_negative_sign_size);
+ // String of grouping info from thousands_sep plucked from __units.
+ string __grouping_tmp;
+ if (__lc->_M_use_grouping)
+ __grouping_tmp.reserve(32);
+ // Last position before the decimal point.
+ int __last_pos = 0;
+ // Separator positions, then, possibly, fractional digits.
+ int __n = 0;
+ // If input iterator is in a valid state.
+ bool __testvalid = true;
+ // Flag marking when a decimal point is found.
+ bool __testdecfound = false;
+
+ // The tentative returned string is stored here.
+ string __res;
+ __res.reserve(32);
+
+ const char_type* __lit_zero = __lit + money_base::_S_zero;
+ const char_type* __q;
+ const money_base::pattern __p = __lc->_M_neg_format;
+ for (int __i = 0; __i < 4 && __testvalid; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ // According to 22.2.6.1.2, p2, symbol is required
+ // if (__io.flags() & ios_base::showbase), otherwise
+ // is optional and consumed only if other characters
+ // are needed to complete the format.
+ if (__io.flags() & ios_base::showbase || __sign_size > 1
+ || __i == 0
+ || (__i == 1 && (__mandatory_sign
+ || (static_cast<part>(__p.field[0])
+ == money_base::sign)
+ || (static_cast<part>(__p.field[2])
+ == money_base::space)))
+ || (__i == 2 && ((static_cast<part>(__p.field[3])
+ == money_base::value)
+ || __mandatory_sign
+ && (static_cast<part>(__p.field[3])
+ == money_base::sign))))
{
- // Sign is mandatory.
- if (__c == __pos_sign[0])
- {
- __sign = __pos_sign;
- __c = *(++__beg);
- }
- else if (__c == __neg_sign[0])
- {
- __sign = __neg_sign;
- __c = *(++__beg);
- }
- else
+ const size_type __len = __lc->_M_curr_symbol_size;
+ size_type __j = 0;
+ for (; __beg != __end && __j < __len
+ && *__beg == __lc->_M_curr_symbol[__j];
+ ++__beg, ++__j);
+ if (__j != __len
+ && (__j || __io.flags() & ios_base::showbase))
__testvalid = false;
}
- else if (__pos_sign.size() && __c == __pos_sign[0])
+ break;
+ case money_base::sign:
+ // Sign might not exist, or be more than one character long.
+ if (__lc->_M_positive_sign_size && __beg != __end
+ && *__beg == __lc->_M_positive_sign[0])
+ {
+ __sign_size = __lc->_M_positive_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_negative_sign_size && __beg != __end
+ && *__beg == __lc->_M_negative_sign[0])
+ {
+ __negative = true;
+ __sign_size = __lc->_M_negative_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_positive_sign_size
+ && !__lc->_M_negative_sign_size)
+ // "... if no sign is detected, the result is given the sign
+ // that corresponds to the source of the empty string"
+ __negative = true;
+ else if (__mandatory_sign)
+ __testvalid = false;
+ break;
+ case money_base::value:
+ // Extract digits, remove and stash away the
+ // grouping of found thousands separators.
+ for (; __beg != __end; ++__beg)
+ if (__q = __traits_type::find(__lit_zero, 10, *__beg))
{
- __sign = __pos_sign;
- __c = *(++__beg);
+ __res += money_base::_S_atoms[__q - __lit];
+ ++__n;
}
- else if (__neg_sign.size() && __c == __neg_sign[0])
+ else if (*__beg == __lc->_M_decimal_point && !__testdecfound)
{
- __sign = __neg_sign;
- __c = *(++__beg);
+ __last_pos = __n;
+ __n = 0;
+ __testdecfound = true;
}
- break;
- case money_base::value:
- // Extract digits, remove and stash away the
- // grouping of found thousands separators.
- while (__beg != __end
- && (__ctype.is(ctype_base::digit, __c)
- || (__c == __d && !__testdecfound)
- || __c == __sep))
+ else if (__lc->_M_use_grouping
+ && *__beg == __lc->_M_thousands_sep
+ && !__testdecfound)
{
- if (__c == __d)
- {
- __grouping_tmp += static_cast<char>(__sep_pos);
- __sep_pos = 0;
- __testdecfound = true;
- }
- else if (__c == __sep)
+ if (__n)
{
- if (__grouping.size())
- {
- // Mark position for later analysis.
- __grouping_tmp += static_cast<char>(__sep_pos);
- __sep_pos = 0;
- }
- else
- {
- __testvalid = false;
- break;
- }
+ // Mark position for later analysis.
+ __grouping_tmp += static_cast<char>(__n);
+ __n = 0;
}
else
{
- __temp_units += __c;
- ++__sep_pos;
+ __testvalid = false;
+ break;
}
- __c = *(++__beg);
}
- break;
- case money_base::space:
- case money_base::none:
- // Only if not at the end of the pattern.
- if (__i != 3)
- while (__beg != __end
- && __ctype.is(ctype_base::space, __c))
- __c = *(++__beg);
- break;
- }
- }
+ else
+ break;
+ if (__res.empty())
+ __testvalid = false;
+ break;
+ case money_base::space:
+ // At least one space is required.
+ if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
+ ++__beg;
+ else
+ __testvalid = false;
+ case money_base::none:
+ // Only if not at the end of the pattern.
+ if (__i != 3)
+ for (; __beg != __end
+ && __ctype.is(ctype_base::space, *__beg); ++__beg);
+ break;
+ }
+ }
- // Need to get the rest of the sign characters, if they exist.
- if (__sign.size() > 1)
- {
- size_type __len = __sign.size();
- size_type __i = 1;
- for (; __c != __eof && __i < __len; ++__i)
- while (__beg != __end && __c != __sign[__i])
- __c = *(++__beg);
-
- if (__i != __len)
- __testvalid = false;
- }
+ // Need to get the rest of the sign characters, if they exist.
+ if (__sign_size > 1 && __testvalid)
+ {
+ const char_type* __sign = __negative ? __lc->_M_negative_sign
+ : __lc->_M_positive_sign;
+ size_type __i = 1;
+ for (; __beg != __end && __i < __sign_size
+ && *__beg == __sign[__i]; ++__beg, ++__i);
+
+ if (__i != __sign_size)
+ __testvalid = false;
+ }
+
+ if (__testvalid)
+ {
+ // Strip leading zeros.
+ if (__res.size() > 1)
+ {
+ const size_type __first = __res.find_first_not_of('0');
+ const bool __only_zeros = __first == string::npos;
+ if (__first)
+ __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
+ }
+
+ // 22.2.6.1.2, p4
+ if (__negative && __res[0] != '0')
+ __res.insert(__res.begin(), '-');
+
+ // Test for grouping fidelity.
+ if (__grouping_tmp.size())
+ {
+ // Add the ending grouping.
+ __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
+ : __n);
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __grouping_tmp))
+ __testvalid = false;
+ }
+
+ // Iff not enough digits were supplied after the decimal-point.
+ if (__testdecfound && __lc->_M_frac_digits > 0
+ && __n != __lc->_M_frac_digits)
+ __testvalid = false;
+ }
+
+ // Iff no more characters are available.
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+
+ // Iff valid sequence is not recognized.
+ if (!__testvalid)
+ __err |= ios_base::failbit;
+ else
+ __units.swap(__res);
+
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const
+ {
+ string __str;
+ if (__intl)
+ __beg = _M_extract<true>(__beg, __end, __io, __err, __str);
+ else
+ __beg = _M_extract<false>(__beg, __end, __io, __err, __str);
+ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+ return __beg;
+ }
- // Strip leading zeros.
- while (__temp_units.size() > 1 && __temp_units[0] == __ctype.widen('0'))
- __temp_units.erase(__temp_units.begin());
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __units) const
+ {
+ typedef typename string::size_type size_type;
- if (__sign.size() && __sign == __neg_sign)
- __temp_units.insert(__temp_units.begin(), __ctype.widen('-'));
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- // Test for grouping fidelity.
- if (__grouping.size() && __grouping_tmp.size())
+ string __str;
+ const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io,
+ __err, __str)
+ : _M_extract<false>(__beg, __end, __io,
+ __err, __str);
+ const size_type __len = __str.size();
+ if (__len)
{
- if (!__verify_grouping(__grouping, __grouping_tmp))
- __testvalid = false;
+ _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __len));
+ __ctype.widen(__str.data(), __str.data() + __len, __ws);
+ __units.assign(__ws, __len);
}
- // Iff no more characters are available.
- if (__c == __eof)
- __err |= ios_base::eofbit;
+ return __ret;
+ }
- // Iff valid sequence is not recognized.
- if (!__testvalid || !__temp_units.size())
- __err |= ios_base::failbit;
- else
- // Use the "swap trick" to copy __temp_units into __units.
- __temp_units.swap(__units);
+ template<typename _CharT, typename _OutIter>
+ template<bool _Intl>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const
+ {
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef moneypunct<_CharT, _Intl> __moneypunct_type;
+ typedef typename __moneypunct_type::__cache_type __cache_type;
+
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- return __beg;
- }
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+
+ // Determine if negative or positive formats are to be used, and
+ // discard leading negative_sign if it is present.
+ const char_type* __beg = __digits.data();
+ money_base::pattern __p;
+ const char_type* __sign;
+ size_type __sign_size;
+ if (*__beg != __lit[money_base::_S_minus])
+ {
+ __p = __lc->_M_pos_format;
+ __sign = __lc->_M_positive_sign;
+ __sign_size = __lc->_M_positive_sign_size;
+ }
+ else
+ {
+ __p = __lc->_M_neg_format;
+ __sign = __lc->_M_negative_sign;
+ __sign_size = __lc->_M_negative_sign_size;
+ if (__digits.size())
+ ++__beg;
+ }
+
+ // Look for valid numbers in the ctype facet within input digits.
+ size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
+ __beg + __digits.size()) - __beg;
+ if (__len)
+ {
+ // Assume valid input, and attempt to format.
+ // Break down input numbers into base components, as follows:
+ // final_value = grouped units + (decimal point) + (digits)
+ string_type __value;
+ __value.reserve(2 * __len);
+
+ // Add thousands separators to non-decimal digits, per
+ // grouping rules.
+ int __paddec = __len - __lc->_M_frac_digits;
+ if (__paddec > 0)
+ {
+ if (__lc->_M_frac_digits < 0)
+ __paddec = __len;
+ if (__lc->_M_grouping_size)
+ {
+ _CharT* __ws =
+ static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * 2 * __len));
+ _CharT* __ws_end =
+ std::__add_grouping(__ws, __lc->_M_thousands_sep,
+ __lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __beg, __beg + __paddec);
+ __value.assign(__ws, __ws_end - __ws);
+ }
+ else
+ __value.assign(__beg, __paddec);
+ }
+
+ // Deal with decimal point, decimal digits.
+ if (__lc->_M_frac_digits > 0)
+ {
+ __value += __lc->_M_decimal_point;
+ if (__paddec >= 0)
+ __value.append(__beg + __paddec, __lc->_M_frac_digits);
+ else
+ {
+ // Have to pad zeros in the decimal position.
+ __value.append(-__paddec, __lit[money_base::_S_zero]);
+ __value.append(__beg, __len);
+ }
+ }
+
+ // Calculate length of resulting string.
+ const ios_base::fmtflags __f = __io.flags()
+ & ios_base::adjustfield;
+ __len = __value.size() + __sign_size;
+ __len += ((__io.flags() & ios_base::showbase)
+ ? __lc->_M_curr_symbol_size : 0);
+
+ string_type __res;
+ __res.reserve(2 * __len);
+
+ const size_type __width = static_cast<size_type>(__io.width());
+ const bool __testipad = (__f == ios_base::internal
+ && __len < __width);
+ // Fit formatted digits into the required pattern.
+ for (int __i = 0; __i < 4; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ if (__io.flags() & ios_base::showbase)
+ __res.append(__lc->_M_curr_symbol,
+ __lc->_M_curr_symbol_size);
+ break;
+ case money_base::sign:
+ // Sign might not exist, or be more than one
+ // charater long. In that case, add in the rest
+ // below.
+ if (__sign_size)
+ __res += __sign[0];
+ break;
+ case money_base::value:
+ __res += __value;
+ break;
+ case money_base::space:
+ // At least one space is required, but if internal
+ // formatting is required, an arbitrary number of
+ // fill spaces will be necessary.
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ else
+ __res += __fill;
+ break;
+ case money_base::none:
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ break;
+ }
+ }
+
+ // Special case of multi-part sign parts.
+ if (__sign_size > 1)
+ __res.append(__sign + 1, __sign_size - 1);
+
+ // Pad, if still necessary.
+ __len = __res.size();
+ if (__width > __len)
+ {
+ if (__f == ios_base::left)
+ // After.
+ __res.append(__width - __len, __fill);
+ else
+ // Before.
+ __res.insert(0, __width - __len, __fill);
+ __len = __width;
+ }
+
+ // Write resulting, fully-formatted string to output iterator.
+ __s = std::__write(__s, __res.data(), __len);
+ }
+ __io.width(0);
+ return __s;
+ }
+
template<typename _CharT, typename _OutIter>
_OutIter
money_put<_CharT, _OutIter>::
do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
long double __units) const
- {
+ {
const locale __loc = __io.getloc();
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
-#ifdef _GLIBCPP_USE_C99
+#ifdef _GLIBCXX_USE_C99
// First try a buffer perhaps big enough.
int __cs_size = 64;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- int __len = __convert_from_v(__cs, __cs_size, "%.01Lf", __units,
- _S_c_locale);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 328. Bad sprintf format modifier in money_put<>::do_put()
+ int __len = std::__convert_from_v(__cs, __cs_size, "%.0Lf", __units,
+ _S_get_c_locale());
// If the buffer was not large enough, try again with the correct size.
if (__len >= __cs_size)
{
__cs_size = __len + 1;
__cs = static_cast<char*>(__builtin_alloca(__cs_size));
- __len = __convert_from_v(__cs, __cs_size, "%.01Lf", __units,
- _S_c_locale);
+ __len = std::__convert_from_v(__cs, __cs_size, "%.0Lf", __units,
+ _S_get_c_locale());
}
#else
- // max_exponent10 + 1 for the integer part, + 4 for sign, decimal point,
- // decimal digit, '\0'.
- const int __cs_size = numeric_limits<long double>::max_exponent10 + 5;
+ // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
+ const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- int __len = __convert_from_v(__cs, 0, "%.01Lf", __units, _S_c_locale);
+ int __len = std::__convert_from_v(__cs, 0, "%.0Lf", __units,
+ _S_get_c_locale());
#endif
- _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __cs_size));
__ctype.widen(__cs, __cs + __len, __ws);
- string_type __digits(__ws);
- return this->do_put(__s, __intl, __io, __fill, __digits);
+ const string_type __digits(__ws, __len);
+ return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits);
}
template<typename _CharT, typename _OutIter>
@@ -1346,163 +1704,8 @@ namespace std
money_put<_CharT, _OutIter>::
do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
const string_type& __digits) const
- {
- typedef typename string_type::size_type size_type;
- typedef money_base::part part;
-
- const locale __loc = __io.getloc();
- const size_type __width = static_cast<size_type>(__io.width());
-
- // These contortions are quite unfortunate.
- typedef moneypunct<_CharT, true> __money_true;
- typedef moneypunct<_CharT, false> __money_false;
- const __money_true& __mpt = use_facet<__money_true>(__loc);
- const __money_false& __mpf = use_facet<__money_false>(__loc);
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
-
- // Determine if negative or positive formats are to be used, and
- // discard leading negative_sign if it is present.
- const char_type* __beg = __digits.data();
- const char_type* __end = __beg + __digits.size();
- money_base::pattern __p;
- string_type __sign;
- if (*__beg != __ctype.widen('-'))
- {
- __p = __intl ? __mpt.pos_format() : __mpf.pos_format();
- __sign =__intl ? __mpt.positive_sign() : __mpf.positive_sign();
- }
- else
- {
- __p = __intl ? __mpt.neg_format() : __mpf.neg_format();
- __sign =__intl ? __mpt.negative_sign() : __mpf.negative_sign();
- ++__beg;
- }
-
- // Look for valid numbers in the current ctype facet within input digits.
- __end = __ctype.scan_not(ctype_base::digit, __beg, __end);
- if (__beg != __end)
- {
- // Assume valid input, and attempt to format.
- // Break down input numbers into base components, as follows:
- // final_value = grouped units + (decimal point) + (digits)
- string_type __res;
- string_type __value;
- const string_type __symbol = __intl ? __mpt.curr_symbol()
- : __mpf.curr_symbol();
-
- // Deal with decimal point, decimal digits.
- const int __frac = __intl ? __mpt.frac_digits()
- : __mpf.frac_digits();
- if (__frac > 0)
- {
- const char_type __d = __intl ? __mpt.decimal_point()
- : __mpf.decimal_point();
- if (__end - __beg >= __frac)
- {
- __value = string_type(__end - __frac, __end);
- __value.insert(__value.begin(), __d);
- __end -= __frac;
- }
- else
- {
- // Have to pad zeros in the decimal position.
- __value = string_type(__beg, __end);
- int __paddec = __frac - (__end - __beg);
- char_type __zero = __ctype.widen('0');
- __value.insert(__value.begin(), __paddec, __zero);
- __value.insert(__value.begin(), __d);
- __beg = __end;
- }
- }
-
- // Add thousands separators to non-decimal digits, per
- // grouping rules.
- if (__beg != __end)
- {
- const string __grouping = __intl ? __mpt.grouping()
- : __mpf.grouping();
- if (__grouping.size())
- {
- const char_type __sep = __intl ? __mpt.thousands_sep()
- : __mpf.thousands_sep();
- const char* __gbeg = __grouping.c_str();
- const char* __gend = __gbeg + __grouping.size();
- const int __n = (__end - __beg) * 2;
- _CharT* __ws2 =
- static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n));
- _CharT* __ws_end = __add_grouping(__ws2, __sep, __gbeg,
- __gend, __beg, __end);
- __value.insert(0, __ws2, __ws_end - __ws2);
- }
- else
- __value.insert(0, string_type(__beg, __end));
- }
-
- // Calculate length of resulting string.
- ios_base::fmtflags __f = __io.flags() & ios_base::adjustfield;
- size_type __len = __value.size() + __sign.size();
- __len += (__io.flags() & ios_base::showbase) ? __symbol.size() : 0;
- bool __testipad = __f == ios_base::internal && __len < __width;
-
- // Fit formatted digits into the required pattern.
- for (int __i = 0; __i < 4; ++__i)
- {
- part __which = static_cast<part>(__p.field[__i]);
- switch (__which)
- {
- case money_base::symbol:
- if (__io.flags() & ios_base::showbase)
- __res += __symbol;
- break;
- case money_base::sign:
- // Sign might not exist, or be more than one
- // charater long. In that case, add in the rest
- // below.
- if (__sign.size())
- __res += __sign[0];
- break;
- case money_base::value:
- __res += __value;
- break;
- case money_base::space:
- // At least one space is required, but if internal
- // formatting is required, an arbitrary number of
- // fill spaces will be necessary.
- if (__testipad)
- __res += string_type(__width - __len, __fill);
- else
- __res += __ctype.widen(__fill);
- break;
- case money_base::none:
- if (__testipad)
- __res += string_type(__width - __len, __fill);
- break;
- }
- }
-
- // Special case of multi-part sign parts.
- if (__sign.size() > 1)
- __res += string_type(__sign.begin() + 1, __sign.end());
-
- // Pad, if still necessary.
- __len = __res.size();
- if (__width > __len)
- {
- if (__f == ios_base::left)
- // After.
- __res.append(__width - __len, __fill);
- else
- // Before.
- __res.insert(0, string_type(__width - __len, __fill));
- __len = __width;
- }
-
- // Write resulting, fully-formatted string to output iterator.
- __s = __write(__s, __res.c_str(), __len);
- }
- __io.width(0);
- return __s;
- }
+ { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits); }
// NB: Not especially useful. Without an ios_base object or some
@@ -1513,32 +1716,29 @@ namespace std
time_get<_CharT, _InIter>::do_date_order() const
{ return time_base::no_order; }
+ // Expand a strftime format string and parse it. E.g., do_get_date() may
+ // pass %m/%d/%Y => extracted characters.
template<typename _CharT, typename _InIter>
- void
+ _InIter
time_get<_CharT, _InIter>::
- _M_extract_via_format(iter_type& __beg, iter_type& __end, ios_base& __io,
- ios_base::iostate& __err, tm* __tm,
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
const _CharT* __format) const
- {
- locale __loc = __io.getloc();
- __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- size_t __len = char_traits<_CharT>::length(__format);
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const size_t __len = char_traits<_CharT>::length(__format);
for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i)
{
- char __c = __format[__i];
- if (__c == '%')
+ if (__ctype.narrow(__format[__i], 0) == '%')
{
// Verify valid formatting code, attempt to extract.
- __c = __format[++__i];
- char __mod = 0;
- int __mem = 0;
+ char __c = __ctype.narrow(__format[++__i], 0);
+ int __mem = 0;
if (__c == 'E' || __c == 'O')
- {
- __mod = __c;
- __c = __format[++__i];
- }
+ __c = __ctype.narrow(__format[++__i], 0);
switch (__c)
{
const char* __cs;
@@ -1547,71 +1747,81 @@ namespace std
// Abbreviated weekday name [tm_wday]
const char_type* __days1[7];
__tp._M_days_abbreviated(__days1);
- _M_extract_name(__beg, __end, __tm->tm_wday, __days1, 7,
- __err);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
+ 7, __io, __err);
break;
case 'A':
// Weekday name [tm_wday].
const char_type* __days2[7];
__tp._M_days(__days2);
- _M_extract_name(__beg, __end, __tm->tm_wday, __days2, 7,
- __err);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
+ 7, __io, __err);
break;
case 'h':
case 'b':
// Abbreviated month name [tm_mon]
const char_type* __months1[12];
__tp._M_months_abbreviated(__months1);
- _M_extract_name(__beg, __end, __tm->tm_mon, __months1, 12,
- __err);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months1, 12, __io, __err);
break;
case 'B':
// Month name [tm_mon].
const char_type* __months2[12];
__tp._M_months(__months2);
- _M_extract_name(__beg, __end, __tm->tm_mon, __months2, 12,
- __err);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months2, 12, __io, __err);
break;
case 'c':
// Default time and date representation.
const char_type* __dt[2];
__tp._M_date_time_formats(__dt);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __dt[0]);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __dt[0]);
break;
case 'd':
// Day [01, 31]. [tm_mday]
- _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
+ __io, __err);
+ break;
+ case 'e':
+ // Day [1, 31], with single digits preceded by
+ // space. [tm_mday]
+ if (__ctype.is(ctype_base::space, *__beg))
+ __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
+ 1, __io, __err);
+ else
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
+ 2, __io, __err);
break;
case 'D':
// Equivalent to %m/%d/%y.[tm_mon, tm_mday, tm_year]
__cs = "%m/%d/%y";
__ctype.widen(__cs, __cs + 9, __wcs);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __wcs);
break;
case 'H':
// Hour [00, 23]. [tm_hour]
- _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
+ __io, __err);
break;
case 'I':
// Hour [01, 12]. [tm_hour]
- _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
+ __io, __err);
break;
case 'm':
// Month [01, 12]. [tm_mon]
- _M_extract_num(__beg, __end, __mem, 1, 12, 2, __ctype,
- __err);
+ __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2,
+ __io, __err);
if (!__err)
__tm->tm_mon = __mem - 1;
break;
case 'M':
// Minute [00, 59]. [tm_min]
- _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
+ __io, __err);
break;
case 'n':
if (__ctype.narrow(*__beg, 0) == '\n')
@@ -1623,51 +1833,51 @@ namespace std
// Equivalent to (%H:%M).
__cs = "%H:%M";
__ctype.widen(__cs, __cs + 6, __wcs);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __wcs);
break;
case 'S':
// Seconds.
- _M_extract_num(__beg, __end, __tm->tm_sec, 0, 59, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 59, 2,
+ __io, __err);
break;
case 't':
if (__ctype.narrow(*__beg, 0) == '\t')
++__beg;
else
- __err |= ios_base::failbit;
+ __err |= ios_base::failbit;
break;
case 'T':
// Equivalent to (%H:%M:%S).
__cs = "%H:%M:%S";
__ctype.widen(__cs, __cs + 9, __wcs);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __wcs);
break;
case 'x':
// Locale's date.
const char_type* __dates[2];
__tp._M_date_formats(__dates);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __dates[0]);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __dates[0]);
break;
case 'X':
// Locale's time.
const char_type* __times[2];
__tp._M_time_formats(__times);
- _M_extract_via_format(__beg, __end, __io, __err, __tm,
- __times[0]);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __times[0]);
break;
case 'y':
+ case 'C': // C99
// Two digit year. [tm_year]
- _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
+ __io, __err);
break;
case 'Y':
// Year [1900). [tm_year]
- _M_extract_num(__beg, __end, __mem, 0,
- numeric_limits<int>::max(), 4,
- __ctype, __err);
+ __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
+ __io, __err);
if (!__err)
__tm->tm_year = __mem - 1900;
break;
@@ -1676,116 +1886,129 @@ namespace std
if (__ctype.is(ctype_base::upper, *__beg))
{
int __tmp;
- _M_extract_name(__beg, __end, __tmp,
- __timepunct<_CharT>::_S_timezones,
- 14, __err);
-
+ __beg = _M_extract_name(__beg, __end, __tmp,
+ __timepunct_cache<_CharT>::_S_timezones,
+ 14, __io, __err);
+
// GMT requires special effort.
- char_type __c = *__beg;
- if (!__err && __tmp == 0
- && (__c == __ctype.widen('-')
- || __c == __ctype.widen('+')))
+ if (__beg != __end && !__err && __tmp == 0
+ && (*__beg == __ctype.widen('-')
+ || *__beg == __ctype.widen('+')))
{
- _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
- __ctype, __err);
- _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
- __ctype, __err);
- }
- }
- else
- __err |= ios_base::failbit;
- break;
- default:
- // Not recognized.
- __err |= ios_base::failbit;
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
+ __io, __err);
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
+ __io, __err);
+ }
}
- }
- else
- {
- // Verify format and input match, extract and discard.
- if (__c == __ctype.narrow(*__beg, 0))
- ++__beg;
else
__err |= ios_base::failbit;
+ break;
+ default:
+ // Not recognized.
+ __err |= ios_base::failbit;
}
+ }
+ else
+ {
+ // Verify format and input match, extract and discard.
+ if (__format[__i] == *__beg)
+ ++__beg;
+ else
+ __err |= ios_base::failbit;
+ }
}
+ return __beg;
}
template<typename _CharT, typename _InIter>
- void
+ _InIter
time_get<_CharT, _InIter>::
- _M_extract_num(iter_type& __beg, iter_type& __end, int& __member,
- int __min, int __max, size_t __len,
- const ctype<_CharT>& __ctype,
- ios_base::iostate& __err) const
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+ int __min, int __max, size_t __len,
+ ios_base& __io, ios_base::iostate& __err) const
{
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ // As-is works for __len = 1, 2, 4, the values actually used.
+ int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
+
+ ++__min;
size_t __i = 0;
- string __digits;
- bool __testvalid = true;
- char_type __c = *__beg;
- while (__beg != __end && __i < __len
- && __ctype.is(ctype_base::digit, __c))
+ int __value = 0;
+ for (; __beg != __end && __i < __len; ++__beg, ++__i)
{
- __digits += __ctype.narrow(__c, 0);
- __c = *(++__beg);
- ++__i;
- }
- if (__i == __len)
- {
- int __value = atoi(__digits.c_str());
- if (__min <= __value && __value <= __max)
- __member = __value;
+ const char __c = __ctype.narrow(*__beg, '*');
+ if (__c >= '0' && __c <= '9')
+ {
+ __value = __value * 10 + (__c - '0');
+ const int __valuec = __value * __mult;
+ if (__valuec > __max || __valuec + __mult < __min)
+ break;
+ __mult /= 10;
+ }
else
- __testvalid = false;
+ break;
}
+ if (__i == __len)
+ __member = __value;
else
- __testvalid = false;
- if (!__testvalid)
__err |= ios_base::failbit;
+ return __beg;
}
// Assumptions:
// All elements in __names are unique.
template<typename _CharT, typename _InIter>
- void
+ _InIter
time_get<_CharT, _InIter>::
- _M_extract_name(iter_type& __beg, iter_type& __end, int& __member,
- const _CharT** __names, size_t __indexlen,
- ios_base::iostate& __err) const
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const
{
- typedef char_traits<_CharT> __traits_type;
- int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
* __indexlen));
size_t __nmatches = 0;
size_t __pos = 0;
bool __testvalid = true;
const char_type* __name;
- char_type __c = *__beg;
// Look for initial matches.
- for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
- if (__c == __names[__i1][0])
- __matches[__nmatches++] = __i1;
-
+ // NB: Some of the locale data is in the form of all lowercase
+ // names, and some is in the form of initially-capitalized
+ // names. Look for both.
+ if (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
+ if (__c == __names[__i1][0]
+ || __c == __ctype.toupper(__names[__i1][0]))
+ __matches[__nmatches++] = __i1;
+ }
+
while (__nmatches > 1)
{
// Find smallest matching string.
- size_t __minlen = 10;
- for (size_t __i2 = 0; __i2 < __nmatches; ++__i2)
- __minlen = min(__minlen,
- __traits_type::length(__names[__matches[__i2]]));
-
+ size_t __minlen = __traits_type::length(__names[__matches[0]]);
+ for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
+ __minlen = std::min(__minlen,
+ __traits_type::length(__names[__matches[__i2]]));
+ ++__pos;
+ ++__beg;
if (__pos < __minlen && __beg != __end)
- {
- ++__pos;
- __c = *(++__beg);
- for (size_t __i3 = 0; __i3 < __nmatches; ++__i3)
- {
- __name = __names[__matches[__i3]];
- if (__name[__pos] != __c)
- __matches[__i3] = __matches[--__nmatches];
- }
- }
+ for (size_t __i3 = 0; __i3 < __nmatches;)
+ {
+ __name = __names[__matches[__i3]];
+ if (__name[__pos] != *__beg)
+ __matches[__i3] = __matches[--__nmatches];
+ else
+ ++__i3;
+ }
else
break;
}
@@ -1793,6 +2016,8 @@ namespace std
if (__nmatches == 1)
{
// Make sure found name is completely extracted.
+ ++__pos;
+ ++__beg;
__name = __names[__matches[0]];
const size_t __len = __traits_type::length(__name);
while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
@@ -1807,6 +2032,7 @@ namespace std
__testvalid = false;
if (!__testvalid)
__err |= ios_base::failbit;
+ return __beg;
}
template<typename _CharT, typename _InIter>
@@ -1815,12 +2041,12 @@ namespace std
do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{
- _CharT __wcs[3];
- const char* __cs = "%X";
- locale __loc = __io.getloc();
- ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
- __ctype.widen(__cs, __cs + 3, __wcs);
- _M_extract_via_format(__beg, __end, __io, __err, __tm, __wcs);
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __times[2];
+ __tp._M_time_formats(__times);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __times[0]);
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
@@ -1832,12 +2058,12 @@ namespace std
do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{
- _CharT __wcs[3];
- const char* __cs = "%x";
- locale __loc = __io.getloc();
- ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
- __ctype.widen(__cs, __cs + 3, __wcs);
- _M_extract_via_format(__beg, __end, __io, __err, __tm, __wcs);
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __dates[2];
+ __tp._M_date_formats(__dates);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __dates[0]);
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
@@ -1846,23 +2072,24 @@ namespace std
template<typename _CharT, typename _InIter>
_InIter
time_get<_CharT, _InIter>::
- do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+ do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{
- typedef char_traits<_CharT> __traits_type;
- locale __loc = __io.getloc();
- __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
const char_type* __days[7];
__tp._M_days_abbreviated(__days);
int __tmpwday;
- _M_extract_name(__beg, __end, __tmpwday, __days, 7, __err);
+ __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __err);
// Check to see if non-abbreviated name exists, and extract.
// NB: Assumes both _M_days and _M_days_abbreviated organized in
// exact same order, first to last, such that the resulting
// __days array with the same index points to a day, and that
// day's abbreviated form.
- // NB: Also assumes that an abbreviated name is a subset of the name.
+ // NB: Also assumes that an abbreviated name is a subset of the name.
if (!__err)
{
size_t __pos = __traits_type::length(__days[__tmpwday]);
@@ -1872,7 +2099,7 @@ namespace std
{
// Extract the rest of it.
const size_t __len = __traits_type::length(__name);
- while (__pos < __len && __beg != __end
+ while (__pos < __len && __beg != __end
&& __name[__pos] == *__beg)
++__beg, ++__pos;
if (__len != __pos)
@@ -1892,20 +2119,22 @@ namespace std
do_get_monthname(iter_type __beg, iter_type __end,
ios_base& __io, ios_base::iostate& __err, tm* __tm) const
{
- typedef char_traits<_CharT> __traits_type;
- locale __loc = __io.getloc();
- __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
const char_type* __months[12];
__tp._M_months_abbreviated(__months);
int __tmpmon;
- _M_extract_name(__beg, __end, __tmpmon, __months, 12, __err);
+ __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12,
+ __io, __err);
// Check to see if non-abbreviated name exists, and extract.
// NB: Assumes both _M_months and _M_months_abbreviated organized in
// exact same order, first to last, such that the resulting
// __months array with the same index points to a month, and that
// month's abbreviated form.
- // NB: Also assumes that an abbreviated name is a subset of the name.
+ // NB: Also assumes that an abbreviated name is a subset of the name.
if (!__err)
{
size_t __pos = __traits_type::length(__months[__tmpmon]);
@@ -1915,7 +2144,7 @@ namespace std
{
// Extract the rest of it.
const size_t __len = __traits_type::length(__name);
- while (__pos < __len && __beg != __end
+ while (__pos < __len && __beg != __end
&& __name[__pos] == *__beg)
++__beg, ++__pos;
if (__len != __pos)
@@ -1924,7 +2153,7 @@ namespace std
if (!__err)
__tm->tm_mon = __tmpmon;
}
-
+
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
@@ -1933,31 +2162,24 @@ namespace std
template<typename _CharT, typename _InIter>
_InIter
time_get<_CharT, _InIter>::
- do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, tm* __tm) const
{
- locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- char_type __c = *__beg;
size_t __i = 0;
- string __digits;
- while (__i < 4 && __beg != __end && __ctype.is(ctype_base::digit, __c))
+ int __value = 0;
+ for (; __beg != __end && __i < 4; ++__beg, ++__i)
{
- __digits += __ctype.narrow(__c, 0);
- __c = *(++__beg);
- ++__i;
+ const char __c = __ctype.narrow(*__beg, '*');
+ if (__c >= '0' && __c <= '9')
+ __value = __value * 10 + (__c - '0');
+ else
+ break;
}
if (__i == 2 || __i == 4)
- {
- long __l;
- __convert_to_v(__digits.c_str(), __l, __err, _S_c_locale);
- if (!(__err & ios_base::failbit) && __l <= INT_MAX)
- {
- __l = __i == 2 ? __l : __l - 1900;
- __tm->tm_year = static_cast<int>(__l);
- }
- }
+ __tm->tm_year = __i == 2 ? __value : __value - 1900;
else
__err |= ios_base::failbit;
if (__beg == __end)
@@ -1968,55 +2190,53 @@ namespace std
template<typename _CharT, typename _OutIter>
_OutIter
time_put<_CharT, _OutIter>::
- put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
const _CharT* __beg, const _CharT* __end) const
{
- locale __loc = __io.getloc();
+ const locale& __loc = __io._M_getloc();
ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
- while (__beg != __end)
- {
- char __c = __ctype.narrow(*__beg, 0);
- ++__beg;
- if (__c == '%')
- {
- char __format;
- char __mod = 0;
- size_t __len = 1;
- __c = __ctype.narrow(*__beg, 0);
- ++__beg;
- if (__c == 'E' || __c == 'O')
- {
- __mod = __c;
- __format = __ctype.narrow(*__beg, 0);
- ++__beg;
- }
- else
- __format = __c;
- __s = this->do_put(__s, __io, _CharT(), __tm, __format, __mod);
- }
- else
- {
- *__s = __c;
- ++__s;
- }
- }
+ for (; __beg != __end; ++__beg)
+ if (__ctype.narrow(*__beg, 0) != '%')
+ {
+ *__s = *__beg;
+ ++__s;
+ }
+ else if (++__beg != __end)
+ {
+ char __format;
+ char __mod = 0;
+ const char __c = __ctype.narrow(*__beg, 0);
+ if (__c != 'E' && __c != 'O')
+ __format = __c;
+ else if (++__beg != __end)
+ {
+ __mod = __c;
+ __format = __ctype.narrow(*__beg, 0);
+ }
+ else
+ break;
+ __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
+ }
+ else
+ break;
return __s;
}
template<typename _CharT, typename _OutIter>
_OutIter
time_put<_CharT, _OutIter>::
- do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
+ do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
char __format, char __mod) const
- {
- locale __loc = __io.getloc();
+ {
+ const locale& __loc = __io._M_getloc();
ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
__timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
// NB: This size is arbitrary. Should this be a data member,
// initialized at construction?
const size_t __maxlen = 64;
- char_type* __res = static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
+ char_type* __res =
+ static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
// NB: In IEE 1003.1-200x, and perhaps other locale models, it
// is possible that the format character will be longer than one
@@ -2024,7 +2244,7 @@ namespace std
// format character: if __mod is not the default argument, assume
// it's a valid modifier.
char_type __fmt[4];
- __fmt[0] = __ctype.widen('%');
+ __fmt[0] = __ctype.widen('%');
if (!__mod)
{
__fmt[1] = __format;
@@ -2040,7 +2260,7 @@ namespace std
__tp._M_put(__res, __maxlen, __fmt, __tm);
// Write resulting, fully-formatted string to output iterator.
- return __write(__s, __res, char_traits<char_type>::length(__res));
+ return std::__write(__s, __res, char_traits<char_type>::length(__res));
}
@@ -2059,25 +2279,25 @@ namespace std
template<typename _CharT>
int
collate<_CharT>::
- do_compare(const _CharT* __lo1, const _CharT* __hi1,
+ do_compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const
- {
+ {
// strcoll assumes zero-terminated strings so we make a copy
// and then put a zero at the end.
const string_type __one(__lo1, __hi1);
const string_type __two(__lo2, __hi2);
const _CharT* __p = __one.c_str();
- const _CharT* __pend = __one.c_str() + __one.length();
+ const _CharT* __pend = __one.data() + __one.length();
const _CharT* __q = __two.c_str();
- const _CharT* __qend = __two.c_str() + __two.length();
+ const _CharT* __qend = __two.data() + __two.length();
// strcoll stops when it sees a nul character so we break
// the strings into zero-terminated substrings and pass those
// to strcoll.
for (;;)
{
- int __res = _M_compare(__p, __q);
+ const int __res = _M_compare(__p, __q);
if (__res)
return __res;
@@ -2095,7 +2315,7 @@ namespace std
}
}
- template<typename _CharT>
+ template<typename _CharT>
typename collate<_CharT>::string_type
collate<_CharT>::
do_transform(const _CharT* __lo, const _CharT* __hi) const
@@ -2104,7 +2324,7 @@ namespace std
string_type __str(__lo, __hi);
const _CharT* __p = __str.c_str();
- const _CharT* __pend = __str.c_str() + __str.length();
+ const _CharT* __pend = __str.data() + __str.length();
size_t __len = (__hi - __lo) * 2;
@@ -2124,7 +2344,7 @@ namespace std
if (__res >= __len)
{
__len = __res + 1;
- __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __len));
__res = _M_transform(__c, __p, __res + 1);
}
@@ -2139,20 +2359,20 @@ namespace std
}
}
- template<typename _CharT>
+ template<typename _CharT>
long
collate<_CharT>::
do_hash(const _CharT* __lo, const _CharT* __hi) const
- {
+ {
unsigned long __val = 0;
for (; __lo < __hi; ++__lo)
- __val = *__lo + ((__val << 7) |
+ __val = *__lo + ((__val << 7) |
(__val >> (numeric_limits<unsigned long>::digits - 7)));
return static_cast<long>(__val);
}
// Construct correctly padded string, as per 22.2.2.2.2
- // Assumes
+ // Assumes
// __newlen > __oldlen
// __news is allocated for __newlen size
// Used by both num_put and ostream inserters: if __num,
@@ -2163,371 +2383,105 @@ namespace std
// NB: Of the two parameters, _CharT can be deduced from the
// function arguments. The other (_Traits) has to be explicitly specified.
template<typename _CharT, typename _Traits>
- void
- __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
- _CharT* __news, const _CharT* __olds,
- const streamsize __newlen,
+ void
+ __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
+ _CharT* __news, const _CharT* __olds,
+ const streamsize __newlen,
const streamsize __oldlen, const bool __num)
{
- size_t __plen = static_cast<size_t>(__newlen - __oldlen);
- _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __plen));
- _Traits::assign(__pads, __plen, __fill);
-
- _CharT* __beg;
- _CharT* __end;
- size_t __mod = 0;
- size_t __beglen; //either __plen or __oldlen
- ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
+ const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
+ const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
+ // Padding last.
if (__adjust == ios_base::left)
{
- // Padding last.
- __beg = const_cast<_CharT*>(__olds);
- __beglen = __oldlen;
- __end = __pads;
+ _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen);
+ _Traits::assign(__news + __oldlen, __plen, __fill);
+ return;
}
- else if (__adjust == ios_base::internal && __num)
+
+ size_t __mod = 0;
+ if (__adjust == ios_base::internal && __num)
{
// Pad after the sign, if there is one.
// Pad after 0[xX], if there is one.
// Who came up with these rules, anyway? Jeeze.
- locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- const _CharT __minus = __ctype.widen('-');
- const _CharT __plus = __ctype.widen('+');
- bool __testsign = _Traits::eq(__olds[0], __minus)
- || _Traits::eq(__olds[0], __plus);
-
- bool __testhex = _Traits::eq(__ctype.widen('0'), __olds[0])
- && (_Traits::eq(__ctype.widen('x'), __olds[1])
- || _Traits::eq(__ctype.widen('X'), __olds[1]));
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ const bool __testsign = (__ctype.widen('-') == __olds[0]
+ || __ctype.widen('+') == __olds[0]);
+ const bool __testhex = (__ctype.widen('0') == __olds[0]
+ && __oldlen > 1
+ && (__ctype.widen('x') == __olds[1]
+ || __ctype.widen('X') == __olds[1]));
if (__testhex)
{
- __news[0] = __olds[0];
+ __news[0] = __olds[0];
__news[1] = __olds[1];
- __mod += 2;
+ __mod = 2;
__news += 2;
- __beg = __pads;
- __beglen = __plen;
- __end = const_cast<_CharT*>(__olds + __mod);
}
else if (__testsign)
{
- _Traits::eq((__news[0] = __olds[0]), __plus) ? __plus : __minus;
- ++__mod;
+ __news[0] = __olds[0];
+ __mod = 1;
++__news;
- __beg = __pads;
- __beglen = __plen;
- __end = const_cast<_CharT*>(__olds + __mod);
- }
- else
- {
- // Padding first.
- __beg = __pads;
- __beglen = __plen;
- __end = const_cast<_CharT*>(__olds);
}
+ // else Padding first.
}
- else
- {
- // Padding first.
- __beg = __pads;
- __beglen = __plen;
- __end = const_cast<_CharT*>(__olds);
- }
- _Traits::copy(__news, __beg, __beglen);
- _Traits::copy(__news + __beglen, __end,
- __newlen - __beglen - __mod);
+ _Traits::assign(__news, __plen, __fill);
+ _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod),
+ __oldlen - __mod);
}
- template<typename _CharT>
- bool
- __verify_grouping(const basic_string<_CharT>& __grouping,
- basic_string<_CharT>& __grouping_tmp)
- {
- int __i = 0;
- int __j = 0;
- const int __len = __grouping.size();
- const int __n = __grouping_tmp.size();
- bool __test = true;
-
- // Parsed number groupings have to match the
- // numpunct::grouping string exactly, starting at the
- // right-most point of the parsed sequence of elements ...
- while (__test && __i < __n - 1)
- for (__j = 0; __test && __j < __len && __i < __n - 1; ++__j,++__i)
- __test &= __grouping[__j] == __grouping_tmp[__n - __i - 1];
- // ... but the last parsed grouping can be <= numpunct
- // grouping.
- __j == __len ? __j = 0 : __j;
- __test &= __grouping[__j] >= __grouping_tmp[__n - __i - 1];
- return __test;
- }
+ bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp)
+ {
+ const size_t __n = __grouping_tmp.size() - 1;
+ const size_t __min = std::min(__n, __grouping_size - 1);
+ size_t __i = __n;
+ bool __test = true;
+
+ // Parsed number groupings have to match the
+ // numpunct::grouping string exactly, starting at the
+ // right-most point of the parsed sequence of elements ...
+ for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
+ __test = __grouping_tmp[__i] == __grouping[__j];
+ for (; __i && __test; --__i)
+ __test = __grouping_tmp[__i] == __grouping[__min];
+ // ... but the last parsed grouping can be <= numpunct
+ // grouping.
+ __test &= __grouping_tmp[0] <= __grouping[__min];
+ return __test;
+ }
template<typename _CharT>
_CharT*
- __add_grouping(_CharT* __s, _CharT __sep,
- const char* __gbeg, const char* __gend,
+ __add_grouping(_CharT* __s, _CharT __sep,
+ const char* __gbeg, size_t __gsize,
const _CharT* __first, const _CharT* __last)
{
if (__last - __first > *__gbeg)
- {
- __s = __add_grouping(__s, __sep,
- (__gbeg + 1 == __gend ? __gbeg : __gbeg + 1),
- __gend, __first, __last - *__gbeg);
- __first = __last - *__gbeg;
- *__s++ = __sep;
- }
+ {
+ const bool __bump = __gsize != 1;
+ __s = std::__add_grouping(__s, __sep, __gbeg + __bump,
+ __gsize - __bump, __first,
+ __last - *__gbeg);
+ __first = __last - *__gbeg;
+ *__s++ = __sep;
+ }
do
*__s++ = *__first++;
while (__first != __last);
return __s;
}
-#if 1
- // XXX GLIBCXX_ABI Deprecated, compatibility only.
- template<typename _CharT, typename _OutIter>
- template<typename _ValueT>
- _OutIter
- num_put<_CharT, _OutIter>::
- _M_convert_int(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
- char __modl, _ValueT __v) const
- {
- // [22.2.2.2.2] Stage 1, numeric conversion to character.
-
- // Long enough for the max format spec.
- char __fbuf[16];
- _S_format_int(__io, __fbuf, __mod, __modl);
-#ifdef _GLIBCPP_USE_C99
- // First try a buffer perhaps big enough.
- int __cs_size = 64;
- char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- int __len = __convert_from_v(__cs, __cs_size, __fbuf, __v,
- _S_c_locale);
- // If the buffer was not large enough, try again with the correct size.
- if (__len >= __cs_size)
- {
- __cs_size = __len + 1;
- __cs = static_cast<char*>(__builtin_alloca(__cs_size));
- __len = __convert_from_v(__cs, __cs_size, __fbuf, __v,
- _S_c_locale);
- }
-#else
- // Leave room for "+/-," "0x," and commas. This size is
- // arbitrary, but should be largely sufficient.
- char __cs[128];
- int __len = __convert_from_v(__cs, 0, __fbuf, __v, _S_c_locale);
-#endif
- return _M_widen_int(__s, __io, __fill, __cs, __len);
- }
-
- template<typename _CharT, typename _OutIter>
- _OutIter
- num_put<_CharT, _OutIter>::
- _M_widen_float(_OutIter __s, ios_base& __io, _CharT __fill, char* __cs,
- int __len) const
- {
- typedef char_traits<_CharT> __traits_type;
- // [22.2.2.2.2] Stage 2, convert to char_type, using correct
- // numpunct.decimal_point() values for '.' and adding grouping.
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len));
- // Grouping can add (almost) as many separators as the number of
- // digits, but no more.
- _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len * 2));
- __ctype.widen(__cs, __cs + __len, __ws);
-
- // Replace decimal point.
- const _CharT* __p;
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
- if (__p = __traits_type::find(__ws, __len, __ctype.widen('.')))
- __ws[__p - __ws] = __np.decimal_point();
-
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//282. What types does numpunct grouping refer to?
- // Add grouping, if necessary.
- const string __grouping = __np.grouping();
- if (__grouping.size())
- {
- _CharT* __p2;
- int __declen = __p ? __p - __ws : __len;
- __p2 = __add_grouping(__ws2, __np.thousands_sep(),
- __grouping.c_str(),
- __grouping.c_str() + __grouping.size(),
- __ws, __ws + __declen);
- int __newlen = __p2 - __ws2;
-
- // Tack on decimal part.
- if (__p)
- {
- __traits_type::copy(__p2, __p, __len - __declen);
- __newlen += __len - __declen;
- }
-
- // Switch strings, establish correct new length.
- __ws = __ws2;
- __len = __newlen;
- }
-#endif
- return _M_insert(__s, __io, __fill, __ws, __len);
- }
-
- template<typename _CharT, typename _OutIter>
- _OutIter
- num_put<_CharT, _OutIter>::
- _M_widen_int(_OutIter __s, ios_base& __io, _CharT __fill, char* __cs,
- int __len) const
- {
- // [22.2.2.2.2] Stage 2, convert to char_type, using correct
- // numpunct.decimal_point() values for '.' and adding grouping.
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
- _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len));
- // Grouping can add (almost) as many separators as the number of
- // digits, but no more.
- _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __len * 2));
- __ctype.widen(__cs, __cs + __len, __ws);
-
- // Add grouping, if necessary.
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
- const string __grouping = __np.grouping();
- if (__grouping.size())
- {
- // By itself __add_grouping cannot deal correctly with __ws when
- // ios::showbase is set and ios_base::oct || ios_base::hex.
- // Therefore we take care "by hand" of the initial 0, 0x or 0X.
- // However, remember that the latter do not occur if the number
- // printed is '0' (__len == 1).
- streamsize __off = 0;
- const ios_base::fmtflags __basefield = __io.flags()
- & ios_base::basefield;
- if ((__io.flags() & ios_base::showbase) && __len > 1)
- if (__basefield == ios_base::oct)
- {
- __off = 1;
- *__ws2 = *__ws;
- }
- else if (__basefield == ios_base::hex)
- {
- __off = 2;
- *__ws2 = *__ws;
- *(__ws2 + 1) = *(__ws + 1);
- }
- _CharT* __p;
- __p = __add_grouping(__ws2 + __off, __np.thousands_sep(),
- __grouping.c_str(),
- __grouping.c_str() + __grouping.size(),
- __ws + __off, __ws + __len);
- __len = __p - __ws2;
- // Switch strings.
- __ws = __ws2;
- }
- return _M_insert(__s, __io, __fill, __ws, __len);
- }
-
- // For use by integer and floating-point types after they have been
- // converted into a char_type string.
- template<typename _CharT, typename _OutIter>
- _OutIter
- num_put<_CharT, _OutIter>::
- _M_insert(_OutIter __s, ios_base& __io, _CharT __fill, const _CharT* __ws,
- int __len) const
- {
- typedef char_traits<_CharT> __traits_type;
- // [22.2.2.2.2] Stage 3.
- // If necessary, pad.
- streamsize __w = __io.width();
- _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
- * __w));
- if (__w > static_cast<streamsize>(__len))
- {
- __pad<_CharT, __traits_type>::_S_pad(__io, __fill, __ws2, __ws,
- __w, __len, true);
- __len = static_cast<int>(__w);
- // Switch strings.
- __ws = __ws2;
- }
- __io.width(0);
-
- // [22.2.2.2.2] Stage 4.
- // Write resulting, fully-formatted string to output iterator.
- return __write(__s, __ws, __len);
- }
-#endif
-
- template<typename _CharT>
- __locale_cache<numpunct<_CharT> >::__locale_cache(const locale& __loc)
- : _M_truename(0), _M_falsename(0), _M_use_grouping(false),
- _M_grouping(0)
- {
- if (has_facet<numpunct<_CharT> >(__loc))
- {
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
- _M_decimal_point = __np.decimal_point();
- _M_thousands_sep = __np.thousands_sep();
-
- string_type __false = __np.falsename();
- _CharT* __falsename = new _CharT[__false.length() + 1];
- __false.copy(__falsename, __false.length());
- __falsename[__false.length()] = _CharT();
- _M_falsename = __falsename;
-
- string_type __true = __np.truename();
- _CharT* __truename = new _CharT[__true.length() + 1];
- __true.copy(__truename, __true.length());
- __truename[__true.length()] = _CharT();
- _M_truename = __truename;
-
- string __grouping = __np.grouping();
- char* __group = new char[__grouping.length() + 1];
- __grouping.copy(__group, __grouping.length());
- __group[__grouping.length()] = 0;
- _M_grouping = __group;
-
- _M_use_grouping = __grouping.length() != 0
- && __grouping.data()[0] != 0;
- }
-
- if (has_facet<ctype<_CharT> >(__loc))
- {
- const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
- __ct.widen(__num_base::_S_atoms_out,
- __num_base::_S_atoms_out + __num_base::_S_end,
- _M_atoms_out);
- }
- }
-
- // Static locale cache initialization. Only instantiated with char
- // and wchar_t, so no need to check has_facet.
- template<typename _CharT>
- __locale_cache<numpunct<_CharT> >::
- __locale_cache(const locale& __loc, bool)
- {
- // Grab pointers to numpunct static strings
- const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
- _M_thousands_sep = __np._M_thousands_sep;
- _M_decimal_point = __np._M_decimal_point;
- _M_falsename = __np._M_falsename;
- _M_truename = __np._M_truename;
- _M_grouping = __np._M_grouping;
- _M_use_grouping = false;
-
- const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
- __ct.widen(__num_base::_S_atoms_out,
- __num_base::_S_atoms_out + __num_base::_S_end,
- _M_atoms_out);
- }
-
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class moneypunct<char, false>;
extern template class moneypunct<char, true>;
extern template class moneypunct_byname<char, false>;
@@ -2537,7 +2491,7 @@ namespace std
extern template class numpunct<char>;
extern template class numpunct_byname<char>;
extern template class num_get<char>;
- extern template class num_put<char>;
+ extern template class num_put<char>;
extern template class __timepunct<char>;
extern template class time_put<char>;
extern template class time_put_byname<char>;
@@ -2551,110 +2505,110 @@ namespace std
extern template class collate_byname<char>;
extern template
- const codecvt<char, char, mbstate_t>&
+ const codecvt<char, char, mbstate_t>&
use_facet<codecvt<char, char, mbstate_t> >(const locale&);
extern template
- const collate<char>&
+ const collate<char>&
use_facet<collate<char> >(const locale&);
extern template
- const numpunct<char>&
+ const numpunct<char>&
use_facet<numpunct<char> >(const locale&);
- extern template
- const num_put<char>&
+ extern template
+ const num_put<char>&
use_facet<num_put<char> >(const locale&);
- extern template
- const num_get<char>&
+ extern template
+ const num_get<char>&
use_facet<num_get<char> >(const locale&);
extern template
- const moneypunct<char, true>&
+ const moneypunct<char, true>&
use_facet<moneypunct<char, true> >(const locale&);
extern template
- const moneypunct<char, false>&
+ const moneypunct<char, false>&
use_facet<moneypunct<char, false> >(const locale&);
- extern template
- const money_put<char>&
+ extern template
+ const money_put<char>&
use_facet<money_put<char> >(const locale&);
- extern template
- const money_get<char>&
+ extern template
+ const money_get<char>&
use_facet<money_get<char> >(const locale&);
extern template
- const __timepunct<char>&
+ const __timepunct<char>&
use_facet<__timepunct<char> >(const locale&);
- extern template
- const time_put<char>&
+ extern template
+ const time_put<char>&
use_facet<time_put<char> >(const locale&);
- extern template
- const time_get<char>&
+ extern template
+ const time_get<char>&
use_facet<time_get<char> >(const locale&);
- extern template
- const messages<char>&
+ extern template
+ const messages<char>&
use_facet<messages<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<ctype<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<codecvt<char, char, mbstate_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<collate<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<numpunct<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<num_put<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<num_get<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<moneypunct<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<money_put<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<money_get<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<__timepunct<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<time_put<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<time_get<char> >(const locale&);
- extern template
+ extern template
bool
has_facet<messages<char> >(const locale&);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class moneypunct<wchar_t, false>;
extern template class moneypunct<wchar_t, true>;
extern template class moneypunct_byname<wchar_t, false>;
@@ -2678,106 +2632,106 @@ namespace std
extern template class collate_byname<wchar_t>;
extern template
- const codecvt<wchar_t, char, mbstate_t>&
+ const codecvt<wchar_t, char, mbstate_t>&
use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
extern template
- const collate<wchar_t>&
+ const collate<wchar_t>&
use_facet<collate<wchar_t> >(const locale&);
extern template
- const numpunct<wchar_t>&
+ const numpunct<wchar_t>&
use_facet<numpunct<wchar_t> >(const locale&);
- extern template
- const num_put<wchar_t>&
+ extern template
+ const num_put<wchar_t>&
use_facet<num_put<wchar_t> >(const locale&);
- extern template
- const num_get<wchar_t>&
+ extern template
+ const num_get<wchar_t>&
use_facet<num_get<wchar_t> >(const locale&);
extern template
- const moneypunct<wchar_t, true>&
+ const moneypunct<wchar_t, true>&
use_facet<moneypunct<wchar_t, true> >(const locale&);
extern template
- const moneypunct<wchar_t, false>&
+ const moneypunct<wchar_t, false>&
use_facet<moneypunct<wchar_t, false> >(const locale&);
-
- extern template
- const money_put<wchar_t>&
+
+ extern template
+ const money_put<wchar_t>&
use_facet<money_put<wchar_t> >(const locale&);
- extern template
- const money_get<wchar_t>&
+ extern template
+ const money_get<wchar_t>&
use_facet<money_get<wchar_t> >(const locale&);
extern template
- const __timepunct<wchar_t>&
+ const __timepunct<wchar_t>&
use_facet<__timepunct<wchar_t> >(const locale&);
- extern template
- const time_put<wchar_t>&
+ extern template
+ const time_put<wchar_t>&
use_facet<time_put<wchar_t> >(const locale&);
- extern template
- const time_get<wchar_t>&
+ extern template
+ const time_get<wchar_t>&
use_facet<time_get<wchar_t> >(const locale&);
- extern template
- const messages<wchar_t>&
+ extern template
+ const messages<wchar_t>&
use_facet<messages<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<ctype<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<collate<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<numpunct<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<num_put<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<num_get<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<moneypunct<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<money_put<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<money_get<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<__timepunct<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<time_put<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<time_get<wchar_t> >(const locale&);
- extern template
+ extern template
bool
has_facet<messages<wchar_t> >(const locale&);
#endif
diff --git a/contrib/libstdc++/include/bits/localefwd.h b/contrib/libstdc++/include/bits/localefwd.h
index ac9e1a9..247158d 100644
--- a/contrib/libstdc++/include/bits/localefwd.h
+++ b/contrib/libstdc++/include/bits/localefwd.h
@@ -37,14 +37,14 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_LOCALE_FWD_H
-#define _CPP_BITS_LOCALE_FWD_H 1
+#ifndef _LOCALE_FWD_H
+#define _LOCALE_FWD_H 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <bits/c++locale.h> // Defines __c_locale, config-specific includes
-#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
+#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
#include <bits/functexcept.h>
namespace std
@@ -53,67 +53,67 @@ namespace std
class locale;
// 22.1.3 Convenience interfaces
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isspace(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isprint(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
iscntrl(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isupper(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
islower(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isalpha(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isdigit(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
ispunct(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isxdigit(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isalnum(_CharT, const locale&);
- template<typename _CharT>
- inline bool
+ template<typename _CharT>
+ inline bool
isgraph(_CharT, const locale&);
- template<typename _CharT>
- inline _CharT
+ template<typename _CharT>
+ inline _CharT
toupper(_CharT, const locale&);
- template<typename _CharT>
- inline _CharT
+ template<typename _CharT>
+ inline _CharT
tolower(_CharT, const locale&);
// 22.2.1 and 22.2.1.3 ctype
class ctype_base;
- template<typename _CharT>
+ template<typename _CharT>
class ctype;
template<> class ctype<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<> class ctype<wchar_t>;
#endif
- template<typename _CharT>
+ template<typename _CharT>
class ctype_byname;
// NB: Specialized for char and wchar_t in locale_facets.h.
@@ -122,7 +122,7 @@ namespace std
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt;
template<> class codecvt<char, char, mbstate_t>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<> class codecvt<wchar_t, char, mbstate_t>;
#endif
template<typename _InternT, typename _ExternT, typename _StateT>
@@ -137,9 +137,9 @@ namespace std
template<typename _CharT> class numpunct_byname;
// 22.2.4 collation
- template<typename _CharT>
+ template<typename _CharT>
class collate;
- template<typename _CharT> class
+ template<typename _CharT> class
collate_byname;
// 22.2.5 date and time
@@ -159,25 +159,34 @@ namespace std
class money_get;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class money_put;
- template<typename _CharT, bool _Intl = false>
+ template<typename _CharT, bool _Intl = false>
class moneypunct;
- template<typename _CharT, bool _Intl = false>
+ template<typename _CharT, bool _Intl = false>
class moneypunct_byname;
// 22.2.7 message retrieval
class messages_base;
- template<typename _CharT>
+ template<typename _CharT>
class messages;
- template<typename _CharT>
+ template<typename _CharT>
class messages_byname;
template<typename _Facet>
+ bool
+ has_facet(const locale& __loc) throw();
+
+ template<typename _Facet>
const _Facet&
use_facet(const locale& __loc);
template<typename _Facet>
- bool
- has_facet(const locale& __loc) throw();
+ inline const _Facet&
+ __check_facet(const _Facet* __f)
+ {
+ if (!__f)
+ __throw_bad_cast();
+ return *__f;
+ }
} // namespace std
#endif
diff --git a/contrib/libstdc++/include/bits/mask_array.h b/contrib/libstdc++/include/bits/mask_array.h
index df23a46..1a694f3 100644
--- a/contrib/libstdc++/include/bits/mask_array.h
+++ b/contrib/libstdc++/include/bits/mask_array.h
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- mask_array class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,34 +35,70 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_MASK_ARRAY_H
-#define _CPP_BITS_MASK_ARRAY_H 1
+#ifndef _MASK_ARRAY_H
+#define _MASK_ARRAY_H 1
#pragma GCC system_header
namespace std {
- template <class _Tp>
+ /**
+ * @brief Reference to selected subset of an array.
+ *
+ * A mask_array is a reference to the actual elements of an array specified
+ * by a bitmask in the form of an array of bool. The way to get a
+ * mask_array is to call operator[](valarray<bool>) on a valarray. The
+ * returned mask_array then permits carrying operations out on the
+ * referenced subset of elements in the original valarray.
+ *
+ * For example, if a mask_array is obtained using the array (false, true,
+ * false, true) as an argument, the mask array has two elements referring
+ * to array[1] and array[3] in the underlying array.
+ *
+ * @param Tp Element type.
+ */
+ template <class _Tp>
class mask_array
- {
+ {
public:
typedef _Tp value_type;
-
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ mask_array (const mask_array&);
+
+ /// Assignment operator. Assigns elements to corresponding elements
+ /// of @a a.
+ mask_array& operator=(const mask_array&);
+
void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
void operator%=(const valarray<_Tp>&) const;
- void operator+=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
void operator-=(const valarray<_Tp>&) const;
- void operator^=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
void operator|=(const valarray<_Tp>&) const;
- void operator<<=(const valarray<_Tp>&) const;
- void operator>>=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
void operator=(const _Tp&) const;
-
+
// ~mask_array ();
-
+
template<class _Dom>
void operator=(const _Expr<_Dom,_Tp>&) const;
template<class _Dom>
@@ -84,48 +120,54 @@ namespace std {
template<class _Dom>
void operator<<=(const _Expr<_Dom,_Tp>&) const;
template<class _Dom>
- void operator>>=(const _Expr<_Dom,_Tp>&) const;
+ void operator>>=(const _Expr<_Dom,_Tp>&) const;
private:
mask_array(_Array<_Tp>, size_t, _Array<bool>);
friend class valarray<_Tp>;
-
+
const size_t _M_sz;
const _Array<bool> _M_mask;
const _Array<_Tp> _M_array;
-
- mask_array (const mask_array&);
-
+
// not implemented
mask_array();
- mask_array& operator=(const mask_array&);
};
template<typename _Tp>
inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& a)
- : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {}
+ : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {}
template<typename _Tp>
- inline
+ inline
mask_array<_Tp>::mask_array(_Array<_Tp> __a, size_t __s, _Array<bool> __m)
- : _M_sz(__s), _M_mask(__m), _M_array(__a) {}
-
+ : _M_sz(__s), _M_mask(__m), _M_array(__a) {}
+
+ template<typename _Tp>
+ inline mask_array<_Tp>&
+ mask_array<_Tp>::operator=(const mask_array<_Tp>& __a)
+ {
+ std::__valarray_copy(__a._M_array, __a._M_mask,
+ _M_sz, _M_array, _M_mask);
+ return *this;
+ }
+
template<typename _Tp>
inline void
mask_array<_Tp>::operator=(const _Tp& __t) const
- { __valarray_fill(_M_array, _M_sz, _M_mask, __t); }
-
+ { std::__valarray_fill(_M_array, _M_sz, _M_mask, __t); }
+
template<typename _Tp>
inline void
mask_array<_Tp>::operator=(const valarray<_Tp>& __v) const
- { __valarray_copy(_Array<_Tp>(__v), __v.size(), _M_array, _M_mask); }
+ { std::__valarray_copy(_Array<_Tp>(__v), __v.size(), _M_array, _M_mask); }
template<typename _Tp>
template<class _Ex>
inline void
mask_array<_Tp>::operator=(const _Expr<_Ex, _Tp>& __e) const
- { __valarray_copy(__e, __e.size(), _M_array, _M_mask); }
+ { std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); }
#undef _DEFINE_VALARRAY_OPERATOR
#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
@@ -156,11 +198,11 @@ _DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
-#undef _DEFINE_VALARRAY_OPERATOR
-
+#undef _DEFINE_VALARRAY_OPERATOR
+
} // std::
-#endif /* _CPP_BITS_MASK_ARRAY_H */
+#endif /* _MASK_ARRAY_H */
// Local Variables:
// mode:c++
diff --git a/contrib/libstdc++/include/bits/ostream.tcc b/contrib/libstdc++/include/bits/ostream.tcc
index ab15ae8..2d1b5b4 100644
--- a/contrib/libstdc++/include/bits/ostream.tcc
+++ b/contrib/libstdc++/include/bits/ostream.tcc
@@ -1,6 +1,6 @@
// ostream classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -32,16 +32,19 @@
// ISO C++ 14882: 27.6.2 Output streams
//
+#ifndef _OSTREAM_TCC
+#define _OSTREAM_TCC 1
+
#pragma GCC system_header
#include <locale>
-namespace std
+namespace std
{
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>::sentry::
- sentry(basic_ostream<_CharT,_Traits>& __os)
- : _M_os(__os)
+ sentry(basic_ostream<_CharT, _Traits>& __os)
+ : _M_ok(false), _M_os(__os)
{
// XXX MT
if (__os.tie() && __os.good())
@@ -50,418 +53,417 @@ namespace std
if (__os.good())
_M_ok = true;
else
- {
- _M_ok = false;
- __os.setstate(ios_base::failbit);
- }
+ __os.setstate(ios_base::failbit);
}
-
+
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(__ostream_type& (*__pf)(__ostream_type&))
{
- sentry __cerb(*this);
- if (__cerb)
- {
- try
- { __pf(*this); }
- catch(...)
- {
- // 27.6.2.5.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
- }
- return *this;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ return __pf(*this);
}
-
+
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(__ios_type& (*__pf)(__ios_type&))
{
- sentry __cerb(*this);
- if (__cerb)
- {
- try
- { __pf(*this); }
- catch(...)
- {
- // 27.6.2.5.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
- }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ __pf(*this);
return *this;
}
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(ios_base& (*__pf)(ios_base&))
{
- sentry __cerb(*this);
- if (__cerb)
- {
- try
- { __pf(*this); }
- catch(...)
- {
- // 27.6.2.5.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
- }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ __pf(*this);
return *this;
}
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type* __sbin)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(bool __n)
{
sentry __cerb(*this);
- if (__cerb && __sbin)
+ if (__cerb)
{
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
- if (!__copy_streambufs(*this, __sbin, this->rdbuf()))
- this->setstate(ios_base::failbit);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.2.5.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
- else if (!__sbin)
- this->setstate(ios_base::badbit);
return *this;
}
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(bool __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(long __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ bool __b = false;
+ const char_type __c = this->fill();
+ const ios_base::fmtflags __fmt = (this->flags()
+ & ios_base::basefield);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
+ {
+ const unsigned long __l = static_cast<unsigned long>(__n);
+ __b = __np.put(*this, *this, __c, __l).failed();
+ }
+ else
+ __b = __np.put(*this, *this, __c, __n).failed();
+ if (__b)
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(long __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(unsigned long __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- char_type __c = this->fill();
- ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
- if (_M_check_facet(_M_fnumput))
- {
- bool __b = false;
- if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
- {
- unsigned long __l = static_cast<unsigned long>(__n);
- __b = _M_fnumput->put(*this, *this, __c, __l).failed();
- }
- else
- __b = _M_fnumput->put(*this, *this, __c, __n).failed();
- if (__b)
- this->setstate(ios_base::badbit);
- }
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
+#ifdef _GLIBCXX_USE_LONG_LONG
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(long long __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ bool __b = false;
+ const char_type __c = this->fill();
+ const ios_base::fmtflags __fmt = (this->flags()
+ & ios_base::basefield);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
+ {
+ const unsigned long long __l = (static_cast<
+ unsigned long long>(__n));
+ __b = __np.put(*this, *this, __c, __l).failed();
+ }
+ else
+ __b = __np.put(*this, *this, __c, __n).failed();
+ if (__b)
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
-#ifdef _GLIBCPP_USE_LONG_LONG
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(long long __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(unsigned long long __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- char_type __c = this->fill();
- ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
- if (_M_check_facet(_M_fnumput))
- {
- bool __b = false;
- if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
- {
- unsigned long long __l;
- __l = static_cast<unsigned long long>(__n);
- __b = _M_fnumput->put(*this, *this, __c, __l).failed();
- }
- else
- __b = _M_fnumput->put(*this, *this, __c, __n).failed();
- if (__b)
- this->setstate(ios_base::badbit);
- }
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
+#endif
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(double __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
-#endif
-
+
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(double __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(long double __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
-
+
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(long double __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(const void* __n)
{
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- try
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __n).failed())
+ __err |= ios_base::badbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
- basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(__streambuf_type* __sbin)
{
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb && __sbin)
{
- try
+ try
{
- if (_M_check_facet(_M_fnumput))
- if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
- this->setstate(ios_base::badbit);
+ if (!__copy_streambufs(__sbin, this->rdbuf()))
+ __err |= ios_base::failbit;
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- this->_M_setstate(ios_base::badbit);
- if ((this->exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { this->_M_setstate(ios_base::failbit); }
}
+ else if (!__sbin)
+ __err |= ios_base::badbit;
+ if (__err)
+ this->setstate(__err);
return *this;
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::put(char_type __c)
- {
+ basic_ostream<_CharT, _Traits>::
+ put(char_type __c)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::put(char_type) is an unformatted output function.
+ // DR 63. Exception-handling policy for unformatted output.
+ // Unformatted output functions should catch exceptions thrown
+ // from streambuf members.
sentry __cerb(*this);
- if (__cerb)
+ if (__cerb)
{
- int_type __put = rdbuf()->sputc(__c);
- if (traits_type::eq_int_type(__put, traits_type::eof()))
- this->setstate(ios_base::badbit);
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
+ {
+ const int_type __put = this->rdbuf()->sputc(__c);
+ if (traits_type::eq_int_type(__put, traits_type::eof()))
+ __err |= ios_base::badbit;
+ }
+ catch (...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
}
return *this;
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::write(const _CharT* __s, streamsize __n)
+ basic_ostream<_CharT, _Traits>::
+ write(const _CharT* __s, streamsize __n)
{
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::write(const char_type*, streamsize) is an
+ // unformatted output function.
+ // DR 63. Exception-handling policy for unformatted output.
+ // Unformatted output functions should catch exceptions thrown
+ // from streambuf members.
sentry __cerb(*this);
if (__cerb)
{
- streamsize __put = this->rdbuf()->sputn(__s, __n);
- if ( __put != __n)
- this->setstate(ios_base::badbit);
+ try
+ { _M_write(__s, __n); }
+ catch (...)
+ { this->_M_setstate(ios_base::badbit); }
}
return *this;
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::flush()
+ basic_ostream<_CharT, _Traits>::
+ flush()
{
- sentry __cerb(*this);
- if (__cerb)
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::flush() is *not* an unformatted output function.
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
- this->setstate(ios_base::badbit);
+ __err |= ios_base::badbit;
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
return *this;
}
-
+
template<typename _CharT, typename _Traits>
typename basic_ostream<_CharT, _Traits>::pos_type
- basic_ostream<_CharT, _Traits>::tellp()
+ basic_ostream<_CharT, _Traits>::
+ tellp()
{
pos_type __ret = pos_type(-1);
- if (!this->fail())
- __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
+ try
+ {
+ if (!this->fail())
+ __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
+ }
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
return __ret;
}
-
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
- basic_ostream<_CharT, _Traits>::seekp(pos_type __pos)
+ basic_ostream<_CharT, _Traits>::
+ seekp(pos_type __pos)
{
- if (!this->fail())
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 136. seekp, seekg setting wrong streams?
- pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out);
+ if (!this->fail())
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+ ios_base::out);
-// 129. Need error indication from seekp() and seekg()
- if (__err == pos_type(off_type(-1)))
- this->setstate(ios_base::failbit);
-#endif
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
return *this;
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
- seekp(off_type __off, ios_base::seekdir __d)
+ seekp(off_type __off, ios_base::seekdir __dir)
{
- if (!this->fail())
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ try
{
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 136. seekp, seekg setting wrong streams?
- pos_type __err = this->rdbuf()->pubseekoff(__off, __d,
- ios_base::out);
-
-// 129. Need error indication from seekp() and seekg()
- if (__err == pos_type(off_type(-1)))
- this->setstate(ios_base::failbit);
-#endif
+ if (!this->fail())
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+ ios_base::out);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
}
+ catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
return *this;
}
@@ -474,35 +476,30 @@ namespace std
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
- try
+ try
{
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__w + 1)));
- __pads[0] = __c;
+ const streamsize __w = __out.width();
streamsize __len = 1;
+ _CharT* __cs = &__c;
if (__w > __len)
{
- __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __pads,
+ __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
+ __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
&__c, __w, __len, false);
__len = __w;
}
- __out.write(__pads, __len);
+ __out._M_write(__cs, __len);
__out.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __out._M_setstate(ios_base::badbit);
- if ((__out.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __out._M_setstate(ios_base::badbit); }
}
return __out;
}
-
+
// Specializations.
- template <class _Traits>
+ template <class _Traits>
basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, char __c)
{
@@ -510,29 +507,23 @@ namespace std
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
- try
+ try
{
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- char* __pads = static_cast<char*>(__builtin_alloca(__w + 1));
- __pads[0] = __c;
+ const streamsize __w = __out.width();
streamsize __len = 1;
+ char* __cs = &__c;
if (__w > __len)
{
- __pad<char, _Traits>::_S_pad(__out, __out.fill(), __pads,
+ __cs = static_cast<char*>(__builtin_alloca(__w));
+ __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs,
&__c, __w, __len, false);
__len = __w;
}
- __out.write(__pads, __len);
+ __out._M_write(__cs, __len);
__out.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __out._M_setstate(ios_base::badbit);
- if ((__out.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __out._M_setstate(ios_base::badbit); }
}
return __out;
}
@@ -545,29 +536,25 @@ namespace std
typename __ostream_type::sentry __cerb(__out);
if (__cerb && __s)
{
- try
+ try
{
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+ const streamsize __w = __out.width();
streamsize __len = static_cast<streamsize>(_Traits::length(__s));
if (__w > __len)
{
- __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __pads,
+ _CharT* __cs = (static_cast<
+ _CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w)));
+ __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__s, __w, __len, false);
- __s = __pads;
+ __s = __cs;
__len = __w;
}
- __out.write(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __out._M_setstate(ios_base::badbit);
- if ((__out.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __out._M_setstate(ios_base::badbit); }
}
else if (!__s)
__out.setstate(ios_base::badbit);
@@ -579,44 +566,39 @@ namespace std
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 167. Improper use of traits_type::length()
-// Note that this is only in 'Review' status.
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 167. Improper use of traits_type::length()
+ // Note that this is only in 'Review' status.
typedef char_traits<char> __traits_type;
-#endif
typename __ostream_type::sentry __cerb(__out);
if (__cerb && __s)
{
size_t __clen = __traits_type::length(__s);
- _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__clen + 1)));
+ _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __clen));
for (size_t __i = 0; __i < __clen; ++__i)
__ws[__i] = __out.widen(__s[__i]);
_CharT* __str = __ws;
-
- try
+
+ try
{
+ const streamsize __w = __out.width();
streamsize __len = static_cast<streamsize>(__clen);
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
-
if (__w > __len)
{
- __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __pads,
+ _CharT* __cs = (static_cast<
+ _CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w)));
+ __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__ws, __w, __len, false);
- __str = __pads;
+ __str = __cs;
__len = __w;
}
- __out.write(__str, __len);
+ __out._M_write(__str, __len);
__out.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __out._M_setstate(ios_base::badbit);
- if ((__out.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __out._M_setstate(ios_base::badbit); }
}
else if (!__s)
__out.setstate(ios_base::badbit);
@@ -632,30 +614,23 @@ namespace std
typename __ostream_type::sentry __cerb(__out);
if (__cerb && __s)
{
- try
+ try
{
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- char* __pads = static_cast<char*>(__builtin_alloca(__w));
+ const streamsize __w = __out.width();
streamsize __len = static_cast<streamsize>(_Traits::length(__s));
-
if (__w > __len)
{
- __pad<char, _Traits>::_S_pad(__out, __out.fill(), __pads,
+ char* __cs = static_cast<char*>(__builtin_alloca(__w));
+ __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs,
__s, __w, __len, false);
- __s = __pads;
+ __s = __cs;
__len = __w;
}
- __out.write(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
}
catch(...)
- {
- // 27.6.1.2.1 Common requirements.
- // Turn this on without causing an ios::failure to be thrown.
- __out._M_setstate(ios_base::badbit);
- if ((__out.exceptions() & ios_base::badbit) != 0)
- __throw_exception_again;
- }
+ { __out._M_setstate(ios_base::badbit); }
}
else if (!__s)
__out.setstate(ios_base::badbit);
@@ -667,37 +642,36 @@ namespace std
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out,
const basic_string<_CharT, _Traits, _Alloc>& __str)
- {
+ {
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
- const _CharT* __s = __str.data();
- const streamsize __w = __out.width() > 0 ? __out.width() : 0;
- _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+ const streamsize __w = __out.width();
streamsize __len = static_cast<streamsize>(__str.size());
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ const _CharT* __s = __str.data();
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 25. String operator<< uses width() value wrong
-#endif
if (__w > __len)
{
- __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __pads, __s,
+ _CharT* __cs = (static_cast<
+ _CharT*>(__builtin_alloca(sizeof(_CharT) * __w)));
+ __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s,
__w, __len, false);
- __s = __pads;
+ __s = __cs;
__len = __w;
}
- streamsize __res = __out.rdbuf()->sputn(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
- if (__res != __len)
- __out.setstate(ios_base::failbit);
}
return __out;
}
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_ostream<char>;
extern template ostream& endl(ostream&);
extern template ostream& ends(ostream&);
@@ -709,7 +683,7 @@ namespace std
extern template ostream& operator<<(ostream&, const unsigned char*);
extern template ostream& operator<<(ostream&, const signed char*);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_ostream<wchar_t>;
extern template wostream& endl(wostream&);
extern template wostream& ends(wostream&);
@@ -721,3 +695,5 @@ namespace std
#endif
#endif
} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/postypes.h b/contrib/libstdc++/include/bits/postypes.h
new file mode 100644
index 0000000..0cfb61b
--- /dev/null
+++ b/contrib/libstdc++/include/bits/postypes.h
@@ -0,0 +1,215 @@
+// Position types -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 27.4.1 - Types
+// ISO C++ 14882: 27.4.3 - Template class fpos
+//
+
+/** @file postypes.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_POSTYPES_H
+#define _GLIBCXX_POSTYPES_H 1
+
+#pragma GCC system_header
+
+#include <cwchar> // For mbstate_t
+
+#ifdef _GLIBCXX_HAVE_STDINT_H
+#include <stdint.h> // For int64_t
+#endif
+
+namespace std
+{
+ // The types streamoff, streampos and wstreampos and the class
+ // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2,
+ // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbage, the
+ // behaviour of these types is mostly implementation defined or
+ // unspecified. The behaviour in this implementation is as noted
+ // below.
+
+ /**
+ * @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
+ *
+ * @if maint
+ * In clauses 21.1.3.1 and 27.4.1 streamoff is described as an
+ * implementation defined type.
+ * Note: In versions of GCC up to and including GCC 3.3, streamoff
+ * was typedef long.
+ * @endif
+ */
+#ifdef _GLIBCXX_HAVE_INT64_T
+ typedef int64_t streamoff;
+#else
+ typedef long long streamoff;
+#endif
+
+ /// Integral type for I/O operation counts and buffer sizes.
+ typedef ptrdiff_t streamsize; // Signed integral type
+
+ template<typename _StateT>
+ class fpos;
+
+ /**
+ * @brief Class representing stream positions.
+ *
+ * The standard places no requirements upon the template parameter StateT.
+ * In this implementation StateT must be DefaultConstructible,
+ * CopyConstructible and Assignable. The standard only requires that fpos
+ * should contain a member of type StateT. In this implementation it also
+ * contains an offset stored as a signed integer.
+ *
+ * @param StateT Type passed to and returned from state().
+ */
+ template<typename _StateT>
+ class fpos
+ {
+ private:
+ streamoff _M_off;
+ _StateT _M_state;
+
+ public:
+ // The standard doesn't require that fpos objects can be default
+ // constructed. This implementation provides a default
+ // constructor that initializes the offset to 0 and default
+ // constructs the state.
+ fpos()
+ : _M_off(0), _M_state() { }
+
+ // The standard requires that fpos objects can be constructed
+ // from streamoff objects using the constructor syntax, and
+ // fails to give any meaningful semantics. In this
+ // implementation implicit conversion is also allowed, and this
+ // constructor stores the streamoff as the offset and default
+ // constructs the state.
+ /// Construct position from offset.
+ fpos(streamoff __off)
+ : _M_off(__off), _M_state() { }
+
+ /// Convert to streamoff.
+ operator streamoff() const { return _M_off; }
+
+ /// Remember the value of @a st.
+ void
+ state(_StateT __st)
+ { _M_state = __st; }
+
+ /// Return the last set value of @a st.
+ _StateT
+ state() const
+ { return _M_state; }
+
+ // The standard only requires that operator== must be an
+ // equivalence relation. In this implementation two fpos<StateT>
+ // objects belong to the same equivalence class if the contained
+ // offsets compare equal.
+ /// Test if equivalent to another position.
+ bool
+ operator==(const fpos& __other) const
+ { return _M_off == __other._M_off; }
+
+ /// Test if not equivalent to another position.
+ bool
+ operator!=(const fpos& __other) const
+ { return _M_off != __other._M_off; }
+
+ // The standard requires that this operator must be defined, but
+ // gives no semantics. In this implemenation it just adds it's
+ // argument to the stored offset and returns *this.
+ /// Add offset to this position.
+ fpos&
+ operator+=(streamoff __off)
+ {
+ _M_off += __off;
+ return *this;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // gives no semantics. In this implemenation it just subtracts
+ // it's argument from the stored offset and returns *this.
+ /// Subtract offset from this position.
+ fpos&
+ operator-=(streamoff __off)
+ {
+ _M_off -= __off;
+ return *this;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines it's semantics only in terms of operator-. In this
+ // implementation it constructs a copy of *this, adds the
+ // argument to that copy using operator+= and then returns the
+ // copy.
+ /// Add position and offset.
+ fpos
+ operator+(streamoff __off) const
+ {
+ fpos __pos(*this);
+ __pos += __off;
+ return __pos;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines it's semantics only in terms of operator+. In this
+ // implementation it constructs a copy of *this, subtracts the
+ // argument from that copy using operator-= and then returns the
+ // copy.
+ /// Subtract offset from position.
+ fpos
+ operator-(streamoff __off) const
+ {
+ fpos __pos(*this);
+ __pos -= __off;
+ return __pos;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines it's semantics only in terms of operator+. In this
+ // implementation it returns the difference between the offset
+ // stored in *this and in the argument.
+ /// Subtract position to return offset.
+ streamoff
+ operator-(const fpos& __other) const
+ { return _M_off - __other._M_off; }
+ };
+
+ // Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos
+ // as implementation defined types, but clause 27.2 requires that
+ // they must both be typedefs for fpos<mbstate_t>
+ /// File position for char streams.
+ typedef fpos<mbstate_t> streampos;
+ /// File position for wchar_t streams.
+ typedef fpos<mbstate_t> wstreampos;
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/slice_array.h b/contrib/libstdc++/include/bits/slice_array.h
index 2502ef4..31c89bc 100644
--- a/contrib/libstdc++/include/bits/slice_array.h
+++ b/contrib/libstdc++/include/bits/slice_array.h
@@ -1,6 +1,7 @@
// The template and inlines for the -*- C++ -*- slice_array class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,23 +35,48 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_SLICE_ARRAY_H
-#define _CPP_BITS_SLICE_ARRAY_H 1
+#ifndef _SLICE_ARRAY_H
+#define _SLICE_ARRAY_H 1
#pragma GCC system_header
namespace std
{
+ /**
+ * @brief Class defining one-dimensional subset of an array.
+ *
+ * The slice class represents a one-dimensional subset of an array,
+ * specified by three parameters: start offset, size, and stride. The
+ * start offset is the index of the first element of the array that is part
+ * of the subset. The size is the total number of elements in the subset.
+ * Stride is the distance between each successive array element to include
+ * in the subset.
+ *
+ * For example, with an array of size 10, and a slice with offset 1, size 3
+ * and stride 2, the subset consists of array elements 1, 3, and 5.
+ */
class slice
{
public:
+ /// Construct an empty slice.
slice();
+
+ /**
+ * @brief Construct a slice.
+ *
+ * @param o Offset in array of first element.
+ * @param d Number of elements in slice.
+ * @param s Stride between array elements.
+ */
slice(size_t, size_t, size_t);
-
+
+ /// Return array offset of first slice element.
size_t start() const;
+ /// Return size of slice.
size_t size() const;
+ /// Return array stride of slice.
size_t stride() const;
-
+
private:
size_t _M_off; // offset
size_t _M_sz; // size
@@ -59,48 +85,77 @@ namespace std
// The default constructor constructor is not required to initialize
// data members with any meaningful values, so we choose to do nothing.
- inline
+ inline
slice::slice() {}
-
- inline
+
+ inline
slice::slice(size_t __o, size_t __d, size_t __s)
: _M_off(__o), _M_sz(__d), _M_st(__s) {}
-
+
inline size_t
slice::start() const
{ return _M_off; }
-
+
inline size_t
slice::size() const
{ return _M_sz; }
-
+
inline size_t
slice::stride() const
{ return _M_st; }
+ /**
+ * @brief Reference to one-dimensional subset of an array.
+ *
+ * A slice_array is a reference to the actual elements of an array
+ * specified by a slice. The way to get a slice_array is to call
+ * operator[](slice) on a valarray. The returned slice_array then permits
+ * carrying operations out on the referenced subset of elements in the
+ * original valarray. For example, operator+=(valarray) will add values
+ * to the subset of elements in the underlying valarray this slice_array
+ * refers to.
+ *
+ * @param Tp Element type.
+ */
template<typename _Tp>
class slice_array
{
public:
typedef _Tp value_type;
- // This constructor is implemented since we need to return a value.
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
slice_array(const slice_array&);
- // This operator must be public. See DR-253.
+ /// Assignment operator. Assigns slice elements to corresponding
+ /// elements of @a a.
slice_array& operator=(const slice_array&);
+ /// Assign slice elements to corresponding elements of @a v.
void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
void operator=(const _Tp &) const;
// ~slice_array ();
@@ -140,16 +195,16 @@ namespace std
};
template<typename _Tp>
- inline
+ inline
slice_array<_Tp>::slice_array(_Array<_Tp> __a, const slice& __s)
- : _M_sz(__s.size()), _M_stride(__s.stride()),
- _M_array(__a.begin() + __s.start()) {}
+ : _M_sz(__s.size()), _M_stride(__s.stride()),
+ _M_array(__a.begin() + __s.start()) {}
template<typename _Tp>
- inline
+ inline
slice_array<_Tp>::slice_array(const slice_array<_Tp>& a)
- : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {}
-
+ : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {}
+
// template<typename _Tp>
// inline slice_array<_Tp>::~slice_array () {}
@@ -157,26 +212,26 @@ namespace std
inline slice_array<_Tp>&
slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
{
- __valarray_copy(__a._M_array, __a._M_sz, __a._M_stride,
- _M_array, _M_stride);
+ std::__valarray_copy(__a._M_array, __a._M_sz, __a._M_stride,
+ _M_array, _M_stride);
return *this;
}
template<typename _Tp>
inline void
slice_array<_Tp>::operator=(const _Tp& __t) const
- { __valarray_fill(_M_array, _M_sz, _M_stride, __t); }
-
+ { std::__valarray_fill(_M_array, _M_sz, _M_stride, __t); }
+
template<typename _Tp>
inline void
slice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
- { __valarray_copy(_Array<_Tp>(__v), _M_array, _M_sz, _M_stride); }
-
+ { std::__valarray_copy(_Array<_Tp>(__v), _M_array, _M_sz, _M_stride); }
+
template<typename _Tp>
template<class _Dom>
inline void
slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
- { __valarray_copy(__e, _M_sz, _M_array, _M_stride); }
+ { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); }
#undef _DEFINE_VALARRAY_OPERATOR
#define _DEFINE_VALARRAY_OPERATOR(_Op,_Name) \
@@ -194,7 +249,7 @@ namespace std
{ \
_Array_augmented_##_Name(_M_array, _M_stride, __e, _M_sz); \
}
-
+
_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
_DEFINE_VALARRAY_OPERATOR(/, __divides)
@@ -211,7 +266,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
} // std::
-#endif /* _CPP_BITS_SLICE_ARRAY_H */
+#endif /* _SLICE_ARRAY_H */
// Local Variables:
// mode:c++
diff --git a/contrib/libstdc++/include/bits/sstream.tcc b/contrib/libstdc++/include/bits/sstream.tcc
index 606705c..04cd6ec 100644
--- a/contrib/libstdc++/include/bits/sstream.tcc
+++ b/contrib/libstdc++/include/bits/sstream.tcc
@@ -1,6 +1,6 @@
// String based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -32,8 +32,8 @@
// ISO C++ 14882: 27.7 String-based streams
//
-#ifndef _CPP_BITS_SSTREAM_TCC
-#define _CPP_BITS_SSTREAM_TCC 1
+#ifndef _SSTREAM_TCC
+#define _SSTREAM_TCC 1
#pragma GCC system_header
@@ -42,75 +42,89 @@
namespace std
{
template <class _CharT, class _Traits, class _Alloc>
- typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
pbackfail(int_type __c)
{
int_type __ret = traits_type::eof();
- bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
- bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur;
-
- // Try to put back __c into input sequence in one of three ways.
- // Order these tests done in is unspecified by the standard.
- if (__testpos)
+ const bool __testeof = traits_type::eq_int_type(__c, __ret);
+
+ if (this->eback() < this->gptr())
{
- if (traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1])
- && !__testeof)
- {
- --_M_in_cur;
- __ret = __c;
- }
- else if (!__testeof)
- {
- --_M_in_cur;
- *_M_in_cur = traits_type::to_char_type(__c);
- __ret = __c;
- }
+ const bool __testeq = traits_type::eq(traits_type::to_char_type(__c),
+ this->gptr()[-1]);
+ this->gbump(-1);
+
+ // Try to put back __c into input sequence in one of three ways.
+ // Order these tests done in is unspecified by the standard.
+ if (!__testeof && __testeq)
+ __ret = __c;
else if (__testeof)
+ __ret = traits_type::not_eof(__c);
+ else
{
- --_M_in_cur;
- __ret = traits_type::not_eof(__c);
+ *this->gptr() = traits_type::to_char_type(__c);
+ __ret = __c;
}
}
return __ret;
}
-
+
template <class _CharT, class _Traits, class _Alloc>
- typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
overflow(int_type __c)
{
- int_type __ret = traits_type::eof();
- bool __testeof = traits_type::eq_int_type(__c, __ret);
- bool __testwrite = _M_out_cur < _M_buf + _M_buf_size;
- bool __testout = _M_mode & ios_base::out;
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__builtin_expect(!__testout, false))
+ return traits_type::eof();
+
+ const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
+ if (__builtin_expect(__testeof, false))
+ return traits_type::not_eof(__c);
+
+ const __size_type __capacity = _M_string.capacity();
+ const __size_type __max_size = _M_string.max_size();
+ const bool __testput = this->pptr() < this->epptr();
+ if (__builtin_expect(!__testput && __capacity == __max_size, false))
+ return traits_type::eof();
// Try to append __c into output sequence in one of two ways.
// Order these tests done in is unspecified by the standard.
- if (__testout)
+ if (!__testput)
{
- if (!__testeof)
- {
- __size_type __len = max(_M_buf_size, _M_buf_size_opt);
- __len *= 2;
-
- if (__testwrite)
- __ret = this->sputc(traits_type::to_char_type(__c));
- else if (__len <= _M_string.max_size())
- {
- // Force-allocate, re-sync.
- _M_string = this->str();
- _M_string.reserve(__len);
- _M_buf_size = __len;
- _M_really_sync(_M_in_cur - _M_in_beg,
- _M_out_cur - _M_out_beg);
- *_M_out_cur = traits_type::to_char_type(__c);
- _M_out_cur_move(1);
- __ret = __c;
- }
- }
- else
- __ret = traits_type::not_eof(__c);
+ // NB: Start ostringstream buffers at 512 chars. This is an
+ // experimental value (pronounced "arbitrary" in some of the
+ // hipper english-speaking countries), and can be changed to
+ // suit particular needs.
+ // Then, in virtue of DR 169 (TC) we are allowed to grow more
+ // than one char.
+ const __size_type __opt_len = std::max(__size_type(2 * __capacity),
+ __size_type(512));
+ const __size_type __len = std::min(__opt_len, __max_size);
+ __string_type __tmp;
+ __tmp.reserve(__len);
+ __tmp.assign(_M_string.data(), this->epptr() - this->pbase());
+ _M_string.swap(__tmp);
+ _M_sync(const_cast<char_type*>(_M_string.data()),
+ this->gptr() - this->eback(), this->pptr() - this->pbase());
+ }
+ return this->sputc(traits_type::to_char_type(__c));
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ underflow()
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = this->_M_mode & ios_base::in;
+ if (__testin)
+ {
+ // Update egptr() to match the actual string end.
+ _M_update_egptr();
+ if (this->gptr() < this->egptr())
+ __ret = traits_type::to_int_type(*this->gptr());
}
return __ret;
}
@@ -120,55 +134,41 @@ namespace std
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
{
- pos_type __ret = pos_type(off_type(-1));
- bool __testin = (ios_base::in & _M_mode & __mode) != 0;
- bool __testout = (ios_base::out & _M_mode & __mode) != 0;
- bool __testboth = __testin && __testout && __way != ios_base::cur;
+ pos_type __ret = pos_type(off_type(-1));
+ bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+ const bool __testboth = __testin && __testout && __way != ios_base::cur;
__testin &= !(__mode & ios_base::out);
__testout &= !(__mode & ios_base::in);
- if (_M_buf_size && (__testin || __testout || __testboth))
+ if (_M_string.capacity() && (__testin || __testout || __testboth))
{
- char_type* __beg = _M_buf;
- char_type* __curi = NULL;
- char_type* __curo = NULL;
- char_type* __endi = NULL;
- char_type* __endo = NULL;
+ char_type* __beg = __testin ? this->eback() : this->pbase();
- if (__testin || __testboth)
- {
- __curi = this->gptr();
- __endi = this->egptr();
- }
- if (__testout || __testboth)
- {
- __curo = this->pptr();
- __endo = this->epptr();
- }
+ _M_update_egptr();
off_type __newoffi = 0;
off_type __newoffo = 0;
if (__way == ios_base::cur)
{
- __newoffi = __curi - __beg;
- __newoffo = __curo - __beg;
+ __newoffi = this->gptr() - __beg;
+ __newoffo = this->pptr() - __beg;
}
else if (__way == ios_base::end)
- {
- __newoffi = __endi - __beg;
- __newoffo = __endo - __beg;
- }
+ __newoffo = __newoffi = this->egptr() - __beg;
if ((__testin || __testboth)
- && __newoffi + __off >= 0 && __endi - __beg >= __newoffi + __off)
+ && __newoffi + __off >= 0
+ && this->egptr() - __beg >= __newoffi + __off)
{
- _M_in_cur = __beg + __newoffi + __off;
+ this->gbump((__beg + __newoffi + __off) - this->gptr());
__ret = pos_type(__newoffi);
}
if ((__testout || __testboth)
- && __newoffo + __off >= 0 && __endo - __beg >= __newoffo + __off)
+ && __newoffo + __off >= 0
+ && this->egptr() - __beg >= __newoffo + __off)
{
- _M_out_cur_move(__newoffo + __off - (_M_out_cur - __beg));
+ this->pbump((__beg + __newoffo + __off) - this->pptr());
__ret = pos_type(__newoffo);
}
}
@@ -180,42 +180,24 @@ namespace std
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekpos(pos_type __sp, ios_base::openmode __mode)
{
- pos_type __ret = pos_type(off_type(-1));
-
- if (_M_buf_size)
+ pos_type __ret = pos_type(off_type(-1));
+ if (_M_string.capacity())
{
- off_type __pos = __sp; // Use streamoff operator to do conversion.
- char_type* __beg = NULL;
- char_type* __end = NULL;
- bool __testin = (ios_base::in & _M_mode & __mode) != 0;
- bool __testout = (ios_base::out & _M_mode & __mode) != 0;
- bool __testboth = __testin && __testout;
- __testin &= !(__mode & ios_base::out);
- __testout &= !(__mode & ios_base::in);
-
- // NB: Ordered.
- bool __testposi = false;
- bool __testposo = false;
- if (__testin || __testboth)
- {
- __beg = this->eback();
- __end = this->egptr();
- if (0 <= __pos && __pos <= __end - __beg)
- __testposi = true;
- }
- if (__testout || __testboth)
- {
- __beg = this->pbase();
- __end = _M_buf + _M_buf_size;
- if (0 <= __pos && __pos <= __end - __beg)
- __testposo = true;
- }
- if (__testposi || __testposo)
+ off_type __pos (__sp);
+ const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+ char_type* __beg = __testin ? this->eback() : this->pbase();
+
+ _M_update_egptr();
+
+ const bool __testpos = 0 <= __pos
+ && __pos <= this->egptr() - __beg;
+ if ((__testin || __testout) && __testpos)
{
- if (__testposi)
- _M_in_cur = _M_in_beg + __pos;
- if (__testposo)
- _M_out_cur_move((__pos) - (_M_out_cur - __beg));
+ if (__testin)
+ this->gbump((__beg + __pos) - this->gptr());
+ if (__testout)
+ this->pbump((__beg + __pos) - this->pptr());
__ret = pos_type(off_type(__pos));
}
}
@@ -223,19 +205,21 @@ namespace std
}
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_stringbuf<char>;
extern template class basic_istringstream<char>;
extern template class basic_ostringstream<char>;
extern template class basic_stringstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_stringbuf<wchar_t>;
extern template class basic_istringstream<wchar_t>;
extern template class basic_ostringstream<wchar_t>;
extern template class basic_stringstream<wchar_t>;
#endif
+#endif
} // namespace std
#endif
diff --git a/contrib/libstdc++/include/bits/stl_algo.h b/contrib/libstdc++/include/bits/stl_algo.h
index 3d22697..6fed578 100644
--- a/contrib/libstdc++/include/bits/stl_algo.h
+++ b/contrib/libstdc++/include/bits/stl_algo.h
@@ -1,6 +1,6 @@
// Algorithm implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,17 +58,17 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_ALGO_H
-#define __GLIBCPP_INTERNAL_ALGO_H
+#ifndef _ALGO_H
+#define _ALGO_H 1
#include <bits/stl_heap.h>
#include <bits/stl_tempbuf.h> // for _Temporary_buffer
+#include <debug/debug.h>
-// See concept_check.h for the __glibcpp_*_requires macros.
+// See concept_check.h for the __glibcxx_*_requires macros.
namespace std
{
-
/**
* @brief Find the median of three values.
* @param a A value.
@@ -82,11 +82,11 @@ namespace std
* @ingroup SGIextensions
*/
template<typename _Tp>
- inline const _Tp&
+ inline const _Tp&
__median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
{
// concept requirements
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
if (__a < __b)
if (__b < __c)
return __b;
@@ -120,7 +120,7 @@ namespace std
__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_BinaryFunctionConcept<_Compare,bool,_Tp,_Tp>)
+ __glibcxx_function_requires(_BinaryFunctionConcept<_Compare,bool,_Tp,_Tp>)
if (__comp(__a, __b))
if (__comp(__b, __c))
return __b;
@@ -147,12 +147,13 @@ namespace std
* @p [first,last). @p f must not modify the order of the sequence.
* If @p f has a return value it is ignored.
*/
- template<typename _InputIter, typename _Function>
+ template<typename _InputIterator, typename _Function>
_Function
- for_each(_InputIter __first, _InputIter __last, _Function __f)
+ for_each(_InputIterator __first, _InputIterator __last, _Function __f)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
__f(*__first);
return __f;
@@ -163,11 +164,10 @@ namespace std
* This is an overload used by find() for the Input Iterator case.
* @endif
*/
- template<typename _InputIter, typename _Tp>
- inline _InputIter
- find(_InputIter __first, _InputIter __last,
- const _Tp& __val,
- input_iterator_tag)
+ template<typename _InputIterator, typename _Tp>
+ inline _InputIterator
+ find(_InputIterator __first, _InputIterator __last,
+ const _Tp& __val, input_iterator_tag)
{
while (__first != __last && !(*__first == __val))
++__first;
@@ -179,11 +179,10 @@ namespace std
* This is an overload used by find_if() for the Input Iterator case.
* @endif
*/
- template<typename _InputIter, typename _Predicate>
- inline _InputIter
- find_if(_InputIter __first, _InputIter __last,
- _Predicate __pred,
- input_iterator_tag)
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ find_if(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred, input_iterator_tag)
{
while (__first != __last && !__pred(*__first))
++__first;
@@ -195,43 +194,51 @@ namespace std
* This is an overload used by find() for the RAI case.
* @endif
*/
- template<typename _RandomAccessIter, typename _Tp>
- _RandomAccessIter
- find(_RandomAccessIter __first, _RandomAccessIter __last,
- const _Tp& __val,
- random_access_iterator_tag)
+ template<typename _RandomAccessIterator, typename _Tp>
+ _RandomAccessIterator
+ find(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ const _Tp& __val, random_access_iterator_tag)
{
- typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
- = (__last - __first) >> 2;
+ typename iterator_traits<_RandomAccessIterator>::difference_type
+ __trip_count = (__last - __first) >> 2;
- for ( ; __trip_count > 0 ; --__trip_count) {
- if (*__first == __val) return __first;
- ++__first;
+ for ( ; __trip_count > 0 ; --__trip_count)
+ {
+ if (*__first == __val)
+ return __first;
+ ++__first;
- if (*__first == __val) return __first;
- ++__first;
+ if (*__first == __val)
+ return __first;
+ ++__first;
- if (*__first == __val) return __first;
- ++__first;
+ if (*__first == __val)
+ return __first;
+ ++__first;
- if (*__first == __val) return __first;
- ++__first;
- }
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ }
- switch(__last - __first) {
- case 3:
- if (*__first == __val) return __first;
- ++__first;
- case 2:
- if (*__first == __val) return __first;
- ++__first;
- case 1:
- if (*__first == __val) return __first;
- ++__first;
- case 0:
- default:
- return __last;
- }
+ switch (__last - __first)
+ {
+ case 3:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 2:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 1:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 0:
+ default:
+ return __last;
+ }
}
/**
@@ -239,43 +246,51 @@ namespace std
* This is an overload used by find_if() for the RAI case.
* @endif
*/
- template<typename _RandomAccessIter, typename _Predicate>
- _RandomAccessIter
- find_if(_RandomAccessIter __first, _RandomAccessIter __last,
- _Predicate __pred,
- random_access_iterator_tag)
+ template<typename _RandomAccessIterator, typename _Predicate>
+ _RandomAccessIterator
+ find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Predicate __pred, random_access_iterator_tag)
{
- typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
- = (__last - __first) >> 2;
+ typename iterator_traits<_RandomAccessIterator>::difference_type
+ __trip_count = (__last - __first) >> 2;
- for ( ; __trip_count > 0 ; --__trip_count) {
- if (__pred(*__first)) return __first;
- ++__first;
+ for ( ; __trip_count > 0 ; --__trip_count)
+ {
+ if (__pred(*__first))
+ return __first;
+ ++__first;
- if (__pred(*__first)) return __first;
- ++__first;
+ if (__pred(*__first))
+ return __first;
+ ++__first;
- if (__pred(*__first)) return __first;
- ++__first;
+ if (__pred(*__first))
+ return __first;
+ ++__first;
- if (__pred(*__first)) return __first;
- ++__first;
- }
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ }
- switch(__last - __first) {
- case 3:
- if (__pred(*__first)) return __first;
- ++__first;
- case 2:
- if (__pred(*__first)) return __first;
- ++__first;
- case 1:
- if (__pred(*__first)) return __first;
- ++__first;
- case 0:
- default:
- return __last;
- }
+ switch (__last - __first)
+ {
+ case 3:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 2:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 1:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 0:
+ default:
+ return __last;
+ }
}
/**
@@ -286,16 +301,18 @@ namespace std
* @return The first iterator @c i in the range @p [first,last)
* such that @c *i == @p val, or @p last if no such iterator exists.
*/
- template<typename _InputIter, typename _Tp>
- inline _InputIter
- find(_InputIter __first, _InputIter __last,
+ template<typename _InputIterator, typename _Tp>
+ inline _InputIterator
+ find(_InputIterator __first, _InputIterator __last,
const _Tp& __val)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter>::value_type, _Tp>)
- return find(__first, __last, __val, __iterator_category(__first));
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::find(__first, __last, __val,
+ std::__iterator_category(__first));
}
/**
@@ -306,16 +323,18 @@ namespace std
* @return The first iterator @c i in the range @p [first,last)
* such that @p pred(*i) is true, or @p last if no such iterator exists.
*/
- template<typename _InputIter, typename _Predicate>
- inline _InputIter
- find_if(_InputIter __first, _InputIter __last,
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ find_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIter>::value_type>)
- return find_if(__first, __last, __pred, __iterator_category(__first));
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::find_if(__first, __last, __pred,
+ std::__iterator_category(__first));
}
/**
@@ -326,22 +345,24 @@ namespace std
* valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
* or @p last if no such iterator exists.
*/
- template<typename _ForwardIter>
- _ForwardIter
- adjacent_find(_ForwardIter __first, _ForwardIter __last)
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return __last;
- _ForwardIter __next = __first;
- while(++__next != __last) {
- if (*__first == *__next)
- return __first;
- __first = __next;
- }
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (*__first == *__next)
+ return __first;
+ __first = __next;
+ }
return __last;
}
@@ -355,24 +376,26 @@ namespace std
* @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
* exists.
*/
- template<typename _ForwardIter, typename _BinaryPredicate>
- _ForwardIter
- adjacent_find(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
_BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return __last;
- _ForwardIter __next = __first;
- while(++__next != __last) {
- if (__binary_pred(*__first, *__next))
- return __first;
- __first = __next;
- }
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ return __first;
+ __first = __next;
+ }
return __last;
}
@@ -384,16 +407,17 @@ namespace std
* @return The number of iterators @c i in the range @p [first,last)
* for which @c *i == @p value
*/
- template<typename _InputIter, typename _Tp>
- typename iterator_traits<_InputIter>::difference_type
- count(_InputIter __first, _InputIter __last, const _Tp& __value)
+ template<typename _InputIterator, typename _Tp>
+ typename iterator_traits<_InputIterator>::difference_type
+ count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIter>::value_type >)
- __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
- typename iterator_traits<_InputIter>::difference_type __n = 0;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type >)
+ __glibcxx_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
for ( ; __first != __last; ++__first)
if (*__first == __value)
++__n;
@@ -408,22 +432,22 @@ namespace std
* @return The number of iterators @c i in the range @p [first,last)
* for which @p pred(*i) is true.
*/
- template<typename _InputIter, typename _Predicate>
- typename iterator_traits<_InputIter>::difference_type
- count_if(_InputIter __first, _InputIter __last, _Predicate __pred)
+ template<typename _InputIterator, typename _Predicate>
+ typename iterator_traits<_InputIterator>::difference_type
+ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIter>::value_type>)
- typename iterator_traits<_InputIter>::difference_type __n = 0;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
for ( ; __first != __last; ++__first)
if (__pred(*__first))
++__n;
return __n;
}
-
/**
* @brief Search a sequence for a matching sub-sequence.
* @param first1 A forward iterator.
@@ -447,55 +471,54 @@ namespace std
* This means that the returned iterator @c i will be in the range
* @p [first1,last1-(last2-first2))
*/
- template<typename _ForwardIter1, typename _ForwardIter2>
- _ForwardIter1
- search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2)
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIter1>::value_type,
- typename iterator_traits<_ForwardIter2>::value_type>)
-
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
// Test for empty ranges
if (__first1 == __last1 || __first2 == __last2)
return __first1;
// Test for a pattern of length 1.
- _ForwardIter2 __tmp(__first2);
+ _ForwardIterator2 __tmp(__first2);
++__tmp;
if (__tmp == __last2)
- return find(__first1, __last1, *__first2);
+ return std::find(__first1, __last1, *__first2);
// General case.
-
- _ForwardIter2 __p1, __p;
-
+ _ForwardIterator2 __p1, __p;
__p1 = __first2; ++__p1;
+ _ForwardIterator1 __current = __first1;
- _ForwardIter1 __current = __first1;
-
- while (__first1 != __last1) {
- __first1 = find(__first1, __last1, *__first2);
- if (__first1 == __last1)
- return __last1;
-
- __p = __p1;
- __current = __first1;
- if (++__current == __last1)
- return __last1;
+ while (__first1 != __last1)
+ {
+ __first1 = std::find(__first1, __last1, *__first2);
+ if (__first1 == __last1)
+ return __last1;
- while (*__current == *__p) {
- if (++__p == __last2)
- return __first1;
+ __p = __p1;
+ __current = __first1;
if (++__current == __last1)
return __last1;
- }
- ++__first1;
- }
+ while (*__current == *__p)
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
return __first1;
}
@@ -519,64 +542,68 @@ namespace std
*
* @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
*/
- template<typename _ForwardIter1, typename _ForwardIter2, typename _BinaryPred>
- _ForwardIter1
- search(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
- _BinaryPred __predicate)
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
+ typename _BinaryPredicate>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ _BinaryPredicate __predicate)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred,
- typename iterator_traits<_ForwardIter1>::value_type,
- typename iterator_traits<_ForwardIter2>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
// Test for empty ranges
if (__first1 == __last1 || __first2 == __last2)
return __first1;
// Test for a pattern of length 1.
- _ForwardIter2 __tmp(__first2);
+ _ForwardIterator2 __tmp(__first2);
++__tmp;
- if (__tmp == __last2) {
- while (__first1 != __last1 && !__predicate(*__first1, *__first2))
- ++__first1;
- return __first1;
- }
+ if (__tmp == __last2)
+ {
+ while (__first1 != __last1 && !__predicate(*__first1, *__first2))
+ ++__first1;
+ return __first1;
+ }
// General case.
-
- _ForwardIter2 __p1, __p;
-
+ _ForwardIterator2 __p1, __p;
__p1 = __first2; ++__p1;
+ _ForwardIterator1 __current = __first1;
- _ForwardIter1 __current = __first1;
-
- while (__first1 != __last1) {
- while (__first1 != __last1) {
- if (__predicate(*__first1, *__first2))
- break;
- ++__first1;
- }
- while (__first1 != __last1 && !__predicate(*__first1, *__first2))
- ++__first1;
- if (__first1 == __last1)
- return __last1;
-
- __p = __p1;
- __current = __first1;
- if (++__current == __last1) return __last1;
+ while (__first1 != __last1)
+ {
+ while (__first1 != __last1)
+ {
+ if (__predicate(*__first1, *__first2))
+ break;
+ ++__first1;
+ }
+ while (__first1 != __last1 && !__predicate(*__first1, *__first2))
+ ++__first1;
+ if (__first1 == __last1)
+ return __last1;
- while (__predicate(*__current, *__p)) {
- if (++__p == __last2)
- return __first1;
+ __p = __p1;
+ __current = __first1;
if (++__current == __last1)
return __last1;
- }
- ++__first1;
- }
+ while (__predicate(*__current, *__p))
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
return __first1;
}
@@ -593,37 +620,41 @@ namespace std
* Searches the range @p [first,last) for @p count consecutive elements
* equal to @p val.
*/
- template<typename _ForwardIter, typename _Integer, typename _Tp>
- _ForwardIter
- search_n(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Integer, typename _Tp>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__count <= 0)
return __first;
- else {
- __first = find(__first, __last, __val);
- while (__first != __last) {
- typename iterator_traits<_ForwardIter>::difference_type __n = __count;
- --__n;
- _ForwardIter __i = __first;
- ++__i;
- while (__i != __last && __n != 0 && *__i == __val) {
- ++__i;
- --__n;
- }
- if (__n == 0)
- return __first;
- else
- __first = find(__i, __last, __val);
+ else
+ {
+ __first = std::find(__first, __last, __val);
+ while (__first != __last)
+ {
+ typename iterator_traits<_ForwardIterator>::difference_type
+ __n = __count;
+ _ForwardIterator __i = __first;
+ ++__i;
+ while (__i != __last && __n != 1 && *__i == __val)
+ {
+ ++__i;
+ --__n;
+ }
+ if (__n == 1)
+ return __first;
+ else
+ __first = std::find(__i, __last, __val);
+ }
+ return __last;
}
- return __last;
- }
}
/**
@@ -641,48 +672,55 @@ namespace std
* Searches the range @p [first,last) for @p count consecutive elements
* for which the predicate returns true.
*/
- template<typename _ForwardIter, typename _Integer, typename _Tp,
- typename _BinaryPred>
- _ForwardIter
- search_n(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Integer, typename _Tp,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val,
- _BinaryPred __binary_pred)
+ _BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred,
- typename iterator_traits<_ForwardIter>::value_type, _Tp>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__count <= 0)
return __first;
- else {
- while (__first != __last) {
- if (__binary_pred(*__first, __val))
- break;
- ++__first;
- }
- while (__first != __last) {
- typename iterator_traits<_ForwardIter>::difference_type __n = __count;
- --__n;
- _ForwardIter __i = __first;
- ++__i;
- while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) {
- ++__i;
- --__n;
- }
- if (__n == 0)
- return __first;
- else {
- while (__i != __last) {
- if (__binary_pred(*__i, __val))
+ else
+ {
+ while (__first != __last)
+ {
+ if (__binary_pred(*__first, __val))
break;
+ ++__first;
+ }
+ while (__first != __last)
+ {
+ typename iterator_traits<_ForwardIterator>::difference_type
+ __n = __count;
+ _ForwardIterator __i = __first;
++__i;
+ while (__i != __last && __n != 1 && __binary_pred(*__i, __val))
+ {
+ ++__i;
+ --__n;
+ }
+ if (__n == 1)
+ return __first;
+ else
+ {
+ while (__i != __last)
+ {
+ if (__binary_pred(*__i, __val))
+ break;
+ ++__i;
+ }
+ __first = __i;
+ }
}
- __first = __i;
- }
+ return __last;
}
- return __last;
- }
}
/**
@@ -696,23 +734,26 @@ namespace std
* corresponding element in the range @p [first2,(last1-first1)).
* The ranges must not overlap.
*/
- template<typename _ForwardIter1, typename _ForwardIter2>
- _ForwardIter2
- swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2)
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator2
+ swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_ConvertibleConcept<
- typename iterator_traits<_ForwardIter1>::value_type,
- typename iterator_traits<_ForwardIter2>::value_type>)
- __glibcpp_function_requires(_ConvertibleConcept<
- typename iterator_traits<_ForwardIter2>::value_type,
- typename iterator_traits<_ForwardIter1>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator1>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator2>)
+ __glibcxx_function_requires(_ConvertibleConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_function_requires(_ConvertibleConcept<
+ typename iterator_traits<_ForwardIterator2>::value_type,
+ typename iterator_traits<_ForwardIterator1>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2)
- iter_swap(__first1, __first2);
+ std::iter_swap(__first1, __first2);
return __first2;
}
@@ -731,16 +772,18 @@ namespace std
*
* @p unary_op must not alter its argument.
*/
- template<typename _InputIter, typename _OutputIter, typename _UnaryOperation>
- _OutputIter
- transform(_InputIter __first, _InputIter __last,
- _OutputIter __result, _UnaryOperation __unary_op)
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _UnaryOperation>
+ _OutputIterator
+ transform(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _UnaryOperation __unary_op)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _UnaryOperation"
__typeof__(__unary_op(*__first))>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first);
@@ -764,19 +807,20 @@ namespace std
*
* @p binary_op must not alter either of its arguments.
*/
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _BinaryOperation>
- _OutputIter
- transform(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _OutputIter __result,
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _BinaryOperation>
+ _OutputIterator
+ transform(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _OutputIterator __result,
_BinaryOperation __binary_op)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _BinaryOperation"
__typeof__(__binary_op(*__first1,*__first2))>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);
@@ -795,17 +839,19 @@ namespace std
* For each iterator @c i in the range @p [first,last) if @c *i ==
* @p old_value then the assignment @c *i = @p new_value is performed.
*/
- template<typename _ForwardIter, typename _Tp>
+ template<typename _ForwardIterator, typename _Tp>
void
- replace(_ForwardIter __first, _ForwardIter __last,
+ replace(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __old_value, const _Tp& __new_value)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIter>::value_type, _Tp>)
- __glibcpp_function_requires(_ConvertibleConcept<_Tp,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
if (*__first == __old_value)
@@ -824,17 +870,19 @@ namespace std
* For each iterator @c i in the range @p [first,last) if @p pred(*i)
* is true then the assignment @c *i = @p new_value is performed.
*/
- template<typename _ForwardIter, typename _Predicate, typename _Tp>
+ template<typename _ForwardIterator, typename _Predicate, typename _Tp>
void
- replace_if(_ForwardIter __first, _ForwardIter __last,
+ replace_if(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred, const _Tp& __new_value)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_ConvertibleConcept<_Tp,
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
if (__pred(*__first))
@@ -855,18 +903,19 @@ namespace std
* output range @p [result,result+(last-first)) replacing elements
* equal to @p old_value with @p new_value.
*/
- template<typename _InputIter, typename _OutputIter, typename _Tp>
- _OutputIter
- replace_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result,
+ template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+ _OutputIterator
+ replace_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
const _Tp& __old_value, const _Tp& __new_value)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter>::value_type, _Tp>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first, ++__result)
*__result = *__first == __old_value ? __new_value : *__first;
@@ -887,19 +936,20 @@ namespace std
* @p [result,result+(last-first)) replacing elements for which
* @p pred returns true with @p new_value.
*/
- template<typename _InputIter, typename _OutputIter, typename _Predicate,
- typename _Tp>
- _OutputIter
- replace_copy_if(_InputIter __first, _InputIter __last,
- _OutputIter __result,
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate, typename _Tp>
+ _OutputIterator
+ replace_copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
_Predicate __pred, const _Tp& __new_value)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first, ++__result)
*__result = __pred(*__first) ? __new_value : *__first;
@@ -917,14 +967,16 @@ namespace std
* Performs the assignment @c *i = @p gen() for each @c i in the range
* @p [first,last).
*/
- template<typename _ForwardIter, typename _Generator>
+ template<typename _ForwardIterator, typename _Generator>
void
- generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen)
+ generate(_ForwardIterator __first, _ForwardIterator __last,
+ _Generator __gen)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_GeneratorConcept<_Generator,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_GeneratorConcept<_Generator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
*__first = __gen();
@@ -941,14 +993,14 @@ namespace std
* Performs the assignment @c *i = @p gen() for each @c i in the range
* @p [first,first+n).
*/
- template<typename _OutputIter, typename _Size, typename _Generator>
- _OutputIter
- generate_n(_OutputIter __first, _Size __n, _Generator __gen)
+ template<typename _OutputIterator, typename _Size, typename _Generator>
+ _OutputIterator
+ generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
{
// concept requirements
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _Generator"
- __typeof__(gen())>)
+ __typeof__(__gen())>)
for ( ; __n > 0; --__n, ++__first)
*__first = __gen();
@@ -968,23 +1020,25 @@ namespace std
* remove_copy() is stable, so the relative order of elements that are
* copied is unchanged.
*/
- template<typename _InputIter, typename _OutputIter, typename _Tp>
- _OutputIter
- remove_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result, const _Tp& __value)
+ template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+ _OutputIterator
+ remove_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, const _Tp& __value)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter>::value_type, _Tp>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
- if (!(*__first == __value)) {
- *__result = *__first;
- ++__result;
- }
+ if (!(*__first == __value))
+ {
+ *__result = *__first;
+ ++__result;
+ }
return __result;
}
@@ -1002,23 +1056,26 @@ namespace std
* remove_copy_if() is stable, so the relative order of elements that are
* copied is unchanged.
*/
- template<typename _InputIter, typename _OutputIter, typename _Predicate>
- _OutputIter
- remove_copy_if(_InputIter __first, _InputIter __last,
- _OutputIter __result, _Predicate __pred)
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate>
+ _OutputIterator
+ remove_copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
- if (!__pred(*__first)) {
- *__result = *__first;
- ++__result;
- }
+ if (!__pred(*__first))
+ {
+ *__result = *__first;
+ ++__result;
+ }
return __result;
}
@@ -1038,22 +1095,25 @@ namespace std
* Elements between the end of the resulting sequence and @p last
* are still present, but their value is unspecified.
*/
- template<typename _ForwardIter, typename _Tp>
- _ForwardIter
- remove(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ remove(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_ConvertibleConcept<_Tp,
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIter>::value_type, _Tp>)
-
- __first = find(__first, __last, __value);
- _ForwardIter __i = __first;
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ __first = std::find(__first, __last, __value);
+ _ForwardIterator __i = __first;
return __first == __last ? __first
- : remove_copy(++__i, __last, __first, __value);
+ : std::remove_copy(++__i, __last,
+ __first, __value);
}
/**
@@ -1072,55 +1132,61 @@ namespace std
* Elements between the end of the resulting sequence and @p last
* are still present, but their value is unspecified.
*/
- template<typename _ForwardIter, typename _Predicate>
- _ForwardIter
- remove_if(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ remove_if(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIter>::value_type>)
-
- __first = find_if(__first, __last, __pred);
- _ForwardIter __i = __first;
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ __first = std::find_if(__first, __last, __pred);
+ _ForwardIterator __i = __first;
return __first == __last ? __first
- : remove_copy_if(++__i, __last, __first, __pred);
+ : std::remove_copy_if(++__i, __last,
+ __first, __pred);
}
/**
* @if maint
- * This is an uglified unique_copy(_InputIter, _InputIter, _OutputIter)
+ * This is an uglified unique_copy(_InputIterator, _InputIterator,
+ * _OutputIterator)
* overloaded for output iterators.
* @endif
*/
- template<typename _InputIter, typename _OutputIter>
- _OutputIter
- __unique_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result,
+ template<typename _InputIterator, typename _OutputIterator>
+ _OutputIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
output_iterator_tag)
{
// concept requirements -- taken care of in dispatching function
- typename iterator_traits<_InputIter>::value_type __value = *__first;
+ typename iterator_traits<_InputIterator>::value_type __value = *__first;
*__result = __value;
while (++__first != __last)
- if (!(__value == *__first)) {
- __value = *__first;
- *++__result = __value;
- }
+ if (!(__value == *__first))
+ {
+ __value = *__first;
+ *++__result = __value;
+ }
return ++__result;
}
/**
* @if maint
- * This is an uglified unique_copy(_InputIter, _InputIter, _OutputIter)
+ * This is an uglified unique_copy(_InputIterator, _InputIterator,
+ * _OutputIterator)
* overloaded for forward iterators.
* @endif
*/
- template<typename _InputIter, typename _ForwardIter>
- _ForwardIter
- __unique_copy(_InputIter __first, _InputIter __last,
- _ForwardIter __result,
+ template<typename _InputIterator, typename _ForwardIterator>
+ _ForwardIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result,
forward_iterator_tag)
{
// concept requirements -- taken care of in dispatching function
@@ -1132,83 +1198,57 @@ namespace std
}
/**
- * @brief Copy a sequence, removing consecutive duplicate values.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @return An iterator designating the end of the resulting sequence.
- *
- * Copies each element in the range @p [first,last) to the range
- * beginning at @p result, except that only the first element is copied
- * from groups of consecutive elements that compare equal.
- * unique_copy() is stable, so the relative order of elements that are
- * copied is unchanged.
- */
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- unique_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result)
- {
- // concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIter>::value_type>)
-
- typedef typename iterator_traits<_OutputIter>::iterator_category _IterType;
-
- if (__first == __last) return __result;
- return __unique_copy(__first, __last, __result, _IterType());
- }
-
- /**
* @if maint
* This is an uglified
- * unique_copy(_InputIter, _InputIter, _OutputIter, _BinaryPredicate)
+ * unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ * _BinaryPredicate)
* overloaded for output iterators.
* @endif
*/
- template<typename _InputIter, typename _OutputIter, typename _BinaryPredicate>
- _OutputIter
- __unique_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result,
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ _OutputIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
_BinaryPredicate __binary_pred,
output_iterator_tag)
{
// concept requirements -- iterators already checked
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_InputIter>::value_type,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_InputIterator>::value_type>)
- typename iterator_traits<_InputIter>::value_type __value = *__first;
+ typename iterator_traits<_InputIterator>::value_type __value = *__first;
*__result = __value;
while (++__first != __last)
- if (!__binary_pred(__value, *__first)) {
- __value = *__first;
- *++__result = __value;
- }
+ if (!__binary_pred(__value, *__first))
+ {
+ __value = *__first;
+ *++__result = __value;
+ }
return ++__result;
}
/**
* @if maint
* This is an uglified
- * unique_copy(_InputIter, _InputIter, _OutputIter, _BinaryPredicate)
+ * unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ * _BinaryPredicate)
* overloaded for forward iterators.
* @endif
*/
- template<typename _InputIter, typename _ForwardIter, typename _BinaryPredicate>
- _ForwardIter
- __unique_copy(_InputIter __first, _InputIter __last,
- _ForwardIter __result,
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result,
_BinaryPredicate __binary_pred,
forward_iterator_tag)
{
// concept requirements -- iterators already checked
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_InputIterator>::value_type>)
*__result = *__first;
while (++__first != __last)
@@ -1217,6 +1257,39 @@ namespace std
}
/**
+ * @brief Copy a sequence, removing consecutive duplicate values.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * beginning at @p result, except that only the first element is copied
+ * from groups of consecutive elements that compare equal.
+ * unique_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ typedef typename iterator_traits<_OutputIterator>::iterator_category
+ _IterType;
+
+ if (__first == __last) return __result;
+ return std::__unique_copy(__first, __last, __result, _IterType());
+ }
+
+ /**
* @brief Copy a sequence, removing consecutive values using a predicate.
* @param first An input iterator.
* @param last An input iterator.
@@ -1231,22 +1304,25 @@ namespace std
* unique_copy() is stable, so the relative order of elements that are
* copied is unchanged.
*/
- template<typename _InputIter, typename _OutputIter, typename _BinaryPredicate>
- inline _OutputIter
- unique_copy(_InputIter __first, _InputIter __last,
- _OutputIter __result,
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
_BinaryPredicate __binary_pred)
{
// concept requirements -- predicates checked later
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- typedef typename iterator_traits<_OutputIter>::iterator_category _IterType;
+ typedef typename iterator_traits<_OutputIterator>::iterator_category
+ _IterType;
if (__first == __last) return __result;
- return __unique_copy(__first, __last,
-__result, __binary_pred, _IterType());
+ return std::__unique_copy(__first, __last, __result,
+ __binary_pred, _IterType());
}
/**
@@ -1262,17 +1338,29 @@ __result, __binary_pred, _IterType());
* Elements between the end of the resulting sequence and @p last
* are still present, but their value is unspecified.
*/
- template<typename _ForwardIter>
- _ForwardIter
- unique(_ForwardIter __first, _ForwardIter __last)
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ unique(_ForwardIterator __first, _ForwardIterator __last)
{
- // concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ // Skip the beginning, if already unique.
+ __first = std::adjacent_find(__first, __last);
+ if (__first == __last)
+ return __last;
- __first = adjacent_find(__first, __last);
- return unique_copy(__first, __last, __first);
+ // Do the real copy work.
+ _ForwardIterator __dest = __first;
+ ++__first;
+ while (++__first != __last)
+ if (!(*__dest == *__first))
+ *++__dest = *__first;
+ return ++__dest;
}
/**
@@ -1289,52 +1377,66 @@ __result, __binary_pred, _IterType());
* Elements between the end of the resulting sequence and @p last
* are still present, but their value is unspecified.
*/
- template<typename _ForwardIter, typename _BinaryPredicate>
- _ForwardIter
- unique(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ unique(_ForwardIterator __first, _ForwardIterator __last,
_BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ // Skip the beginning, if already unique.
+ __first = std::adjacent_find(__first, __last, __binary_pred);
+ if (__first == __last)
+ return __last;
- __first = adjacent_find(__first, __last, __binary_pred);
- return unique_copy(__first, __last, __first, __binary_pred);
+ // Do the real copy work.
+ _ForwardIterator __dest = __first;
+ ++__first;
+ while (++__first != __last)
+ if (!__binary_pred(*__dest, *__first))
+ *++__dest = *__first;
+ return ++__dest;
}
/**
* @if maint
- * This is an uglified reverse(_BidirectionalIter, _BidirectionalIter)
+ * This is an uglified reverse(_BidirectionalIterator,
+ * _BidirectionalIterator)
* overloaded for bidirectional iterators.
* @endif
*/
- template<typename _BidirectionalIter>
+ template<typename _BidirectionalIterator>
void
- __reverse(_BidirectionalIter __first, _BidirectionalIter __last,
+ __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
bidirectional_iterator_tag)
{
- while (true)
- if (__first == __last || __first == --__last)
- return;
- else
- iter_swap(__first++, __last);
+ while (true)
+ if (__first == __last || __first == --__last)
+ return;
+ else
+ std::iter_swap(__first++, __last);
}
/**
* @if maint
- * This is an uglified reverse(_BidirectionalIter, _BidirectionalIter)
+ * This is an uglified reverse(_BidirectionalIterator,
+ * _BidirectionalIterator)
* overloaded for bidirectional iterators.
* @endif
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
void
- __reverse(_RandomAccessIter __first, _RandomAccessIter __last,
+ __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
- while (__first < __last)
- iter_swap(__first++, --__last);
+ while (__first < __last)
+ std::iter_swap(__first++, --__last);
}
/**
@@ -1348,14 +1450,15 @@ __result, __binary_pred, _IterType());
* For every @c i such that @p 0<=i<=(last-first)/2), @p reverse()
* swaps @p *(first+i) and @p *(last-(i+1))
*/
- template<typename _BidirectionalIter>
+ template<typename _BidirectionalIterator>
inline void
- reverse(_BidirectionalIter __first, _BidirectionalIter __last)
+ reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
- // concept requirements
- __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
- _BidirectionalIter>)
- __reverse(__first, __last, __iterator_category(__first));
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ std::__reverse(__first, __last, std::__iterator_category(__first));
}
/**
@@ -1373,21 +1476,24 @@ __result, __binary_pred, _IterType());
* The ranges @p [first,last) and @p [result,result+(last-first))
* must not overlap.
*/
- template<typename _BidirectionalIter, typename _OutputIter>
- _OutputIter
- reverse_copy(_BidirectionalIter __first, _BidirectionalIter __last,
- _OutputIter __result)
+ template<typename _BidirectionalIterator, typename _OutputIterator>
+ _OutputIterator
+ reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_BidirectionalIter>::value_type>)
-
- while (__first != __last) {
- --__last;
- *__result = *__last;
- ++__result;
- }
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ while (__first != __last)
+ {
+ --__last;
+ *__result = *__last;
+ ++__result;
+ }
return __result;
}
@@ -1402,11 +1508,12 @@ __result, __binary_pred, _IterType());
_EuclideanRingElement
__gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
{
- while (__n != 0) {
- _EuclideanRingElement __t = __m % __n;
- __m = __n;
- __n = __t;
- }
+ while (__n != 0)
+ {
+ _EuclideanRingElement __t = __m % __n;
+ __m = __n;
+ __n = __t;
+ }
return __m;
}
@@ -1415,32 +1522,35 @@ __result, __binary_pred, _IterType());
* This is a helper function for the rotate algorithm.
* @endif
*/
- template<typename _ForwardIter>
+ template<typename _ForwardIterator>
void
- __rotate(_ForwardIter __first,
- _ForwardIter __middle,
- _ForwardIter __last,
+ __rotate(_ForwardIterator __first,
+ _ForwardIterator __middle,
+ _ForwardIterator __last,
forward_iterator_tag)
{
if ((__first == __middle) || (__last == __middle))
return;
- _ForwardIter __first2 = __middle;
- do {
- swap(*__first++, *__first2++);
- if (__first == __middle)
- __middle = __first2;
- } while (__first2 != __last);
+ _ForwardIterator __first2 = __middle;
+ do
+ {
+ swap(*__first++, *__first2++);
+ if (__first == __middle)
+ __middle = __first2;
+ }
+ while (__first2 != __last);
__first2 = __middle;
- while (__first2 != __last) {
- swap(*__first++, *__first2++);
- if (__first == __middle)
- __middle = __first2;
- else if (__first2 == __last)
- __first2 = __middle;
- }
+ while (__first2 != __last)
+ {
+ swap(*__first++, *__first2++);
+ if (__first == __middle)
+ __middle = __first2;
+ else if (__first2 == __last)
+ __first2 = __middle;
+ }
}
/**
@@ -1448,32 +1558,30 @@ __result, __binary_pred, _IterType());
* This is a helper function for the rotate algorithm.
* @endif
*/
- template<typename _BidirectionalIter>
+ template<typename _BidirectionalIterator>
void
- __rotate(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
+ __rotate(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
bidirectional_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
- _BidirectionalIter>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
if ((__first == __middle) || (__last == __middle))
return;
- __reverse(__first, __middle, bidirectional_iterator_tag());
- __reverse(__middle, __last, bidirectional_iterator_tag());
+ std::__reverse(__first, __middle, bidirectional_iterator_tag());
+ std::__reverse(__middle, __last, bidirectional_iterator_tag());
while (__first != __middle && __middle != __last)
- swap (*__first++, *--__last);
+ swap(*__first++, *--__last);
- if (__first == __middle) {
- __reverse(__middle, __last, bidirectional_iterator_tag());
- }
- else {
- __reverse(__first, __middle, bidirectional_iterator_tag());
- }
+ if (__first == __middle)
+ std::__reverse(__middle, __last, bidirectional_iterator_tag());
+ else
+ std::__reverse(__first, __middle, bidirectional_iterator_tag());
}
/**
@@ -1481,65 +1589,73 @@ __result, __binary_pred, _IterType());
* This is a helper function for the rotate algorithm.
* @endif
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
void
- __rotate(_RandomAccessIter __first,
- _RandomAccessIter __middle,
- _RandomAccessIter __last,
+ __rotate(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
random_access_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
if ((__first == __middle) || (__last == __middle))
return;
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
-
- _Distance __n = __last - __first;
- _Distance __k = __middle - __first;
- _Distance __l = __n - __k;
-
- if (__k == __l) {
- swap_ranges(__first, __middle, __middle);
- return;
- }
-
- _Distance __d = __gcd(__n, __k);
-
- for (_Distance __i = 0; __i < __d; __i++) {
- _ValueType __tmp = *__first;
- _RandomAccessIter __p = __first;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
- if (__k < __l) {
- for (_Distance __j = 0; __j < __l/__d; __j++) {
- if (__p > __first + __l) {
- *__p = *(__p - __l);
- __p -= __l;
- }
+ const _Distance __n = __last - __first;
+ const _Distance __k = __middle - __first;
+ const _Distance __l = __n - __k;
- *__p = *(__p + __k);
- __p += __k;
- }
+ if (__k == __l)
+ {
+ std::swap_ranges(__first, __middle, __middle);
+ return;
}
- else {
- for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
- if (__p < __last - __k) {
- *__p = *(__p + __k);
- __p += __k;
+ const _Distance __d = __gcd(__n, __k);
+
+ for (_Distance __i = 0; __i < __d; __i++)
+ {
+ const _ValueType __tmp = *__first;
+ _RandomAccessIterator __p = __first;
+
+ if (__k < __l)
+ {
+ for (_Distance __j = 0; __j < __l / __d; __j++)
+ {
+ if (__p > __first + __l)
+ {
+ *__p = *(__p - __l);
+ __p -= __l;
+ }
+
+ *__p = *(__p + __k);
+ __p += __k;
+ }
+ }
+ else
+ {
+ for (_Distance __j = 0; __j < __k / __d - 1; __j ++)
+ {
+ if (__p < __last - __k)
+ {
+ *__p = *(__p + __k);
+ __p += __k;
+ }
+ *__p = * (__p - __l);
+ __p -= __l;
+ }
}
- *__p = * (__p - __l);
- __p -= __l;
- }
+ *__p = __tmp;
+ ++__first;
}
-
- *__p = __tmp;
- ++__first;
- }
}
/**
@@ -1560,15 +1676,20 @@ __result, __binary_pred, _IterType());
* Performs @p *(first+(n+(last-middle))%(last-first))=*(first+n) for
* each @p n in the range @p [0,last-first).
*/
- template<typename _ForwardIter>
+ template<typename _ForwardIterator>
inline void
- rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last)
+ rotate(_ForwardIterator __first, _ForwardIterator __middle,
+ _ForwardIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
- typedef typename iterator_traits<_ForwardIter>::iterator_category _IterType;
- __rotate(__first, __middle, __last, _IterType());
+ typedef typename iterator_traits<_ForwardIterator>::iterator_category
+ _IterType;
+ std::__rotate(__first, __middle, __last, _IterType());
}
/**
@@ -1588,41 +1709,21 @@ __result, __binary_pred, _IterType());
* Performs @p *(result+(n+(last-middle))%(last-first))=*(first+n) for
* each @p n in the range @p [0,last-first).
*/
- template<typename _ForwardIter, typename _OutputIter>
- _OutputIter
- rotate_copy(_ForwardIter __first, _ForwardIter __middle,
- _ForwardIter __last, _OutputIter __result)
+ template<typename _ForwardIterator, typename _OutputIterator>
+ _OutputIterator
+ rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
+ _ForwardIterator __last, _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
- return copy(__first, __middle, copy(__middle, __last, __result));
+ return std::copy(__first, __middle, copy(__middle, __last, __result));
}
-
- /**
- * @if maint
- * Return a random number in the range [0, __n). This function encapsulates
- * whether we're using rand (part of the standard C library) or lrand48
- * (not standard, but a much better choice whenever it's available).
- *
- * XXX There is no corresponding encapsulation fn to seed the generator.
- * @endif
- */
- template<typename _Distance>
- inline _Distance
- __random_number(_Distance __n)
- {
- #ifdef _GLIBCPP_HAVE_DRAND48
- return lrand48() % __n;
- #else
- return rand() % __n;
- #endif
- }
-
-
/**
* @brief Randomly shuffle the elements of a sequence.
* @param first A forward iterator.
@@ -1633,17 +1734,18 @@ __result, __binary_pred, _IterType());
* distribution, so that every possible ordering of the sequence is
* equally likely.
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
inline void
- random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last)
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- iter_swap(__i, __first + __random_number((__i - __first) + 1));
+ if (__first != __last)
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
}
/**
@@ -1659,18 +1761,20 @@ __result, __binary_pred, _IterType());
* integer @p N should return a randomly chosen integer from the
* range [0,N).
*/
- template<typename _RandomAccessIter, typename _RandomNumberGenerator>
+ template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
void
- random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomNumberGenerator& __rand)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- iter_swap(__i, __first + __rand((__i - __first) + 1));
+ if (__first == __last)
+ return;
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + __rand((__i - __first) + 1));
}
@@ -1679,24 +1783,27 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _ForwardIter, typename _Predicate>
- _ForwardIter
- __partition(_ForwardIter __first, _ForwardIter __last,
- _Predicate __pred,
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ __partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred,
forward_iterator_tag)
{
- if (__first == __last) return __first;
+ if (__first == __last)
+ return __first;
while (__pred(*__first))
- if (++__first == __last) return __first;
+ if (++__first == __last)
+ return __first;
- _ForwardIter __next = __first;
+ _ForwardIterator __next = __first;
while (++__next != __last)
- if (__pred(*__next)) {
- swap(*__first, *__next);
- ++__first;
- }
+ if (__pred(*__next))
+ {
+ swap(*__first, *__next);
+ ++__first;
+ }
return __first;
}
@@ -1706,31 +1813,32 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _BidirectionalIter, typename _Predicate>
- _BidirectionalIter
- __partition(_BidirectionalIter __first, _BidirectionalIter __last,
+ template<typename _BidirectionalIterator, typename _Predicate>
+ _BidirectionalIterator
+ __partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
_Predicate __pred,
bidirectional_iterator_tag)
{
- while (true) {
- while (true)
- if (__first == __last)
- return __first;
- else if (__pred(*__first))
- ++__first;
- else
- break;
- --__last;
- while (true)
- if (__first == __last)
- return __first;
- else if (!__pred(*__last))
- --__last;
- else
- break;
- iter_swap(__first, __last);
- ++__first;
- }
+ while (true)
+ {
+ while (true)
+ if (__first == __last)
+ return __first;
+ else if (__pred(*__first))
+ ++__first;
+ else
+ break;
+ --__last;
+ while (true)
+ if (__first == __last)
+ return __first;
+ else if (!__pred(*__last))
+ --__last;
+ else
+ break;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
}
/**
@@ -1742,22 +1850,25 @@ __result, __binary_pred, _IterType());
* @return An iterator @p middle such that @p pred(i) is true for each
* iterator @p i in the range @p [first,middle) and false for each @p i
* in the range @p [middle,last).
- *
+ *
* @p pred must not modify its operand. @p partition() does not preserve
* the relative ordering of elements in each group, use
* @p stable_partition() if this is needed.
*/
- template<typename _ForwardIter, typename _Predicate>
- inline _ForwardIter
- partition(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Predicate>
+ inline _ForwardIterator
+ partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- return __partition(__first, __last, __pred, __iterator_category(__first));
+ return std::__partition(__first, __last, __pred,
+ std::__iterator_category(__first));
}
@@ -1766,23 +1877,26 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _ForwardIter, typename _Predicate, typename _Distance>
- _ForwardIter
- __inplace_stable_partition(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Predicate, typename _Distance>
+ _ForwardIterator
+ __inplace_stable_partition(_ForwardIterator __first,
+ _ForwardIterator __last,
_Predicate __pred, _Distance __len)
{
if (__len == 1)
return __pred(*__first) ? __last : __first;
- _ForwardIter __middle = __first;
- advance(__middle, __len / 2);
- _ForwardIter __begin = __inplace_stable_partition(__first, __middle,
- __pred,
- __len / 2);
- _ForwardIter __end = __inplace_stable_partition(__middle, __last,
- __pred,
- __len - __len / 2);
- rotate(__begin, __middle, __end);
- advance(__begin, distance(__middle, __end));
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin = std::__inplace_stable_partition(__first,
+ __middle,
+ __pred,
+ __len / 2);
+ _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
+ __pred,
+ __len
+ - __len / 2);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
return __begin;
}
@@ -1791,44 +1905,49 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _ForwardIter, typename _Pointer, typename _Predicate,
+ template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
typename _Distance>
- _ForwardIter
- __stable_partition_adaptive(_ForwardIter __first, _ForwardIter __last,
+ _ForwardIterator
+ __stable_partition_adaptive(_ForwardIterator __first,
+ _ForwardIterator __last,
_Predicate __pred, _Distance __len,
_Pointer __buffer,
_Distance __buffer_size)
{
- if (__len <= __buffer_size) {
- _ForwardIter __result1 = __first;
- _Pointer __result2 = __buffer;
- for ( ; __first != __last ; ++__first)
- if (__pred(*__first)) {
- *__result1 = *__first;
- ++__result1;
- }
- else {
- *__result2 = *__first;
- ++__result2;
- }
- copy(__buffer, __result2, __result1);
- return __result1;
- }
- else {
- _ForwardIter __middle = __first;
- advance(__middle, __len / 2);
- _ForwardIter __begin = __stable_partition_adaptive(__first, __middle,
- __pred,
- __len / 2,
- __buffer, __buffer_size);
- _ForwardIter __end = __stable_partition_adaptive( __middle, __last,
- __pred,
- __len - __len / 2,
- __buffer, __buffer_size);
- rotate(__begin, __middle, __end);
- advance(__begin, distance(__middle, __end));
- return __begin;
- }
+ if (__len <= __buffer_size)
+ {
+ _ForwardIterator __result1 = __first;
+ _Pointer __result2 = __buffer;
+ for ( ; __first != __last ; ++__first)
+ if (__pred(*__first))
+ {
+ *__result1 = *__first;
+ ++__result1;
+ }
+ else
+ {
+ *__result2 = *__first;
+ ++__result2;
+ }
+ std::copy(__buffer, __result2, __result1);
+ return __result1;
+ }
+ else
+ {
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin =
+ std::__stable_partition_adaptive(__first, __middle, __pred,
+ __len / 2, __buffer,
+ __buffer_size);
+ _ForwardIterator __end =
+ std::__stable_partition_adaptive(__middle, __last, __pred,
+ __len - __len / 2,
+ __buffer, __buffer_size);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
+ return __begin;
+ }
}
/**
@@ -1840,39 +1959,46 @@ __result, __binary_pred, _IterType());
* @return An iterator @p middle such that @p pred(i) is true for each
* iterator @p i in the range @p [first,middle) and false for each @p i
* in the range @p [middle,last).
- *
+ *
* Performs the same function as @p partition() with the additional
* guarantee that the relative ordering of elements in each group is
* preserved, so any two elements @p x and @p y in the range
* @p [first,last) such that @p pred(x)==pred(y) will have the same
* relative ordering after calling @p stable_partition().
*/
- template<typename _ForwardIter, typename _Predicate>
- _ForwardIter
- stable_partition(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ stable_partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return __first;
else
- {
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
-
- _Temporary_buffer<_ForwardIter, _ValueType> __buf(__first, __last);
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
+ __last);
if (__buf.size() > 0)
- return __stable_partition_adaptive(__first, __last, __pred,
- _DistanceType(__buf.requested_size()),
- __buf.begin(), __buf.size());
+ return
+ std::__stable_partition_adaptive(__first, __last, __pred,
+ _DistanceType(__buf.requested_size()),
+ __buf.begin(), __buf.size());
else
- return __inplace_stable_partition(__first, __last, __pred,
- _DistanceType(__buf.requested_size()));
- }
+ return
+ std::__inplace_stable_partition(__first, __last, __pred,
+ _DistanceType(__buf.requested_size()));
+ }
}
/**
@@ -1880,22 +2006,23 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _RandomAccessIter, typename _Tp>
- _RandomAccessIter
- __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last,
- _Tp __pivot)
- {
- while (true) {
- while (*__first < __pivot)
- ++__first;
- --__last;
- while (__pivot < *__last)
+ template<typename _RandomAccessIterator, typename _Tp>
+ _RandomAccessIterator
+ __unguarded_partition(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Tp __pivot)
+ {
+ while (true)
+ {
+ while (*__first < __pivot)
+ ++__first;
--__last;
- if (!(__first < __last))
- return __first;
- iter_swap(__first, __last);
- ++__first;
- }
+ while (__pivot < *__last)
+ --__last;
+ if (!(__first < __last))
+ return __first;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
}
/**
@@ -1903,49 +2030,51 @@ __result, __binary_pred, _IterType());
* This is a helper function...
* @endif
*/
- template<typename _RandomAccessIter, typename _Tp, typename _Compare>
- _RandomAccessIter
- __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last,
+ template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
+ _RandomAccessIterator
+ __unguarded_partition(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
_Tp __pivot, _Compare __comp)
{
- while (true) {
- while (__comp(*__first, __pivot))
- ++__first;
- --__last;
- while (__comp(__pivot, *__last))
+ while (true)
+ {
+ while (__comp(*__first, __pivot))
+ ++__first;
--__last;
- if (!(__first < __last))
- return __first;
- iter_swap(__first, __last);
- ++__first;
- }
+ while (__comp(__pivot, *__last))
+ --__last;
+ if (!(__first < __last))
+ return __first;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
}
-
/**
* @if maint
* @doctodo
* This controls some aspect of the sort routines.
* @endif
*/
- enum { _M_threshold = 16 };
+ enum { _S_threshold = 16 };
/**
* @if maint
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter, typename _Tp>
+ template<typename _RandomAccessIterator, typename _Tp>
void
- __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val)
+ __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val)
{
- _RandomAccessIter __next = __last;
+ _RandomAccessIterator __next = __last;
--__next;
- while (__val < *__next) {
- *__last = *__next;
- __last = __next;
- --__next;
- }
+ while (__val < *__next)
+ {
+ *__last = *__next;
+ __last = __next;
+ --__next;
+ }
*__last = __val;
}
@@ -1954,17 +2083,19 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter, typename _Tp, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
void
- __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, _Compare __comp)
+ __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val,
+ _Compare __comp)
{
- _RandomAccessIter __next = __last;
+ _RandomAccessIterator __next = __last;
--__next;
- while (__comp(__val, *__next)) {
- *__last = *__next;
- __last = __next;
- --__next;
- }
+ while (__comp(__val, *__next))
+ {
+ *__last = *__next;
+ __last = __next;
+ --__next;
+ }
*__last = __val;
}
@@ -1973,22 +2104,26 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
void
- __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+ __insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
{
- if (__first == __last) return;
+ if (__first == __last)
+ return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- {
- typename iterator_traits<_RandomAccessIter>::value_type __val = *__i;
- if (__val < *__first) {
- copy_backward(__first, __i, __i + 1);
- *__first = __val;
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ {
+ typename iterator_traits<_RandomAccessIterator>::value_type
+ __val = *__i;
+ if (__val < *__first)
+ {
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = __val;
+ }
+ else
+ std::__unguarded_linear_insert(__i, __val);
}
- else
- __unguarded_linear_insert(__i, __val);
- }
}
/**
@@ -1996,23 +2131,25 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Compare>
void
- __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Compare __comp)
+ __insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
{
if (__first == __last) return;
- for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
- {
- typename iterator_traits<_RandomAccessIter>::value_type __val = *__i;
- if (__comp(__val, *__first)) {
- copy_backward(__first, __i, __i + 1);
- *__first = __val;
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ {
+ typename iterator_traits<_RandomAccessIterator>::value_type
+ __val = *__i;
+ if (__comp(__val, *__first))
+ {
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = __val;
+ }
+ else
+ std::__unguarded_linear_insert(__i, __val, __comp);
}
- else
- __unguarded_linear_insert(__i, __val, __comp);
- }
}
/**
@@ -2020,14 +2157,16 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
inline void
- __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+ __unguarded_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
- for (_RandomAccessIter __i = __first; __i != __last; ++__i)
- __unguarded_linear_insert(__i, _ValueType(*__i));
+ for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+ std::__unguarded_linear_insert(__i, _ValueType(*__i));
}
/**
@@ -2035,15 +2174,16 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Compare>
inline void
- __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Compare __comp)
+ __unguarded_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
- for (_RandomAccessIter __i = __first; __i != __last; ++__i)
- __unguarded_linear_insert(__i, _ValueType(*__i), __comp);
+ for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+ std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp);
}
/**
@@ -2051,16 +2191,18 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
void
- __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+ __final_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
{
- if (__last - __first > _M_threshold) {
- __insertion_sort(__first, __first + _M_threshold);
- __unguarded_insertion_sort(__first + _M_threshold, __last);
- }
+ if (__last - __first > _S_threshold)
+ {
+ std::__insertion_sort(__first, __first + _S_threshold);
+ std::__unguarded_insertion_sort(__first + _S_threshold, __last);
+ }
else
- __insertion_sort(__first, __last);
+ std::__insertion_sort(__first, __last);
}
/**
@@ -2068,17 +2210,19 @@ __result, __binary_pred, _IterType());
* This is a helper function for the sort routine.
* @endif
*/
- template<typename _RandomAccessIter, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Compare>
void
- __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Compare __comp)
- {
- if (__last - __first > _M_threshold) {
- __insertion_sort(__first, __first + _M_threshold, __comp);
- __unguarded_insertion_sort(__first + _M_threshold, __last, __comp);
- }
+ __final_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ if (__last - __first > _S_threshold)
+ {
+ std::__insertion_sort(__first, __first + _S_threshold, __comp);
+ std::__unguarded_insertion_sort(__first + _S_threshold, __last,
+ __comp);
+ }
else
- __insertion_sort(__first, __last, __comp);
+ std::__insertion_sort(__first, __last, __comp);
}
/**
@@ -2091,402 +2235,12 @@ __result, __binary_pred, _IterType());
__lg(_Size __n)
{
_Size __k;
- for (__k = 0; __n != 1; __n >>= 1) ++__k;
+ for (__k = 0; __n != 1; __n >>= 1)
+ ++__k;
return __k;
}
/**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
- template<typename _RandomAccessIter, typename _Size>
- void
- __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last,
- _Size __depth_limit)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
-
- while (__last - __first > _M_threshold) {
- if (__depth_limit == 0) {
- partial_sort(__first, __last, __last);
- return;
- }
- --__depth_limit;
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _ValueType(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1))));
- __introsort_loop(__cut, __last, __depth_limit);
- __last = __cut;
- }
- }
-
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
- template<typename _RandomAccessIter, typename _Size, typename _Compare>
- void
- __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last,
- _Size __depth_limit, _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
-
- while (__last - __first > _M_threshold) {
- if (__depth_limit == 0) {
- partial_sort(__first, __last, __last, __comp);
- return;
- }
- --__depth_limit;
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _ValueType(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1), __comp)),
- __comp);
- __introsort_loop(__cut, __last, __depth_limit, __comp);
- __last = __cut;
- }
- }
-
- /**
- * @brief Sort the elements of a sequence.
- * @param first An iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p *(i+1)<*i is false for each iterator @p i in the range
- * @p [first,last-1).
- *
- * The relative ordering of equivalent elements is not preserved, use
- * @p stable_sort() if this is needed.
- */
- template<typename _RandomAccessIter>
- inline void
- sort(_RandomAccessIter __first, _RandomAccessIter __last)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
-
- // concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
-
- if (__first != __last) {
- __introsort_loop(__first, __last, __lg(__last - __first) * 2);
- __final_insertion_sort(__first, __last);
- }
- }
-
- /**
- * @brief Sort the elements of a sequence using a predicate for comparison.
- * @param first An iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p comp(*(i+1),*i) is false for every iterator @p i in the
- * range @p [first,last-1).
- *
- * The relative ordering of equivalent elements is not preserved, use
- * @p stable_sort() if this is needed.
- */
- template<typename _RandomAccessIter, typename _Compare>
- inline void
- sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
-
- // concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _ValueType>)
-
- if (__first != __last) {
- __introsort_loop(__first, __last, __lg(__last - __first) * 2, __comp);
- __final_insertion_sort(__first, __last, __comp);
- }
- }
-
-
- /**
- * @if maint
- * This is a helper function for the stable sorting routines.
- * @endif
- */
- template<typename _RandomAccessIter>
- void
- __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last)
- {
- if (__last - __first < 15) {
- __insertion_sort(__first, __last);
- return;
- }
- _RandomAccessIter __middle = __first + (__last - __first) / 2;
- __inplace_stable_sort(__first, __middle);
- __inplace_stable_sort(__middle, __last);
- __merge_without_buffer(__first, __middle, __last,
- __middle - __first,
- __last - __middle);
- }
-
- /**
- * @if maint
- * This is a helper function for the stable sorting routines.
- * @endif
- */
- template<typename _RandomAccessIter, typename _Compare>
- void
- __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Compare __comp)
- {
- if (__last - __first < 15) {
- __insertion_sort(__first, __last, __comp);
- return;
- }
- _RandomAccessIter __middle = __first + (__last - __first) / 2;
- __inplace_stable_sort(__first, __middle, __comp);
- __inplace_stable_sort(__middle, __last, __comp);
- __merge_without_buffer(__first, __middle, __last,
- __middle - __first,
- __last - __middle,
- __comp);
- }
-
- template<typename _RandomAccessIter1, typename _RandomAccessIter2,
- typename _Distance>
- void
- __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last,
- _RandomAccessIter2 __result, _Distance __step_size)
- {
- _Distance __two_step = 2 * __step_size;
-
- while (__last - __first >= __two_step) {
- __result = merge(__first, __first + __step_size,
- __first + __step_size, __first + __two_step,
- __result);
- __first += __two_step;
- }
-
- __step_size = min(_Distance(__last - __first), __step_size);
- merge(__first, __first + __step_size, __first + __step_size, __last,
- __result);
- }
-
- template<typename _RandomAccessIter1, typename _RandomAccessIter2,
- typename _Distance, typename _Compare>
- void
- __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last,
- _RandomAccessIter2 __result, _Distance __step_size,
- _Compare __comp)
- {
- _Distance __two_step = 2 * __step_size;
-
- while (__last - __first >= __two_step) {
- __result = merge(__first, __first + __step_size,
- __first + __step_size, __first + __two_step,
- __result,
- __comp);
- __first += __two_step;
- }
- __step_size = min(_Distance(__last - __first), __step_size);
-
- merge(__first, __first + __step_size,
- __first + __step_size, __last,
- __result,
- __comp);
- }
-
- enum { _M_chunk_size = 7 };
-
- template<typename _RandomAccessIter, typename _Distance>
- void
- __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Distance __chunk_size)
- {
- while (__last - __first >= __chunk_size) {
- __insertion_sort(__first, __first + __chunk_size);
- __first += __chunk_size;
- }
- __insertion_sort(__first, __last);
- }
-
- template<typename _RandomAccessIter, typename _Distance, typename _Compare>
- void
- __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
- _Distance __chunk_size, _Compare __comp)
- {
- while (__last - __first >= __chunk_size) {
- __insertion_sort(__first, __first + __chunk_size, __comp);
- __first += __chunk_size;
- }
- __insertion_sort(__first, __last, __comp);
- }
-
- template<typename _RandomAccessIter, typename _Pointer>
- void
- __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last,
- _Pointer __buffer)
- {
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
-
- _Distance __len = __last - __first;
- _Pointer __buffer_last = __buffer + __len;
-
- _Distance __step_size = _M_chunk_size;
- __chunk_insertion_sort(__first, __last, __step_size);
-
- while (__step_size < __len) {
- __merge_sort_loop(__first, __last, __buffer, __step_size);
- __step_size *= 2;
- __merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
- __step_size *= 2;
- }
- }
-
- template<typename _RandomAccessIter, typename _Pointer, typename _Compare>
- void
- __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last,
- _Pointer __buffer, _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
-
- _Distance __len = __last - __first;
- _Pointer __buffer_last = __buffer + __len;
-
- _Distance __step_size = _M_chunk_size;
- __chunk_insertion_sort(__first, __last, __step_size, __comp);
-
- while (__step_size < __len) {
- __merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
- __step_size *= 2;
- __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
- __step_size *= 2;
- }
- }
-
- template<typename _RandomAccessIter, typename _Pointer, typename _Distance>
- void
- __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last,
- _Pointer __buffer, _Distance __buffer_size)
- {
- _Distance __len = (__last - __first + 1) / 2;
- _RandomAccessIter __middle = __first + __len;
- if (__len > __buffer_size) {
- __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size);
- __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size);
- }
- else {
- __merge_sort_with_buffer(__first, __middle, __buffer);
- __merge_sort_with_buffer(__middle, __last, __buffer);
- }
- __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
- _Distance(__last - __middle), __buffer, __buffer_size);
- }
-
- template<typename _RandomAccessIter, typename _Pointer, typename _Distance,
- typename _Compare>
- void
- __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last,
- _Pointer __buffer, _Distance __buffer_size,
- _Compare __comp)
- {
- _Distance __len = (__last - __first + 1) / 2;
- _RandomAccessIter __middle = __first + __len;
- if (__len > __buffer_size) {
- __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size,
- __comp);
- __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size,
- __comp);
- }
- else {
- __merge_sort_with_buffer(__first, __middle, __buffer, __comp);
- __merge_sort_with_buffer(__middle, __last, __buffer, __comp);
- }
- __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
- _Distance(__last - __middle), __buffer, __buffer_size,
- __comp);
- }
-
- /**
- * @brief Sort the elements of a sequence, preserving the relative order
- * of equivalent elements.
- * @param first An iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p *(i+1)<*i is false for each iterator @p i in the range
- * @p [first,last-1).
- *
- * The relative ordering of equivalent elements is preserved, so any two
- * elements @p x and @p y in the range @p [first,last) such that
- * @p x<y is false and @p y<x is false will have the same relative
- * ordering after calling @p stable_sort().
- */
- template<typename _RandomAccessIter>
- inline void
- stable_sort(_RandomAccessIter __first, _RandomAccessIter __last)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
-
- // concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
-
- _Temporary_buffer<_RandomAccessIter, _ValueType> buf(__first, __last);
- if (buf.begin() == 0)
- __inplace_stable_sort(__first, __last);
- else
- __stable_sort_adaptive(__first, __last, buf.begin(), _DistanceType(buf.size()));
- }
-
- /**
- * @brief Sort the elements of a sequence using a predicate for comparison,
- * preserving the relative order of equivalent elements.
- * @param first An iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p comp(*(i+1),*i) is false for each iterator @p i in the
- * range @p [first,last-1).
- *
- * The relative ordering of equivalent elements is preserved, so any two
- * elements @p x and @p y in the range @p [first,last) such that
- * @p comp(x,y) is false and @p comp(y,x) is false will have the same
- * relative ordering after calling @p stable_sort().
- */
- template<typename _RandomAccessIter, typename _Compare>
- inline void
- stable_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
-
- // concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType, _ValueType>)
-
- _Temporary_buffer<_RandomAccessIter, _ValueType> buf(__first, __last);
- if (buf.begin() == 0)
- __inplace_stable_sort(__first, __last, __comp);
- else
- __stable_sort_adaptive(__first, __last, buf.begin(), _DistanceType(buf.size()),
- __comp);
- }
-
- /**
* @brief Sort the smallest elements of a sequence.
* @param first An iterator.
* @param middle Another iterator.
@@ -2501,24 +2255,27 @@ __result, __binary_pred, _IterType());
* @p [first,middle) such that @i precedes @j and @k is an iterator in
* the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
void
- partial_sort(_RandomAccessIter __first,
- _RandomAccessIter __middle,
- _RandomAccessIter __last)
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
-
- make_heap(__first, __middle);
- for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ std::make_heap(__first, __middle);
+ for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (*__i < *__first)
- __pop_heap(__first, __middle, __i, _ValueType(*__i));
- sort_heap(__first, __middle);
+ std::__pop_heap(__first, __middle, __i, _ValueType(*__i));
+ std::sort_heap(__first, __middle);
}
/**
@@ -2539,26 +2296,29 @@ __result, __binary_pred, _IterType());
* the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
* are both false.
*/
- template<typename _RandomAccessIter, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Compare>
void
- partial_sort(_RandomAccessIter __first,
- _RandomAccessIter __middle,
- _RandomAccessIter __last,
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
_Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType, _ValueType>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
- make_heap(__first, __middle, __comp);
- for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
+ std::make_heap(__first, __middle, __comp);
+ for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (__comp(*__i, *__first))
- __pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
- sort_heap(__first, __middle, __comp);
+ std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
+ std::sort_heap(__first, __middle, __comp);
}
/**
@@ -2578,38 +2338,48 @@ __result, __binary_pred, _IterType());
* @p *j<*i is false.
* The value returned is @p result_first+N.
*/
- template<typename _InputIter, typename _RandomAccessIter>
- _RandomAccessIter
- partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first,
- _RandomAccessIter __result_last)
- {
- typedef typename iterator_traits<_InputIter>::value_type _InputValueType;
- typedef typename iterator_traits<_RandomAccessIter>::value_type _OutputValueType;
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+ template<typename _InputIterator, typename _RandomAccessIterator>
+ _RandomAccessIterator
+ partial_sort_copy(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __result_first,
+ _RandomAccessIterator __result_last)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _InputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _OutputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_ConvertibleConcept<_InputValueType, _OutputValueType>)
- __glibcpp_function_requires(_LessThanComparableConcept<_OutputValueType>)
- __glibcpp_function_requires(_LessThanComparableConcept<_InputValueType>)
-
- if (__result_first == __result_last) return __result_last;
- _RandomAccessIter __result_real_last = __result_first;
- while(__first != __last && __result_real_last != __result_last) {
- *__result_real_last = *__first;
- ++__result_real_last;
- ++__first;
- }
- make_heap(__result_first, __result_real_last);
- while (__first != __last) {
- if (*__first < *__result_first)
- __adjust_heap(__result_first, _DistanceType(0),
- _DistanceType(__result_real_last - __result_first),
- _InputValueType(*__first));
- ++__first;
- }
- sort_heap(__result_first, __result_real_last);
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+ _OutputValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_InputValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__result_first, __result_last);
+
+ if (__result_first == __result_last)
+ return __result_last;
+ _RandomAccessIterator __result_real_last = __result_first;
+ while(__first != __last && __result_real_last != __result_last)
+ {
+ *__result_real_last = *__first;
+ ++__result_real_last;
+ ++__first;
+ }
+ std::make_heap(__result_first, __result_real_last);
+ while (__first != __last)
+ {
+ if (*__first < *__result_first)
+ std::__adjust_heap(__result_first, _DistanceType(0),
+ _DistanceType(__result_real_last
+ - __result_first),
+ _InputValueType(*__first));
+ ++__first;
+ }
+ std::sort_heap(__result_first, __result_real_last);
return __result_real_last;
}
@@ -2632,173 +2402,246 @@ __result, __binary_pred, _IterType());
* @p comp(*j,*i) is false.
* The value returned is @p result_first+N.
*/
- template<typename _InputIter, typename _RandomAccessIter, typename _Compare>
- _RandomAccessIter
- partial_sort_copy(_InputIter __first, _InputIter __last,
- _RandomAccessIter __result_first,
- _RandomAccessIter __result_last,
+ template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
+ _RandomAccessIterator
+ partial_sort_copy(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __result_first,
+ _RandomAccessIterator __result_last,
_Compare __comp)
{
- typedef typename iterator_traits<_InputIter>::value_type _InputValueType;
- typedef typename iterator_traits<_RandomAccessIter>::value_type _OutputValueType;
- typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _InputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _OutputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
- __glibcpp_function_requires(_ConvertibleConcept<_InputValueType, _OutputValueType>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+ _OutputValueType>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_OutputValueType, _OutputValueType>)
-
- if (__result_first == __result_last) return __result_last;
- _RandomAccessIter __result_real_last = __result_first;
- while(__first != __last && __result_real_last != __result_last) {
- *__result_real_last = *__first;
- ++__result_real_last;
- ++__first;
- }
- make_heap(__result_first, __result_real_last, __comp);
- while (__first != __last) {
- if (__comp(*__first, *__result_first))
- __adjust_heap(__result_first, _DistanceType(0),
- _DistanceType(__result_real_last - __result_first),
- _InputValueType(*__first),
- __comp);
- ++__first;
- }
- sort_heap(__result_first, __result_real_last, __comp);
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__result_first, __result_last);
+
+ if (__result_first == __result_last)
+ return __result_last;
+ _RandomAccessIterator __result_real_last = __result_first;
+ while(__first != __last && __result_real_last != __result_last)
+ {
+ *__result_real_last = *__first;
+ ++__result_real_last;
+ ++__first;
+ }
+ std::make_heap(__result_first, __result_real_last, __comp);
+ while (__first != __last)
+ {
+ if (__comp(*__first, *__result_first))
+ std::__adjust_heap(__result_first, _DistanceType(0),
+ _DistanceType(__result_real_last
+ - __result_first),
+ _InputValueType(*__first),
+ __comp);
+ ++__first;
+ }
+ std::sort_heap(__result_first, __result_real_last, __comp);
return __result_real_last;
}
/**
- * @brief Sort a sequence just enough to find a particular position.
+ * @if maint
+ * This is a helper function for the sort routine.
+ * @endif
+ */
+ template<typename _RandomAccessIterator, typename _Size>
+ void
+ __introsort_loop(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Size __depth_limit)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > _S_threshold)
+ {
+ if (__depth_limit == 0)
+ {
+ std::partial_sort(__first, __last, __last);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last
+ - 1))));
+ std::__introsort_loop(__cut, __last, __depth_limit);
+ __last = __cut;
+ }
+ }
+
+ /**
+ * @if maint
+ * This is a helper function for the sort routine.
+ * @endif
+ */
+ template<typename _RandomAccessIterator, typename _Size, typename _Compare>
+ void
+ __introsort_loop(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Size __depth_limit, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > _S_threshold)
+ {
+ if (__depth_limit == 0)
+ {
+ std::partial_sort(__first, __last, __last, __comp);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last - 1),
+ __comp)),
+ __comp);
+ std::__introsort_loop(__cut, __last, __depth_limit, __comp);
+ __last = __cut;
+ }
+ }
+
+ /**
+ * @brief Sort the elements of a sequence.
* @param first An iterator.
- * @param nth Another iterator.
* @param last Another iterator.
* @return Nothing.
*
- * Rearranges the elements in the range @p [first,last) so that @p *nth
- * is the same element that would have been in that position had the
- * whole sequence been sorted.
- * whole sequence been sorted. The elements either side of @p *nth are
- * not completely sorted, but for any iterator @i in the range
- * @p [first,nth) and any iterator @j in the range @p [nth,last) it
- * holds that @p *j<*i is false.
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
*/
- template<typename _RandomAccessIter>
- void
- nth_element(_RandomAccessIter __first,
- _RandomAccessIter __nth,
- _RandomAccessIter __last)
+ template<typename _RandomAccessIterator>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
-
- while (__last - __first > 3) {
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _ValueType(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1))));
- if (__cut <= __nth)
- __first = __cut;
- else
- __last = __cut;
- }
- __insertion_sort(__first, __last);
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last, __lg(__last - __first) * 2);
+ std::__final_insertion_sort(__first, __last);
+ }
}
/**
- * @brief Sort a sequence just enough to find a particular position
- * using a predicate for comparison.
+ * @brief Sort the elements of a sequence using a predicate for comparison.
* @param first An iterator.
- * @param nth Another iterator.
* @param last Another iterator.
* @param comp A comparison functor.
* @return Nothing.
*
- * Rearranges the elements in the range @p [first,last) so that @p *nth
- * is the same element that would have been in that position had the
- * whole sequence been sorted. The elements either side of @p *nth are
- * not completely sorted, but for any iterator @i in the range
- * @p [first,nth) and any iterator @j in the range @p [nth,last) it
- * holds that @p comp(*j,*i) is false.
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for every iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
*/
- template<typename _RandomAccessIter, typename _Compare>
- void
- nth_element(_RandomAccessIter __first,
- _RandomAccessIter __nth,
- _RandomAccessIter __last,
- _Compare __comp)
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType, _ValueType>)
-
- while (__last - __first > 3) {
- _RandomAccessIter __cut =
- __unguarded_partition(__first, __last,
- _ValueType(__median(*__first,
- *(__first + (__last - __first)/2),
- *(__last - 1),
- __comp)),
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last, __lg(__last - __first) * 2,
__comp);
- if (__cut <= __nth)
- __first = __cut;
- else
- __last = __cut;
- }
- __insertion_sort(__first, __last, __comp);
+ std::__final_insertion_sort(__first, __last, __comp);
+ }
}
-
/**
* @brief Finds the first position in which @a val could be inserted
* without changing the ordering.
* @param first An iterator.
* @param last Another iterator.
* @param val The search term.
- * @return An iterator pointing to the first element "not less than" @a val.
+ * @return An iterator pointing to the first element "not less than" @a val,
+ * or end() if every element is less than @a val.
* @ingroup binarysearch
*/
- template<typename _ForwardIter, typename _Tp>
- _ForwardIter
- lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
// concept requirements
// Note that these are slightly stricter than those of the 4-argument
// version, defined next. The difference is in the strictness of the
// comparison operations... so for looser checking, define your own
// comparison function, as was intended.
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_requires_partitioned(__first, __last, __val);
- _DistanceType __len = distance(__first, __last);
+ _DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
- _ForwardIter __middle;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (*__middle < __val) {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
}
- else
- __len = __half;
- }
return __first;
}
@@ -2809,40 +2652,47 @@ __result, __binary_pred, _IterType());
* @param last Another iterator.
* @param val The search term.
* @param comp A functor to use for comparisons.
- * @return An iterator pointing to the first element "not less than" @a val.
+ * @return An iterator pointing to the first element "not less than" @a val,
+ * or end() if every element is less than @a val.
* @ingroup binarysearch
*
* The comparison function should have the same effects on ordering as
* the function used for the initial sort.
*/
- template<typename _ForwardIter, typename _Tp, typename _Compare>
- _ForwardIter
- lower_bound(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ _ForwardIterator
+ lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _Tp>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _Tp>)
+ __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
- _DistanceType __len = distance(__first, __last);
+ _DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
- _ForwardIter __middle;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (__comp(*__middle, __val)) {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__comp(*__middle, __val))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
}
- else
- __len = __half;
- }
return __first;
}
@@ -2852,38 +2702,45 @@ __result, __binary_pred, _IterType());
* @param first An iterator.
* @param last Another iterator.
* @param val The search term.
- * @return An iterator pointing to the first element greater than @a val.
+ * @return An iterator pointing to the first element greater than @a val,
+ * or end() if no elements are greater than @a val.
* @ingroup binarysearch
*/
- template<typename _ForwardIter, typename _Tp>
- _ForwardIter
- upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ upper_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
// concept requirements
// See comments on lower_bound.
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_requires_partitioned(__first, __last, __val);
- _DistanceType __len = distance(__first, __last);
+ _DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
- _ForwardIter __middle;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (__val < *__middle)
- __len = __half;
- else {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__val < *__middle)
+ __len = __half;
+ else
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
}
- }
return __first;
}
@@ -2894,208 +2751,193 @@ __result, __binary_pred, _IterType());
* @param last Another iterator.
* @param val The search term.
* @param comp A functor to use for comparisons.
- * @return An iterator pointing to the first element greater than @a val.
+ * @return An iterator pointing to the first element greater than @a val,
+ * or end() if no elements are greater than @a val.
* @ingroup binarysearch
*
* The comparison function should have the same effects on ordering as
* the function used for the initial sort.
*/
- template<typename _ForwardIter, typename _Tp, typename _Compare>
- _ForwardIter
- upper_bound(_ForwardIter __first, _ForwardIter __last,
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ _ForwardIterator
+ upper_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _ValueType>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _Tp, _ValueType>)
+ __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
- _DistanceType __len = distance(__first, __last);
+ _DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
- _ForwardIter __middle;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (__comp(__val, *__middle))
- __len = __half;
- else {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__comp(__val, *__middle))
+ __len = __half;
+ else
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
}
- }
return __first;
}
/**
- * @brief Finds the largest subrange in which @a val could be inserted
- * at any place in it without changing the ordering.
- * @param first An iterator.
- * @param last Another iterator.
- * @param val The search term.
- * @return An pair of iterators defining the subrange.
- * @ingroup binarysearch
- *
- * This is equivalent to
- * @code
- * std::make_pair(lower_bound(first, last, val),
- * upper_bound(first, last, val))
- * @endcode
- * but does not actually call those functions.
+ * @if maint
+ * This is a helper function for the merge routines.
+ * @endif
*/
- template<typename _ForwardIter, typename _Tp>
- pair<_ForwardIter, _ForwardIter>
- equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+ template<typename _BidirectionalIterator, typename _Distance>
+ void
+ __merge_without_buffer(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
-
- // concept requirements
- // See comments on lower_bound.
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
-
- _DistanceType __len = distance(__first, __last);
- _DistanceType __half;
- _ForwardIter __middle, __left, __right;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (*__middle < __val) {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ if (__len1 == 0 || __len2 == 0)
+ return;
+ if (__len1 + __len2 == 2)
+ {
+ if (*__middle < *__first)
+ std::iter_swap(__first, __middle);
+ return;
}
- else if (__val < *__middle)
- __len = __half;
- else {
- __left = lower_bound(__first, __middle, __val);
- advance(__first, __len);
- __right = upper_bound(++__middle, __first, __val);
- return pair<_ForwardIter, _ForwardIter>(__left, __right);
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut);
+ __len22 = std::distance(__middle, __second_cut);
}
- }
- return pair<_ForwardIter, _ForwardIter>(__first, __first);
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut);
+ __len11 = std::distance(__first, __first_cut);
+ }
+ std::rotate(__first_cut, __middle, __second_cut);
+ _BidirectionalIterator __new_middle = __first_cut;
+ std::advance(__new_middle, std::distance(__middle, __second_cut));
+ std::__merge_without_buffer(__first, __first_cut, __new_middle,
+ __len11, __len22);
+ std::__merge_without_buffer(__new_middle, __second_cut, __last,
+ __len1 - __len11, __len2 - __len22);
}
/**
- * @brief Finds the largest subrange in which @a val could be inserted
- * at any place in it without changing the ordering.
- * @param first An iterator.
- * @param last Another iterator.
- * @param val The search term.
- * @param comp A functor to use for comparisons.
- * @return An pair of iterators defining the subrange.
- * @ingroup binarysearch
- *
- * This is equivalent to
- * @code
- * std::make_pair(lower_bound(first, last, val, comp),
- * upper_bound(first, last, val, comp))
- * @endcode
- * but does not actually call those functions.
+ * @if maint
+ * This is a helper function for the merge routines.
+ * @endif
*/
- template<typename _ForwardIter, typename _Tp, typename _Compare>
- pair<_ForwardIter, _ForwardIter>
- equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
- _Compare __comp)
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Compare>
+ void
+ __merge_without_buffer(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2,
+ _Compare __comp)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
- typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
-
- // concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _Tp>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _ValueType>)
-
- _DistanceType __len = distance(__first, __last);
- _DistanceType __half;
- _ForwardIter __middle, __left, __right;
-
- while (__len > 0) {
- __half = __len >> 1;
- __middle = __first;
- advance(__middle, __half);
- if (__comp(*__middle, __val)) {
- __first = __middle;
- ++__first;
- __len = __len - __half - 1;
+ if (__len1 == 0 || __len2 == 0)
+ return;
+ if (__len1 + __len2 == 2)
+ {
+ if (__comp(*__middle, *__first))
+ std::iter_swap(__first, __middle);
+ return;
}
- else if (__comp(__val, *__middle))
- __len = __half;
- else {
- __left = lower_bound(__first, __middle, __val, __comp);
- advance(__first, __len);
- __right = upper_bound(++__middle, __first, __val, __comp);
- return pair<_ForwardIter, _ForwardIter>(__left, __right);
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+ __comp);
+ __len22 = std::distance(__middle, __second_cut);
+ }
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+ __comp);
+ __len11 = std::distance(__first, __first_cut);
}
- }
- return pair<_ForwardIter, _ForwardIter>(__first, __first);
+ std::rotate(__first_cut, __middle, __second_cut);
+ _BidirectionalIterator __new_middle = __first_cut;
+ std::advance(__new_middle, std::distance(__middle, __second_cut));
+ std::__merge_without_buffer(__first, __first_cut, __new_middle,
+ __len11, __len22, __comp);
+ std::__merge_without_buffer(__new_middle, __second_cut, __last,
+ __len1 - __len11, __len2 - __len22, __comp);
}
/**
- * @brief Determines whether an element exists in a range.
- * @param first An iterator.
- * @param last Another iterator.
- * @param val The search term.
- * @return True if @a val (or its equivelent) is in [@a first,@a last ].
- * @ingroup binarysearch
- *
- * Note that this does not actually return an iterator to @a val. For
- * that, use std::find or a container's specialized find member functions.
+ * @if maint
+ * This is a helper function for the stable sorting routines.
+ * @endif
*/
- template<typename _ForwardIter, typename _Tp>
- bool
- binary_search(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val)
+ template<typename _RandomAccessIterator>
+ void
+ __inplace_stable_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
{
- // concept requirements
- // See comments on lower_bound.
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_SameTypeConcept<_Tp,
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
-
- _ForwardIter __i = lower_bound(__first, __last, __val);
- return __i != __last && !(__val < *__i);
+ if (__last - __first < 15)
+ {
+ std::__insertion_sort(__first, __last);
+ return;
+ }
+ _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+ std::__inplace_stable_sort(__first, __middle);
+ std::__inplace_stable_sort(__middle, __last);
+ std::__merge_without_buffer(__first, __middle, __last,
+ __middle - __first,
+ __last - __middle);
}
/**
- * @brief Determines whether an element exists in a range.
- * @param first An iterator.
- * @param last Another iterator.
- * @param val The search term.
- * @param comp A functor to use for comparisons.
- * @return True if @a val (or its equivelent) is in [@a first,@a last ].
- * @ingroup binarysearch
- *
- * Note that this does not actually return an iterator to @a val. For
- * that, use std::find or a container's specialized find member functions.
- *
- * The comparison function should have the same effects on ordering as
- * the function used for the initial sort.
+ * @if maint
+ * This is a helper function for the stable sorting routines.
+ * @endif
*/
- template<typename _ForwardIter, typename _Tp, typename _Compare>
- bool
- binary_search(_ForwardIter __first, _ForwardIter __last,
- const _Tp& __val, _Compare __comp)
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __inplace_stable_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
{
- // concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_ForwardIter>::value_type, _Tp>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp,
- typename iterator_traits<_ForwardIter>::value_type>)
-
- _ForwardIter __i = lower_bound(__first, __last, __val, __comp);
- return __i != __last && !__comp(__val, *__i);
+ if (__last - __first < 15)
+ {
+ std::__insertion_sort(__first, __last, __comp);
+ return;
+ }
+ _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+ std::__inplace_stable_sort(__first, __middle, __comp);
+ std::__inplace_stable_sort(__middle, __last, __comp);
+ std::__merge_without_buffer(__first, __middle, __last,
+ __middle - __first,
+ __last - __middle,
+ __comp);
}
/**
@@ -3114,35 +2956,42 @@ __result, __binary_pred, _IterType());
* elements in the two ranges, elements from the first range will always
* come before elements from the second.
*/
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter>
- _OutputIter
- merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result)
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
-
- while (__first1 != __last1 && __first2 != __last2) {
- if (*__first2 < *__first1) {
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
}
- ++__result;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
}
/**
@@ -3165,159 +3014,172 @@ __result, __binary_pred, _IterType());
* The comparison function should have the same effects on ordering as
* the function used for the initial sort.
*/
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _Compare>
- _OutputIter
- merge(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp)
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
-
- while (__first1 != __last1 && __first2 != __last2) {
- if (__comp(*__first2, *__first1)) {
- *__result = *__first2;
- ++__first2;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__comp(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
}
- else {
- *__result = *__first1;
- ++__first1;
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+ template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+ typename _Distance>
+ void
+ __merge_sort_loop(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _RandomAccessIterator2 __result,
+ _Distance __step_size)
+ {
+ const _Distance __two_step = 2 * __step_size;
+
+ while (__last - __first >= __two_step)
+ {
+ __result = std::merge(__first, __first + __step_size,
+ __first + __step_size, __first + __two_step,
+ __result);
+ __first += __two_step;
}
- ++__result;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+
+ __step_size = std::min(_Distance(__last - __first), __step_size);
+ std::merge(__first, __first + __step_size, __first + __step_size, __last,
+ __result);
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
- template<typename _BidirectionalIter, typename _Distance>
+ template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+ typename _Distance, typename _Compare>
void
- __merge_without_buffer(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance __len1, _Distance __len2)
+ __merge_sort_loop(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _RandomAccessIterator2 __result, _Distance __step_size,
+ _Compare __comp)
{
- if (__len1 == 0 || __len2 == 0)
- return;
- if (__len1 + __len2 == 2) {
- if (*__middle < *__first)
- iter_swap(__first, __middle);
- return;
- }
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- advance(__first_cut, __len11);
- __second_cut = lower_bound(__middle, __last, *__first_cut);
- __len22 = distance(__middle, __second_cut);
- }
- else {
- __len22 = __len2 / 2;
- advance(__second_cut, __len22);
- __first_cut = upper_bound(__first, __middle, *__second_cut);
- __len11 = distance(__first, __first_cut);
- }
- rotate(__first_cut, __middle, __second_cut);
- _BidirectionalIter __new_middle = __first_cut;
- advance(__new_middle, distance(__middle, __second_cut));
- __merge_without_buffer(__first, __first_cut, __new_middle,
- __len11, __len22);
- __merge_without_buffer(__new_middle, __second_cut, __last,
- __len1 - __len11, __len2 - __len22);
+ const _Distance __two_step = 2 * __step_size;
+
+ while (__last - __first >= __two_step)
+ {
+ __result = std::merge(__first, __first + __step_size,
+ __first + __step_size, __first + __two_step,
+ __result,
+ __comp);
+ __first += __two_step;
+ }
+ __step_size = std::min(_Distance(__last - __first), __step_size);
+
+ std::merge(__first, __first + __step_size,
+ __first + __step_size, __last,
+ __result,
+ __comp);
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
- template<typename _BidirectionalIter, typename _Distance, typename _Compare>
+ enum { _S_chunk_size = 7 };
+
+ template<typename _RandomAccessIterator, typename _Distance>
void
- __merge_without_buffer(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
- _Distance __len1, _Distance __len2,
- _Compare __comp)
+ __chunk_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Distance __chunk_size)
{
- if (__len1 == 0 || __len2 == 0)
- return;
- if (__len1 + __len2 == 2) {
- if (__comp(*__middle, *__first))
- iter_swap(__first, __middle);
- return;
- }
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- advance(__first_cut, __len11);
- __second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
- __len22 = distance(__middle, __second_cut);
- }
- else {
- __len22 = __len2 / 2;
- advance(__second_cut, __len22);
- __first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
- __len11 = distance(__first, __first_cut);
- }
- rotate(__first_cut, __middle, __second_cut);
- _BidirectionalIter __new_middle = __first_cut;
- advance(__new_middle, distance(__middle, __second_cut));
- __merge_without_buffer(__first, __first_cut, __new_middle,
- __len11, __len22, __comp);
- __merge_without_buffer(__new_middle, __second_cut, __last,
- __len1 - __len11, __len2 - __len22, __comp);
+ while (__last - __first >= __chunk_size)
+ {
+ std::__insertion_sort(__first, __first + __chunk_size);
+ __first += __chunk_size;
+ }
+ std::__insertion_sort(__first, __last);
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
- template<typename _BidirectionalIter1, typename _BidirectionalIter2,
- typename _Distance>
- _BidirectionalIter1
- __rotate_adaptive(_BidirectionalIter1 __first,
- _BidirectionalIter1 __middle,
- _BidirectionalIter1 __last,
- _Distance __len1, _Distance __len2,
- _BidirectionalIter2 __buffer,
- _Distance __buffer_size)
+ template<typename _RandomAccessIterator, typename _Distance, typename _Compare>
+ void
+ __chunk_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Distance __chunk_size, _Compare __comp)
{
- _BidirectionalIter2 __buffer_end;
- if (__len1 > __len2 && __len2 <= __buffer_size) {
- __buffer_end = copy(__middle, __last, __buffer);
- copy_backward(__first, __middle, __last);
- return copy(__buffer, __buffer_end, __first);
- }
- else if (__len1 <= __buffer_size) {
- __buffer_end = copy(__first, __middle, __buffer);
- copy(__middle, __last, __first);
- return copy_backward(__buffer, __buffer_end, __last);
- }
- else {
- rotate(__first, __middle, __last);
- advance(__first, distance(__middle, __last));
- return __first;
- }
+ while (__last - __first >= __chunk_size)
+ {
+ std::__insertion_sort(__first, __first + __chunk_size, __comp);
+ __first += __chunk_size;
+ }
+ std::__insertion_sort(__first, __last, __comp);
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer>
+ void
+ __merge_sort_with_buffer(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+
+ const _Distance __len = __last - __first;
+ const _Pointer __buffer_last = __buffer + __len;
+
+ _Distance __step_size = _S_chunk_size;
+ std::__chunk_insertion_sort(__first, __last, __step_size);
+
+ while (__step_size < __len)
+ {
+ std::__merge_sort_loop(__first, __last, __buffer, __step_size);
+ __step_size *= 2;
+ std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
+ __step_size *= 2;
+ }
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
+ void
+ __merge_sort_with_buffer(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+
+ const _Distance __len = __last - __first;
+ const _Pointer __buffer_last = __buffer + __len;
+
+ _Distance __step_size = _S_chunk_size;
+ std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
+
+ while (__step_size < __len)
+ {
+ std::__merge_sort_loop(__first, __last, __buffer,
+ __step_size, __comp);
+ __step_size *= 2;
+ std::__merge_sort_loop(__buffer, __buffer_last, __first,
+ __step_size, __comp);
+ __step_size *= 2;
+ }
}
/**
@@ -3325,33 +3187,38 @@ __result, __binary_pred, _IterType());
* This is a helper function for the merge routines.
* @endif
*/
- template<typename _BidirectionalIter1, typename _BidirectionalIter2,
- typename _BidirectionalIter3>
- _BidirectionalIter3
- __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
- _BidirectionalIter3 __result)
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _BidirectionalIterator3>
+ _BidirectionalIterator3
+ __merge_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result)
{
if (__first1 == __last1)
- return copy_backward(__first2, __last2, __result);
+ return std::copy_backward(__first2, __last2, __result);
if (__first2 == __last2)
- return copy_backward(__first1, __last1, __result);
+ return std::copy_backward(__first1, __last1, __result);
--__last1;
--__last2;
- while (true) {
- if (*__last2 < *__last1) {
- *--__result = *__last1;
- if (__first1 == __last1)
- return copy_backward(__first2, ++__last2, __result);
- --__last1;
- }
- else {
- *--__result = *__last2;
- if (__first2 == __last2)
- return copy_backward(__first1, ++__last1, __result);
- --__last2;
+ while (true)
+ {
+ if (*__last2 < *__last1)
+ {
+ *--__result = *__last1;
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, ++__last2, __result);
+ --__last1;
+ }
+ else
+ {
+ *--__result = *__last2;
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, ++__last1, __result);
+ --__last2;
+ }
}
- }
}
/**
@@ -3359,34 +3226,75 @@ __result, __binary_pred, _IterType());
* This is a helper function for the merge routines.
* @endif
*/
- template<typename _BidirectionalIter1, typename _BidirectionalIter2,
- typename _BidirectionalIter3, typename _Compare>
- _BidirectionalIter3
- __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
- _BidirectionalIter3 __result,
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _BidirectionalIterator3, typename _Compare>
+ _BidirectionalIterator3
+ __merge_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result,
_Compare __comp)
{
if (__first1 == __last1)
- return copy_backward(__first2, __last2, __result);
+ return std::copy_backward(__first2, __last2, __result);
if (__first2 == __last2)
- return copy_backward(__first1, __last1, __result);
+ return std::copy_backward(__first1, __last1, __result);
--__last1;
--__last2;
- while (true) {
- if (__comp(*__last2, *__last1)) {
- *--__result = *__last1;
- if (__first1 == __last1)
- return copy_backward(__first2, ++__last2, __result);
- --__last1;
+ while (true)
+ {
+ if (__comp(*__last2, *__last1))
+ {
+ *--__result = *__last1;
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, ++__last2, __result);
+ --__last1;
+ }
+ else
+ {
+ *--__result = *__last2;
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, ++__last1, __result);
+ --__last2;
+ }
}
- else {
- *--__result = *__last2;
- if (__first2 == __last2)
- return copy_backward(__first1, ++__last1, __result);
- --__last2;
+ }
+
+ /**
+ * @if maint
+ * This is a helper function for the merge routines.
+ * @endif
+ */
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _Distance>
+ _BidirectionalIterator1
+ __rotate_adaptive(_BidirectionalIterator1 __first,
+ _BidirectionalIterator1 __middle,
+ _BidirectionalIterator1 __last,
+ _Distance __len1, _Distance __len2,
+ _BidirectionalIterator2 __buffer,
+ _Distance __buffer_size)
+ {
+ _BidirectionalIterator2 __buffer_end;
+ if (__len1 > __len2 && __len2 <= __buffer_size)
+ {
+ __buffer_end = std::copy(__middle, __last, __buffer);
+ std::copy_backward(__first, __middle, __last);
+ return std::copy(__buffer, __buffer_end, __first);
+ }
+ else if (__len1 <= __buffer_size)
+ {
+ __buffer_end = std::copy(__first, __middle, __buffer);
+ std::copy(__middle, __last, __first);
+ return std::copy_backward(__buffer, __buffer_end, __last);
+ }
+ else
+ {
+ std::rotate(__first, __middle, __last);
+ std::advance(__first, std::distance(__middle, __last));
+ return __first;
}
- }
}
/**
@@ -3394,48 +3302,58 @@ __result, __binary_pred, _IterType());
* This is a helper function for the merge routines.
* @endif
*/
- template<typename _BidirectionalIter, typename _Distance, typename _Pointer>
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Pointer>
void
- __merge_adaptive(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
+ __merge_adaptive(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size)
{
- if (__len1 <= __len2 && __len1 <= __buffer_size) {
- _Pointer __buffer_end = copy(__first, __middle, __buffer);
- merge(__buffer, __buffer_end, __middle, __last, __first);
- }
- else if (__len2 <= __buffer_size) {
- _Pointer __buffer_end = copy(__middle, __last, __buffer);
- __merge_backward(__first, __middle, __buffer, __buffer_end, __last);
- }
- else {
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- advance(__first_cut, __len11);
- __second_cut = lower_bound(__middle, __last, *__first_cut);
- __len22 = distance(__middle, __second_cut);
+ if (__len1 <= __len2 && __len1 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
+ std::merge(__buffer, __buffer_end, __middle, __last, __first);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
+ std::__merge_backward(__first, __middle, __buffer,
+ __buffer_end, __last);
+ }
+ else
+ {
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last,
+ *__first_cut);
+ __len22 = std::distance(__middle, __second_cut);
}
- else {
- __len22 = __len2 / 2;
- advance(__second_cut, __len22);
- __first_cut = upper_bound(__first, __middle, *__second_cut);
- __len11 = distance(__first, __first_cut);
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle,
+ *__second_cut);
+ __len11 = std::distance(__first, __first_cut);
}
- _BidirectionalIter __new_middle =
- __rotate_adaptive(__first_cut, __middle, __second_cut,
- __len1 - __len11, __len22, __buffer,
- __buffer_size);
- __merge_adaptive(__first, __first_cut, __new_middle, __len11,
- __len22, __buffer, __buffer_size);
- __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
- __len2 - __len22, __buffer, __buffer_size);
- }
+ _BidirectionalIterator __new_middle =
+ std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+ __len1 - __len11, __len22, __buffer,
+ __buffer_size);
+ std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+ __len22, __buffer, __buffer_size);
+ std::__merge_adaptive(__new_middle, __second_cut, __last,
+ __len1 - __len11,
+ __len2 - __len22, __buffer, __buffer_size);
+ }
}
/**
@@ -3443,51 +3361,60 @@ __result, __binary_pred, _IterType());
* This is a helper function for the merge routines.
* @endif
*/
- template<typename _BidirectionalIter, typename _Distance, typename _Pointer,
+ template<typename _BidirectionalIterator, typename _Distance, typename _Pointer,
typename _Compare>
void
- __merge_adaptive(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
+ __merge_adaptive(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size,
_Compare __comp)
{
- if (__len1 <= __len2 && __len1 <= __buffer_size) {
- _Pointer __buffer_end = copy(__first, __middle, __buffer);
- merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
- }
- else if (__len2 <= __buffer_size) {
- _Pointer __buffer_end = copy(__middle, __last, __buffer);
- __merge_backward(__first, __middle, __buffer, __buffer_end, __last,
- __comp);
- }
- else {
- _BidirectionalIter __first_cut = __first;
- _BidirectionalIter __second_cut = __middle;
- _Distance __len11 = 0;
- _Distance __len22 = 0;
- if (__len1 > __len2) {
- __len11 = __len1 / 2;
- advance(__first_cut, __len11);
- __second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
- __len22 = distance(__middle, __second_cut);
+ if (__len1 <= __len2 && __len1 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
+ std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
+ std::__merge_backward(__first, __middle, __buffer, __buffer_end,
+ __last, __comp);
+ }
+ else
+ {
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+ __comp);
+ __len22 = std::distance(__middle, __second_cut);
}
- else {
- __len22 = __len2 / 2;
- advance(__second_cut, __len22);
- __first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
- __len11 = distance(__first, __first_cut);
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+ __comp);
+ __len11 = std::distance(__first, __first_cut);
}
- _BidirectionalIter __new_middle =
- __rotate_adaptive(__first_cut, __middle, __second_cut,
- __len1 - __len11, __len22, __buffer,
- __buffer_size);
- __merge_adaptive(__first, __first_cut, __new_middle, __len11,
- __len22, __buffer, __buffer_size, __comp);
- __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
- __len2 - __len22, __buffer, __buffer_size, __comp);
- }
+ _BidirectionalIterator __new_middle =
+ std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+ __len1 - __len11, __len22, __buffer,
+ __buffer_size);
+ std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+ __len22, __buffer, __buffer_size, __comp);
+ std::__merge_adaptive(__new_middle, __second_cut, __last,
+ __len1 - __len11,
+ __len2 - __len22, __buffer,
+ __buffer_size, __comp);
+ }
}
/**
@@ -3507,34 +3434,37 @@ __result, __binary_pred, _IterType());
* comparisons. Otherwise an NlogN algorithm is used, where N is
* distance(first,last).
*/
- template<typename _BidirectionalIter>
+ template<typename _BidirectionalIterator>
void
- inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last)
+ inplace_merge(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last)
{
- typedef typename iterator_traits<_BidirectionalIter>::value_type
+ typedef typename iterator_traits<_BidirectionalIterator>::value_type
_ValueType;
- typedef typename iterator_traits<_BidirectionalIter>::difference_type
+ typedef typename iterator_traits<_BidirectionalIterator>::difference_type
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
- _BidirectionalIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_sorted(__first, __middle);
+ __glibcxx_requires_sorted(__middle, __last);
if (__first == __middle || __middle == __last)
return;
- _DistanceType __len1 = distance(__first, __middle);
- _DistanceType __len2 = distance(__middle, __last);
+ _DistanceType __len1 = std::distance(__first, __middle);
+ _DistanceType __len2 = std::distance(__middle, __last);
- _Temporary_buffer<_BidirectionalIter, _ValueType> __buf(__first, __last);
+ _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+ __last);
if (__buf.begin() == 0)
- __merge_without_buffer(__first, __middle, __last, __len1, __len2);
+ std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
else
- __merge_adaptive(__first, __middle, __last, __len1, __len2,
- __buf.begin(), _DistanceType(__buf.size()));
+ std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+ __buf.begin(), _DistanceType(__buf.size()));
}
/**
@@ -3558,37 +3488,468 @@ __result, __binary_pred, _IterType());
* The comparison function should have the same effects on ordering as
* the function used for the initial sort.
*/
- template<typename _BidirectionalIter, typename _Compare>
+ template<typename _BidirectionalIterator, typename _Compare>
void
- inplace_merge(_BidirectionalIter __first,
- _BidirectionalIter __middle,
- _BidirectionalIter __last,
+ inplace_merge(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
_Compare __comp)
{
- typedef typename iterator_traits<_BidirectionalIter>::value_type
+ typedef typename iterator_traits<_BidirectionalIterator>::value_type
_ValueType;
- typedef typename iterator_traits<_BidirectionalIter>::difference_type
+ typedef typename iterator_traits<_BidirectionalIterator>::difference_type
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
- _BidirectionalIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType, _ValueType>)
+ __glibcxx_requires_sorted_pred(__first, __middle, __comp);
+ __glibcxx_requires_sorted_pred(__middle, __last, __comp);
if (__first == __middle || __middle == __last)
return;
- _DistanceType __len1 = distance(__first, __middle);
- _DistanceType __len2 = distance(__middle, __last);
+ const _DistanceType __len1 = std::distance(__first, __middle);
+ const _DistanceType __len2 = std::distance(__middle, __last);
- _Temporary_buffer<_BidirectionalIter, _ValueType> __buf(__first, __last);
+ _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+ __last);
if (__buf.begin() == 0)
- __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
+ std::__merge_without_buffer(__first, __middle, __last, __len1,
+ __len2, __comp);
+ else
+ std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+ __buf.begin(), _DistanceType(__buf.size()),
+ __comp);
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer,
+ typename _Distance>
+ void
+ __stable_sort_adaptive(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Distance __buffer_size)
+ {
+ const _Distance __len = (__last - __first + 1) / 2;
+ const _RandomAccessIterator __middle = __first + __len;
+ if (__len > __buffer_size)
+ {
+ std::__stable_sort_adaptive(__first, __middle,
+ __buffer, __buffer_size);
+ std::__stable_sort_adaptive(__middle, __last,
+ __buffer, __buffer_size);
+ }
else
- __merge_adaptive(__first, __middle, __last, __len1, __len2,
- __buf.begin(), _DistanceType(__buf.size()),
- __comp);
+ {
+ std::__merge_sort_with_buffer(__first, __middle, __buffer);
+ std::__merge_sort_with_buffer(__middle, __last, __buffer);
+ }
+ std::__merge_adaptive(__first, __middle, __last,
+ _Distance(__middle - __first),
+ _Distance(__last - __middle),
+ __buffer, __buffer_size);
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer,
+ typename _Distance, typename _Compare>
+ void
+ __stable_sort_adaptive(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Distance __buffer_size,
+ _Compare __comp)
+ {
+ const _Distance __len = (__last - __first + 1) / 2;
+ const _RandomAccessIterator __middle = __first + __len;
+ if (__len > __buffer_size)
+ {
+ std::__stable_sort_adaptive(__first, __middle, __buffer,
+ __buffer_size, __comp);
+ std::__stable_sort_adaptive(__middle, __last, __buffer,
+ __buffer_size, __comp);
+ }
+ else
+ {
+ std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
+ std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
+ }
+ std::__merge_adaptive(__first, __middle, __last,
+ _Distance(__middle - __first),
+ _Distance(__last - __middle),
+ __buffer, __buffer_size,
+ __comp);
+ }
+
+ /**
+ * @brief Sort the elements of a sequence, preserving the relative order
+ * of equivalent elements.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p x<y is false and @p y<x is false will have the same relative
+ * ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType>
+ buf(__first, __last);
+ if (buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last);
+ else
+ std::__stable_sort_adaptive(__first, __last, buf.begin(),
+ _DistanceType(buf.size()));
+ }
+
+ /**
+ * @brief Sort the elements of a sequence using a predicate for comparison,
+ * preserving the relative order of equivalent elements.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for each iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p comp(x,y) is false and @p comp(y,x) is false will have the same
+ * relative ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType> buf(__first, __last);
+ if (buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last, __comp);
+ else
+ std::__stable_sort_adaptive(__first, __last, buf.begin(),
+ _DistanceType(buf.size()), __comp);
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position.
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted.
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p *j<*i is false.
+ */
+ template<typename _RandomAccessIterator>
+ void
+ nth_element(_RandomAccessIterator __first,
+ _RandomAccessIterator __nth,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ while (__last - __first > 3)
+ {
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last
+ - 1))));
+ if (__cut <= __nth)
+ __first = __cut;
+ else
+ __last = __cut;
+ }
+ std::__insertion_sort(__first, __last);
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position
+ * using a predicate for comparison.
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p comp(*j,*i) is false.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ nth_element(_RandomAccessIterator __first,
+ _RandomAccessIterator __nth,
+ _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ while (__last - __first > 3)
+ {
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last - 1),
+ __comp)), __comp);
+ if (__cut <= __nth)
+ __first = __cut;
+ else
+ __last = __cut;
+ }
+ std::__insertion_sort(__first, __last, __comp);
+ }
+
+ /**
+ * @brief Finds the largest subrange in which @a val could be inserted
+ * at any place in it without changing the ordering.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return An pair of iterators defining the subrange.
+ * @ingroup binarysearch
+ *
+ * This is equivalent to
+ * @code
+ * std::make_pair(lower_bound(first, last, val),
+ * upper_bound(first, last, val))
+ * @endcode
+ * but does not actually call those functions.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ pair<_ForwardIterator, _ForwardIterator>
+ equal_range(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ // See comments on lower_bound.
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_requires_partitioned(__first, __last, __val);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle, __left, __right;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else if (__val < *__middle)
+ __len = __half;
+ else
+ {
+ __left = std::lower_bound(__first, __middle, __val);
+ std::advance(__first, __len);
+ __right = std::upper_bound(++__middle, __first, __val);
+ return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+ }
+ }
+ return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+ }
+
+ /**
+ * @brief Finds the largest subrange in which @a val could be inserted
+ * at any place in it without changing the ordering.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return An pair of iterators defining the subrange.
+ * @ingroup binarysearch
+ *
+ * This is equivalent to
+ * @code
+ * std::make_pair(lower_bound(first, last, val, comp),
+ * upper_bound(first, last, val, comp))
+ * @endcode
+ * but does not actually call those functions.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ pair<_ForwardIterator, _ForwardIterator>
+ equal_range(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _Tp>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _Tp, _ValueType>)
+ __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle, __left, __right;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__comp(*__middle, __val))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else if (__comp(__val, *__middle))
+ __len = __half;
+ else
+ {
+ __left = std::lower_bound(__first, __middle, __val, __comp);
+ std::advance(__first, __len);
+ __right = std::upper_bound(++__middle, __first, __val, __comp);
+ return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+ }
+ }
+ return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+ }
+
+ /**
+ * @brief Determines whether an element exists in a range.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return True if @a val (or its equivelent) is in [@a first,@a last ].
+ * @ingroup binarysearch
+ *
+ * Note that this does not actually return an iterator to @a val. For
+ * that, use std::find or a container's specialized find member functions.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ bool
+ binary_search(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ // concept requirements
+ // See comments on lower_bound.
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_SameTypeConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_requires_partitioned(__first, __last, __val);
+
+ _ForwardIterator __i = std::lower_bound(__first, __last, __val);
+ return __i != __last && !(__val < *__i);
+ }
+
+ /**
+ * @brief Determines whether an element exists in a range.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return True if @a val (or its equivelent) is in [@a first,@a last ].
+ * @ingroup binarysearch
+ *
+ * Note that this does not actually return an iterator to @a val. For
+ * that, use std::find or a container's specialized find member functions.
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ bool
+ binary_search(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+
+ _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
+ return __i != __last && !__comp(__val, *__i);
}
// Set algorithms: includes, set_union, set_intersection, set_difference,
@@ -3596,19 +3957,37 @@ __result, __binary_pred, _IterType());
// that their input ranges are sorted and the postcondition that their output
// ranges are sorted.
- template<typename _InputIter1, typename _InputIter2>
+ /**
+ * @brief Determines whether all elements of a sequence exists in a range.
+ * @param first1 Start of search range.
+ * @param last1 End of search range.
+ * @param first2 Start of sequence
+ * @param last2 End of sequence.
+ * @return True if each element in [first2,last2) is contained in order
+ * within [first1,last1). False otherwise.
+ * @ingroup setoperations
+ *
+ * This operation expects both [first1,last1) and [first2,last2) to be
+ * sorted. Searches for the presence of each element in [first2,last2)
+ * within [first1,last1). The iterators over each range only move forward,
+ * so this is a linear algorithm. If an element in [first2,last2) is not
+ * found before the search iterator reaches @a last2, false is returned.
+ */
+ template<typename _InputIterator1, typename _InputIterator2>
bool
- includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2)
+ includes(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
while (__first1 != __last1 && __first2 != __last2)
if (*__first2 < *__first1)
@@ -3621,20 +4000,42 @@ __result, __binary_pred, _IterType());
return __first2 == __last2;
}
- template<typename _InputIter1, typename _InputIter2, typename _Compare>
+ /**
+ * @brief Determines whether all elements of a sequence exists in a range
+ * using comparison.
+ * @param first1 Start of search range.
+ * @param last1 End of search range.
+ * @param first2 Start of sequence
+ * @param last2 End of sequence.
+ * @param comp Comparison function to use.
+ * @return True if each element in [first2,last2) is contained in order
+ * within [first1,last1) according to comp. False otherwise.
+ * @ingroup setoperations
+ *
+ * This operation expects both [first1,last1) and [first2,last2) to be
+ * sorted. Searches for the presence of each element in [first2,last2)
+ * within [first1,last1), using comp to decide. The iterators over each
+ * range only move forward, so this is a linear algorithm. If an element
+ * in [first2,last2) is not found before the search iterator reaches @a
+ * last2, false is returned.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Compare>
bool
- includes(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2, _Compare __comp)
+ includes(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first2, *__first1))
@@ -3647,351 +4048,574 @@ __result, __binary_pred, _IterType());
return __first2 == __last2;
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter>
- _OutputIter
- set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result)
+ /**
+ * @brief Return the union of two sorted ranges.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * each range in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other,
+ * that element is copied and the iterator advanced. If an element is
+ * contained in both ranges, the element from the first range is copied and
+ * both ranges advance. The output range may not overlap either input
+ * range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
-
- while (__first1 != __last1 && __first2 != __last2) {
- if (*__first1 < *__first2) {
- *__result = *__first1;
- ++__first1;
- }
- else if (*__first2 < *__first1) {
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ else if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ }
+ ++__result;
}
- ++__result;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _Compare>
- _OutputIter
- set_union(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp)
+ /**
+ * @brief Return the union of two sorted ranges using a comparison functor.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * each range in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other
+ * according to @a comp, that element is copied and the iterator advanced.
+ * If an equivalent element according to @a comp is contained in both
+ * ranges, the element from the first range is copied and both ranges
+ * advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
-
- while (__first1 != __last1 && __first2 != __last2) {
- if (__comp(*__first1, *__first2)) {
- *__result = *__first1;
- ++__first1;
- }
- else if (__comp(*__first2, *__first1)) {
- *__result = *__first2;
- ++__first2;
- }
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__comp(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ else if (__comp(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ }
+ ++__result;
}
- ++__result;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter>
- _OutputIter
- set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result)
+ /**
+ * @brief Return the intersection of two sorted ranges.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * both ranges in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other,
+ * that iterator advances. If an element is contained in both ranges, the
+ * element from the first range is copied and both ranges advance. The
+ * output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
++__first1;
else if (*__first2 < *__first1)
++__first2;
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
- ++__result;
- }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ ++__result;
+ }
return __result;
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _Compare>
- _OutputIter
- set_intersection(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp)
+ /**
+ * @brief Return the intersection of two sorted ranges using comparison
+ * functor.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * both ranges in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other
+ * according to @a comp, that iterator advances. If an element is
+ * contained in both ranges according to @a comp, the element from the
+ * first range is copied and both ranges advance. The output range may not
+ * overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
++__first1;
else if (__comp(*__first2, *__first1))
++__first2;
- else {
- *__result = *__first1;
- ++__first1;
- ++__first2;
- ++__result;
- }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ ++__result;
+ }
return __result;
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter>
- _OutputIter
- set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result)
+ /**
+ * @brief Return the difference of two sorted ranges.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * the first range but not the second in order to the output range.
+ * Iterators increment for each range. When the current element of the
+ * first range is less than the second, that element is copied and the
+ * iterator advances. If the current element of the second range is less,
+ * the iterator advances, but no element is copied. If an element is
+ * contained in both ranges, no elements are copied and both ranges
+ * advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
while (__first1 != __last1 && __first2 != __last2)
- if (*__first1 < *__first2) {
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
else if (*__first2 < *__first1)
++__first2;
- else {
- ++__first1;
- ++__first2;
- }
- return copy(__first1, __last1, __result);
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first1, __last1, __result);
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _Compare>
- _OutputIter
- set_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result, _Compare __comp)
+ /**
+ * @brief Return the difference of two sorted ranges using comparison
+ * functor.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * the first range but not the second in order to the output range.
+ * Iterators increment for each range. When the current element of the
+ * first range is less than the second according to @a comp, that element
+ * is copied and the iterator advances. If the current element of the
+ * second range is less, no element is copied and the iterator advances.
+ * If an element is contained in both ranges according to @a comp, no
+ * elements are copied and both ranges advance. The output range may not
+ * overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first1, *__first2)) {
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
+ if (__comp(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
else if (__comp(*__first2, *__first1))
++__first2;
- else {
- ++__first1;
- ++__first2;
- }
- return copy(__first1, __last1, __result);
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first1, __last1, __result);
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter>
- _OutputIter
- set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result)
+ /**
+ * @brief Return the symmetric difference of two sorted ranges.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * one range but not the other in order to the output range. Iterators
+ * increment for each range. When the current element of one range is less
+ * than the other, that element is copied and the iterator advances. If an
+ * element is contained in both ranges, no elements are copied and both
+ * ranges advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_requires_sorted(__first1, __last1);
+ __glibcxx_requires_sorted(__first2, __last2);
while (__first1 != __last1 && __first2 != __last2)
- if (*__first1 < *__first2) {
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
- else if (*__first2 < *__first1) {
- *__result = *__first2;
- ++__first2;
- ++__result;
- }
- else {
- ++__first1;
- ++__first2;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ ++__result;
+ }
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1,
+ __last1, __result));
}
- template<typename _InputIter1, typename _InputIter2, typename _OutputIter,
- typename _Compare>
- _OutputIter
- set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _OutputIter __result,
+ /**
+ * @brief Return the symmetric difference of two sorted ranges using
+ * comparison functor.
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup setoperations
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * one range but not the other in order to the output range. Iterators
+ * increment for each range. When the current element of one range is less
+ * than the other according to @a comp, that element is copied and the
+ * iterator advances. If an element is contained in both ranges according
+ * to @a comp, no elements are copied and both ranges advance. The output
+ * range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result,
_Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_SameTypeConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_SameTypeConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
+ __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
while (__first1 != __last1 && __first2 != __last2)
- if (__comp(*__first1, *__first2)) {
- *__result = *__first1;
- ++__first1;
- ++__result;
- }
- else if (__comp(*__first2, *__first1)) {
- *__result = *__first2;
- ++__first2;
- ++__result;
- }
- else {
- ++__first1;
- ++__first2;
- }
- return copy(__first2, __last2, copy(__first1, __last1, __result));
+ if (__comp(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (__comp(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ ++__result;
+ }
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1,
+ __last1, __result));
}
// min_element and max_element, with and without an explicitly supplied
// comparison function.
- template<typename _ForwardIter>
- _ForwardIter
- max_element(_ForwardIter __first, _ForwardIter __last)
+ /**
+ * @brief Return the maximum element in a range.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return Iterator referencing the first instance of the largest value.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ max_element(_ForwardIterator __first, _ForwardIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
while (++__first != __last)
if (*__result < *__first)
__result = __first;
return __result;
}
- template<typename _ForwardIter, typename _Compare>
- _ForwardIter
- max_element(_ForwardIter __first, _ForwardIter __last,
+ /**
+ * @brief Return the maximum element in a range using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return Iterator referencing the first instance of the largest value
+ * according to comp.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ max_element(_ForwardIterator __first, _ForwardIterator __last,
_Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last) return __first;
- _ForwardIter __result = __first;
+ _ForwardIterator __result = __first;
while (++__first != __last)
if (__comp(*__result, *__first)) __result = __first;
return __result;
}
- template<typename _ForwardIter>
- _ForwardIter
- min_element(_ForwardIter __first, _ForwardIter __last)
+ /**
+ * @brief Return the minimum element in a range.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return Iterator referencing the first instance of the smallest value.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ min_element(_ForwardIterator __first, _ForwardIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
while (++__first != __last)
if (*__first < *__result)
__result = __first;
return __result;
}
- template<typename _ForwardIter, typename _Compare>
- _ForwardIter
- min_element(_ForwardIter __first, _ForwardIter __last,
+ /**
+ * @brief Return the minimum element in a range using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return Iterator referencing the first instance of the smallest value
+ * according to comp.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ min_element(_ForwardIterator __first, _ForwardIterator __last,
_Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last) return __first;
- _ForwardIter __result = __first;
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
while (++__first != __last)
if (__comp(*__first, *__result))
__result = __first;
@@ -4001,193 +4625,300 @@ __result, __binary_pred, _IterType());
// next_permutation and prev_permutation, with and without an explicitly
// supplied comparison function.
- template<typename _BidirectionalIter>
+ /**
+ * @brief Permute range into the next "dictionary" ordering.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the next one of this set.
+ * Returns true if there are more sequences to generate. If the sequence
+ * is the largest of the set, the smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator>
bool
- next_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_BidirectionalIter>::value_type>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return false;
- _BidirectionalIter __i = __first;
+ _BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (*__i < *__ii) {
- _BidirectionalIter __j = __last;
- while (!(*__i < *--__j))
- {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__i < *__ii)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*__i < *--__j))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
}
- }
}
- template<typename _BidirectionalIter, typename _Compare>
+ /**
+ * @brief Permute range into the next "dictionary" ordering using
+ * comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the next one of this set. Returns true if there are more
+ * sequences to generate. If the sequence is the largest of the set, the
+ * smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
bool
- next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp)
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_BidirectionalIter>::value_type,
- typename iterator_traits<_BidirectionalIter>::value_type>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return false;
- _BidirectionalIter __i = __first;
+ _BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (__comp(*__i, *__ii)) {
- _BidirectionalIter __j = __last;
- while (!__comp(*__i, *--__j))
- {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__comp(*__i, *__ii))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!__comp(*__i, *--__j))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
}
- }
}
- template<typename _BidirectionalIter>
+ /**
+ * @brief Permute range into the previous "dictionary" ordering.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the previous one of this
+ * set. Returns true if there are more sequences to generate. If the
+ * sequence is the smallest of the set, the largest is generated and false
+ * returned.
+ */
+ template<typename _BidirectionalIterator>
bool
- prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_BidirectionalIter>::value_type>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return false;
- _BidirectionalIter __i = __first;
+ _BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (*__ii < *__i) {
- _BidirectionalIter __j = __last;
- while (!(*--__j < *__i))
- {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__ii < *__i)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*--__j < *__i))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
}
- }
}
- template<typename _BidirectionalIter, typename _Compare>
+ /**
+ * @brief Permute range into the previous "dictionary" ordering using
+ * comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the previous one of this set. Returns true if there are
+ * more sequences to generate. If the sequence is the smallest of the set,
+ * the largest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
bool
- prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
- _Compare __comp)
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_BidirectionalIter>::value_type,
- typename iterator_traits<_BidirectionalIter>::value_type>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return false;
- _BidirectionalIter __i = __first;
+ _BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
- for(;;) {
- _BidirectionalIter __ii = __i;
- --__i;
- if (__comp(*__ii, *__i)) {
- _BidirectionalIter __j = __last;
- while (!__comp(*--__j, *__i))
- {}
- iter_swap(__i, __j);
- reverse(__ii, __last);
- return true;
- }
- if (__i == __first) {
- reverse(__first, __last);
- return false;
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__comp(*__ii, *__i))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!__comp(*--__j, *__i))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
}
- }
}
// find_first_of, with and without an explicitly supplied comparison function.
- template<typename _InputIter, typename _ForwardIter>
- _InputIter
- find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2)
+ /**
+ * @brief Find element from a set in a sequence.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c *i == @p *(i2) such that i2 is an
+ * interator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for an element that is equal to
+ * some element in the range [first2,last2). If found, returns an iterator
+ * in the range [first1,last1), otherwise returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
for ( ; __first1 != __last1; ++__first1)
- for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
if (*__first1 == *__iter)
return __first1;
return __last1;
}
- template<typename _InputIter, typename _ForwardIter, typename _BinaryPredicate>
- _InputIter
- find_first_of(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
+ /**
+ * @brief Find element from a set in a sequence using a predicate.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @param comp Predicate to use.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c comp(*i, @p *(i2)) is true and i2 is an
+ * interator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for an element that is equal to
+ * some element in the range [first2,last2). If found, returns an iterator in
+ * the range [first1,last1), otherwise returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _BinaryPredicate>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2,
_BinaryPredicate __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_InputIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
for ( ; __first1 != __last1; ++__first1)
- for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
if (__comp(*__first1, *__iter))
return __first1;
return __last1;
@@ -4200,154 +4931,223 @@ __result, __binary_pred, _IterType());
// is much faster than for forward iterators.
// find_end for forward iterators.
- template<typename _ForwardIter1, typename _ForwardIter2>
- _ForwardIter1
- __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator1
+ __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
forward_iterator_tag, forward_iterator_tag)
{
if (__first2 == __last2)
return __last1;
- else {
- _ForwardIter1 __result = __last1;
- while (1) {
- _ForwardIter1 __new_result
- = search(__first1, __last1, __first2, __last2);
- if (__new_result == __last1)
- return __result;
- else {
- __result = __new_result;
- __first1 = __new_result;
- ++__first1;
- }
+ else
+ {
+ _ForwardIterator1 __result = __last1;
+ while (1)
+ {
+ _ForwardIterator1 __new_result
+ = std::search(__first1, __last1, __first2, __last2);
+ if (__new_result == __last1)
+ return __result;
+ else
+ {
+ __result = __new_result;
+ __first1 = __new_result;
+ ++__first1;
+ }
+ }
}
- }
}
- template<typename _ForwardIter1, typename _ForwardIter2,
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
typename _BinaryPredicate>
- _ForwardIter1
- __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
+ _ForwardIterator1
+ __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
forward_iterator_tag, forward_iterator_tag,
_BinaryPredicate __comp)
{
if (__first2 == __last2)
return __last1;
- else {
- _ForwardIter1 __result = __last1;
- while (1) {
- _ForwardIter1 __new_result
- = search(__first1, __last1, __first2, __last2, __comp);
- if (__new_result == __last1)
- return __result;
- else {
- __result = __new_result;
- __first1 = __new_result;
- ++__first1;
- }
+ else
+ {
+ _ForwardIterator1 __result = __last1;
+ while (1)
+ {
+ _ForwardIterator1 __new_result
+ = std::search(__first1, __last1, __first2, __last2, __comp);
+ if (__new_result == __last1)
+ return __result;
+ else
+ {
+ __result = __new_result;
+ __first1 = __new_result;
+ ++__first1;
+ }
+ }
}
- }
}
// find_end for bidirectional iterators. Requires partial specialization.
- template<typename _BidirectionalIter1, typename _BidirectionalIter2>
- _BidirectionalIter1
- __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
+ _BidirectionalIterator1
+ __find_end(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>)
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator1>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator2>)
- typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
- typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
+ typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+ typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
- _RevIter1 __rlast1(__first1);
- _RevIter2 __rlast2(__first2);
- _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
- _RevIter2(__last2), __rlast2);
+ _RevIterator1 __rlast1(__first1);
+ _RevIterator2 __rlast2(__first2);
+ _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
+ _RevIterator2(__last2), __rlast2);
if (__rresult == __rlast1)
return __last1;
- else {
- _BidirectionalIter1 __result = __rresult.base();
- advance(__result, -distance(__first2, __last2));
- return __result;
- }
+ else
+ {
+ _BidirectionalIterator1 __result = __rresult.base();
+ std::advance(__result, -std::distance(__first2, __last2));
+ return __result;
+ }
}
- template<typename _BidirectionalIter1, typename _BidirectionalIter2,
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BinaryPredicate>
- _BidirectionalIter1
- __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
- _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+ _BidirectionalIterator1
+ __find_end(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag,
_BinaryPredicate __comp)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>)
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator1>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator2>)
- typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
- typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
+ typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+ typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
- _RevIter1 __rlast1(__first1);
- _RevIter2 __rlast2(__first2);
- _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
- _RevIter2(__last2), __rlast2,
- __comp);
+ _RevIterator1 __rlast1(__first1);
+ _RevIterator2 __rlast2(__first2);
+ _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
+ _RevIterator2(__last2), __rlast2,
+ __comp);
if (__rresult == __rlast1)
return __last1;
- else {
- _BidirectionalIter1 __result = __rresult.base();
- advance(__result, -distance(__first2, __last2));
- return __result;
- }
+ else
+ {
+ _BidirectionalIterator1 __result = __rresult.base();
+ std::advance(__result, -std::distance(__first2, __last2));
+ return __result;
+ }
}
// Dispatching functions for find_end.
- template<typename _ForwardIter1, typename _ForwardIter2>
- inline _ForwardIter1
- find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2)
+ /**
+ * @brief Find last matching subsequence in a sequence.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of sequence to match.
+ * @param last2 End of sequence to match.
+ * @return The last iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+ * for each @c N in the range @p [0,last2-first2), or @p last1 if no
+ * such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) and
+ * returns an iterator to the first element of the sub-sequence, or
+ * @p last1 if the sub-sequence is not found. The sub-sequence will be the
+ * last such subsequence contained in [first,last1).
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ inline _ForwardIterator1
+ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIter1>::value_type,
- typename iterator_traits<_ForwardIter2>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
- return __find_end(__first1, __last1, __first2, __last2,
- __iterator_category(__first1),
- __iterator_category(__first2));
+ return std::__find_end(__first1, __last1, __first2, __last2,
+ std::__iterator_category(__first1),
+ std::__iterator_category(__first2));
}
- template<typename _ForwardIter1, typename _ForwardIter2,
+ /**
+ * @brief Find last matching subsequence in a sequence using a predicate.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of sequence to match.
+ * @param last2 End of sequence to match.
+ * @param comp The predicate to use.
+ * @return The last iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c predicate(*(i+N), @p
+ * (first2+N)) is true for each @c N in the range @p [0,last2-first2), or
+ * @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) using
+ * comp as a predicate and returns an iterator to the first element of the
+ * sub-sequence, or @p last1 if the sub-sequence is not found. The
+ * sub-sequence will be the last such subsequence contained in
+ * [first,last1).
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
typename _BinaryPredicate>
- inline _ForwardIter1
- find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
- _ForwardIter2 __first2, _ForwardIter2 __last2,
+ inline _ForwardIterator1
+ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate __comp)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIter1>::value_type,
- typename iterator_traits<_ForwardIter2>::value_type>)
-
- return __find_end(__first1, __last1, __first2, __last2,
- __iterator_category(__first1),
- __iterator_category(__first2),
- __comp);
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ return std::__find_end(__first1, __last1, __first2, __last2,
+ std::__iterator_category(__first1),
+ std::__iterator_category(__first2),
+ __comp);
}
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_ALGO_H */
-
+#endif /* _ALGO_H */
diff --git a/contrib/libstdc++/include/bits/stl_algobase.h b/contrib/libstdc++/include/bits/stl_algobase.h
index 6e488ea..17c3007 100644
--- a/contrib/libstdc++/include/bits/stl_algobase.h
+++ b/contrib/libstdc++/include/bits/stl_algobase.h
@@ -1,6 +1,6 @@
// Bits and pieces used in algorithms -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_ALGOBASE_H
-#define __GLIBCPP_INTERNAL_ALGOBASE_H
+#ifndef _ALGOBASE_H
+#define _ALGOBASE_H 1
#include <bits/c++config.h>
#include <cstring>
@@ -74,11 +74,10 @@
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <bits/concept_check.h>
+#include <debug/debug.h>
namespace std
{
- // swap and iter_swap
-
/**
* @brief Swaps the contents of two iterators.
* @param a An iterator.
@@ -88,20 +87,26 @@ namespace std
* This function swaps the values pointed to by two iterators, not the
* iterators themselves.
*/
- template<typename _ForwardIter1, typename _ForwardIter2>
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
- iter_swap(_ForwardIter1 __a, _ForwardIter2 __b)
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
- typedef typename iterator_traits<_ForwardIter1>::value_type _ValueType1;
- typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2;
+ typedef typename iterator_traits<_ForwardIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_ForwardIterator2>::value_type
+ _ValueType2;
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
- __glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>)
- __glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>)
-
- _ValueType1 __tmp = *__a;
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator1>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator2>)
+ __glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
+ _ValueType2>)
+ __glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
+ _ValueType1>)
+
+ const _ValueType1 __tmp = *__a;
*__a = *__b;
*__b = __tmp;
}
@@ -120,16 +125,13 @@ namespace std
swap(_Tp& __a, _Tp& __b)
{
// concept requirements
- __glibcpp_function_requires(_SGIAssignableConcept<_Tp>)
-
- _Tp __tmp = __a;
+ __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
+
+ const _Tp __tmp = __a;
__a = __b;
__b = __tmp;
}
- //--------------------------------------------------
- // min and max
-
#undef min
#undef max
@@ -148,9 +150,11 @@ namespace std
min(const _Tp& __a, const _Tp& __b)
{
// concept requirements
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __b < __a ? __b : __a;
- if (__b < __a) return __b; return __a;
+ if (__b < __a)
+ return __b;
+ return __a;
}
/**
@@ -165,12 +169,14 @@ namespace std
*/
template<typename _Tp>
inline const _Tp&
- max(const _Tp& __a, const _Tp& __b)
+ max(const _Tp& __a, const _Tp& __b)
{
// concept requirements
- __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __a < __b ? __b : __a;
- if (__a < __b) return __b; return __a;
+ if (__a < __b)
+ return __b;
+ return __a;
}
/**
@@ -188,7 +194,9 @@ namespace std
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__b, __a) ? __b : __a;
- if (__comp(__b, __a)) return __b; return __a;
+ if (__comp(__b, __a))
+ return __b;
+ return __a;
}
/**
@@ -206,42 +214,40 @@ namespace std
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__a, __b) ? __b : __a;
- if (__comp(__a, __b)) return __b; return __a;
+ if (__comp(__a, __b))
+ return __b;
+ return __a;
}
- //--------------------------------------------------
- // copy
-
// All of these auxiliary functions serve two purposes. (1) Replace
// calls to copy with memmove whenever possible. (Memmove, not memcpy,
// because the input and output ranges are permitted to overlap.)
// (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count.
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy(_InputIter __first, _InputIter __last,
- _OutputIter __result,
- input_iterator_tag)
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, input_iterator_tag)
{
- for ( ; __first != __last; ++__result, ++__first)
+ for (; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
- template<typename _RandomAccessIter, typename _OutputIter>
- inline _OutputIter
- __copy(_RandomAccessIter __first, _RandomAccessIter __last,
- _OutputIter __result,
- random_access_iterator_tag)
+ template<typename _RandomAccessIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _OutputIterator __result, random_access_iterator_tag)
{
- typedef typename iterator_traits<_RandomAccessIter>::difference_type
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance;
- for (_Distance __n = __last - __first; __n > 0; --__n) {
- *__result = *__first;
- ++__first;
- ++__result;
- }
+ for (_Distance __n = __last - __first; __n > 0; --__n)
+ {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
return __result;
}
@@ -249,78 +255,76 @@ namespace std
inline _Tp*
__copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
- memmove(__result, __first, sizeof(_Tp) * (__last - __first));
+ std::memmove(__result, __first, sizeof(_Tp) * (__last - __first));
return __result + (__last - __first);
}
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_aux2(_InputIter __first, _InputIter __last,
- _OutputIter __result, __false_type)
- { return __copy(__first, __last, __result, __iterator_category(__first)); }
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_aux2(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __false_type)
+ { return std::__copy(__first, __last, __result,
+ std::__iterator_category(__first)); }
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_aux2(_InputIter __first, _InputIter __last,
- _OutputIter __result, __true_type)
- { return __copy(__first, __last, __result, __iterator_category(__first)); }
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_aux2(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __true_type)
+ { return std::__copy(__first, __last, __result,
+ std::__iterator_category(__first)); }
template<typename _Tp>
inline _Tp*
- __copy_aux2(_Tp* __first, _Tp* __last,
- _Tp* __result, __true_type)
- { return __copy_trivial(__first, __last, __result); }
+ __copy_aux2(_Tp* __first, _Tp* __last, _Tp* __result, __true_type)
+ { return std::__copy_trivial(__first, __last, __result); }
template<typename _Tp>
inline _Tp*
- __copy_aux2(const _Tp* __first, const _Tp* __last,
- _Tp* __result, __true_type)
- { return __copy_trivial(__first, __last, __result); }
-
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_ni2(_InputIter __first, _InputIter __last,
- _OutputIter __result, __true_type)
- {
- typedef typename iterator_traits<_InputIter>::value_type
- _ValueType;
- typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
- _Trivial;
- return _OutputIter(__copy_aux2(__first, __last,
- __result.base(),
- _Trivial()));
+ __copy_aux2(const _Tp* __first, const _Tp* __last, _Tp* __result,
+ __true_type)
+ { return std::__copy_trivial(__first, __last, __result); }
+
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_ni2(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __true_type)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _ValueType;
+ typedef typename __type_traits<
+ _ValueType>::has_trivial_assignment_operator _Trivial;
+ return _OutputIterator(std::__copy_aux2(__first, __last, __result.base(),
+ _Trivial()));
}
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_ni2(_InputIter __first, _InputIter __last,
- _OutputIter __result, __false_type)
- {
- typedef typename iterator_traits<_InputIter>::value_type
- _ValueType;
- typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
- _Trivial;
- return __copy_aux2(__first, __last,
- __result,
- _Trivial());
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_ni2(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __false_type)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+ typedef typename __type_traits<
+ _ValueType>::has_trivial_assignment_operator _Trivial;
+ return std::__copy_aux2(__first, __last, __result, _Trivial());
}
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_ni1(_InputIter __first, _InputIter __last,
- _OutputIter __result, __true_type)
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_ni1(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __true_type)
{
- typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
- return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
+ typedef typename _Is_normal_iterator<_OutputIterator>::_Normal __Normal;
+ return std::__copy_ni2(__first.base(), __last.base(),
+ __result, __Normal());
}
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- __copy_ni1(_InputIter __first, _InputIter __last,
- _OutputIter __result, __false_type)
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ __copy_ni1(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, __false_type)
{
- typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
- return __copy_ni2(__first, __last, __result, __Normal());
+ typedef typename _Is_normal_iterator<_OutputIterator>::_Normal __Normal;
+ return std::__copy_ni2(__first, __last, __result, __Normal());
}
/**
@@ -333,29 +337,32 @@ namespace std
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
- * optimizations such as unrolling). If the input range and the output
- * range overlap, then the copy_backward function should be used instead.
+ * optimizations such as unrolling). Result may not be contained within
+ * [first,last); the copy_backward function should be used instead.
+ *
+ * Note that the end of the output range is permitted to be contained
+ * within [first,last).
*/
- template<typename _InputIter, typename _OutputIter>
- inline _OutputIter
- copy(_InputIter __first, _InputIter __last, _OutputIter __result)
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
- return __copy_ni1(__first, __last, __result, __Normal());
+ typedef typename _Is_normal_iterator<_InputIterator>::_Normal __Normal;
+ return std::__copy_ni1(__first, __last, __result, __Normal());
}
- //--------------------------------------------------
- // copy_backward
-
- template<typename _BidirectionalIter1, typename _BidirectionalIter2>
- inline _BidirectionalIter2
- __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
- _BidirectionalIter2 __result,
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
+ inline _BidirectionalIterator2
+ __copy_backward(_BidirectionalIterator1 __first,
+ _BidirectionalIterator1 __last,
+ _BidirectionalIterator2 __result,
bidirectional_iterator_tag)
{
while (__first != __last)
@@ -363,36 +370,31 @@ namespace std
return __result;
}
- template<typename _RandomAccessIter, typename _BidirectionalIter>
- inline _BidirectionalIter
- __copy_backward(_RandomAccessIter __first, _RandomAccessIter __last,
- _BidirectionalIter __result,
- random_access_iterator_tag)
+ template<typename _RandomAccessIterator, typename _BidirectionalIterator>
+ inline _BidirectionalIterator
+ __copy_backward(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _BidirectionalIterator __result, random_access_iterator_tag)
{
- typename iterator_traits<_RandomAccessIter>::difference_type __n;
+ typename iterator_traits<_RandomAccessIterator>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
- // This dispatch class is a workaround for compilers that do not
+ // This dispatch class is a workaround for compilers that do not
// have partial ordering of function templates. All we're doing is
// creating a specialization so that we can turn a call to copy_backward
// into a memmove whenever possible.
-
- template<typename _BidirectionalIter1, typename _BidirectionalIter2,
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BoolType>
struct __copy_backward_dispatch
{
- static _BidirectionalIter2
- copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
- _BidirectionalIter2 __result)
- {
- return __copy_backward(__first, __last,
- __result,
- __iterator_category(__first));
- }
+ static _BidirectionalIterator2
+ copy(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
+ _BidirectionalIterator2 __result)
+ { return std::__copy_backward(__first, __last, __result,
+ std::__iterator_category(__first)); }
};
template<typename _Tp>
@@ -402,7 +404,7 @@ namespace std
copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
- memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
+ std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
@@ -413,7 +415,7 @@ namespace std
static _Tp*
copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
- return __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
+ return std::__copy_backward_dispatch<_Tp*, _Tp*, __true_type>
::copy(__first, __last, __result);
}
};
@@ -424,21 +426,23 @@ namespace std
{
typedef typename __type_traits<typename iterator_traits<_BI2>::value_type>
::has_trivial_assignment_operator _Trivial;
- return __copy_backward_dispatch<_BI1, _BI2, _Trivial>
- ::copy(__first, __last, __result);
+ return
+ std::__copy_backward_dispatch<_BI1, _BI2, _Trivial>::copy(__first,
+ __last,
+ __result);
}
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __true_type)
- { return _BI2(__copy_backward_aux(__first, __last, __result.base())); }
+ { return _BI2(std::__copy_backward_aux(__first, __last, __result.base())); }
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __false_type)
- { return __copy_backward_aux(__first, __last, __result); }
+ { return std::__copy_backward_aux(__first, __last, __result); }
template <typename _BI1, typename _BI2>
inline _BI2
@@ -446,8 +450,9 @@ namespace std
_BI2 __result, __true_type)
{
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
- return __copy_backward_output_normal_iterator(__first.base(), __last.base(),
- __result, __Normal());
+ return std::__copy_backward_output_normal_iterator(__first.base(),
+ __last.base(),
+ __result, __Normal());
}
template <typename _BI1, typename _BI2>
@@ -456,15 +461,15 @@ namespace std
_BI2 __result, __false_type)
{
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
- return __copy_backward_output_normal_iterator(__first, __last, __result,
- __Normal());
+ return std::__copy_backward_output_normal_iterator(__first, __last,
+ __result, __Normal());
}
/**
* @brief Copies the range [first,last) into result.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @param result A bidirectional iterator.
* @return result - (first - last)
*
* The function has the same effect as copy, but starts at the end of the
@@ -473,28 +478,28 @@ namespace std
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
+ *
+ * Result may not be in the range [first,last). Use copy instead. Note
+ * that the start of the output range may overlap [first,last).
*/
template <typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BI1>)
- __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
- __glibcpp_function_requires(_ConvertibleConcept<
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+ __glibcxx_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal;
- return __copy_backward_input_normal_iterator(__first, __last, __result,
- __Normal());
+ return std::__copy_backward_input_normal_iterator(__first, __last,
+ __result, __Normal());
}
- //--------------------------------------------------
- // fill and fill_n
-
-
/**
* @brief Fills the range [first,last) with copies of value.
* @param first A forward iterator.
@@ -506,12 +511,14 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to
* @c memset.
*/
- template<typename _ForwardIter, typename _Tp>
+ template<typename _ForwardIterator, typename _Tp>
void
- fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
+ fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
*__first = __value;
@@ -528,12 +535,12 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to
* @c memset.
*/
- template<typename _OutputIter, typename _Size, typename _Tp>
- _OutputIter
- fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
+ template<typename _OutputIterator, typename _Size, typename _Tp>
+ _OutputIterator
+ fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
// concept requirements
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,_Tp>)
for ( ; __n > 0; --__n, ++__first)
*__first = __value;
@@ -541,33 +548,35 @@ namespace std
}
// Specialization: for one-byte types we can use memset.
-
inline void
fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c)
{
- unsigned char __tmp = __c;
- memset(__first, __tmp, __last - __first);
+ __glibcxx_requires_valid_range(__first, __last);
+ const unsigned char __tmp = __c;
+ std::memset(__first, __tmp, __last - __first);
}
inline void
fill(signed char* __first, signed char* __last, const signed char& __c)
{
- signed char __tmp = __c;
- memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
+ __glibcxx_requires_valid_range(__first, __last);
+ const signed char __tmp = __c;
+ std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
inline void
fill(char* __first, char* __last, const char& __c)
{
- char __tmp = __c;
- memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
+ __glibcxx_requires_valid_range(__first, __last);
+ const char __tmp = __c;
+ std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
template<typename _Size>
inline unsigned char*
fill_n(unsigned char* __first, _Size __n, const unsigned char& __c)
{
- fill(__first, __first + __n, __c);
+ std::fill(__first, __first + __n, __c);
return __first + __n;
}
@@ -575,7 +584,7 @@ namespace std
inline signed char*
fill_n(char* __first, _Size __n, const signed char& __c)
{
- fill(__first, __first + __n, __c);
+ std::fill(__first, __first + __n, __c);
return __first + __n;
}
@@ -583,14 +592,11 @@ namespace std
inline char*
fill_n(char* __first, _Size __n, const char& __c)
{
- fill(__first, __first + __n, __c);
+ std::fill(__first, __first + __n, __c);
return __first + __n;
}
- //--------------------------------------------------
- // equal and mismatch
-
/**
* @brief Finds the places in ranges which don't match.
* @param first1 An input iterator.
@@ -603,24 +609,26 @@ namespace std
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
- template<typename _InputIter1, typename _InputIter2>
- pair<_InputIter1, _InputIter2>
- mismatch(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2)
+ template<typename _InputIterator1, typename _InputIterator2>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIter2>::value_type>)
-
- while (__first1 != __last1 && *__first1 == *__first2) {
- ++__first1;
- ++__first2;
- }
- return pair<_InputIter1, _InputIter2>(__first1, __first2);
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ while (__first1 != __last1 && *__first1 == *__first2)
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
@@ -637,21 +645,23 @@ namespace std
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
- template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
- pair<_InputIter1, _InputIter2>
- mismatch(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2,
- _BinaryPredicate __binary_pred)
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _BinaryPredicate>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
-
- while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
- ++__first1;
- ++__first2;
- }
- return pair<_InputIter1, _InputIter2>(__first1, __first2);
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
@@ -665,17 +675,18 @@ namespace std
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
- template<typename _InputIter1, typename _InputIter2>
+ template<typename _InputIterator1, typename _InputIterator2>
inline bool
- equal(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2)
+ equal(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIter1>::value_type,
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
@@ -696,15 +707,17 @@ namespace std
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
- template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _BinaryPredicate>
inline bool
- equal(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2,
+ equal(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2,
_BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2))
@@ -712,9 +725,6 @@ namespace std
return true;
}
- //--------------------------------------------------
- // lexicographical_compare
-
/**
* @brief Performs "dictionary" comparison on ranges.
* @param first1 An input iterator.
@@ -729,26 +739,28 @@ namespace std
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
- template<typename _InputIter1, typename _InputIter2>
+ template<typename _InputIterator1, typename _InputIterator2>
bool
- lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2)
+ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter2>::value_type>)
-
- for ( ; __first1 != __last1 && __first2 != __last2
- ; ++__first1, ++__first2) {
- if (*__first1 < *__first2)
- return true;
- if (*__first2 < *__first1)
- return false;
- }
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ for (;__first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
+ {
+ if (*__first1 < *__first2)
+ return true;
+ if (*__first2 < *__first1)
+ return false;
+ }
return __first1 == __last1 && __first2 != __last2;
}
@@ -764,33 +776,43 @@ namespace std
* The same as the four-parameter @c lexigraphical_compare, but uses the
* comp parameter instead of @c <.
*/
- template<typename _InputIter1, typename _InputIter2, typename _Compare>
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Compare>
bool
- lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
+ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
_Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
for ( ; __first1 != __last1 && __first2 != __last2
- ; ++__first1, ++__first2) {
- if (__comp(*__first1, *__first2))
- return true;
- if (__comp(*__first2, *__first1))
- return false;
- }
+ ; ++__first1, ++__first2)
+ {
+ if (__comp(*__first1, *__first2))
+ return true;
+ if (__comp(*__first2, *__first1))
+ return false;
+ }
return __first1 == __last1 && __first2 != __last2;
}
- inline bool
- lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1,
- const unsigned char* __first2, const unsigned char* __last2)
+ inline bool
+ lexicographical_compare(const unsigned char* __first1,
+ const unsigned char* __last1,
+ const unsigned char* __first2,
+ const unsigned char* __last2)
{
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
- const int __result = memcmp(__first1, __first2, min(__len1, __len2));
+ const int __result = std::memcmp(__first1, __first2,
+ std::min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
@@ -798,23 +820,22 @@ namespace std
lexicographical_compare(const char* __first1, const char* __last1,
const char* __first2, const char* __last2)
{
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
#if CHAR_MAX == SCHAR_MAX
- return lexicographical_compare((const signed char*) __first1,
- (const signed char*) __last1,
- (const signed char*) __first2,
- (const signed char*) __last2);
+ return std::lexicographical_compare((const signed char*) __first1,
+ (const signed char*) __last1,
+ (const signed char*) __first2,
+ (const signed char*) __last2);
#else /* CHAR_MAX == SCHAR_MAX */
- return lexicographical_compare((const unsigned char*) __first1,
- (const unsigned char*) __last1,
- (const unsigned char*) __first2,
- (const unsigned char*) __last2);
+ return std::lexicographical_compare((const unsigned char*) __first1,
+ (const unsigned char*) __last1,
+ (const unsigned char*) __first2,
+ (const unsigned char*) __last2);
#endif /* CHAR_MAX == SCHAR_MAX */
}
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_ALGOBASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/bits/stl_bvector.h b/contrib/libstdc++/include/bits/stl_bvector.h
index 2c97d47..afae738 100644
--- a/contrib/libstdc++/include/bits/stl_bvector.h
+++ b/contrib/libstdc++/include/bits/stl_bvector.h
@@ -1,6 +1,6 @@
-// bit_vector and vector<bool> specialization -*- C++ -*-
+// vector<bool> specialization -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,528 +58,646 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_BVECTOR_H
-#define __GLIBCPP_INTERNAL_BVECTOR_H
+#ifndef _BVECTOR_H
+#define _BVECTOR_H 1
-namespace std
-{
+namespace _GLIBCXX_STD
+{
typedef unsigned long _Bit_type;
- enum { _M_word_bit = int(CHAR_BIT * sizeof(_Bit_type)) };
+ enum { _S_word_bit = int(CHAR_BIT * sizeof(_Bit_type)) };
-struct _Bit_reference {
+ struct _Bit_reference
+ {
+ _Bit_type * _M_p;
+ _Bit_type _M_mask;
- _Bit_type * _M_p;
- _Bit_type _M_mask;
- _Bit_reference(_Bit_type * __x, _Bit_type __y)
- : _M_p(__x), _M_mask(__y) {}
+ _Bit_reference(_Bit_type * __x, _Bit_type __y)
+ : _M_p(__x), _M_mask(__y) { }
-public:
- _Bit_reference() : _M_p(0), _M_mask(0) {}
- operator bool() const { return !!(*_M_p & _M_mask); }
- _Bit_reference& operator=(bool __x)
- {
- if (__x) *_M_p |= _M_mask;
- else *_M_p &= ~_M_mask;
- return *this;
- }
- _Bit_reference& operator=(const _Bit_reference& __x)
+ _Bit_reference() : _M_p(0), _M_mask(0) { }
+
+ operator bool() const { return !!(*_M_p & _M_mask); }
+
+ _Bit_reference&
+ operator=(bool __x)
+ {
+ if (__x)
+ *_M_p |= _M_mask;
+ else
+ *_M_p &= ~_M_mask;
+ return *this;
+ }
+
+ _Bit_reference&
+ operator=(const _Bit_reference& __x)
{ return *this = bool(__x); }
- bool operator==(const _Bit_reference& __x) const
+
+ bool
+ operator==(const _Bit_reference& __x) const
{ return bool(*this) == bool(__x); }
- bool operator<(const _Bit_reference& __x) const
+
+ bool
+ operator<(const _Bit_reference& __x) const
{ return !bool(*this) && bool(__x); }
- void flip() { *_M_p ^= _M_mask; }
-};
-struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
-{
- _Bit_type * _M_p;
- unsigned int _M_offset;
+ void
+ flip() { *_M_p ^= _M_mask; }
+ };
- _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
- : _M_p(__x), _M_offset(__y) {}
+ struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
+ {
+ _Bit_type * _M_p;
+ unsigned int _M_offset;
+
+ _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
+ : _M_p(__x), _M_offset(__y) { }
- void _M_bump_up() {
- if (_M_offset++ == _M_word_bit - 1) {
- _M_offset = 0;
- ++_M_p;
+ void
+ _M_bump_up()
+ {
+ if (_M_offset++ == _S_word_bit - 1)
+ {
+ _M_offset = 0;
+ ++_M_p;
+ }
}
- }
- void _M_bump_down() {
- if (_M_offset-- == 0) {
- _M_offset = _M_word_bit - 1;
- --_M_p;
+
+ void
+ _M_bump_down()
+ {
+ if (_M_offset-- == 0)
+ {
+ _M_offset = _S_word_bit - 1;
+ --_M_p;
+ }
}
- }
- void _M_incr(ptrdiff_t __i) {
- difference_type __n = __i + _M_offset;
- _M_p += __n / _M_word_bit;
- __n = __n % _M_word_bit;
- if (__n < 0) {
- _M_offset = (unsigned int) __n + _M_word_bit;
- --_M_p;
- } else
- _M_offset = (unsigned int) __n;
- }
+ void
+ _M_incr(ptrdiff_t __i)
+ {
+ difference_type __n = __i + _M_offset;
+ _M_p += __n / _S_word_bit;
+ __n = __n % _S_word_bit;
+ if (__n < 0)
+ {
+ _M_offset = static_cast<unsigned int>(__n + _S_word_bit);
+ --_M_p;
+ }
+ else
+ _M_offset = static_cast<unsigned int>(__n);
+ }
- bool operator==(const _Bit_iterator_base& __i) const {
- return _M_p == __i._M_p && _M_offset == __i._M_offset;
- }
- bool operator<(const _Bit_iterator_base& __i) const {
- return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset);
- }
- bool operator!=(const _Bit_iterator_base& __i) const {
- return !(*this == __i);
- }
- bool operator>(const _Bit_iterator_base& __i) const {
- return __i < *this;
- }
- bool operator<=(const _Bit_iterator_base& __i) const {
- return !(__i < *this);
- }
- bool operator>=(const _Bit_iterator_base& __i) const {
- return !(*this < __i);
- }
-};
+ bool
+ operator==(const _Bit_iterator_base& __i) const
+ { return _M_p == __i._M_p && _M_offset == __i._M_offset; }
-inline ptrdiff_t
-operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
- return _M_word_bit * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset;
-}
+ bool
+ operator<(const _Bit_iterator_base& __i) const
+ {
+ return _M_p < __i._M_p
+ || (_M_p == __i._M_p && _M_offset < __i._M_offset);
+ }
+ bool
+ operator!=(const _Bit_iterator_base& __i) const
+ { return !(*this == __i); }
-struct _Bit_iterator : public _Bit_iterator_base
-{
- typedef _Bit_reference reference;
- typedef _Bit_reference* pointer;
- typedef _Bit_iterator iterator;
-
- _Bit_iterator() : _Bit_iterator_base(0, 0) {}
- _Bit_iterator(_Bit_type * __x, unsigned int __y)
- : _Bit_iterator_base(__x, __y) {}
-
- reference operator*() const { return reference(_M_p, 1UL << _M_offset); }
- iterator& operator++() {
- _M_bump_up();
- return *this;
- }
- iterator operator++(int) {
- iterator __tmp = *this;
- _M_bump_up();
- return __tmp;
- }
- iterator& operator--() {
- _M_bump_down();
- return *this;
- }
- iterator operator--(int) {
- iterator __tmp = *this;
- _M_bump_down();
- return __tmp;
- }
- iterator& operator+=(difference_type __i) {
- _M_incr(__i);
- return *this;
- }
- iterator& operator-=(difference_type __i) {
- *this += -__i;
- return *this;
- }
- iterator operator+(difference_type __i) const {
- iterator __tmp = *this;
- return __tmp += __i;
- }
- iterator operator-(difference_type __i) const {
- iterator __tmp = *this;
- return __tmp -= __i;
+ bool
+ operator>(const _Bit_iterator_base& __i) const
+ { return __i < *this; }
+
+ bool
+ operator<=(const _Bit_iterator_base& __i) const
+ { return !(__i < *this); }
+
+ bool
+ operator>=(const _Bit_iterator_base& __i) const
+ { return !(*this < __i); }
+ };
+
+ inline ptrdiff_t
+ operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
+ {
+ return _S_word_bit * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset;
}
- reference operator[](difference_type __i) { return *(*this + __i); }
-};
+ struct _Bit_iterator : public _Bit_iterator_base
+ {
+ typedef _Bit_reference reference;
+ typedef _Bit_reference* pointer;
+ typedef _Bit_iterator iterator;
-inline _Bit_iterator
-operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; }
+ _Bit_iterator() : _Bit_iterator_base(0, 0) { }
+ _Bit_iterator(_Bit_type * __x, unsigned int __y)
+ : _Bit_iterator_base(__x, __y) { }
+ reference
+ operator*() const { return reference(_M_p, 1UL << _M_offset); }
-struct _Bit_const_iterator : public _Bit_iterator_base
-{
- typedef bool reference;
- typedef bool const_reference;
- typedef const bool* pointer;
- typedef _Bit_const_iterator const_iterator;
-
- _Bit_const_iterator() : _Bit_iterator_base(0, 0) {}
- _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
- : _Bit_iterator_base(__x, __y) {}
- _Bit_const_iterator(const _Bit_iterator& __x)
- : _Bit_iterator_base(__x._M_p, __x._M_offset) {}
-
- const_reference operator*() const {
- return _Bit_reference(_M_p, 1UL << _M_offset);
- }
- const_iterator& operator++() {
- _M_bump_up();
- return *this;
- }
- const_iterator operator++(int) {
- const_iterator __tmp = *this;
- _M_bump_up();
- return __tmp;
- }
- const_iterator& operator--() {
- _M_bump_down();
- return *this;
- }
- const_iterator operator--(int) {
- const_iterator __tmp = *this;
- _M_bump_down();
- return __tmp;
- }
- const_iterator& operator+=(difference_type __i) {
- _M_incr(__i);
- return *this;
- }
- const_iterator& operator-=(difference_type __i) {
- *this += -__i;
- return *this;
- }
- const_iterator operator+(difference_type __i) const {
- const_iterator __tmp = *this;
- return __tmp += __i;
- }
- const_iterator operator-(difference_type __i) const {
- const_iterator __tmp = *this;
- return __tmp -= __i;
- }
- const_reference operator[](difference_type __i) {
- return *(*this + __i);
- }
-};
-
-inline _Bit_const_iterator
-operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; }
-
-
-// Bit-vector base class, which encapsulates the difference between
-// old SGI-style allocators and standard-conforming allocators.
-
-// Base class for ordinary allocators.
-template <class _Allocator, bool __is_static>
-class _Bvector_alloc_base {
-public:
- typedef typename _Alloc_traits<bool, _Allocator>::allocator_type
- allocator_type;
- allocator_type get_allocator() const { return _M_data_allocator; }
-
- _Bvector_alloc_base(const allocator_type& __a)
- : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {}
-
-protected:
- _Bit_type * _M_bit_alloc(size_t __n)
- { return _M_data_allocator.allocate((__n + _M_word_bit - 1)/_M_word_bit); }
- void _M_deallocate() {
- if (_M_start._M_p)
- _M_data_allocator.deallocate(_M_start._M_p,
- _M_end_of_storage - _M_start._M_p);
- }
-
- typename _Alloc_traits<_Bit_type, _Allocator>::allocator_type
- _M_data_allocator;
- _Bit_iterator _M_start;
- _Bit_iterator _M_finish;
- _Bit_type * _M_end_of_storage;
-};
-
-// Specialization for instanceless allocators.
-template <class _Allocator>
-class _Bvector_alloc_base<_Allocator, true> {
-public:
- typedef typename _Alloc_traits<bool, _Allocator>::allocator_type
- allocator_type;
- allocator_type get_allocator() const { return allocator_type(); }
-
- _Bvector_alloc_base(const allocator_type&)
- : _M_start(), _M_finish(), _M_end_of_storage(0) {}
-
-protected:
- typedef typename _Alloc_traits<_Bit_type, _Allocator>::_Alloc_type
- _Alloc_type;
-
- _Bit_type * _M_bit_alloc(size_t __n)
- { return _Alloc_type::allocate((__n + _M_word_bit - 1)/_M_word_bit); }
- void _M_deallocate() {
- if (_M_start._M_p)
- _Alloc_type::deallocate(_M_start._M_p,
- _M_end_of_storage - _M_start._M_p);
- }
-
- _Bit_iterator _M_start;
- _Bit_iterator _M_finish;
- _Bit_type * _M_end_of_storage;
-};
-
-template <class _Alloc>
-class _Bvector_base
- : public _Bvector_alloc_base<_Alloc,
- _Alloc_traits<bool, _Alloc>::_S_instanceless>
-{
- typedef _Bvector_alloc_base<_Alloc,
- _Alloc_traits<bool, _Alloc>::_S_instanceless>
- _Base;
-public:
- typedef typename _Base::allocator_type allocator_type;
+ iterator&
+ operator++()
+ {
+ _M_bump_up();
+ return *this;
+ }
+
+ iterator
+ operator++(int)
+ {
+ iterator __tmp = *this;
+ _M_bump_up();
+ return __tmp;
+ }
+
+ iterator&
+ operator--()
+ {
+ _M_bump_down();
+ return *this;
+ }
+
+ iterator
+ operator--(int)
+ {
+ iterator __tmp = *this;
+ _M_bump_down();
+ return __tmp;
+ }
+
+ iterator&
+ operator+=(difference_type __i)
+ {
+ _M_incr(__i);
+ return *this;
+ }
+
+ iterator&
+ operator-=(difference_type __i)
+ {
+ *this += -__i;
+ return *this;
+ }
+
+ iterator
+ operator+(difference_type __i) const
+ {
+ iterator __tmp = *this;
+ return __tmp += __i;
+ }
+
+ iterator
+ operator-(difference_type __i) const
+ {
+ iterator __tmp = *this;
+ return __tmp -= __i;
+ }
+
+ reference
+ operator[](difference_type __i)
+ { return *(*this + __i); }
+ };
+
+ inline _Bit_iterator
+ operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; }
+
+
+ struct _Bit_const_iterator : public _Bit_iterator_base
+ {
+ typedef bool reference;
+ typedef bool const_reference;
+ typedef const bool* pointer;
+ typedef _Bit_const_iterator const_iterator;
+
+ _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
+ _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
+ : _Bit_iterator_base(__x, __y) { }
+ _Bit_const_iterator(const _Bit_iterator& __x)
+ : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
+
+ const_reference
+ operator*() const
+ { return _Bit_reference(_M_p, 1UL << _M_offset); }
+
+ const_iterator&
+ operator++()
+ {
+ _M_bump_up();
+ return *this;
+ }
+
+ const_iterator
+ operator++(int)
+ {
+ const_iterator __tmp = *this;
+ _M_bump_up();
+ return __tmp;
+ }
+
+ const_iterator&
+ operator--()
+ {
+ _M_bump_down();
+ return *this;
+ }
+
+ const_iterator
+ operator--(int)
+ {
+ const_iterator __tmp = *this;
+ _M_bump_down();
+ return __tmp;
+ }
+
+ const_iterator&
+ operator+=(difference_type __i)
+ {
+ _M_incr(__i);
+ return *this;
+ }
+
+ const_iterator&
+ operator-=(difference_type __i)
+ {
+ *this += -__i;
+ return *this;
+ }
+
+ const_iterator
+ operator+(difference_type __i) const {
+ const_iterator __tmp = *this;
+ return __tmp += __i;
+ }
+
+ const_iterator
+ operator-(difference_type __i) const
+ {
+ const_iterator __tmp = *this;
+ return __tmp -= __i;
+ }
- _Bvector_base(const allocator_type& __a) : _Base(__a) {}
- ~_Bvector_base() { _Base::_M_deallocate(); }
-};
+ const_reference
+ operator[](difference_type __i)
+ { return *(*this + __i); }
+ };
+
+ inline _Bit_const_iterator
+ operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
+ { return __x + __n; }
+ template<class _Alloc>
+ class _Bvector_base
+ {
+ typedef typename _Alloc::template rebind<_Bit_type>::other
+ _Bit_alloc_type;
+
+ struct _Bvector_impl : public _Bit_alloc_type
+ {
+ _Bit_iterator _M_start;
+ _Bit_iterator _M_finish;
+ _Bit_type* _M_end_of_storage;
+ _Bvector_impl(const _Bit_alloc_type& __a)
+ : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
+ { }
+ };
+
+ public:
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
+
+ _Bvector_base(const allocator_type& __a) : _M_impl(__a) { }
+
+ ~_Bvector_base() { this->_M_deallocate(); }
+
+ protected:
+ _Bvector_impl _M_impl;
+
+ _Bit_type*
+ _M_allocate(size_t __n)
+ { return _M_impl.allocate((__n + _S_word_bit - 1) / _S_word_bit); }
+
+ void
+ _M_deallocate()
+ {
+ if (_M_impl._M_start._M_p)
+ _M_impl.deallocate(_M_impl._M_start._M_p,
+ _M_impl._M_end_of_storage - _M_impl._M_start._M_p);
+ }
+ };
} // namespace std
// Declare a partial specialization of vector<T, Alloc>.
#include <bits/stl_vector.h>
-namespace std
-{
-template <typename _Alloc>
- class vector<bool, _Alloc> : public _Bvector_base<_Alloc>
+namespace _GLIBCXX_STD
+{
+ /**
+ * @brief A specialization of vector for booleans which offers fixed time
+ * access to individual elements in any order.
+ *
+ * Note that vector<bool> does not actually meet the requirements for being
+ * a container. This is because the reference and pointer types are not
+ * really references and pointers to bool. See DR96 for details. @see
+ * vector for function documentation.
+ *
+ * @ingroup Containers
+ * @ingroup Sequences
+ *
+ * In some terminology a %vector can be described as a dynamic
+ * C-style array, it offers fast and efficient access to individual
+ * elements in any order and saves the user from worrying about
+ * memory and size allocation. Subscripting ( @c [] ) access is
+ * also provided as with C-style arrays.
+ */
+template<typename _Alloc>
+ class vector<bool, _Alloc> : public _Bvector_base<_Alloc>
{
public:
typedef bool value_type;
typedef size_t size_type;
- typedef ptrdiff_t difference_type;
+ typedef ptrdiff_t difference_type;
typedef _Bit_reference reference;
typedef bool const_reference;
typedef _Bit_reference* pointer;
typedef const bool* const_pointer;
-
+
typedef _Bit_iterator iterator;
typedef _Bit_const_iterator const_iterator;
-
+
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
-
+
typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type;
- allocator_type get_allocator() const {
- return _Bvector_base<_Alloc>::get_allocator();
- }
-
+
+ allocator_type get_allocator() const
+ { return _Bvector_base<_Alloc>::get_allocator(); }
+
protected:
- using _Bvector_base<_Alloc>::_M_bit_alloc;
+ using _Bvector_base<_Alloc>::_M_allocate;
using _Bvector_base<_Alloc>::_M_deallocate;
- using _Bvector_base<_Alloc>::_M_start;
- using _Bvector_base<_Alloc>::_M_finish;
- using _Bvector_base<_Alloc>::_M_end_of_storage;
-
+
protected:
- void _M_initialize(size_type __n) {
- _Bit_type * __q = _M_bit_alloc(__n);
- _M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
- _M_start = iterator(__q, 0);
- _M_finish = _M_start + difference_type(__n);
- }
- void _M_insert_aux(iterator __position, bool __x) {
- if (_M_finish._M_p != _M_end_of_storage) {
- copy_backward(__position, _M_finish, _M_finish + 1);
- *__position = __x;
- ++_M_finish;
- }
- else {
- size_type __len = size()
- ? 2 * size() : static_cast<size_type>(_M_word_bit);
- _Bit_type * __q = _M_bit_alloc(__len);
- iterator __i = copy(begin(), __position, iterator(__q, 0));
- *__i++ = __x;
- _M_finish = copy(__position, end(), __i);
- _M_deallocate();
- _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
- _M_start = iterator(__q, 0);
- }
+ void _M_initialize(size_type __n)
+ {
+ _Bit_type* __q = this->_M_allocate(__n);
+ this->_M_impl._M_end_of_storage = __q
+ + (__n + _S_word_bit - 1) / _S_word_bit;
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
}
-
- template <class _InputIterator>
+
+ void _M_insert_aux(iterator __position, bool __x)
+ {
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
+ {
+ std::copy_backward(__position, this->_M_impl._M_finish,
+ this->_M_impl._M_finish + 1);
+ *__position = __x;
+ ++this->_M_impl._M_finish;
+ }
+ else
+ {
+ const size_type __len = size() ? 2 * size()
+ : static_cast<size_type>(_S_word_bit);
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = std::copy(begin(), __position, iterator(__q, 0));
+ *__i++ = __x;
+ this->_M_impl._M_finish = std::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = __q + (__len + _S_word_bit - 1)
+ / _S_word_bit;
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+
+ template<class _InputIterator>
void _M_initialize_range(_InputIterator __first, _InputIterator __last,
- input_iterator_tag) {
- _M_start = iterator();
- _M_finish = iterator();
- _M_end_of_storage = 0;
- for ( ; __first != __last; ++__first)
+ input_iterator_tag)
+ {
+ this->_M_impl._M_start = iterator();
+ this->_M_impl._M_finish = iterator();
+ this->_M_impl._M_end_of_storage = 0;
+ for ( ; __first != __last; ++__first)
push_back(*__first);
}
-
- template <class _ForwardIterator>
+
+ template<class _ForwardIterator>
void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
- forward_iterator_tag) {
- size_type __n = distance(__first, __last);
+ forward_iterator_tag)
+ {
+ const size_type __n = std::distance(__first, __last);
_M_initialize(__n);
- copy(__first, __last, _M_start);
- }
-
- template <class _InputIterator>
- void _M_insert_range(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- input_iterator_tag) {
- for ( ; __first != __last; ++__first) {
- __pos = insert(__pos, *__first);
- ++__pos;
- }
+ std::copy(__first, __last, this->_M_impl._M_start);
}
-
- template <class _ForwardIterator>
- void _M_insert_range(iterator __position,
- _ForwardIterator __first, _ForwardIterator __last,
- forward_iterator_tag) {
- if (__first != __last) {
- size_type __n = distance(__first, __last);
- if (capacity() - size() >= __n) {
- copy_backward(__position, end(), _M_finish + difference_type(__n));
- copy(__first, __last, __position);
- _M_finish += difference_type(__n);
- }
- else {
- size_type __len = size() + max(size(), __n);
- _Bit_type * __q = _M_bit_alloc(__len);
- iterator __i = copy(begin(), __position, iterator(__q, 0));
- __i = copy(__first, __last, __i);
- _M_finish = copy(__position, end(), __i);
- _M_deallocate();
- _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
- _M_start = iterator(__q, 0);
- }
- }
- }
-
+
+ template<class _InputIterator>
+ void _M_insert_range(iterator __pos, _InputIterator __first,
+ _InputIterator __last, input_iterator_tag)
+ {
+ for ( ; __first != __last; ++__first)
+ {
+ __pos = insert(__pos, *__first);
+ ++__pos;
+ }
+ }
+
+ template<class _ForwardIterator>
+ void _M_insert_range(iterator __position, _ForwardIterator __first,
+ _ForwardIterator __last, forward_iterator_tag)
+ {
+ if (__first != __last)
+ {
+ size_type __n = std::distance(__first, __last);
+ if (capacity() - size() >= __n)
+ {
+ std::copy_backward(__position, end(),
+ this->_M_impl._M_finish + difference_type(__n));
+ std::copy(__first, __last, __position);
+ this->_M_impl._M_finish += difference_type(__n);
+ }
+ else
+ {
+ const size_type __len = size() + std::max(size(), __n);
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = std::copy(begin(), __position, iterator(__q, 0));
+ __i = std::copy(__first, __last, __i);
+ this->_M_impl._M_finish = std::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = __q + (__len + _S_word_bit - 1)
+ / _S_word_bit;
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+ }
+
public:
- iterator begin() { return _M_start; }
- const_iterator begin() const { return _M_start; }
- iterator end() { return _M_finish; }
- const_iterator end() const { return _M_finish; }
-
- reverse_iterator rbegin() { return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const {
- return const_reverse_iterator(end());
- }
- reverse_iterator rend() { return reverse_iterator(begin()); }
- const_reverse_iterator rend() const {
- return const_reverse_iterator(begin());
- }
-
- size_type size() const { return size_type(end() - begin()); }
- size_type max_size() const { return size_type(-1); }
- size_type capacity() const {
- return size_type(const_iterator(_M_end_of_storage, 0) - begin());
- }
- bool empty() const { return begin() == end(); }
-
+ iterator begin()
+ { return this->_M_impl._M_start; }
+
+ const_iterator begin() const
+ { return this->_M_impl._M_start; }
+
+ iterator end()
+ { return this->_M_impl._M_finish; }
+
+ const_iterator end() const
+ { return this->_M_impl._M_finish; }
+
+ reverse_iterator rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(begin()); }
+
+ size_type size() const
+ { return size_type(end() - begin()); }
+
+ size_type max_size() const
+ { return size_type(-1); }
+
+ size_type capacity() const
+ { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
+ - begin()); }
+ bool empty() const
+ { return begin() == end(); }
+
reference operator[](size_type __n)
- { return *(begin() + difference_type(__n)); }
+ { return *(begin() + difference_type(__n)); }
+
const_reference operator[](size_type __n) const
- { return *(begin() + difference_type(__n)); }
-
- void _M_range_check(size_type __n) const {
+ { return *(begin() + difference_type(__n)); }
+
+ void _M_range_check(size_type __n) const
+ {
if (__n >= this->size())
- __throw_out_of_range("vector<bool>");
+ __throw_out_of_range(__N("vector<bool>::_M_range_check"));
}
-
+
reference at(size_type __n)
- { _M_range_check(__n); return (*this)[__n]; }
+ { _M_range_check(__n); return (*this)[__n]; }
+
const_reference at(size_type __n) const
- { _M_range_check(__n); return (*this)[__n]; }
-
+ { _M_range_check(__n); return (*this)[__n]; }
+
explicit vector(const allocator_type& __a = allocator_type())
- : _Bvector_base<_Alloc>(__a) {}
-
- vector(size_type __n, bool __value,
- const allocator_type& __a = allocator_type())
- : _Bvector_base<_Alloc>(__a)
+ : _Bvector_base<_Alloc>(__a) { }
+
+ vector(size_type __n, bool __value,
+ const allocator_type& __a = allocator_type())
+ : _Bvector_base<_Alloc>(__a)
{
_M_initialize(__n);
- fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0);
+ std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage,
+ __value ? ~0 : 0);
}
-
+
explicit vector(size_type __n)
- : _Bvector_base<_Alloc>(allocator_type())
+ : _Bvector_base<_Alloc>(allocator_type())
{
_M_initialize(__n);
- fill(_M_start._M_p, _M_end_of_storage, 0);
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, 0);
}
-
- vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator()) {
+
+ vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator())
+ {
_M_initialize(__x.size());
- copy(__x.begin(), __x.end(), _M_start);
+ std::copy(__x.begin(), __x.end(), this->_M_impl._M_start);
}
-
+
// Check whether it's an integral type. If so, it's not an iterator.
-
- template <class _Integer>
- void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) {
+ template<class _Integer>
+ void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ {
_M_initialize(__n);
- fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
}
-
- template <class _InputIterator>
- void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
- __false_type) {
- _M_initialize_range(__first, __last, __iterator_category(__first));
- }
-
- template <class _InputIterator>
- vector(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a = allocator_type())
- : _Bvector_base<_Alloc>(__a)
+
+ template<class _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ { _M_initialize_range(__first, __last,
+ std::__iterator_category(__first)); }
+
+ template<class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Bvector_base<_Alloc>(__a)
{
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_initialize_dispatch(__first, __last, _Integral());
}
-
+
~vector() { }
-
- vector& operator=(const vector& __x) {
- if (&__x == this) return *this;
- if (__x.size() > capacity()) {
- _M_deallocate();
- _M_initialize(__x.size());
- }
- copy(__x.begin(), __x.end(), begin());
- _M_finish = begin() + difference_type(__x.size());
+
+ vector& operator=(const vector& __x)
+ {
+ if (&__x == this)
+ return *this;
+ if (__x.size() > capacity())
+ {
+ this->_M_deallocate();
+ _M_initialize(__x.size());
+ }
+ std::copy(__x.begin(), __x.end(), begin());
+ this->_M_impl._M_finish = begin() + difference_type(__x.size());
return *this;
}
-
+
// assign(), a generalized assignment member function. Two
// versions: one that takes a count, and one that takes a range.
// The range version is a member template, so we dispatch on whether
// or not the type is an integer.
-
- void _M_fill_assign(size_t __n, bool __x) {
- if (__n > size()) {
- fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
- insert(end(), __n - size(), __x);
- }
- else {
- erase(begin() + __n, end());
- fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
- }
+
+ void _M_fill_assign(size_t __n, bool __x)
+ {
+ if (__n > size())
+ {
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+ insert(end(), __n - size(), __x);
+ }
+ else
+ {
+ erase(begin() + __n, end());
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+ }
}
-
- void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); }
-
- template <class _InputIterator>
- void assign(_InputIterator __first, _InputIterator __last) {
+
+ void assign(size_t __n, bool __x)
+ { _M_fill_assign(__n, __x); }
+
+ template<class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last)
+ {
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_assign_dispatch(__first, __last, _Integral());
}
-
- template <class _Integer>
+
+ template<class _Integer>
void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
- { _M_fill_assign((size_t) __n, (bool) __val); }
-
- template <class _InputIter>
- void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
- { _M_assign_aux(__first, __last, __iterator_category(__first)); }
-
- template <class _InputIterator>
+ { _M_fill_assign((size_t) __n, (bool) __val); }
+
+ template<class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
+
+ template<class _InputIterator>
void _M_assign_aux(_InputIterator __first, _InputIterator __last,
- input_iterator_tag) {
+ input_iterator_tag)
+ {
iterator __cur = begin();
for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
*__cur = *__first;
@@ -588,142 +706,171 @@ template <typename _Alloc>
else
insert(end(), __first, __last);
}
-
- template <class _ForwardIterator>
+
+ template<class _ForwardIterator>
void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
- forward_iterator_tag) {
- size_type __len = distance(__first, __last);
+ forward_iterator_tag)
+ {
+ const size_type __len = std::distance(__first, __last);
if (__len < size())
- erase(copy(__first, __last, begin()), end());
- else {
- _ForwardIterator __mid = __first;
- advance(__mid, size());
- copy(__first, __mid, begin());
- insert(end(), __mid, __last);
- }
- }
-
- void reserve(size_type __n) {
+ erase(std::copy(__first, __last, begin()), end());
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ }
+
+ void reserve(size_type __n)
+ {
if (__n > this->max_size())
- __throw_length_error("vector::reserve");
- if (this->capacity() < __n) {
- _Bit_type * __q = _M_bit_alloc(__n);
- _M_finish = copy(begin(), end(), iterator(__q, 0));
- _M_deallocate();
- _M_start = iterator(__q, 0);
- _M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
- }
+ __throw_length_error(__N("vector::reserve"));
+ if (this->capacity() < __n)
+ {
+ _Bit_type* __q = this->_M_allocate(__n);
+ this->_M_impl._M_finish = std::copy(begin(), end(),
+ iterator(__q, 0));
+ this->_M_deallocate();
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_end_of_storage = __q + (__n + _S_word_bit - 1) / _S_word_bit;
+ }
}
-
- reference front() { return *begin(); }
- const_reference front() const { return *begin(); }
- reference back() { return *(end() - 1); }
- const_reference back() const { return *(end() - 1); }
- void push_back(bool __x) {
- if (_M_finish._M_p != _M_end_of_storage)
- *_M_finish++ = __x;
+
+ reference front()
+ { return *begin(); }
+
+ const_reference front() const
+ { return *begin(); }
+
+ reference back()
+ { return *(end() - 1); }
+
+ const_reference back() const
+ { return *(end() - 1); }
+
+ void push_back(bool __x)
+ {
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
+ *this->_M_impl._M_finish++ = __x;
else
_M_insert_aux(end(), __x);
}
- void swap(vector<bool, _Alloc>& __x) {
- std::swap(_M_start, __x._M_start);
- std::swap(_M_finish, __x._M_finish);
- std::swap(_M_end_of_storage, __x._M_end_of_storage);
+
+ void swap(vector<bool, _Alloc>& __x)
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_end_of_storage,
+ __x._M_impl._M_end_of_storage);
}
// [23.2.5]/1, third-to-last entry in synopsis listing
- static void swap(reference __x, reference __y) {
+ static void swap(reference __x, reference __y)
+ {
bool __tmp = __x;
__x = __y;
__y = __tmp;
}
- iterator insert(iterator __position, bool __x = bool()) {
- difference_type __n = __position - begin();
- if (_M_finish._M_p != _M_end_of_storage && __position == end())
- *_M_finish++ = __x;
+ iterator insert(iterator __position, bool __x = bool())
+ {
+ const difference_type __n = __position - begin();
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
+ && __position == end())
+ *this->_M_impl._M_finish++ = __x;
else
_M_insert_aux(__position, __x);
return begin() + __n;
}
-
+
// Check whether it's an integral type. If so, it's not an iterator.
-
- template <class _Integer>
+
+ template<class _Integer>
void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
- __true_type) {
- _M_fill_insert(__pos, __n, __x);
- }
-
- template <class _InputIterator>
+ __true_type)
+ { _M_fill_insert(__pos, __n, __x); }
+
+ template<class _InputIterator>
void _M_insert_dispatch(iterator __pos,
_InputIterator __first, _InputIterator __last,
- __false_type) {
- _M_insert_range(__pos, __first, __last, __iterator_category(__first));
- }
-
- template <class _InputIterator>
+ __false_type)
+ { _M_insert_range(__pos, __first, __last,
+ std::__iterator_category(__first)); }
+
+ template<class _InputIterator>
void insert(iterator __position,
- _InputIterator __first, _InputIterator __last) {
+ _InputIterator __first, _InputIterator __last)
+ {
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_insert_dispatch(__position, __first, __last, _Integral());
}
-
- void _M_fill_insert(iterator __position, size_type __n, bool __x) {
- if (__n == 0) return;
- if (capacity() - size() >= __n) {
- copy_backward(__position, end(), _M_finish + difference_type(__n));
- fill(__position, __position + difference_type(__n), __x);
- _M_finish += difference_type(__n);
- }
- else {
- size_type __len = size() + max(size(), __n);
- _Bit_type * __q = _M_bit_alloc(__len);
- iterator __i = copy(begin(), __position, iterator(__q, 0));
- fill_n(__i, __n, __x);
- _M_finish = copy(__position, end(), __i + difference_type(__n));
- _M_deallocate();
- _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
- _M_start = iterator(__q, 0);
- }
- }
-
- void insert(iterator __position, size_type __n, bool __x) {
- _M_fill_insert(__position, __n, __x);
- }
-
- void pop_back() { --_M_finish; }
- iterator erase(iterator __position) {
+
+ void _M_fill_insert(iterator __position, size_type __n, bool __x)
+ {
+ if (__n == 0)
+ return;
+ if (capacity() - size() >= __n)
+ {
+ std::copy_backward(__position, end(),
+ this->_M_impl._M_finish + difference_type(__n));
+ std::fill(__position, __position + difference_type(__n), __x);
+ this->_M_impl._M_finish += difference_type(__n);
+ }
+ else
+ {
+ const size_type __len = size() + std::max(size(), __n);
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = std::copy(begin(), __position, iterator(__q, 0));
+ std::fill_n(__i, __n, __x);
+ this->_M_impl._M_finish = std::copy(__position, end(),
+ __i + difference_type(__n));
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = __q + (__len + _S_word_bit - 1)
+ / _S_word_bit;
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+
+ void insert(iterator __position, size_type __n, bool __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+ void pop_back()
+ { --this->_M_impl._M_finish; }
+
+ iterator erase(iterator __position)
+ {
if (__position + 1 != end())
- copy(__position + 1, end(), __position);
- --_M_finish;
+ std::copy(__position + 1, end(), __position);
+ --this->_M_impl._M_finish;
return __position;
}
- iterator erase(iterator __first, iterator __last) {
- _M_finish = copy(__last, end(), __first);
+
+ iterator erase(iterator __first, iterator __last)
+ {
+ this->_M_impl._M_finish = std::copy(__last, end(), __first);
return __first;
}
- void resize(size_type __new_size, bool __x = bool()) {
- if (__new_size < size())
+
+ void resize(size_type __new_size, bool __x = bool())
+ {
+ if (__new_size < size())
erase(begin() + difference_type(__new_size), end());
else
insert(end(), __new_size - size(), __x);
}
- void flip() {
- for (_Bit_type * __p = _M_start._M_p; __p != _M_end_of_storage; ++__p)
+
+ void flip()
+ {
+ for (_Bit_type * __p = this->_M_impl._M_start._M_p;
+ __p != this->_M_impl._M_end_of_storage; ++__p)
*__p = ~*__p;
}
-
- void clear() { erase(begin(), end()); }
- };
-
-// This typedef is non-standard. It is provided for backward compatibility.
-typedef vector<bool, __alloc> bit_vector;
-} // namespace std
-
-#endif /* __GLIBCPP_INTERNAL_BVECTOR_H */
+ void clear()
+ { erase(begin(), end()); }
+ };
+} // namespace std
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/bits/stl_construct.h b/contrib/libstdc++/include/bits/stl_construct.h
index 6859138..afb3387 100644
--- a/contrib/libstdc++/include/bits/stl_construct.h
+++ b/contrib/libstdc++/include/bits/stl_construct.h
@@ -1,6 +1,6 @@
// nonstandard construct and destroy functions -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STL_CONSTRUCT_H
-#define _CPP_BITS_STL_CONSTRUCT_H 1
+#ifndef _STL_CONSTRUCT_H
+#define _STL_CONSTRUCT_H 1
#include <bits/type_traits.h>
#include <new>
@@ -72,33 +72,52 @@ namespace std
* object's constructor with an initializer.
* @endif
*/
- template <class _T1, class _T2>
+ template<typename _T1, typename _T2>
inline void
_Construct(_T1* __p, const _T2& __value)
- { new (static_cast<void*>(__p)) _T1(__value); }
-
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_]allocator::construct
+ ::new(static_cast<void*>(__p)) _T1(__value);
+ }
+
/**
* @if maint
* Constructs an object in existing memory by invoking an allocated
* object's default constructor (no initializers).
* @endif
*/
- template <class _T1>
+ template<typename _T1>
inline void
_Construct(_T1* __p)
- { new (static_cast<void*>(__p)) _T1(); }
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_]allocator::construct
+ ::new(static_cast<void*>(__p)) _T1();
+ }
+
+ /**
+ * @if maint
+ * Destroy the object pointed to by a pointer type.
+ * @endif
+ */
+ template<typename _Tp>
+ inline void
+ _Destroy(_Tp* __pointer)
+ { __pointer->~_Tp(); }
/**
* @if maint
- * Destroy a range of objects with nontrivial destructors.
+ * Destroy a range of objects with nontrivial destructors.
*
* This is a helper function used only by _Destroy().
* @endif
*/
- template <class _ForwardIterator>
+ template<typename _ForwardIterator>
inline void
- __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
- { for ( ; __first != __last; ++__first) _Destroy(&*__first); }
+ __destroy_aux(_ForwardIterator __first, _ForwardIterator __last,
+ __false_type)
+ { for ( ; __first != __last; ++__first) std::_Destroy(&*__first); }
/**
* @if maint
@@ -109,29 +128,19 @@ namespace std
* This is a helper function used only by _Destroy().
* @endif
*/
- template <class _ForwardIterator>
+ template<typename _ForwardIterator>
inline void
__destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
{ }
/**
* @if maint
- * Destroy the object pointed to by a pointer type.
- * @endif
- */
- template <class _Tp>
- inline void
- _Destroy(_Tp* __pointer)
- { __pointer->~_Tp(); }
-
- /**
- * @if maint
* Destroy a range of objects. If the value_type of the object has
* a trivial destructor, the compiler should optimize all of this
* away, otherwise the objects' destructors must be invoked.
* @endif
*/
- template <class _ForwardIterator>
+ template<typename _ForwardIterator>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last)
{
@@ -140,9 +149,9 @@ namespace std
typedef typename __type_traits<_Value_type>::has_trivial_destructor
_Has_trivial_destructor;
- __destroy_aux(__first, __last, _Has_trivial_destructor());
+ std::__destroy_aux(__first, __last, _Has_trivial_destructor());
}
} // namespace std
-#endif /* _CPP_BITS_STL_CONSTRUCT_H */
+#endif /* _STL_CONSTRUCT_H */
diff --git a/contrib/libstdc++/include/bits/stl_deque.h b/contrib/libstdc++/include/bits/stl_deque.h
index 454fed3..54dadf2 100644
--- a/contrib/libstdc++/include/bits/stl_deque.h
+++ b/contrib/libstdc++/include/bits/stl_deque.h
@@ -1,6 +1,6 @@
// Deque implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,15 +58,15 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_DEQUE_H
-#define __GLIBCPP_INTERNAL_DEQUE_H
+#ifndef _DEQUE_H
+#define _DEQUE_H 1
#include <bits/concept_check.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
-namespace std
-{
+namespace _GLIBCXX_STD
+{
/**
* @if maint
* @brief This function controls the size of memory nodes.
@@ -79,11 +79,11 @@ namespace std
* been done since inheriting the SGI code.
* @endif
*/
- inline size_t
- __deque_buf_size(size_t __size)
+ inline size_t
+ __deque_buf_size(size_t __size)
{ return __size < 512 ? size_t(512 / __size) : size_t(1); }
-
-
+
+
/**
* @brief A deque::iterator.
*
@@ -96,390 +96,337 @@ namespace std
* All the functions are op overloads except for _M_set_node.
* @endif
*/
- template <typename _Tp, typename _Ref, typename _Ptr>
+ template<typename _Tp, typename _Ref, typename _Ptr>
struct _Deque_iterator
- {
- typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
- typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
- static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); }
-
- typedef random_access_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Ptr pointer;
- typedef _Ref reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef _Tp** _Map_pointer;
- typedef _Deque_iterator _Self;
-
- _Tp* _M_cur;
- _Tp* _M_first;
- _Tp* _M_last;
- _Map_pointer _M_node;
-
- _Deque_iterator(_Tp* __x, _Map_pointer __y)
+ {
+ typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
+ typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+ static size_t _S_buffer_size()
+ { return __deque_buf_size(sizeof(_Tp)); }
+
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Ptr pointer;
+ typedef _Ref reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp** _Map_pointer;
+ typedef _Deque_iterator _Self;
+
+ _Tp* _M_cur;
+ _Tp* _M_first;
+ _Tp* _M_last;
+ _Map_pointer _M_node;
+
+ _Deque_iterator(_Tp* __x, _Map_pointer __y)
: _M_cur(__x), _M_first(*__y),
_M_last(*__y + _S_buffer_size()), _M_node(__y) {}
- _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
- _Deque_iterator(const iterator& __x)
- : _M_cur(__x._M_cur), _M_first(__x._M_first),
+
+ _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
+
+ _Deque_iterator(const iterator& __x)
+ : _M_cur(__x._M_cur), _M_first(__x._M_first),
_M_last(__x._M_last), _M_node(__x._M_node) {}
-
- reference operator*() const { return *_M_cur; }
- pointer operator->() const { return _M_cur; }
-
- _Self& operator++() {
- ++_M_cur;
- if (_M_cur == _M_last) {
- _M_set_node(_M_node + 1);
- _M_cur = _M_first;
+
+ reference
+ operator*() const
+ { return *_M_cur; }
+
+ pointer
+ operator->() const
+ { return _M_cur; }
+
+ _Self&
+ operator++()
+ {
+ ++_M_cur;
+ if (_M_cur == _M_last)
+ {
+ _M_set_node(_M_node + 1);
+ _M_cur = _M_first;
+ }
+ return *this;
}
- return *this;
- }
- _Self operator++(int) {
- _Self __tmp = *this;
- ++*this;
- return __tmp;
- }
-
- _Self& operator--() {
- if (_M_cur == _M_first) {
- _M_set_node(_M_node - 1);
- _M_cur = _M_last;
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ ++*this;
+ return __tmp;
}
- --_M_cur;
- return *this;
- }
- _Self operator--(int) {
- _Self __tmp = *this;
- --*this;
- return __tmp;
- }
-
- _Self& operator+=(difference_type __n)
- {
- difference_type __offset = __n + (_M_cur - _M_first);
- if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
- _M_cur += __n;
- else {
- difference_type __node_offset =
- __offset > 0 ? __offset / difference_type(_S_buffer_size())
- : -difference_type((-__offset - 1) / _S_buffer_size()) - 1;
- _M_set_node(_M_node + __node_offset);
- _M_cur = _M_first +
- (__offset - __node_offset * difference_type(_S_buffer_size()));
+
+ _Self&
+ operator--()
+ {
+ if (_M_cur == _M_first)
+ {
+ _M_set_node(_M_node - 1);
+ _M_cur = _M_last;
+ }
+ --_M_cur;
+ return *this;
}
- return *this;
- }
-
- _Self operator+(difference_type __n) const
- {
- _Self __tmp = *this;
- return __tmp += __n;
- }
-
- _Self& operator-=(difference_type __n) { return *this += -__n; }
-
- _Self operator-(difference_type __n) const {
- _Self __tmp = *this;
- return __tmp -= __n;
- }
-
- reference operator[](difference_type __n) const { return *(*this + __n); }
-
- /** @if maint
- * Prepares to traverse new_node. Sets everything except _M_cur, which
- * should therefore be set by the caller immediately afterwards, based on
- * _M_first and _M_last.
- * @endif
- */
- void
- _M_set_node(_Map_pointer __new_node)
- {
- _M_node = __new_node;
- _M_first = *__new_node;
- _M_last = _M_first + difference_type(_S_buffer_size());
- }
- };
-
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ --*this;
+ return __tmp;
+ }
+
+ _Self&
+ operator+=(difference_type __n)
+ {
+ const difference_type __offset = __n + (_M_cur - _M_first);
+ if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
+ _M_cur += __n;
+ else
+ {
+ const difference_type __node_offset =
+ __offset > 0 ? __offset / difference_type(_S_buffer_size())
+ : -difference_type((-__offset - 1)
+ / _S_buffer_size()) - 1;
+ _M_set_node(_M_node + __node_offset);
+ _M_cur = _M_first + (__offset - __node_offset
+ * difference_type(_S_buffer_size()));
+ }
+ return *this;
+ }
+
+ _Self
+ operator+(difference_type __n) const
+ {
+ _Self __tmp = *this;
+ return __tmp += __n;
+ }
+
+ _Self&
+ operator-=(difference_type __n)
+ { return *this += -__n; }
+
+ _Self
+ operator-(difference_type __n) const
+ {
+ _Self __tmp = *this;
+ return __tmp -= __n;
+ }
+
+ reference
+ operator[](difference_type __n) const
+ { return *(*this + __n); }
+
+ /** @if maint
+ * Prepares to traverse new_node. Sets everything except _M_cur, which
+ * should therefore be set by the caller immediately afterwards, based on
+ * _M_first and _M_last.
+ * @endif
+ */
+ void
+ _M_set_node(_Map_pointer __new_node)
+ {
+ _M_node = __new_node;
+ _M_first = *__new_node;
+ _M_last = _M_first + difference_type(_S_buffer_size());
+ }
+ };
+
// Note: we also provide overloads whose operands are of the same type in
// order to avoid ambiguous overload resolution when std::rel_ops operators
// are in scope (for additional details, see libstdc++/3628)
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return __x._M_cur == __y._M_cur;
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return __x._M_cur == __y._M_cur;
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return !(__x == __y);
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return !(__x == __y);
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return (__x._M_node == __y._M_node) ?
- (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return (__x._M_node == __y._M_node) ?
- (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return __y < __x;
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return __y < __x;
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return !(__y < __x);
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return !(__y < __x);
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline bool
- operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
- const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
- {
- return !(__x < __y);
- }
-
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline bool
- operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return !(__x < __y);
- }
-
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return __x._M_cur == __y._M_cur; }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return __x._M_cur == __y._M_cur; }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+ : (__x._M_node < __y._M_node); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+ : (__x._M_node < __y._M_node); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return __y < __x; }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return __y < __x; }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__x < __y); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__x < __y); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// According to the resolution of DR179 not only the various comparison
// operators but also operator- must accept mixed iterator/const_iterator
// parameters.
- template <typename _Tp, typename _RefL, typename _PtrL,
- typename _RefR, typename _PtrR>
- inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
- operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
- const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
- {
- return _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
- (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) *
- (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) +
- (__y._M_last - __y._M_cur);
- }
-
- template <typename _Tp, typename _Ref, typename _Ptr>
- inline _Deque_iterator<_Tp, _Ref, _Ptr>
- operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
- {
- return __x + __n;
- }
-
-
- /// @if maint Primary default version. @endif
- /**
- * @if maint
- * Deque base class. It has two purposes. First, its constructor
- * and destructor allocate (but don't initialize) storage. This makes
- * %exception safety easier. Second, the base class encapsulates all of
- * the differences between SGI-style allocators and standard-conforming
- * allocators. (See stl_alloc.h for more on this topic.) There are two
- * versions: this ordinary one, and the space-saving specialization for
- * instanceless allocators.
- * @endif
- */
- template <typename _Tp, typename _Alloc, bool __is_static>
- class _Deque_alloc_base
- {
- public:
- typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type;
- allocator_type get_allocator() const { return _M_node_allocator; }
-
- _Deque_alloc_base(const allocator_type& __a)
- : _M_node_allocator(__a), _M_map_allocator(__a),
- _M_map(0), _M_map_size(0)
- {}
-
- protected:
- typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type
- _Map_allocator_type;
-
- _Tp*
- _M_allocate_node()
- {
- return _M_node_allocator.allocate(__deque_buf_size(sizeof(_Tp)));
- }
-
- void
- _M_deallocate_node(_Tp* __p)
- {
- _M_node_allocator.deallocate(__p, __deque_buf_size(sizeof(_Tp)));
- }
-
- _Tp**
- _M_allocate_map(size_t __n)
- { return _M_map_allocator.allocate(__n); }
-
- void
- _M_deallocate_map(_Tp** __p, size_t __n)
- { _M_map_allocator.deallocate(__p, __n); }
-
- allocator_type _M_node_allocator;
- _Map_allocator_type _M_map_allocator;
- _Tp** _M_map;
- size_t _M_map_size;
- };
-
- /// @if maint Specialization for instanceless allocators. @endif
- template <typename _Tp, typename _Alloc>
- class _Deque_alloc_base<_Tp, _Alloc, true>
- {
- public:
- typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type;
- allocator_type get_allocator() const { return allocator_type(); }
-
- _Deque_alloc_base(const allocator_type&)
- : _M_map(0), _M_map_size(0)
- {}
-
- protected:
- typedef typename _Alloc_traits<_Tp,_Alloc>::_Alloc_type _Node_alloc_type;
- typedef typename _Alloc_traits<_Tp*,_Alloc>::_Alloc_type _Map_alloc_type;
-
- _Tp*
- _M_allocate_node()
- {
- return _Node_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
- }
-
- void
- _M_deallocate_node(_Tp* __p)
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+ operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{
- _Node_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
+ return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+ (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size())
+ * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+ + (__y._M_last - __y._M_cur);
}
-
- _Tp**
- _M_allocate_map(size_t __n)
- { return _Map_alloc_type::allocate(__n); }
-
- void
- _M_deallocate_map(_Tp** __p, size_t __n)
- { _Map_alloc_type::deallocate(__p, __n); }
-
- _Tp** _M_map;
- size_t _M_map_size;
- };
-
-
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline _Deque_iterator<_Tp, _Ref, _Ptr>
+ operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
+ { return __x + __n; }
+
/**
* @if maint
- * Deque base class. Using _Alloc_traits in the instantiation of the parent
- * class provides the compile-time dispatching mentioned in the parent's
- * docs. This class provides the unified face for %deque's allocation.
+ * Deque base class. This class provides the unified face for %deque's
+ * allocation. This class's constructor and destructor allocate and
+ * deallocate (but do not initialize) storage. This makes %exception
+ * safety easier.
*
* Nothing in this class ever constructs or destroys an actual Tp element.
* (Deque handles that itself.) Only/All memory management is performed
* here.
* @endif
*/
- template <typename _Tp, typename _Alloc>
+ template<typename _Tp, typename _Alloc>
class _Deque_base
- : public _Deque_alloc_base<_Tp,_Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- {
- public:
- typedef _Deque_alloc_base<_Tp,_Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- _Base;
- typedef typename _Base::allocator_type allocator_type;
- typedef _Deque_iterator<_Tp,_Tp&,_Tp*> iterator;
- typedef _Deque_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
-
- _Deque_base(const allocator_type& __a, size_t __num_elements)
- : _Base(__a), _M_start(), _M_finish()
+ {
+ public:
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Alloc*>(&this->_M_impl); }
+
+ typedef _Deque_iterator<_Tp,_Tp&,_Tp*> iterator;
+ typedef _Deque_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
+
+ _Deque_base(const allocator_type& __a, size_t __num_elements)
+ : _M_impl(__a)
{ _M_initialize_map(__num_elements); }
- _Deque_base(const allocator_type& __a)
- : _Base(__a), _M_start(), _M_finish() {}
- ~_Deque_base();
-
- protected:
- void _M_initialize_map(size_t);
- void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
- void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
- enum { _S_initial_map_size = 8 };
-
- iterator _M_start;
- iterator _M_finish;
- };
-
-
- template <typename _Tp, typename _Alloc>
+
+ _Deque_base(const allocator_type& __a)
+ : _M_impl(__a)
+ { }
+
+ ~_Deque_base();
+
+ protected:
+ //This struct encapsulates the implementation of the std::deque
+ //standard container and at the same time makes use of the EBO
+ //for empty allocators.
+ struct _Deque_impl
+ : public _Alloc {
+ _Tp** _M_map;
+ size_t _M_map_size;
+ iterator _M_start;
+ iterator _M_finish;
+
+ _Deque_impl(const _Alloc& __a)
+ : _Alloc(__a), _M_map(0), _M_map_size(0), _M_start(), _M_finish()
+ { }
+ };
+
+ typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
+ _Map_alloc_type _M_get_map_allocator() const
+ { return _Map_alloc_type(this->get_allocator()); }
+
+ _Tp*
+ _M_allocate_node()
+ { return _M_impl._Alloc::allocate(__deque_buf_size(sizeof(_Tp))); }
+
+ void
+ _M_deallocate_node(_Tp* __p)
+ { _M_impl._Alloc::deallocate(__p, __deque_buf_size(sizeof(_Tp))); }
+
+ _Tp**
+ _M_allocate_map(size_t __n)
+ { return _M_get_map_allocator().allocate(__n); }
+
+ void
+ _M_deallocate_map(_Tp** __p, size_t __n)
+ { _M_get_map_allocator().deallocate(__p, __n); }
+
+ protected:
+ void _M_initialize_map(size_t);
+ void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
+ void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
+ enum { _S_initial_map_size = 8 };
+
+ _Deque_impl _M_impl;
+ };
+
+ template<typename _Tp, typename _Alloc>
_Deque_base<_Tp,_Alloc>::~_Deque_base()
{
- if (_M_map)
+ if (this->_M_impl._M_map)
{
- _M_destroy_nodes(_M_start._M_node, _M_finish._M_node + 1);
- _M_deallocate_map(_M_map, _M_map_size);
+ _M_destroy_nodes(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1);
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
}
}
-
+
/**
* @if maint
* @brief Layout storage.
@@ -490,65 +437,66 @@ namespace std
* The initial underlying memory layout is a bit complicated...
* @endif
*/
- template <typename _Tp, typename _Alloc>
- void
- _Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements)
- {
- size_t __num_nodes =
- __num_elements / __deque_buf_size(sizeof(_Tp)) + 1;
-
- _M_map_size = max((size_t) _S_initial_map_size, __num_nodes + 2);
- _M_map = _M_allocate_map(_M_map_size);
-
- // For "small" maps (needing less than _M_map_size nodes), allocation
- // starts in the middle elements and grows outwards. So nstart may be the
- // beginning of _M_map, but for small maps it may be as far in as _M_map+3.
-
- _Tp** __nstart = _M_map + (_M_map_size - __num_nodes) / 2;
- _Tp** __nfinish = __nstart + __num_nodes;
-
- try
- { _M_create_nodes(__nstart, __nfinish); }
- catch(...)
- {
- _M_deallocate_map(_M_map, _M_map_size);
- _M_map = 0;
- _M_map_size = 0;
- __throw_exception_again;
- }
-
- _M_start._M_set_node(__nstart);
- _M_finish._M_set_node(__nfinish - 1);
- _M_start._M_cur = _M_start._M_first;
- _M_finish._M_cur = _M_finish._M_first +
- __num_elements % __deque_buf_size(sizeof(_Tp));
- }
-
- template <typename _Tp, typename _Alloc>
- void _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
- {
- _Tp** __cur;
- try
- {
- for (__cur = __nstart; __cur < __nfinish; ++__cur)
- *__cur = _M_allocate_node();
- }
- catch(...)
- {
- _M_destroy_nodes(__nstart, __cur);
- __throw_exception_again;
- }
- }
-
- template <typename _Tp, typename _Alloc>
- void
- _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
- {
- for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
- _M_deallocate_node(*__n);
- }
-
-
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements)
+ {
+ size_t __num_nodes = __num_elements / __deque_buf_size(sizeof(_Tp)) + 1;
+
+ this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size,
+ __num_nodes + 2);
+ this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size);
+
+ // For "small" maps (needing less than _M_map_size nodes), allocation
+ // starts in the middle elements and grows outwards. So nstart may be
+ // the beginning of _M_map, but for small maps it may be as far in as
+ // _M_map+3.
+
+ _Tp** __nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size - __num_nodes) / 2;
+ _Tp** __nfinish = __nstart + __num_nodes;
+
+ try
+ { _M_create_nodes(__nstart, __nfinish); }
+ catch(...)
+ {
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+ this->_M_impl._M_map = 0;
+ this->_M_impl._M_map_size = 0;
+ __throw_exception_again;
+ }
+
+ this->_M_impl._M_start._M_set_node(__nstart);
+ this->_M_impl._M_finish._M_set_node(__nfinish - 1);
+ this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first;
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first + __num_elements
+ % __deque_buf_size(sizeof(_Tp));
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
+ {
+ _Tp** __cur;
+ try
+ {
+ for (__cur = __nstart; __cur < __nfinish; ++__cur)
+ *__cur = this->_M_allocate_node();
+ }
+ catch(...)
+ {
+ _M_destroy_nodes(__nstart, __cur);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
+ {
+ for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
+ _M_deallocate_node(*__n);
+ }
+
/**
* @brief A standard container using fixed-size memory allocation and
* constant-time manipulation of elements at either end.
@@ -568,15 +516,15 @@ namespace std
*
* @if maint
* Here's how a deque<Tp> manages memory. Each deque has 4 members:
- *
+ *
* - Tp** _M_map
* - size_t _M_map_size
* - iterator _M_start, _M_finish
- *
+ *
* map_size is at least 8. %map is an array of map_size pointers-to-"nodes".
* (The name %map has nothing to do with the std::map class, and "nodes"
* should not be confused with std::list's usage of "node".)
- *
+ *
* A "node" has no specific type name as such, but it is referred to as
* "node" in this file. It is a simple array-of-Tp. If Tp is very large,
* there will be one Tp element per node (i.e., an "array" of one).
@@ -584,11 +532,11 @@ namespace std
* larger the Tp, the fewer Tp's will fit in a node. The goal here is to
* keep the total size of a node relatively small and constant over different
* Tp's, to improve allocator efficiency.
- *
+ *
* **** As I write this, the nodes are /not/ allocated using the high-speed
* memory pool. There are 20 hours left in the year; perhaps I can fix
* this before 2002.
- *
+ *
* Not every pointer in the %map array will point to a node. If the initial
* number of elements in the deque is small, the /middle/ %map pointers will
* be valid, and the ones at the edges will be unused. This same situation
@@ -616,9 +564,9 @@ namespace std
* that range are uninitialized storage. Otherwise, [start.cur, start.last)
* and [finish.first, finish.cur) are initialized objects, and [start.first,
* start.cur) and [finish.cur, finish.last) are uninitialized storage.
- * - [%map, %map + map_size) is a valid, non-empty range.
- * - [start.node, finish.node] is a valid range contained within
- * [%map, %map + map_size).
+ * - [%map, %map + map_size) is a valid, non-empty range.
+ * - [start.node, finish.node] is a valid range contained within
+ * [%map, %map + map_size).
* - A pointer in the range [%map, %map + map_size) points to an allocated
* node if and only if the pointer is in the range
* [start.node, finish.node].
@@ -633,900 +581,853 @@ namespace std
* and we can use other standard algorithms as well.
* @endif
*/
- template <typename _Tp, typename _Alloc = allocator<_Tp> >
+ template<typename _Tp, typename _Alloc = allocator<_Tp> >
class deque : protected _Deque_base<_Tp, _Alloc>
- {
- // concept requirements
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
-
- typedef _Deque_base<_Tp, _Alloc> _Base;
-
- public:
- typedef _Tp value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef typename _Base::iterator iterator;
- typedef typename _Base::const_iterator const_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef typename _Base::allocator_type allocator_type;
-
- protected:
- typedef pointer* _Map_pointer;
- static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); }
-
- // Functions controlling memory layout, and nothing else.
- using _Base::_M_initialize_map;
- using _Base::_M_create_nodes;
- using _Base::_M_destroy_nodes;
- using _Base::_M_allocate_node;
- using _Base::_M_deallocate_node;
- using _Base::_M_allocate_map;
- using _Base::_M_deallocate_map;
-
- /** @if maint
- * A total of four data members accumulated down the heirarchy. If the
- * _Alloc type requires separate instances, then two of them will also be
- * included in each deque.
- * @endif
- */
- using _Base::_M_map;
- using _Base::_M_map_size;
- using _Base::_M_start;
- using _Base::_M_finish;
-
- public:
- // [23.2.1.1] construct/copy/destroy
- // (assign() and get_allocator() are also listed in this section)
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- deque(const allocator_type& __a = allocator_type())
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+
+ typedef _Deque_base<_Tp, _Alloc> _Base;
+
+ public:
+ typedef _Tp value_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef typename _Base::allocator_type allocator_type;
+
+ protected:
+ typedef pointer* _Map_pointer;
+
+ static size_t _S_buffer_size()
+ { return __deque_buf_size(sizeof(_Tp)); }
+
+ // Functions controlling memory layout, and nothing else.
+ using _Base::_M_initialize_map;
+ using _Base::_M_create_nodes;
+ using _Base::_M_destroy_nodes;
+ using _Base::_M_allocate_node;
+ using _Base::_M_deallocate_node;
+ using _Base::_M_allocate_map;
+ using _Base::_M_deallocate_map;
+
+ /** @if maint
+ * A total of four data members accumulated down the heirarchy.
+ * May be accessed via _M_impl.*
+ * @endif
+ */
+ using _Base::_M_impl;
+
+ public:
+ // [23.2.1.1] construct/copy/destroy
+ // (assign() and get_allocator() are also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ deque(const allocator_type& __a = allocator_type())
: _Base(__a, 0) {}
-
- /**
- * @brief Create a %deque with copies of an exemplar element.
- * @param n The number of elements to initially create.
- * @param value An element to copy.
- *
- * This constructor fills the %deque with @a n copies of @a value.
- */
- deque(size_type __n, const value_type& __value,
- const allocator_type& __a = allocator_type())
+
+ /**
+ * @brief Create a %deque with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ *
+ * This constructor fills the %deque with @a n copies of @a value.
+ */
+ deque(size_type __n, const value_type& __value,
+ const allocator_type& __a = allocator_type())
: _Base(__a, __n)
{ _M_fill_initialize(__value); }
-
- /**
- * @brief Create a %deque with default elements.
- * @param n The number of elements to initially create.
- *
- * This constructor fills the %deque with @a n copies of a
- * default-constructed element.
- */
- explicit
- deque(size_type __n)
+
+ /**
+ * @brief Create a %deque with default elements.
+ * @param n The number of elements to initially create.
+ *
+ * This constructor fills the %deque with @a n copies of a
+ * default-constructed element.
+ */
+ explicit
+ deque(size_type __n)
: _Base(allocator_type(), __n)
{ _M_fill_initialize(value_type()); }
-
- /**
- * @brief %Deque copy constructor.
- * @param x A %deque of identical element and allocator types.
- *
- * The newly-created %deque uses a copy of the allocation object used
- * by @a x.
- */
- deque(const deque& __x)
- : _Base(__x.get_allocator(), __x.size())
- { uninitialized_copy(__x.begin(), __x.end(), _M_start); }
-
- /**
- * @brief Builds a %deque from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * Create a %deque consisting of copies of the elements from [first,last).
- *
- * If the iterators are forward, bidirectional, or random-access, then
- * this will call the elements' copy constructor N times (where N is
- * distance(first,last)) and do no memory reallocation. But if only
- * input iterators are used, then this will do at most 2N calls to the
- * copy constructor, and logN memory reallocations.
- */
- template<typename _InputIterator>
- deque(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a = allocator_type())
- : _Base(__a)
+
+ /**
+ * @brief %Deque copy constructor.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The newly-created %deque uses a copy of the allocation object used
+ * by @a x.
+ */
+ deque(const deque& __x)
+ : _Base(__x.get_allocator(), __x.size())
+ { std::uninitialized_copy(__x.begin(), __x.end(), this->_M_impl._M_start); }
+
+ /**
+ * @brief Builds a %deque from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %deque consisting of copies of the elements from [first,
+ * last).
+ *
+ * If the iterators are forward, bidirectional, or random-access, then
+ * this will call the elements' copy constructor N times (where N is
+ * distance(first,last)) and do no memory reallocation. But if only
+ * input iterators are used, then this will do at most 2N calls to the
+ * copy constructor, and logN memory reallocations.
+ */
+ template<typename _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibilty.
+ */
+ ~deque()
+ { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish); }
+
+ /**
+ * @brief %Deque assignment operator.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ deque&
+ operator=(const deque& __x);
+
+ /**
+ * @brief Assigns a given value to a %deque.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %deque with @a n copies of the given value.
+ * Note that the assignment completely changes the %deque and that the
+ * resulting %deque's size is the same as the number of elements assigned.
+ * Old data may be lost.
+ */
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+
+ /**
+ * @brief Assigns a range to a %deque.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %deque with copies of the elements in the
+ * range [first,last).
+ *
+ * Note that the assignment completely changes the %deque and that the
+ * resulting %deque's size is the same as the number of elements
+ * assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %deque. Iteration is done in ordinary element order.
+ */
+ iterator
+ begin()
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %deque. Iteration is done in ordinary element order.
+ */
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read/write iterator that points one past the last element in
+ * the %deque. Iteration is done in ordinary element order.
+ */
+ iterator
+ end()
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %deque. Iteration is done in ordinary element order.
+ */
+ const_iterator
+ end() const
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last element
+ * in the %deque. Iteration is done in reverse element order.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %deque. Iteration is done in reverse element
+ * order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first element in the %deque. Iteration is done in reverse element
+ * order.
+ */
+ reverse_iterator
+ rend() { return reverse_iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first element in the %deque. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->_M_impl._M_start); }
+
+ // [23.2.1.2] capacity
+ /** Returns the number of elements in the %deque. */
+ size_type
+ size() const
+ { return this->_M_impl._M_finish - this->_M_impl._M_start; }
+
+ /** Returns the size() of the largest possible %deque. */
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ /**
+ * @brief Resizes the %deque to the specified number of elements.
+ * @param new_size Number of elements the %deque should contain.
+ * @param x Data with which new elements should be populated.
+ *
+ * This function will %resize the %deque to the specified number of
+ * elements. If the number is smaller than the %deque's current size the
+ * %deque is truncated, otherwise the %deque is extended and new elements
+ * are populated with given data.
+ */
+ void
+ resize(size_type __new_size, const value_type& __x)
{
- // Check whether it's an integral type. If so, it's not an iterator.
- typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_initialize_dispatch(__first, __last, _Integral());
+ const size_type __len = size();
+ if (__new_size < __len)
+ erase(this->_M_impl._M_start + __new_size, this->_M_impl._M_finish);
+ else
+ insert(this->_M_impl._M_finish, __new_size - __len, __x);
}
-
- /**
- * The dtor only erases the elements, and note that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
- ~deque() { _Destroy(_M_start, _M_finish); }
-
- /**
- * @brief %Deque assignment operator.
- * @param x A %deque of identical element and allocator types.
- *
- * All the elements of @a x are copied, but unlike the copy constructor,
- * the allocator object is not copied.
- */
- deque&
- operator=(const deque& __x);
-
- /**
- * @brief Assigns a given value to a %deque.
- * @param n Number of elements to be assigned.
- * @param val Value to be assigned.
- *
- * This function fills a %deque with @a n copies of the given value.
- * Note that the assignment completely changes the %deque and that the
- * resulting %deque's size is the same as the number of elements assigned.
- * Old data may be lost.
- */
- void
- assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); }
-
- /**
- * @brief Assigns a range to a %deque.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * This function fills a %deque with copies of the elements in the
- * range [first,last).
- *
- * Note that the assignment completely changes the %deque and that the
- * resulting %deque's size is the same as the number of elements assigned.
- * Old data may be lost.
- */
- template<typename _InputIterator>
+
+ /**
+ * @brief Resizes the %deque to the specified number of elements.
+ * @param new_size Number of elements the %deque should contain.
+ *
+ * This function will resize the %deque to the specified number of
+ * elements. If the number is smaller than the %deque's current size the
+ * %deque is truncated, otherwise the %deque is extended and new elements
+ * are default-constructed.
+ */
+ void
+ resize(size_type new_size)
+ { resize(new_size, value_type()); }
+
+ /**
+ * Returns true if the %deque is empty. (Thus begin() would equal end().)
+ */
+ bool
+ empty() const
+ { return this->_M_impl._M_finish == this->_M_impl._M_start; }
+
+ // element access
+ /**
+ * @brief Subscript access to the data contained in the %deque.
+ * @param n The index of the element for which data should be accessed.
+ * @return Read/write reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and out_of_range
+ * lookups are not defined. (For checked lookups see at().)
+ */
+ reference
+ operator[](size_type __n)
+ { return this->_M_impl._M_start[difference_type(__n)]; }
+
+ /**
+ * @brief Subscript access to the data contained in the %deque.
+ * @param n The index of the element for which data should be accessed.
+ * @return Read-only (constant) reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and out_of_range
+ * lookups are not defined. (For checked lookups see at().)
+ */
+ const_reference
+ operator[](size_type __n) const
+ { return this->_M_impl._M_start[difference_type(__n)]; }
+
+ protected:
+ /// @if maint Safety check used only from at(). @endif
void
- assign(_InputIterator __first, _InputIterator __last)
+ _M_range_check(size_type __n) const
{
- typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_assign_dispatch(__first, __last, _Integral());
+ if (__n >= this->size())
+ __throw_out_of_range(__N("deque::_M_range_check"));
}
-
- /// Get a copy of the memory allocation object.
- allocator_type
- get_allocator() const { return _Base::get_allocator(); }
-
- // iterators
- /**
- * Returns a read/write iterator that points to the first element in the
- * %deque. Iteration is done in ordinary element order.
- */
- iterator
- begin() { return _M_start; }
-
- /**
- * Returns a read-only (constant) iterator that points to the first element
- * in the %deque. Iteration is done in ordinary element order.
- */
- const_iterator
- begin() const { return _M_start; }
-
- /**
- * Returns a read/write iterator that points one past the last element in
- * the %deque. Iteration is done in ordinary element order.
- */
- iterator
- end() { return _M_finish; }
-
- /**
- * Returns a read-only (constant) iterator that points one past the last
- * element in the %deque. Iteration is done in ordinary element order.
- */
- const_iterator
- end() const { return _M_finish; }
-
- /**
- * Returns a read/write reverse iterator that points to the last element in
- * the %deque. Iteration is done in reverse element order.
- */
- reverse_iterator
- rbegin() { return reverse_iterator(_M_finish); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to the last
- * element in the %deque. Iteration is done in reverse element order.
- */
- const_reverse_iterator
- rbegin() const { return const_reverse_iterator(_M_finish); }
-
- /**
- * Returns a read/write reverse iterator that points to one before the
- * first element in the %deque. Iteration is done in reverse element
- * order.
- */
- reverse_iterator
- rend() { return reverse_iterator(_M_start); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to one
- * before the first element in the %deque. Iteration is done in reverse
- * element order.
- */
- const_reverse_iterator
- rend() const { return const_reverse_iterator(_M_start); }
-
- // [23.2.1.2] capacity
- /** Returns the number of elements in the %deque. */
- size_type
- size() const { return _M_finish - _M_start; }
-
- /** Returns the size() of the largest possible %deque. */
- size_type
- max_size() const { return size_type(-1); }
-
- /**
- * @brief Resizes the %deque to the specified number of elements.
- * @param new_size Number of elements the %deque should contain.
- * @param x Data with which new elements should be populated.
- *
- * This function will %resize the %deque to the specified number of
- * elements. If the number is smaller than the %deque's current size the
- * %deque is truncated, otherwise the %deque is extended and new elements
- * are populated with given data.
- */
- void
- resize(size_type __new_size, const value_type& __x)
- {
- const size_type __len = size();
- if (__new_size < __len)
- erase(_M_start + __new_size, _M_finish);
- else
- insert(_M_finish, __new_size - __len, __x);
- }
-
- /**
- * @brief Resizes the %deque to the specified number of elements.
- * @param new_size Number of elements the %deque should contain.
- *
- * This function will resize the %deque to the specified number of
- * elements. If the number is smaller than the %deque's current size the
- * %deque is truncated, otherwise the %deque is extended and new elements
- * are default-constructed.
- */
- void
- resize(size_type new_size) { resize(new_size, value_type()); }
-
- /**
- * Returns true if the %deque is empty. (Thus begin() would equal end().)
- */
- bool empty() const { return _M_finish == _M_start; }
-
- // element access
- /**
- * @brief Subscript access to the data contained in the %deque.
- * @param n The index of the element for which data should be accessed.
- * @return Read/write reference to data.
- *
- * This operator allows for easy, array-style, data access.
- * Note that data access with this operator is unchecked and out_of_range
- * lookups are not defined. (For checked lookups see at().)
- */
- reference
- operator[](size_type __n) { return _M_start[difference_type(__n)]; }
-
- /**
- * @brief Subscript access to the data contained in the %deque.
- * @param n The index of the element for which data should be accessed.
- * @return Read-only (constant) reference to data.
- *
- * This operator allows for easy, array-style, data access.
- * Note that data access with this operator is unchecked and out_of_range
- * lookups are not defined. (For checked lookups see at().)
- */
- const_reference
- operator[](size_type __n) const { return _M_start[difference_type(__n)]; }
-
- protected:
- /// @if maint Safety check used only from at(). @endif
- void
- _M_range_check(size_type __n) const
- {
- if (__n >= this->size())
- __throw_out_of_range("deque [] access out of range");
- }
-
- public:
- /**
- * @brief Provides access to the data contained in the %deque.
- * @param n The index of the element for which data should be accessed.
- * @return Read/write reference to data.
- * @throw std::out_of_range If @a n is an invalid index.
- *
- * This function provides for safer data access. The parameter is first
- * checked that it is in the range of the deque. The function throws
- * out_of_range if the check fails.
- */
- reference
- at(size_type __n) { _M_range_check(__n); return (*this)[__n]; }
-
- /**
- * @brief Provides access to the data contained in the %deque.
- * @param n The index of the element for which data should be accessed.
- * @return Read-only (constant) reference to data.
- * @throw std::out_of_range If @a n is an invalid index.
- *
- * This function provides for safer data access. The parameter is first
- * checked that it is in the range of the deque. The function throws
- * out_of_range if the check fails.
- */
- const_reference
- at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; }
-
- /**
- * Returns a read/write reference to the data at the first element of the
- * %deque.
- */
- reference
- front() { return *_M_start; }
-
- /**
- * Returns a read-only (constant) reference to the data at the first
- * element of the %deque.
- */
- const_reference
- front() const { return *_M_start; }
-
- /**
- * Returns a read/write reference to the data at the last element of the
- * %deque.
- */
- reference
- back()
- {
- iterator __tmp = _M_finish;
- --__tmp;
- return *__tmp;
- }
-
- /**
- * Returns a read-only (constant) reference to the data at the last
- * element of the %deque.
- */
- const_reference
- back() const
- {
- const_iterator __tmp = _M_finish;
- --__tmp;
- return *__tmp;
- }
-
- // [23.2.1.2] modifiers
- /**
- * @brief Add data to the front of the %deque.
- * @param x Data to be added.
- *
- * This is a typical stack operation. The function creates an element at
- * the front of the %deque and assigns the given data to it. Due to the
- * nature of a %deque this operation can be done in constant time.
- */
- void
- push_front(const value_type& __x)
- {
- if (_M_start._M_cur != _M_start._M_first) {
- _Construct(_M_start._M_cur - 1, __x);
- --_M_start._M_cur;
- }
- else
- _M_push_front_aux(__x);
- }
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Add data to the front of the %deque.
- *
- * This is a typical stack operation. The function creates a
- * default-constructed element at the front of the %deque. Due to the
- * nature of a %deque this operation can be done in constant time. You
- * should consider using push_front(value_type()) instead.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- void
- push_front()
- {
- if (_M_start._M_cur != _M_start._M_first) {
- _Construct(_M_start._M_cur - 1);
- --_M_start._M_cur;
- }
- else
- _M_push_front_aux();
- }
- #endif
-
- /**
- * @brief Add data to the end of the %deque.
- * @param x Data to be added.
- *
- * This is a typical stack operation. The function creates an element at
- * the end of the %deque and assigns the given data to it. Due to the
- * nature of a %deque this operation can be done in constant time.
- */
- void
- push_back(const value_type& __x)
- {
- if (_M_finish._M_cur != _M_finish._M_last - 1) {
- _Construct(_M_finish._M_cur, __x);
- ++_M_finish._M_cur;
- }
- else
- _M_push_back_aux(__x);
- }
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Add data to the end of the %deque.
- *
- * This is a typical stack operation. The function creates a
- * default-constructed element at the end of the %deque. Due to the nature
- * of a %deque this operation can be done in constant time. You should
- * consider using push_back(value_type()) instead.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- void
- push_back()
- {
- if (_M_finish._M_cur != _M_finish._M_last - 1) {
- _Construct(_M_finish._M_cur);
- ++_M_finish._M_cur;
+
+ public:
+ /**
+ * @brief Provides access to the data contained in the %deque.
+ * @param n The index of the element for which data should be accessed.
+ * @return Read/write reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is first
+ * checked that it is in the range of the deque. The function throws
+ * out_of_range if the check fails.
+ */
+ reference
+ at(size_type __n)
+ { _M_range_check(__n); return (*this)[__n]; }
+
+ /**
+ * @brief Provides access to the data contained in the %deque.
+ * @param n The index of the element for which data should be accessed.
+ * @return Read-only (constant) reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is first
+ * checked that it is in the range of the deque. The function throws
+ * out_of_range if the check fails.
+ */
+ const_reference
+ at(size_type __n) const
+ {
+ _M_range_check(__n);
+ return (*this)[__n];
}
- else
- _M_push_back_aux();
- }
- #endif
-
- /**
- * @brief Removes first element.
- *
- * This is a typical stack operation. It shrinks the %deque by one.
- *
- * Note that no data is returned, and if the first element's data is
- * needed, it should be retrieved before pop_front() is called.
- */
- void
- pop_front()
- {
- if (_M_start._M_cur != _M_start._M_last - 1) {
- _Destroy(_M_start._M_cur);
- ++_M_start._M_cur;
+
+ /**
+ * Returns a read/write reference to the data at the first element of the
+ * %deque.
+ */
+ reference
+ front()
+ { return *this->_M_impl._M_start; }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %deque.
+ */
+ const_reference
+ front() const
+ { return *this->_M_impl._M_start; }
+
+ /**
+ * Returns a read/write reference to the data at the last element of the
+ * %deque.
+ */
+ reference
+ back()
+ {
+ iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return *__tmp;
}
- else
- _M_pop_front_aux();
- }
-
- /**
- * @brief Removes last element.
- *
- * This is a typical stack operation. It shrinks the %deque by one.
- *
- * Note that no data is returned, and if the last element's data is
- * needed, it should be retrieved before pop_back() is called.
- */
- void
- pop_back()
- {
- if (_M_finish._M_cur != _M_finish._M_first) {
- --_M_finish._M_cur;
- _Destroy(_M_finish._M_cur);
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %deque.
+ */
+ const_reference
+ back() const
+ {
+ const_iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return *__tmp;
}
- else
- _M_pop_back_aux();
- }
-
- /**
- * @brief Inserts given value into %deque before specified iterator.
- * @param position An iterator into the %deque.
- * @param x Data to be inserted.
- * @return An iterator that points to the inserted data.
- *
- * This function will insert a copy of the given value before the specified
- * location.
- */
- iterator
- insert(iterator position, const value_type& __x);
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Inserts an element into the %deque.
- * @param position An iterator into the %deque.
- * @return An iterator that points to the inserted element.
- *
- * This function will insert a default-constructed element before the
- * specified location. You should consider using
- * insert(position,value_type()) instead.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- iterator
- insert(iterator __position)
- { return insert(__position, value_type()); }
- #endif
-
- /**
- * @brief Inserts a number of copies of given data into the %deque.
- * @param position An iterator into the %deque.
- * @param n Number of elements to be inserted.
- * @param x Data to be inserted.
- *
- * This function will insert a specified number of copies of the given data
- * before the location specified by @a position.
- */
- void
- insert(iterator __position, size_type __n, const value_type& __x)
- { _M_fill_insert(__position, __n, __x); }
-
- /**
- * @brief Inserts a range into the %deque.
- * @param pos An iterator into the %deque.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * This function will insert copies of the data in the range [first,last)
- * into the %deque before the location specified by @a pos. This is
- * known as "range insert."
- */
- template<typename _InputIterator>
+
+ // [23.2.1.2] modifiers
+ /**
+ * @brief Add data to the front of the %deque.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an element at
+ * the front of the %deque and assigns the given data to it. Due to the
+ * nature of a %deque this operation can be done in constant time.
+ */
void
- insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+ push_front(const value_type& __x)
{
- // Check whether it's an integral type. If so, it's not an iterator.
- typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_insert_dispatch(__pos, __first, __last, _Integral());
+ if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+ {
+ std::_Construct(this->_M_impl._M_start._M_cur - 1, __x);
+ --this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_push_front_aux(__x);
}
-
- /**
- * @brief Remove element at given position.
- * @param position Iterator pointing to element to be erased.
- * @return An iterator pointing to the next element (or end()).
- *
- * This function will erase the element at the given position and thus
- * shorten the %deque by one.
- *
- * The user is cautioned that
- * this function only erases the element, and that if the element is itself
- * a pointer, the pointed-to memory is not touched in any way. Managing
- * the pointer is the user's responsibilty.
- */
- iterator
- erase(iterator __position);
-
- /**
- * @brief Remove a range of elements.
- * @param first Iterator pointing to the first element to be erased.
- * @param last Iterator pointing to one past the last element to be
- * erased.
- * @return An iterator pointing to the element pointed to by @a last
- * prior to erasing (or end()).
- *
- * This function will erase the elements in the range [first,last) and
- * shorten the %deque accordingly.
- *
- * The user is cautioned that
- * this function only erases the elements, and that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
- iterator
- erase(iterator __first, iterator __last);
-
- /**
- * @brief Swaps data with another %deque.
- * @param x A %deque of the same element and allocator types.
- *
- * This exchanges the elements between two deques in constant time.
- * (Four pointers, so it should be quite fast.)
- * Note that the global std::swap() function is specialized such that
- * std::swap(d1,d2) will feed to this function.
- */
- void
- swap(deque& __x)
- {
- std::swap(_M_start, __x._M_start);
- std::swap(_M_finish, __x._M_finish);
- std::swap(_M_map, __x._M_map);
- std::swap(_M_map_size, __x._M_map_size);
- }
-
- /**
- * Erases all the elements. Note that this function only erases the
- * elements, and that if the elements themselves are pointers, the
- * pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
- */
- void clear();
-
- protected:
- // Internal constructor functions follow.
-
- // called by the range constructor to implement [23.1.1]/9
- template<typename _Integer>
+
+ /**
+ * @brief Add data to the end of the %deque.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an element at
+ * the end of the %deque and assigns the given data to it. Due to the
+ * nature of a %deque this operation can be done in constant time.
+ */
void
- _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ push_back(const value_type& __x)
{
- _M_initialize_map(__n);
- _M_fill_initialize(__x);
+ if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1)
+ {
+ std::_Construct(this->_M_impl._M_finish._M_cur, __x);
+ ++this->_M_impl._M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux(__x);
}
-
- // called by the range constructor to implement [23.1.1]/9
- template<typename _InputIter>
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical stack operation. It shrinks the %deque by one.
+ *
+ * Note that no data is returned, and if the first element's data is
+ * needed, it should be retrieved before pop_front() is called.
+ */
void
- _M_initialize_dispatch(_InputIter __first, _InputIter __last,
- __false_type)
+ pop_front()
{
- typedef typename iterator_traits<_InputIter>::iterator_category
- _IterCategory;
- _M_range_initialize(__first, __last, _IterCategory());
+ if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_last - 1)
+ {
+ std::_Destroy(this->_M_impl._M_start._M_cur);
+ ++this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_pop_front_aux();
}
-
- // called by the second initialize_dispatch above
- //@{
- /**
- * @if maint
- * @brief Fills the deque with whatever is in [first,last).
- * @param first An input iterator.
- * @param last An input iterator.
- * @return Nothing.
- *
- * If the iterators are actually forward iterators (or better), then the
- * memory layout can be done all at once. Else we move forward using
- * push_back on each value from the iterator.
- * @endif
- */
- template <typename _InputIterator>
- void
- _M_range_initialize(_InputIterator __first, _InputIterator __last,
- input_iterator_tag);
-
- // called by the second initialize_dispatch above
- template <typename _ForwardIterator>
- void
- _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
- forward_iterator_tag);
- //@}
-
- /**
- * @if maint
- * @brief Fills the %deque with copies of value.
- * @param value Initial value.
- * @return Nothing.
- * @pre _M_start and _M_finish have already been initialized, but none of
- * the %deque's elements have yet been constructed.
- *
- * This function is called only when the user provides an explicit size
- * (with or without an explicit exemplar value).
- * @endif
- */
- void
- _M_fill_initialize(const value_type& __value);
-
-
- // Internal assign functions follow. The *_aux functions do the actual
- // assignment work for the range versions.
-
- // called by the range assign to implement [23.1.1]/9
- template<typename _Integer>
+
+ /**
+ * @brief Removes last element.
+ *
+ * This is a typical stack operation. It shrinks the %deque by one.
+ *
+ * Note that no data is returned, and if the last element's data is
+ * needed, it should be retrieved before pop_back() is called.
+ */
void
- _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ pop_back()
{
- _M_fill_assign(static_cast<size_type>(__n),
- static_cast<value_type>(__val));
+ if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_first)
+ {
+ --this->_M_impl._M_finish._M_cur;
+ std::_Destroy(this->_M_impl._M_finish._M_cur);
+ }
+ else
+ _M_pop_back_aux();
}
-
- // called by the range assign to implement [23.1.1]/9
- template<typename _InputIter>
+
+ /**
+ * @brief Inserts given value into %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value before the
+ * specified location.
+ */
+ iterator
+ insert(iterator position, const value_type& __x);
+
+ /**
+ * @brief Inserts a number of copies of given data into the %deque.
+ * @param position An iterator into the %deque.
+ * @param n Number of elements to be inserted.
+ * @param x Data to be inserted.
+ *
+ * This function will insert a specified number of copies of the given
+ * data before the location specified by @a position.
+ */
void
- _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+ /**
+ * @brief Inserts a range into the %deque.
+ * @param position An iterator into the %deque.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range [first,last)
+ * into the %deque before the location specified by @a pos. This is
+ * known as "range insert."
+ */
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+
+ /**
+ * @brief Remove element at given position.
+ * @param position Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and thus
+ * shorten the %deque by one.
+ *
+ * The user is cautioned that
+ * this function only erases the element, and that if the element is
+ * itself a pointer, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibilty.
+ */
+ iterator
+ erase(iterator __position);
+
+ /**
+ * @brief Remove a range of elements.
+ * @param first Iterator pointing to the first element to be erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range [first,last) and
+ * shorten the %deque accordingly.
+ *
+ * The user is cautioned that
+ * this function only erases the elements, and that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibilty.
+ */
+ iterator
+ erase(iterator __first, iterator __last);
+
+ /**
+ * @brief Swaps data with another %deque.
+ * @param x A %deque of the same element and allocator types.
+ *
+ * This exchanges the elements between two deques in constant time.
+ * (Four pointers, so it should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(d1,d2) will feed to this function.
+ */
+ void
+ swap(deque& __x)
{
- typedef typename iterator_traits<_InputIter>::iterator_category
- _IterCategory;
- _M_assign_aux(__first, __last, _IterCategory());
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+ std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
}
-
- // called by the second assign_dispatch above
- template <typename _InputIterator>
+
+ /**
+ * Erases all the elements. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibilty.
+ */
+ void clear();
+
+ protected:
+ // Internal constructor functions follow.
+
+ // called by the range constructor to implement [23.1.1]/9
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ {
+ _M_initialize_map(__n);
+ _M_fill_initialize(__x);
+ }
+
+ // called by the range constructor to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename iterator_traits<_InputIterator>::iterator_category
+ _IterCategory;
+ _M_range_initialize(__first, __last, _IterCategory());
+ }
+
+ // called by the second initialize_dispatch above
+ //@{
+ /**
+ * @if maint
+ * @brief Fills the deque with whatever is in [first,last).
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @return Nothing.
+ *
+ * If the iterators are actually forward iterators (or better), then the
+ * memory layout can be done all at once. Else we move forward using
+ * push_back on each value from the iterator.
+ * @endif
+ */
+ template<typename _InputIterator>
+ void
+ _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ input_iterator_tag);
+
+ // called by the second initialize_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ forward_iterator_tag);
+ //@}
+
+ /**
+ * @if maint
+ * @brief Fills the %deque with copies of value.
+ * @param value Initial value.
+ * @return Nothing.
+ * @pre _M_start and _M_finish have already been initialized, but none of
+ * the %deque's elements have yet been constructed.
+ *
+ * This function is called only when the user provides an explicit size
+ * (with or without an explicit exemplar value).
+ * @endif
+ */
void
- _M_assign_aux(_InputIterator __first, _InputIterator __last,
- input_iterator_tag);
-
- // called by the second assign_dispatch above
- template <typename _ForwardIterator>
+ _M_fill_initialize(const value_type& __value);
+
+ // Internal assign functions follow. The *_aux functions do the actual
+ // assignment work for the range versions.
+
+ // called by the range assign to implement [23.1.1]/9
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ {
+ _M_fill_assign(static_cast<size_type>(__n),
+ static_cast<value_type>(__val));
+ }
+
+ // called by the range assign to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename iterator_traits<_InputIterator>::iterator_category
+ _IterCategory;
+ _M_assign_aux(__first, __last, _IterCategory());
+ }
+
+ // called by the second assign_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ input_iterator_tag);
+
+ // called by the second assign_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ forward_iterator_tag)
+ {
+ const size_type __len = std::distance(__first, __last);
+ if (__len > size())
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ else
+ erase(std::copy(__first, __last, begin()), end());
+ }
+
+ // Called by assign(n,t), and the range assign when it turns out to be the
+ // same thing.
void
- _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
- forward_iterator_tag)
+ _M_fill_assign(size_type __n, const value_type& __val)
{
- size_type __len = distance(__first, __last);
- if (__len > size()) {
- _ForwardIterator __mid = __first;
- advance(__mid, size());
- copy(__first, __mid, begin());
- insert(end(), __mid, __last);
- }
- else
- erase(copy(__first, __last, begin()), end());
+ if (__n > size())
+ {
+ std::fill(begin(), end(), __val);
+ insert(end(), __n - size(), __val);
+ }
+ else
+ {
+ erase(begin() + __n, end());
+ std::fill(begin(), end(), __val);
+ }
}
-
- // Called by assign(n,t), and the range assign when it turns out to be the
- // same thing.
- void
- _M_fill_assign(size_type __n, const value_type& __val)
- {
- if (__n > size())
+
+ //@{
+ /**
+ * @if maint
+ * @brief Helper functions for push_* and pop_*.
+ * @endif
+ */
+ void _M_push_back_aux(const value_type&);
+ void _M_push_front_aux(const value_type&);
+ void _M_pop_back_aux();
+ void _M_pop_front_aux();
+ //@}
+
+ // Internal insert functions follow. The *_aux functions do the actual
+ // insertion work when all shortcuts fail.
+
+ // called by the range insert to implement [23.1.1]/9
+ template<typename _Integer>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _Integer __n, _Integer __x, __true_type)
+ {
+ _M_fill_insert(__pos, static_cast<size_type>(__n),
+ static_cast<value_type>(__x));
+ }
+
+ // called by the range insert to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename iterator_traits<_InputIterator>::iterator_category
+ _IterCategory;
+ _M_range_insert_aux(__pos, __first, __last, _IterCategory());
+ }
+
+ // called by the second insert_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_range_insert_aux(iterator __pos, _InputIterator __first,
+ _InputIterator __last, input_iterator_tag);
+
+ // called by the second insert_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
+ _ForwardIterator __last, forward_iterator_tag);
+
+ // Called by insert(p,n,x), and the range insert when it turns out to be
+ // the same thing. Can use fill functions in optimal situations,
+ // otherwise passes off to insert_aux(p,n,x).
+ void
+ _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
+
+ // called by insert(p,x)
+ iterator
+ _M_insert_aux(iterator __pos, const value_type& __x);
+
+ // called by insert(p,n,x) via fill_insert
+ void
+ _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
+
+ // called by range_insert_aux for forward iterators
+ template<typename _ForwardIterator>
+ void
+ _M_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n);
+
+ //@{
+ /**
+ * @if maint
+ * @brief Memory-handling helpers for the previous internal insert
+ * functions.
+ * @endif
+ */
+ iterator
+ _M_reserve_elements_at_front(size_type __n)
{
- fill(begin(), end(), __val);
- insert(end(), __n - size(), __val);
+ const size_type __vacancies = this->_M_impl._M_start._M_cur
+ - this->_M_impl._M_start._M_first;
+ if (__n > __vacancies)
+ _M_new_elements_at_front(__n - __vacancies);
+ return this->_M_impl._M_start - difference_type(__n);
}
- else
+
+ iterator
+ _M_reserve_elements_at_back(size_type __n)
{
- erase(begin() + __n, end());
- fill(begin(), end(), __val);
+ const size_type __vacancies = (this->_M_impl._M_finish._M_last
+ - this->_M_impl._M_finish._M_cur) - 1;
+ if (__n > __vacancies)
+ _M_new_elements_at_back(__n - __vacancies);
+ return this->_M_impl._M_finish + difference_type(__n);
}
- }
-
-
- //@{
- /**
- * @if maint
- * @brief Helper functions for push_* and pop_*.
- * @endif
- */
- void _M_push_back_aux(const value_type&);
- void _M_push_front_aux(const value_type&);
- #ifdef _GLIBCPP_DEPRECATED
- void _M_push_back_aux();
- void _M_push_front_aux();
- #endif
- void _M_pop_back_aux();
- void _M_pop_front_aux();
- //@}
-
-
- // Internal insert functions follow. The *_aux functions do the actual
- // insertion work when all shortcuts fail.
-
- // called by the range insert to implement [23.1.1]/9
- template<typename _Integer>
+
+ void
+ _M_new_elements_at_front(size_type __new_elements);
+
void
- _M_insert_dispatch(iterator __pos,
- _Integer __n, _Integer __x, __true_type)
+ _M_new_elements_at_back(size_type __new_elements);
+ //@}
+
+
+ //@{
+ /**
+ * @if maint
+ * @brief Memory-handling helpers for the major %map.
+ *
+ * Makes sure the _M_map has space for new nodes. Does not actually add
+ * the nodes. Can invalidate _M_map pointers. (And consequently, %deque
+ * iterators.)
+ * @endif
+ */
+ void
+ _M_reserve_map_at_back (size_type __nodes_to_add = 1)
{
- _M_fill_insert(__pos, static_cast<size_type>(__n),
- static_cast<value_type>(__x));
+ if (__nodes_to_add + 1 > this->_M_impl._M_map_size
+ - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map))
+ _M_reallocate_map(__nodes_to_add, false);
}
-
- // called by the range insert to implement [23.1.1]/9
- template<typename _InputIterator>
+
void
- _M_insert_dispatch(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- __false_type)
+ _M_reserve_map_at_front (size_type __nodes_to_add = 1)
{
- typedef typename iterator_traits<_InputIterator>::iterator_category
- _IterCategory;
- _M_range_insert_aux(__pos, __first, __last, _IterCategory());
+ if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node - this->_M_impl._M_map))
+ _M_reallocate_map(__nodes_to_add, true);
}
-
- // called by the second insert_dispatch above
- template <typename _InputIterator>
- void
- _M_range_insert_aux(iterator __pos, _InputIterator __first,
- _InputIterator __last, input_iterator_tag);
-
- // called by the second insert_dispatch above
- template <typename _ForwardIterator>
- void
- _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
- _ForwardIterator __last, forward_iterator_tag);
-
- // Called by insert(p,n,x), and the range insert when it turns out to be
- // the same thing. Can use fill functions in optimal situations, otherwise
- // passes off to insert_aux(p,n,x).
- void
- _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
-
- // called by insert(p,x)
- iterator
- _M_insert_aux(iterator __pos, const value_type& __x);
-
- // called by insert(p,n,x) via fill_insert
- void
- _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
-
- // called by range_insert_aux for forward iterators
- template <typename _ForwardIterator>
+
void
- _M_insert_aux(iterator __pos,
- _ForwardIterator __first, _ForwardIterator __last,
- size_type __n);
-
- #ifdef _GLIBCPP_DEPRECATED
- // unused, see comment in implementation
- iterator _M_insert_aux(iterator __pos);
- #endif
-
- //@{
- /**
- * @if maint
- * @brief Memory-handling helpers for the previous internal insert
- * functions.
- * @endif
- */
- iterator
- _M_reserve_elements_at_front(size_type __n)
- {
- size_type __vacancies = _M_start._M_cur - _M_start._M_first;
- if (__n > __vacancies)
- _M_new_elements_at_front(__n - __vacancies);
- return _M_start - difference_type(__n);
- }
-
- iterator
- _M_reserve_elements_at_back(size_type __n)
- {
- size_type __vacancies = (_M_finish._M_last - _M_finish._M_cur) - 1;
- if (__n > __vacancies)
- _M_new_elements_at_back(__n - __vacancies);
- return _M_finish + difference_type(__n);
- }
-
- void
- _M_new_elements_at_front(size_type __new_elements);
-
- void
- _M_new_elements_at_back(size_type __new_elements);
- //@}
-
-
- //@{
- /**
- * @if maint
- * @brief Memory-handling helpers for the major %map.
- *
- * Makes sure the _M_map has space for new nodes. Does not actually add
- * the nodes. Can invalidate _M_map pointers. (And consequently, %deque
- * iterators.)
- * @endif
- */
- void
- _M_reserve_map_at_back (size_type __nodes_to_add = 1)
- {
- if (__nodes_to_add + 1 > _M_map_size - (_M_finish._M_node - _M_map))
- _M_reallocate_map(__nodes_to_add, false);
- }
-
- void
- _M_reserve_map_at_front (size_type __nodes_to_add = 1)
- {
- if (__nodes_to_add > size_type(_M_start._M_node - _M_map))
- _M_reallocate_map(__nodes_to_add, true);
- }
-
- void
- _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
- //@}
- };
-
-
+ _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
+ //@}
+ };
+
+
/**
* @brief Deque equality comparison.
* @param x A %deque.
@@ -1537,67 +1438,64 @@ namespace std
* deques. Deques are considered equivalent if their sizes are equal,
* and if corresponding elements compare equal.
*/
- template <typename _Tp, typename _Alloc>
- inline bool operator==(const deque<_Tp, _Alloc>& __x,
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
- {
- return __x.size() == __y.size() &&
- equal(__x.begin(), __x.end(), __y.begin());
- }
-
+ { return __x.size() == __y.size()
+ && std::equal(__x.begin(), __x.end(), __y.begin()); }
+
/**
* @brief Deque ordering relation.
* @param x A %deque.
* @param y A %deque of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* deques. The elements must be comparable with @c <.
*
- * See std::lexographical_compare() for how the determination is made.
+ * See std::lexicographical_compare() for how the determination is made.
*/
- template <typename _Tp, typename _Alloc>
- inline bool operator<(const deque<_Tp, _Alloc>& __x,
- const deque<_Tp, _Alloc>& __y)
- {
- return lexicographical_compare(__x.begin(), __x.end(),
- __y.begin(), __y.end());
- }
-
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()); }
+
/// Based on operator==
- template <typename _Tp, typename _Alloc>
- inline bool operator!=(const deque<_Tp, _Alloc>& __x,
- const deque<_Tp, _Alloc>& __y) {
- return !(__x == __y);
- }
-
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__x == __y); }
+
/// Based on operator<
- template <typename _Tp, typename _Alloc>
- inline bool operator>(const deque<_Tp, _Alloc>& __x,
- const deque<_Tp, _Alloc>& __y) {
- return __y < __x;
- }
-
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return __y < __x; }
+
/// Based on operator<
- template <typename _Tp, typename _Alloc>
- inline bool operator<=(const deque<_Tp, _Alloc>& __x,
- const deque<_Tp, _Alloc>& __y) {
- return !(__y < __x);
- }
-
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__y < __x); }
+
/// Based on operator<
- template <typename _Tp, typename _Alloc>
- inline bool operator>=(const deque<_Tp, _Alloc>& __x,
- const deque<_Tp, _Alloc>& __y) {
- return !(__x < __y);
- }
-
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__x < __y); }
+
/// See std::deque::swap().
- template <typename _Tp, typename _Alloc>
- inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
- {
- __x.swap(__y);
- }
-} // namespace std
-
-#endif /* __GLIBCPP_INTERNAL_DEQUE_H */
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
+ { __x.swap(__y); }
+} // namespace std
+
+#endif /* _DEQUE_H */
diff --git a/contrib/libstdc++/include/bits/stl_function.h b/contrib/libstdc++/include/bits/stl_function.h
index 9ea975d..74ddcce 100644
--- a/contrib/libstdc++/include/bits/stl_function.h
+++ b/contrib/libstdc++/include/bits/stl_function.h
@@ -1,6 +1,6 @@
// Functor implementations -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,678 +58,840 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_FUNCTION_H
-#define __GLIBCPP_INTERNAL_FUNCTION_H
+#ifndef _FUNCTION_H
+#define _FUNCTION_H 1
namespace std
{
-// 20.3.1 base classes
-/** @defgroup s20_3_1_base Functor Base Classes
- * Function objects, or @e functors, are objects with an @c operator()
- * defined and accessible. They can be passed as arguments to algorithm
- * templates and used in place of a function pointer. Not only is the
- * resulting expressiveness of the library increased, but the generated
- * code can be more efficient than what you might write by hand. When we
- * refer to "functors," then, generally we include function pointers in
- * the description as well.
- *
- * Often, functors are only created as temporaries passed to algorithm
- * calls, rather than being created as named variables.
- *
- * Two examples taken from the standard itself follow. To perform a
- * by-element addition of two vectors @c a and @c b containing @c double,
- * and put the result in @c a, use
- * \code
- * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
- * \endcode
- * To negate every element in @c a, use
- * \code
- * transform(a.begin(), a.end(), a.begin(), negate<double>());
- * \endcode
- * The addition and negation functions will be inlined directly.
- *
- * The standard functiors are derived from structs named @c unary_function
- * and @c binary_function. These two classes contain nothing but typedefs,
- * to aid in generic (template) programming. If you write your own
- * functors, you might consider doing the same.
- *
- * @{
-*/
-/**
- * This is one of the @link s20_3_1_base functor base classes@endlink.
-*/
-template <class _Arg, class _Result>
-struct unary_function {
- typedef _Arg argument_type; ///< @c argument_type is the type of the argument (no surprises here)
- typedef _Result result_type; ///< @c result_type is the return type
-};
-
-/**
- * This is one of the @link s20_3_1_base functor base classes@endlink.
-*/
-template <class _Arg1, class _Arg2, class _Result>
-struct binary_function {
- typedef _Arg1 first_argument_type; ///< the type of the first argument (no surprises here)
- typedef _Arg2 second_argument_type; ///< the type of the second argument
- typedef _Result result_type; ///< type of the return type
-};
-/** @} */
-
-// 20.3.2 arithmetic
-/** @defgroup s20_3_2_arithmetic Arithmetic Classes
- * Because basic math often needs to be done during an algorithm, the library
- * provides functors for those operations. See the documentation for
- * @link s20_3_1_base the base classes@endlink for examples of their use.
- *
- * @{
-*/
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct plus : public binary_function<_Tp,_Tp,_Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
-};
-
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct minus : public binary_function<_Tp,_Tp,_Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
-};
-
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct multiplies : public binary_function<_Tp,_Tp,_Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
-};
-
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct divides : public binary_function<_Tp,_Tp,_Tp> {
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
-};
-
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct modulus : public binary_function<_Tp,_Tp,_Tp>
-{
- _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
-};
-
-/// One of the @link s20_3_2_arithmetic math functors@endlink.
-template <class _Tp>
-struct negate : public unary_function<_Tp,_Tp>
-{
- _Tp operator()(const _Tp& __x) const { return -__x; }
-};
-/** @} */
-
-// 20.3.3 comparisons
-/** @defgroup s20_3_3_comparisons Comparison Classes
- * The library provides six wrapper functors for all the basic comparisons
- * in C++, like @c <.
- *
- * @{
-*/
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct equal_to : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
-};
-
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct not_equal_to : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
-};
-
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct greater : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
-};
-
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct less : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
-};
-
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct greater_equal : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
-};
+ // 20.3.1 base classes
+ /** @defgroup s20_3_1_base Functor Base Classes
+ * Function objects, or @e functors, are objects with an @c operator()
+ * defined and accessible. They can be passed as arguments to algorithm
+ * templates and used in place of a function pointer. Not only is the
+ * resulting expressiveness of the library increased, but the generated
+ * code can be more efficient than what you might write by hand. When we
+ * refer to "functors," then, generally we include function pointers in
+ * the description as well.
+ *
+ * Often, functors are only created as temporaries passed to algorithm
+ * calls, rather than being created as named variables.
+ *
+ * Two examples taken from the standard itself follow. To perform a
+ * by-element addition of two vectors @c a and @c b containing @c double,
+ * and put the result in @c a, use
+ * \code
+ * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
+ * \endcode
+ * To negate every element in @c a, use
+ * \code
+ * transform(a.begin(), a.end(), a.begin(), negate<double>());
+ * \endcode
+ * The addition and negation functions will be inlined directly.
+ *
+ * The standard functiors are derived from structs named @c unary_function
+ * and @c binary_function. These two classes contain nothing but typedefs,
+ * to aid in generic (template) programming. If you write your own
+ * functors, you might consider doing the same.
+ *
+ * @{
+ */
+ /**
+ * This is one of the @link s20_3_1_base functor base classes@endlink.
+ */
+ template <class _Arg, class _Result>
+ struct unary_function
+ {
+ typedef _Arg argument_type; ///< @c argument_type is the type of the
+ /// argument (no surprises here)
+
+ typedef _Result result_type; ///< @c result_type is the return type
+ };
+
+ /**
+ * This is one of the @link s20_3_1_base functor base classes@endlink.
+ */
+ template <class _Arg1, class _Arg2, class _Result>
+ struct binary_function
+ {
+ typedef _Arg1 first_argument_type; ///< the type of the first argument
+ /// (no surprises here)
+
+ typedef _Arg2 second_argument_type; ///< the type of the second argument
+ typedef _Result result_type; ///< type of the return type
+ };
+ /** @} */
+
+ // 20.3.2 arithmetic
+ /** @defgroup s20_3_2_arithmetic Arithmetic Classes
+ * Because basic math often needs to be done during an algorithm, the library
+ * provides functors for those operations. See the documentation for
+ * @link s20_3_1_base the base classes@endlink for examples of their use.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct plus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x + __y; }
+ };
+
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct minus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x - __y; }
+ };
+
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct multiplies : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x * __y; }
+ };
+
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct divides : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x / __y; }
+ };
+
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct modulus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x % __y; }
+ };
+
+ /// One of the @link s20_3_2_arithmetic math functors@endlink.
+ template <class _Tp>
+ struct negate : public unary_function<_Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x) const
+ { return -__x; }
+ };
+ /** @} */
+
+ // 20.3.3 comparisons
+ /** @defgroup s20_3_3_comparisons Comparison Classes
+ * The library provides six wrapper functors for all the basic comparisons
+ * in C++, like @c <.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct equal_to : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x == __y; }
+ };
+
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct not_equal_to : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x != __y; }
+ };
+
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct greater : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x > __y; }
+ };
+
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct less : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x < __y; }
+ };
+
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct greater_equal : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >= __y; }
+ };
+
+ /// One of the @link s20_3_3_comparisons comparison functors@endlink.
+ template <class _Tp>
+ struct less_equal : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x <= __y; }
+ };
+ /** @} */
+
+ // 20.3.4 logical operations
+ /** @defgroup s20_3_4_logical Boolean Operations Classes
+ * Here are wrapper functors for Boolean operations: @c &&, @c ||, and @c !.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+ template <class _Tp>
+ struct logical_and : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x && __y; }
+ };
+
+ /// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+ template <class _Tp>
+ struct logical_or : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x || __y; }
+ };
+
+ /// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+ template <class _Tp>
+ struct logical_not : public unary_function<_Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x) const
+ { return !__x; }
+ };
+ /** @} */
+
+ // 20.3.5 negators
+ /** @defgroup s20_3_5_negators Negators
+ * The functions @c not1 and @c not2 each take a predicate functor
+ * and return an instance of @c unary_negate or
+ * @c binary_negate, respectively. These classes are functors whose
+ * @c operator() performs the stored predicate function and then returns
+ * the negation of the result.
+ *
+ * For example, given a vector of integers and a trivial predicate,
+ * \code
+ * struct IntGreaterThanThree
+ * : public std::unary_function<int, bool>
+ * {
+ * bool operator() (int x) { return x > 3; }
+ * };
+ *
+ * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
+ * \endcode
+ * The call to @c find_if will locate the first index (i) of @c v for which
+ * "!(v[i] > 3)" is true.
+ *
+ * The not1/unary_negate combination works on predicates taking a single
+ * argument. The not2/binary_negate combination works on predicates which
+ * take two arguments.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_5_negators negation functors@endlink.
+ template <class _Predicate>
+ class unary_negate
+ : public unary_function<typename _Predicate::argument_type, bool>
+ {
+ protected:
+ _Predicate _M_pred;
+ public:
+ explicit
+ unary_negate(const _Predicate& __x) : _M_pred(__x) {}
+
+ bool
+ operator()(const typename _Predicate::argument_type& __x) const
+ { return !_M_pred(__x); }
+ };
+
+ /// One of the @link s20_3_5_negators negation functors@endlink.
+ template <class _Predicate>
+ inline unary_negate<_Predicate>
+ not1(const _Predicate& __pred)
+ { return unary_negate<_Predicate>(__pred); }
+
+ /// One of the @link s20_3_5_negators negation functors@endlink.
+ template <class _Predicate>
+ class binary_negate
+ : public binary_function<typename _Predicate::first_argument_type,
+ typename _Predicate::second_argument_type,
+ bool>
+ {
+ protected:
+ _Predicate _M_pred;
+ public:
+ explicit
+ binary_negate(const _Predicate& __x)
+ : _M_pred(__x) { }
+
+ bool
+ operator()(const typename _Predicate::first_argument_type& __x,
+ const typename _Predicate::second_argument_type& __y) const
+ { return !_M_pred(__x, __y); }
+ };
+
+ /// One of the @link s20_3_5_negators negation functors@endlink.
+ template <class _Predicate>
+ inline binary_negate<_Predicate>
+ not2(const _Predicate& __pred)
+ { return binary_negate<_Predicate>(__pred); }
+ /** @} */
+
+ // 20.3.6 binders
+ /** @defgroup s20_3_6_binder Binder Classes
+ * Binders turn functions/functors with two arguments into functors with
+ * a single argument, storing an argument to be applied later. For
+ * example, an variable @c B of type @c binder1st is constructed from a
+ * functor @c f and an argument @c x. Later, B's @c operator() is called
+ * with a single argument @c y. The return value is the value of @c f(x,y).
+ * @c B can be "called" with various arguments (y1, y2, ...) and will in
+ * turn call @c f(x,y1), @c f(x,y2), ...
+ *
+ * The function @c bind1st is provided to save some typing. It takes the
+ * function and an argument as parameters, and returns an instance of
+ * @c binder1st.
+ *
+ * The type @c binder2nd and its creator function @c bind2nd do the same
+ * thing, but the stored argument is passed as the second parameter instead
+ * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
+ * functor whose @c operator() accepts a floating-point number, subtracts
+ * 1.3 from it, and returns the result. (If @c bind1st had been used,
+ * the functor would perform "1.3 - x" instead.
+ *
+ * Creator-wrapper functions like @c bind1st are intended to be used in
+ * calling algorithms. Their return values will be temporary objects.
+ * (The goal is to not require you to type names like
+ * @c std::binder1st<std::plus<int>> for declaring a variable to hold the
+ * return value from @c bind1st(std::plus<int>,5).
+ *
+ * These become more useful when combined with the composition functions.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template <class _Operation>
+ class binder1st
+ : public unary_function<typename _Operation::second_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::first_argument_type value;
+ public:
+ binder1st(const _Operation& __x,
+ const typename _Operation::first_argument_type& __y)
+ : op(__x), value(__y) {}
-/// One of the @link s20_3_3_comparisons comparison functors@endlink.
-template <class _Tp>
-struct less_equal : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
-};
-/** @} */
+ typename _Operation::result_type
+ operator()(const typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+ };
+
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template <class _Operation, class _Tp>
+ inline binder1st<_Operation>
+ bind1st(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::first_argument_type _Arg1_type;
+ return binder1st<_Operation>(__fn, _Arg1_type(__x));
+ }
-// 20.3.4 logical operations
-/** @defgroup s20_3_4_logical Boolean Operations Classes
- * Here are wrapper functors for Boolean operations: @c &&, @c ||, and @c !.
- *
- * @{
-*/
-/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
-template <class _Tp>
-struct logical_and : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
-};
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template <class _Operation>
+ class binder2nd
+ : public unary_function<typename _Operation::first_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::second_argument_type value;
+ public:
+ binder2nd(const _Operation& __x,
+ const typename _Operation::second_argument_type& __y)
+ : op(__x), value(__y) {}
-/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
-template <class _Tp>
-struct logical_or : public binary_function<_Tp,_Tp,bool>
-{
- bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
-};
+ typename _Operation::result_type
+ operator()(const typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+ };
+
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template <class _Operation, class _Tp>
+ inline binder2nd<_Operation>
+ bind2nd(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::second_argument_type _Arg2_type;
+ return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+ }
+ /** @} */
+
+ // 20.3.7 adaptors pointers functions
+ /** @defgroup s20_3_7_adaptors Adaptors for pointers to functions
+ * The advantage of function objects over pointers to functions is that
+ * the objects in the standard library declare nested typedefs describing
+ * their argument and result types with uniform names (e.g., @c result_type
+ * from the base classes @c unary_function and @c binary_function).
+ * Sometimes those typedefs are required, not just optional.
+ *
+ * Adaptors are provided to turn pointers to unary (single-argument) and
+ * binary (double-argument) functions into function objects. The
+ * long-winded functor @c pointer_to_unary_function is constructed with a
+ * function pointer @c f, and its @c operator() called with argument @c x
+ * returns @c f(x). The functor @c pointer_to_binary_function does the same
+ * thing, but with a double-argument @c f and @c operator().
+ *
+ * The function @c ptr_fun takes a pointer-to-function @c f and constructs
+ * an instance of the appropriate functor.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+ template <class _Arg, class _Result>
+ class pointer_to_unary_function : public unary_function<_Arg, _Result>
+ {
+ protected:
+ _Result (*_M_ptr)(_Arg);
+ public:
+ pointer_to_unary_function() {}
+
+ explicit
+ pointer_to_unary_function(_Result (*__x)(_Arg))
+ : _M_ptr(__x) {}
-/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
-template <class _Tp>
-struct logical_not : public unary_function<_Tp,bool>
-{
- bool operator()(const _Tp& __x) const { return !__x; }
-};
-/** @} */
-
-// 20.3.5 negators
-/** @defgroup s20_3_5_negators Negators
- * The functions @c not1 and @c not2 each take a predicate functor
- * and return an instance of @c unary_negate or
- * @c binary_negate, respectively. These classes are functors whose
- * @c operator() performs the stored predicate function and then returns
- * the negation of the result.
- *
- * For example, given a vector of integers and a trivial predicate,
- * \code
- * struct IntGreaterThanThree
- * : public std::unary_function<int, bool>
- * {
- * bool operator() (int x) { return x > 3; }
- * };
- *
- * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
- * \endcode
- * The call to @c find_if will locate the first index (i) of @c v for which
- * "!(v[i] > 3)" is true.
- *
- * The not1/unary_negate combination works on predicates taking a single
- * argument. The not2/binary_negate combination works on predicates which
- * take two arguments.
- *
- * @{
-*/
-/// One of the @link s20_3_5_negators negation functors@endlink.
-template <class _Predicate>
-class unary_negate
- : public unary_function<typename _Predicate::argument_type, bool> {
-protected:
- _Predicate _M_pred;
-public:
- explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
- bool operator()(const typename _Predicate::argument_type& __x) const {
- return !_M_pred(__x);
- }
-};
-
-/// One of the @link s20_3_5_negators negation functors@endlink.
-template <class _Predicate>
-inline unary_negate<_Predicate>
-not1(const _Predicate& __pred)
-{
- return unary_negate<_Predicate>(__pred);
-}
-
-/// One of the @link s20_3_5_negators negation functors@endlink.
-template <class _Predicate>
-class binary_negate
- : public binary_function<typename _Predicate::first_argument_type,
- typename _Predicate::second_argument_type,
- bool> {
-protected:
- _Predicate _M_pred;
-public:
- explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
- bool operator()(const typename _Predicate::first_argument_type& __x,
- const typename _Predicate::second_argument_type& __y) const
- {
- return !_M_pred(__x, __y);
- }
-};
-
-/// One of the @link s20_3_5_negators negation functors@endlink.
-template <class _Predicate>
-inline binary_negate<_Predicate>
-not2(const _Predicate& __pred)
-{
- return binary_negate<_Predicate>(__pred);
-}
-/** @} */
-
-// 20.3.6 binders
-/** @defgroup s20_3_6_binder Binder Classes
- * Binders turn functions/functors with two arguments into functors with
- * a single argument, storing an argument to be applied later. For
- * example, an variable @c B of type @c binder1st is constructed from a functor
- * @c f and an argument @c x. Later, B's @c operator() is called with a
- * single argument @c y. The return value is the value of @c f(x,y).
- * @c B can be "called" with various arguments (y1, y2, ...) and will in
- * turn call @c f(x,y1), @c f(x,y2), ...
- *
- * The function @c bind1st is provided to save some typing. It takes the
- * function and an argument as parameters, and returns an instance of
- * @c binder1st.
- *
- * The type @c binder2nd and its creator function @c bind2nd do the same
- * thing, but the stored argument is passed as the second parameter instead
- * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
- * functor whose @c operator() accepts a floating-point number, subtracts
- * 1.3 from it, and returns the result. (If @c bind1st had been used,
- * the functor would perform "1.3 - x" instead.
- *
- * Creator-wrapper functions like @c bind1st are intended to be used in
- * calling algorithms. Their return values will be temporary objects.
- * (The goal is to not require you to type names like
- * @c std::binder1st<std::plus<int>> for declaring a variable to hold the
- * return value from @c bind1st(std::plus<int>,5).
- *
- * These become more useful when combined with the composition functions.
- *
- * @{
-*/
-/// One of the @link s20_3_6_binder binder functors@endlink.
-template <class _Operation>
-class binder1st
- : public unary_function<typename _Operation::second_argument_type,
- typename _Operation::result_type> {
-protected:
- _Operation op;
- typename _Operation::first_argument_type value;
-public:
- binder1st(const _Operation& __x,
- const typename _Operation::first_argument_type& __y)
- : op(__x), value(__y) {}
- typename _Operation::result_type
- operator()(const typename _Operation::second_argument_type& __x) const {
- return op(value, __x);
- }
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //109. Missing binders for non-const sequence elements
- typename _Operation::result_type
- operator()(typename _Operation::second_argument_type& __x) const {
- return op(value, __x);
- }
-#endif
-};
-
-/// One of the @link s20_3_6_binder binder functors@endlink.
-template <class _Operation, class _Tp>
-inline binder1st<_Operation>
-bind1st(const _Operation& __fn, const _Tp& __x)
-{
- typedef typename _Operation::first_argument_type _Arg1_type;
- return binder1st<_Operation>(__fn, _Arg1_type(__x));
-}
-
-/// One of the @link s20_3_6_binder binder functors@endlink.
-template <class _Operation>
-class binder2nd
- : public unary_function<typename _Operation::first_argument_type,
- typename _Operation::result_type> {
-protected:
- _Operation op;
- typename _Operation::second_argument_type value;
-public:
- binder2nd(const _Operation& __x,
- const typename _Operation::second_argument_type& __y)
- : op(__x), value(__y) {}
- typename _Operation::result_type
- operator()(const typename _Operation::first_argument_type& __x) const {
- return op(__x, value);
- }
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- //109. Missing binders for non-const sequence elements
- typename _Operation::result_type
- operator()(typename _Operation::first_argument_type& __x) const {
- return op(__x, value);
- }
-#endif
-};
-
-/// One of the @link s20_3_6_binder binder functors@endlink.
-template <class _Operation, class _Tp>
-inline binder2nd<_Operation>
-bind2nd(const _Operation& __fn, const _Tp& __x)
-{
- typedef typename _Operation::second_argument_type _Arg2_type;
- return binder2nd<_Operation>(__fn, _Arg2_type(__x));
-}
-/** @} */
-
-// 20.3.7 adaptors pointers functions
-/** @defgroup s20_3_7_adaptors Adaptors for pointers to functions
- * The advantage of function objects over pointers to functions is that
- * the objects in the standard library declare nested typedefs describing
- * their argument and result types with uniform names (e.g., @c result_type
- * from the base classes @c unary_function and @c binary_function).
- * Sometimes those typedefs are required, not just optional.
- *
- * Adaptors are provided to turn pointers to unary (single-argument) and
- * binary (double-argument) functions into function objects. The long-winded
- * functor @c pointer_to_unary_function is constructed with a function
- * pointer @c f, and its @c operator() called with argument @c x returns
- * @c f(x). The functor @c pointer_to_binary_function does the same thing,
- * but with a double-argument @c f and @c operator().
- *
- * The function @c ptr_fun takes a pointer-to-function @c f and constructs
- * an instance of the appropriate functor.
- *
- * @{
-*/
-/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
-template <class _Arg, class _Result>
-class pointer_to_unary_function : public unary_function<_Arg, _Result> {
-protected:
- _Result (*_M_ptr)(_Arg);
-public:
- pointer_to_unary_function() {}
- explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {}
- _Result operator()(_Arg __x) const { return _M_ptr(__x); }
-};
-
-/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
-template <class _Arg, class _Result>
-inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg))
-{
- return pointer_to_unary_function<_Arg, _Result>(__x);
-}
-
-/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
-template <class _Arg1, class _Arg2, class _Result>
-class pointer_to_binary_function :
- public binary_function<_Arg1,_Arg2,_Result> {
-protected:
- _Result (*_M_ptr)(_Arg1, _Arg2);
-public:
- pointer_to_binary_function() {}
- explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
+ _Result
+ operator()(_Arg __x) const
+ { return _M_ptr(__x); }
+ };
+
+ /// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+ template <class _Arg, class _Result>
+ inline pointer_to_unary_function<_Arg, _Result>
+ ptr_fun(_Result (*__x)(_Arg))
+ { return pointer_to_unary_function<_Arg, _Result>(__x); }
+
+ /// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+ template <class _Arg1, class _Arg2, class _Result>
+ class pointer_to_binary_function
+ : public binary_function<_Arg1, _Arg2, _Result>
+ {
+ protected:
+ _Result (*_M_ptr)(_Arg1, _Arg2);
+ public:
+ pointer_to_binary_function() {}
+
+ explicit
+ pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
: _M_ptr(__x) {}
- _Result operator()(_Arg1 __x, _Arg2 __y) const {
- return _M_ptr(__x, __y);
- }
-};
-
-/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
-template <class _Arg1, class _Arg2, class _Result>
-inline pointer_to_binary_function<_Arg1,_Arg2,_Result>
-ptr_fun(_Result (*__x)(_Arg1, _Arg2)) {
- return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__x);
-}
-/** @} */
-
-template <class _Tp>
-struct _Identity : public unary_function<_Tp,_Tp> {
- _Tp& operator()(_Tp& __x) const { return __x; }
- const _Tp& operator()(const _Tp& __x) const { return __x; }
-};
-
-template <class _Pair>
-struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> {
- typename _Pair::first_type& operator()(_Pair& __x) const {
- return __x.first;
- }
- const typename _Pair::first_type& operator()(const _Pair& __x) const {
- return __x.first;
- }
-};
-
-template <class _Pair>
-struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type>
-{
- typename _Pair::second_type& operator()(_Pair& __x) const {
- return __x.second;
- }
- const typename _Pair::second_type& operator()(const _Pair& __x) const {
- return __x.second;
- }
-};
-
-// 20.3.8 adaptors pointers members
-/** @defgroup s20_3_8_memadaptors Adaptors for pointers to members
- * There are a total of 16 = 2^4 function objects in this family.
- * (1) Member functions taking no arguments vs member functions taking
- * one argument.
- * (2) Call through pointer vs call through reference.
- * (3) Member function with void return type vs member function with
- * non-void return type.
- * (4) Const vs non-const member function.
- *
- * Note that choice (3) is nothing more than a workaround: according
- * to the draft, compilers should handle void and non-void the same way.
- * This feature is not yet widely implemented, though. You can only use
- * member functions returning void if your compiler supports partial
- * specialization.
- *
- * All of this complexity is in the function objects themselves. You can
- * ignore it by using the helper function mem_fun and mem_fun_ref,
- * which create whichever type of adaptor is appropriate.
- *
- * @{
-*/
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp>
-class mem_fun_t : public unary_function<_Tp*,_Ret> {
-public:
- explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
- _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
-private:
- _Ret (_Tp::*_M_f)();
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp>
-class const_mem_fun_t : public unary_function<const _Tp*,_Ret> {
-public:
- explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
- _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
-private:
- _Ret (_Tp::*_M_f)() const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp>
-class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
-public:
- explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
- _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
-private:
- _Ret (_Tp::*_M_f)();
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp>
-class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
-public:
- explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
- _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
-private:
- _Ret (_Tp::*_M_f)() const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
-public:
- explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
- _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
-private:
- _Ret (_Tp::*_M_f)(_Arg);
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_t : public binary_function<const _Tp*,_Arg,_Ret> {
-public:
- explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
- _Ret operator()(const _Tp* __p, _Arg __x) const
- { return (__p->*_M_f)(__x); }
-private:
- _Ret (_Tp::*_M_f)(_Arg) const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
-public:
- explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
- _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
- _Ret (_Tp::*_M_f)(_Arg);
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
-public:
- explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
- _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
- _Ret (_Tp::*_M_f)(_Arg) const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp>
-class mem_fun_t<void, _Tp> : public unary_function<_Tp*,void> {
-public:
- explicit mem_fun_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
- void operator()(_Tp* __p) const { (__p->*_M_f)(); }
-private:
- void (_Tp::*_M_f)();
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp>
-class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*,void> {
-public:
- explicit const_mem_fun_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
- void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
-private:
- void (_Tp::*_M_f)() const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp>
-class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
-public:
- explicit mem_fun_ref_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
- void operator()(_Tp& __r) const { (__r.*_M_f)(); }
-private:
- void (_Tp::*_M_f)();
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp>
-class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
-public:
- explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
- void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
-private:
- void (_Tp::*_M_f)() const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp, class _Arg>
-class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*,_Arg,void> {
-public:
- explicit mem_fun1_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
- void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
- void (_Tp::*_M_f)(_Arg);
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp, class _Arg>
-class const_mem_fun1_t<void, _Tp, _Arg>
- : public binary_function<const _Tp*,_Arg,void> {
-public:
- explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
- void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
- void (_Tp::*_M_f)(_Arg) const;
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp, class _Arg>
-class mem_fun1_ref_t<void, _Tp, _Arg>
- : public binary_function<_Tp,_Arg,void> {
-public:
- explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
- void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
- void (_Tp::*_M_f)(_Arg);
-};
-
-/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
-template <class _Tp, class _Arg>
-class const_mem_fun1_ref_t<void, _Tp, _Arg>
- : public binary_function<_Tp,_Arg,void> {
-public:
- explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
- void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
- void (_Tp::*_M_f)(_Arg) const;
-};
-
-
-// Mem_fun adaptor helper functions. There are only two:
-// mem_fun and mem_fun_ref.
-
-template <class _Ret, class _Tp>
-inline mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)())
- { return mem_fun_t<_Ret,_Tp>(__f); }
-
-template <class _Ret, class _Tp>
-inline const_mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)() const)
- { return const_mem_fun_t<_Ret,_Tp>(__f); }
-
-template <class _Ret, class _Tp>
-inline mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)())
- { return mem_fun_ref_t<_Ret,_Tp>(__f); }
-
-template <class _Ret, class _Tp>
-inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const)
- { return const_mem_fun_ref_t<_Ret,_Tp>(__f); }
-
-template <class _Ret, class _Tp, class _Arg>
-inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg))
- { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
-
-template <class _Ret, class _Tp, class _Arg>
-inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const)
- { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
-
-template <class _Ret, class _Tp, class _Arg>
-inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
- { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
-
-template <class _Ret, class _Tp, class _Arg>
-inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
-mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
- { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
-
-/** @} */
+
+ _Result
+ operator()(_Arg1 __x, _Arg2 __y) const
+ { return _M_ptr(__x, __y); }
+ };
+
+ /// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+ template <class _Arg1, class _Arg2, class _Result>
+ inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
+ ptr_fun(_Result (*__x)(_Arg1, _Arg2))
+ { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
+ /** @} */
+
+ template <class _Tp>
+ struct _Identity : public unary_function<_Tp,_Tp>
+ {
+ _Tp&
+ operator()(_Tp& __x) const
+ { return __x; }
+
+ const _Tp&
+ operator()(const _Tp& __x) const
+ { return __x; }
+ };
+
+ template <class _Pair>
+ struct _Select1st : public unary_function<_Pair,
+ typename _Pair::first_type>
+ {
+ typename _Pair::first_type&
+ operator()(_Pair& __x) const
+ { return __x.first; }
+
+ const typename _Pair::first_type&
+ operator()(const _Pair& __x) const
+ { return __x.first; }
+ };
+
+ template <class _Pair>
+ struct _Select2nd : public unary_function<_Pair,
+ typename _Pair::second_type>
+ {
+ typename _Pair::second_type&
+ operator()(_Pair& __x) const
+ { return __x.second; }
+
+ const typename _Pair::second_type&
+ operator()(const _Pair& __x) const
+ { return __x.second; }
+ };
+
+ // 20.3.8 adaptors pointers members
+ /** @defgroup s20_3_8_memadaptors Adaptors for pointers to members
+ * There are a total of 16 = 2^4 function objects in this family.
+ * (1) Member functions taking no arguments vs member functions taking
+ * one argument.
+ * (2) Call through pointer vs call through reference.
+ * (3) Member function with void return type vs member function with
+ * non-void return type.
+ * (4) Const vs non-const member function.
+ *
+ * Note that choice (3) is nothing more than a workaround: according
+ * to the draft, compilers should handle void and non-void the same way.
+ * This feature is not yet widely implemented, though. You can only use
+ * member functions returning void if your compiler supports partial
+ * specialization.
+ *
+ * All of this complexity is in the function objects themselves. You can
+ * ignore it by using the helper function mem_fun and mem_fun_ref,
+ * which create whichever type of adaptor is appropriate.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp>
+ class mem_fun_t : public unary_function<_Tp*, _Ret>
+ {
+ public:
+ explicit
+ mem_fun_t(_Ret (_Tp::*__pf)())
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(_Tp* __p) const
+ { return (__p->*_M_f)(); }
+ private:
+ _Ret (_Tp::*_M_f)();
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp>
+ class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun_t(_Ret (_Tp::*__pf)() const)
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(const _Tp* __p) const
+ { return (__p->*_M_f)(); }
+ private:
+ _Ret (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp>
+ class mem_fun_ref_t : public unary_function<_Tp, _Ret>
+ {
+ public:
+ explicit
+ mem_fun_ref_t(_Ret (_Tp::*__pf)())
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(_Tp& __r) const
+ { return (__r.*_M_f)(); }
+ private:
+ _Ret (_Tp::*_M_f)();
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp>
+ class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(const _Tp& __r) const
+ { return (__r.*_M_f)(); }
+ private:
+ _Ret (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp, class _Arg>
+ class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
+ {
+ public:
+ explicit
+ mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(_Tp* __p, _Arg __x) const
+ { return (__p->*_M_f)(__x); }
+ private:
+ _Ret (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp, class _Arg>
+ class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(const _Tp* __p, _Arg __x) const
+ { return (__p->*_M_f)(__x); }
+ private:
+ _Ret (_Tp::*_M_f)(_Arg) const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp, class _Arg>
+ class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+ {
+ public:
+ explicit
+ mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(_Tp& __r, _Arg __x) const
+ { return (__r.*_M_f)(__x); }
+ private:
+ _Ret (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Ret, class _Tp, class _Arg>
+ class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) {}
+
+ _Ret
+ operator()(const _Tp& __r, _Arg __x) const
+ { return (__r.*_M_f)(__x); }
+ private:
+ _Ret (_Tp::*_M_f)(_Arg) const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp>
+ class mem_fun_t<void, _Tp> : public unary_function<_Tp*, void>
+ {
+ public:
+ explicit
+ mem_fun_t(void (_Tp::*__pf)())
+ : _M_f(__pf) {}
+
+ void
+ operator()(_Tp* __p) const
+ { (__p->*_M_f)(); }
+ private:
+ void (_Tp::*_M_f)();
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp>
+ class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*, void>
+ {
+ public:
+ explicit
+ const_mem_fun_t(void (_Tp::*__pf)() const)
+ : _M_f(__pf) {}
+
+ void
+ operator()(const _Tp* __p) const
+ { (__p->*_M_f)(); }
+ private:
+ void (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp>
+ class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
+ {
+ public:
+ explicit
+ mem_fun_ref_t(void (_Tp::*__pf)())
+ : _M_f(__pf) {}
+
+ void
+ operator()(_Tp& __r) const
+ { (__r.*_M_f)(); }
+ private:
+ void (_Tp::*_M_f)();
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp>
+ class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
+ {
+ public:
+ explicit
+ const_mem_fun_ref_t(void (_Tp::*__pf)() const)
+ : _M_f(__pf) {}
+
+ void
+ operator()(const _Tp& __r) const
+ { (__r.*_M_f)(); }
+ private:
+ void (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp, class _Arg>
+ class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*, _Arg, void>
+ {
+ public:
+ explicit
+ mem_fun1_t(void (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) {}
+
+ void
+ operator()(_Tp* __p, _Arg __x) const
+ { (__p->*_M_f)(__x); }
+ private:
+ void (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp, class _Arg>
+ class const_mem_fun1_t<void, _Tp, _Arg>
+ : public binary_function<const _Tp*, _Arg, void>
+ {
+ public:
+ explicit
+ const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) {}
+
+ void
+ operator()(const _Tp* __p, _Arg __x) const
+ { (__p->*_M_f)(__x); }
+ private:
+ void (_Tp::*_M_f)(_Arg) const;
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp, class _Arg>
+ class mem_fun1_ref_t<void, _Tp, _Arg>
+ : public binary_function<_Tp, _Arg, void>
+ {
+ public:
+ explicit
+ mem_fun1_ref_t(void (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) {}
+
+ void
+ operator()(_Tp& __r, _Arg __x) const
+ { (__r.*_M_f)(__x); }
+ private:
+ void (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+ template <class _Tp, class _Arg>
+ class const_mem_fun1_ref_t<void, _Tp, _Arg>
+ : public binary_function<_Tp, _Arg, void>
+ {
+ public:
+ explicit
+ const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) {}
+
+ void
+ operator()(const _Tp& __r, _Arg __x) const
+ { (__r.*_M_f)(__x); }
+ private:
+ void (_Tp::*_M_f)(_Arg) const;
+ };
+
+ // Mem_fun adaptor helper functions. There are only two:
+ // mem_fun and mem_fun_ref.
+ template <class _Ret, class _Tp>
+ inline mem_fun_t<_Ret, _Tp>
+ mem_fun(_Ret (_Tp::*__f)())
+ { return mem_fun_t<_Ret, _Tp>(__f); }
+
+ template <class _Ret, class _Tp>
+ inline const_mem_fun_t<_Ret, _Tp>
+ mem_fun(_Ret (_Tp::*__f)() const)
+ { return const_mem_fun_t<_Ret, _Tp>(__f); }
+
+ template <class _Ret, class _Tp>
+ inline mem_fun_ref_t<_Ret, _Tp>
+ mem_fun_ref(_Ret (_Tp::*__f)())
+ { return mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+ template <class _Ret, class _Tp>
+ inline const_mem_fun_ref_t<_Ret, _Tp>
+ mem_fun_ref(_Ret (_Tp::*__f)() const)
+ { return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline const_mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+ /** @} */
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_FUNCTION_H */
+#endif /* _FUNCTION_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/bits/stl_heap.h b/contrib/libstdc++/include/bits/stl_heap.h
index c19195a..eff7fd3 100644
--- a/contrib/libstdc++/include/bits/stl_heap.h
+++ b/contrib/libstdc++/include/bits/stl_heap.h
@@ -1,6 +1,6 @@
// Heap implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -57,30 +57,87 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STL_HEAP_H
-#define _CPP_BITS_STL_HEAP_H 1
+#ifndef _STL_HEAP_H
+#define _STL_HEAP_H 1
+
+#include <debug/debug.h>
namespace std
{
+ // is_heap, a predicate testing whether or not a range is
+ // a heap. This function is an extension, not part of the C++
+ // standard.
+ template<typename _RandomAccessIterator, typename _Distance>
+ bool
+ __is_heap(_RandomAccessIterator __first, _Distance __n)
+ {
+ _Distance __parent = 0;
+ for (_Distance __child = 1; __child < __n; ++__child)
+ {
+ if (__first[__parent] < __first[__child])
+ return false;
+ if ((__child & 1) == 0)
+ ++__parent;
+ }
+ return true;
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance,
+ typename _StrictWeakOrdering>
+ bool
+ __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
+ _Distance __n)
+ {
+ _Distance __parent = 0;
+ for (_Distance __child = 1; __child < __n; ++__child)
+ {
+ if (__comp(__first[__parent], __first[__child]))
+ return false;
+ if ((__child & 1) == 0)
+ ++__parent;
+ }
+ return true;
+ }
+
+ template<typename _RandomAccessIterator>
+ bool
+ __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ { return std::__is_heap(__first, std::distance(__first, __last)); }
+
+ template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
+ bool
+ __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _StrictWeakOrdering __comp)
+ { return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
- void
+ void
__push_heap(_RandomAccessIterator __first,
_Distance __holeIndex, _Distance __topIndex, _Tp __value)
{
_Distance __parent = (__holeIndex - 1) / 2;
- while (__holeIndex > __topIndex && *(__first + __parent) < __value) {
- *(__first + __holeIndex) = *(__first + __parent);
- __holeIndex = __parent;
- __parent = (__holeIndex - 1) / 2;
- }
+ while (__holeIndex > __topIndex && *(__first + __parent) < __value)
+ {
+ *(__first + __holeIndex) = *(__first + __parent);
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
*(__first + __holeIndex) = __value;
}
+ /**
+ * @brief Push an element onto a heap.
+ * @param first Start of heap.
+ * @param last End of heap + element.
+ * @ingroup heap
+ *
+ * This operation pushes the element at last-1 onto the valid heap over the
+ * range [first,last-1). After completion, [first,last) is a valid heap.
+ */
template<typename _RandomAccessIterator>
- inline void
+ inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
@@ -89,31 +146,46 @@ namespace std
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ // __glibcxx_requires_heap(__first, __last - 1);
- __push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
- _ValueType(*(__last - 1)));
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), _ValueType(*(__last - 1)));
}
- template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
+ template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
typename _Compare>
void
__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __topIndex, _Tp __value, _Compare __comp)
{
_Distance __parent = (__holeIndex - 1) / 2;
- while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) {
- *(__first + __holeIndex) = *(__first + __parent);
- __holeIndex = __parent;
- __parent = (__holeIndex - 1) / 2;
- }
+ while (__holeIndex > __topIndex
+ && __comp(*(__first + __parent), __value))
+ {
+ *(__first + __holeIndex) = *(__first + __parent);
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
*(__first + __holeIndex) = __value;
}
+ /**
+ * @brief Push an element onto a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap + element.
+ * @param comp Comparison functor.
+ * @ingroup heap
+ *
+ * This operation pushes the element at last-1 onto the valid heap over the
+ * range [first,last-1). After completion, [first,last) is a valid heap.
+ * Compare operations are performed using comp.
+ */
template<typename _RandomAccessIterator, typename _Compare>
- inline void
+ inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
@@ -123,56 +195,75 @@ namespace std
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last - 1, __comp);
- __push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
- _ValueType(*(__last - 1)), __comp);
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), _ValueType(*(__last - 1)), __comp);
}
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
- void
+ void
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value)
{
- _Distance __topIndex = __holeIndex;
+ const _Distance __topIndex = __holeIndex;
_Distance __secondChild = 2 * __holeIndex + 2;
- while (__secondChild < __len) {
- if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
- __secondChild--;
- *(__first + __holeIndex) = *(__first + __secondChild);
- __holeIndex = __secondChild;
- __secondChild = 2 * (__secondChild + 1);
- }
- if (__secondChild == __len) {
- *(__first + __holeIndex) = *(__first + (__secondChild - 1));
- __holeIndex = __secondChild - 1;
- }
- __push_heap(__first, __holeIndex, __topIndex, __value);
+ while (__secondChild < __len)
+ {
+ if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
+ __secondChild--;
+ *(__first + __holeIndex) = *(__first + __secondChild);
+ __holeIndex = __secondChild;
+ __secondChild = 2 * (__secondChild + 1);
+ }
+ if (__secondChild == __len)
+ {
+ *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex, __value);
}
template<typename _RandomAccessIterator, typename _Tp>
- inline void
+ inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result, _Tp __value)
{
- typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
*__result = *__first;
- __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value);
+ std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
+ __value);
}
+ /**
+ * @brief Pop an element off a heap.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap
+ *
+ * This operation pops the top of the heap. The elements first and last-1
+ * are swapped and [first,last-1) is made into a heap.
+ */
template<typename _RandomAccessIterator>
inline void
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
- typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap(__first, __last);
- __pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)));
+ std::__pop_heap(__first, __last - 1, __last - 1,
+ _ValueType(*(__last - 1)));
}
template<typename _RandomAccessIterator, typename _Distance,
@@ -181,48 +272,75 @@ namespace std
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value, _Compare __comp)
{
- _Distance __topIndex = __holeIndex;
+ const _Distance __topIndex = __holeIndex;
_Distance __secondChild = 2 * __holeIndex + 2;
- while (__secondChild < __len) {
- if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1))))
- __secondChild--;
- *(__first + __holeIndex) = *(__first + __secondChild);
- __holeIndex = __secondChild;
- __secondChild = 2 * (__secondChild + 1);
- }
- if (__secondChild == __len) {
- *(__first + __holeIndex) = *(__first + (__secondChild - 1));
- __holeIndex = __secondChild - 1;
- }
- __push_heap(__first, __holeIndex, __topIndex, __value, __comp);
+ while (__secondChild < __len)
+ {
+ if (__comp(*(__first + __secondChild),
+ *(__first + (__secondChild - 1))))
+ __secondChild--;
+ *(__first + __holeIndex) = *(__first + __secondChild);
+ __holeIndex = __secondChild;
+ __secondChild = 2 * (__secondChild + 1);
+ }
+ if (__secondChild == __len)
+ {
+ *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
}
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
- inline void
+ inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result, _Tp __value, _Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
*__result = *__first;
- __adjust_heap(__first, _Distance(0), _Distance(__last - __first),
- __value, __comp);
+ std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
+ __value, __comp);
}
+ /**
+ * @brief Pop an element off a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap
+ *
+ * This operation pops the top of the heap. The elements first and last-1
+ * are swapped and [first,last-1) is made into a heap. Comparisons are
+ * made using comp.
+ */
template<typename _RandomAccessIterator, typename _Compare>
- inline void
+ inline void
pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last, __comp);
- typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
- __pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp);
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ std::__pop_heap(__first, __last - 1, __last - 1,
+ _ValueType(*(__last - 1)), __comp);
}
+ /**
+ * @brief Construct a heap over a range.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap
+ *
+ * This operation makes the elements in [first,last) into a heap.
+ */
template<typename _RandomAccessIterator>
- void
+ void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
@@ -231,23 +349,38 @@ namespace std
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
-
- if (__last - __first < 2) return;
- _DistanceType __len = __last - __first;
- _DistanceType __parent = (__len - 2)/2;
-
- while (true) {
- __adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent)));
- if (__parent == 0) return;
- __parent--;
- }
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__last - __first < 2)
+ return;
+
+ const _DistanceType __len = __last - __first;
+ _DistanceType __parent = (__len - 2) / 2;
+ while (true)
+ {
+ std::__adjust_heap(__first, __parent, __len,
+ _ValueType(*(__first + __parent)));
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
}
+ /**
+ * @brief Construct a heap over a range using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap
+ *
+ * This operation makes the elements in [first,last) into a heap.
+ * Comparisons are made using comp.
+ */
template<typename _RandomAccessIterator, typename _Compare>
- inline void
+ inline void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
@@ -257,51 +390,77 @@ namespace std
_DistanceType;
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
-
- if (__last - __first < 2) return;
- _DistanceType __len = __last - __first;
- _DistanceType __parent = (__len - 2)/2;
-
- while (true) {
- __adjust_heap(__first, __parent, __len,
- _ValueType(*(__first + __parent)), __comp);
- if (__parent == 0) return;
- __parent--;
- }
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__last - __first < 2)
+ return;
+
+ const _DistanceType __len = __last - __first;
+ _DistanceType __parent = (__len - 2) / 2;
+ while (true)
+ {
+ std::__adjust_heap(__first, __parent, __len,
+ _ValueType(*(__first + __parent)), __comp);
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
}
+ /**
+ * @brief Sort a heap.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap
+ *
+ * This operation sorts the valid heap in the range [first,last).
+ */
template<typename _RandomAccessIterator>
void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
- __glibcpp_function_requires(_LessThanComparableConcept<
+ __glibcxx_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ // __glibcxx_requires_heap(__first, __last);
while (__last - __first > 1)
- pop_heap(__first, __last--);
+ std::pop_heap(__first, __last--);
}
+ /**
+ * @brief Sort a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap
+ *
+ * This operation sorts the valid heap in the range [first,last).
+ * Comparisons are made using comp.
+ */
template<typename _RandomAccessIterator, typename _Compare>
- void
+ void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last, __comp);
while (__last - __first > 1)
- pop_heap(__first, __last--, __comp);
+ std::pop_heap(__first, __last--, __comp);
}
} // namespace std
-#endif /* _CPP_BITS_STL_HEAP_H */
+#endif /* _STL_HEAP_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/bits/stl_iterator.h b/contrib/libstdc++/include/bits/stl_iterator.h
index 529ad77..cc56431 100644
--- a/contrib/libstdc++/include/bits/stl_iterator.h
+++ b/contrib/libstdc++/include/bits/stl_iterator.h
@@ -1,6 +1,6 @@
// Iterators -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -62,8 +62,8 @@
* supporting functions and overloaded operators.
*/
-#ifndef __GLIBCPP_INTERNAL_ITERATOR_H
-#define __GLIBCPP_INTERNAL_ITERATOR_H
+#ifndef _ITERATOR_H
+#define _ITERATOR_H 1
namespace std
{
@@ -87,7 +87,7 @@ namespace std
* the requirement that the iterators must be safe.
*/
template<typename _Iterator>
- class reverse_iterator
+ class reverse_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
@@ -98,9 +98,9 @@ namespace std
_Iterator current;
public:
- typedef _Iterator iterator_type;
- typedef typename iterator_traits<_Iterator>::difference_type
- difference_type;
+ typedef _Iterator iterator_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
typedef typename iterator_traits<_Iterator>::reference reference;
typedef typename iterator_traits<_Iterator>::pointer pointer;
@@ -109,20 +109,20 @@ namespace std
* The default constructor default-initializes member @p current.
* If it is a pointer, that means it is zero-initialized.
*/
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 235 No specification of default ctor for reverse_iterator
reverse_iterator() : current() { }
/**
* This %iterator will move in the opposite direction that @p x does.
*/
- explicit
+ explicit
reverse_iterator(iterator_type __x) : current(__x) { }
/**
* The copy constructor is normal.
*/
- reverse_iterator(const reverse_iterator& __x)
+ reverse_iterator(const reverse_iterator& __x)
: current(__x.current) { }
/**
@@ -132,20 +132,21 @@ namespace std
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) { }
-
+
/**
* @return @c current, the %iterator used for underlying work.
*/
- iterator_type
- base() const { return current; }
+ iterator_type
+ base() const
+ { return current; }
/**
* @return TODO
*
* @doctodo
*/
- reference
- operator*() const
+ reference
+ operator*() const
{
_Iterator __tmp = current;
return *--__tmp;
@@ -156,16 +157,17 @@ namespace std
*
* @doctodo
*/
- pointer
- operator->() const { return &(operator*()); }
+ pointer
+ operator->() const
+ { return &(operator*()); }
/**
* @return TODO
*
* @doctodo
*/
- reverse_iterator&
- operator++()
+ reverse_iterator&
+ operator++()
{
--current;
return *this;
@@ -176,8 +178,8 @@ namespace std
*
* @doctodo
*/
- reverse_iterator
- operator++(int)
+ reverse_iterator
+ operator++(int)
{
reverse_iterator __tmp = *this;
--current;
@@ -189,8 +191,8 @@ namespace std
*
* @doctodo
*/
- reverse_iterator&
- operator--()
+ reverse_iterator&
+ operator--()
{
++current;
return *this;
@@ -201,20 +203,20 @@ namespace std
*
* @doctodo
*/
- reverse_iterator operator--(int)
+ reverse_iterator operator--(int)
{
reverse_iterator __tmp = *this;
++current;
return __tmp;
}
-
+
/**
* @return TODO
*
* @doctodo
*/
- reverse_iterator
- operator+(difference_type __n) const
+ reverse_iterator
+ operator+(difference_type __n) const
{ return reverse_iterator(current - __n); }
/**
@@ -222,8 +224,8 @@ namespace std
*
* @doctodo
*/
- reverse_iterator&
- operator+=(difference_type __n)
+ reverse_iterator&
+ operator+=(difference_type __n)
{
current -= __n;
return *this;
@@ -234,8 +236,8 @@ namespace std
*
* @doctodo
*/
- reverse_iterator
- operator-(difference_type __n) const
+ reverse_iterator
+ operator-(difference_type __n) const
{ return reverse_iterator(current + __n); }
/**
@@ -243,8 +245,8 @@ namespace std
*
* @doctodo
*/
- reverse_iterator&
- operator-=(difference_type __n)
+ reverse_iterator&
+ operator-=(difference_type __n)
{
current += __n;
return *this;
@@ -255,10 +257,11 @@ namespace std
*
* @doctodo
*/
- reference
- operator[](difference_type __n) const { return *(*this + __n); }
- };
-
+ reference
+ operator[](difference_type __n) const
+ { return *(*this + __n); }
+ };
+
//@{
/**
* @param x A %reverse_iterator.
@@ -270,51 +273,51 @@ namespace std
*
*/
template<typename _Iterator>
- inline bool
- operator==(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator==(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
- inline bool
- operator<(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator<(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return __y.base() < __x.base(); }
template<typename _Iterator>
- inline bool
- operator!=(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator!=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
- inline bool
- operator>(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator>(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _Iterator>
- inline bool
- operator<=(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator<=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
- inline bool
- operator>=(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ inline bool
+ operator>=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline typename reverse_iterator<_Iterator>::difference_type
- operator-(const reverse_iterator<_Iterator>& __x,
- const reverse_iterator<_Iterator>& __y)
+ operator-(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
{ return __y.base() - __x.base(); }
template<typename _Iterator>
- inline reverse_iterator<_Iterator>
+ inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
- const reverse_iterator<_Iterator>& __x)
+ const reverse_iterator<_Iterator>& __x)
{ return reverse_iterator<_Iterator>(__x.base() - __n); }
//@}
@@ -330,7 +333,7 @@ namespace std
* save typing.
*/
template<typename _Container>
- class back_insert_iterator
+ class back_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
@@ -339,9 +342,9 @@ namespace std
public:
/// A nested typedef for the type of whatever container you used.
typedef _Container container_type;
-
+
/// The only way to create this %iterator is with a container.
- explicit
+ explicit
back_insert_iterator(_Container& __x) : container(&__x) { }
/**
@@ -356,23 +359,26 @@ namespace std
* always append the value to the end of the container.
*/
back_insert_iterator&
- operator=(typename _Container::const_reference __value)
- {
+ operator=(typename _Container::const_reference __value)
+ {
container->push_back(__value);
return *this;
}
/// Simply returns *this.
- back_insert_iterator&
- operator*() { return *this; }
+ back_insert_iterator&
+ operator*()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
- back_insert_iterator&
- operator++() { return *this; }
+ back_insert_iterator&
+ operator++()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
back_insert_iterator
- operator++(int) { return *this; }
+ operator++(int)
+ { return *this; }
};
/**
@@ -387,8 +393,8 @@ namespace std
* types for you.
*/
template<typename _Container>
- inline back_insert_iterator<_Container>
- back_inserter(_Container& __x)
+ inline back_insert_iterator<_Container>
+ back_inserter(_Container& __x)
{ return back_insert_iterator<_Container>(__x); }
/**
@@ -402,7 +408,7 @@ namespace std
* save typing.
*/
template<typename _Container>
- class front_insert_iterator
+ class front_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
@@ -427,23 +433,26 @@ namespace std
* always prepend the value to the front of the container.
*/
front_insert_iterator&
- operator=(typename _Container::const_reference __value)
- {
+ operator=(typename _Container::const_reference __value)
+ {
container->push_front(__value);
return *this;
}
/// Simply returns *this.
- front_insert_iterator&
- operator*() { return *this; }
+ front_insert_iterator&
+ operator*()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
- front_insert_iterator&
- operator++() { return *this; }
+ front_insert_iterator&
+ operator++()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
- front_insert_iterator
- operator++(int) { return *this; }
+ front_insert_iterator
+ operator++(int)
+ { return *this; }
};
/**
@@ -458,8 +467,8 @@ namespace std
* types for you.
*/
template<typename _Container>
- inline front_insert_iterator<_Container>
- front_inserter(_Container& __x)
+ inline front_insert_iterator<_Container>
+ front_inserter(_Container& __x)
{ return front_insert_iterator<_Container>(__x); }
/**
@@ -477,7 +486,7 @@ namespace std
* save typing.
*/
template<typename _Container>
- class insert_iterator
+ class insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
@@ -487,14 +496,14 @@ namespace std
public:
/// A nested typedef for the type of whatever container you used.
typedef _Container container_type;
-
+
/**
* The only way to create this %iterator is with a container and an
* initial position (a normal %iterator into the container).
*/
- insert_iterator(_Container& __x, typename _Container::iterator __i)
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x), iter(__i) {}
-
+
/**
* @param value An instance of whatever type
* container_type::const_reference is; presumably a
@@ -519,26 +528,29 @@ namespace std
* @endcode
*/
insert_iterator&
- operator=(const typename _Container::const_reference __value)
- {
+ operator=(const typename _Container::const_reference __value)
+ {
iter = container->insert(iter, __value);
++iter;
return *this;
}
/// Simply returns *this.
- insert_iterator&
- operator*() { return *this; }
+ insert_iterator&
+ operator*()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
- insert_iterator&
- operator++() { return *this; }
+ insert_iterator&
+ operator++()
+ { return *this; }
/// Simply returns *this. (This %iterator does not "move".)
- insert_iterator&
- operator++(int) { return *this; }
+ insert_iterator&
+ operator++(int)
+ { return *this; }
};
-
+
/**
* @param x A container of arbitrary type.
* @return An instance of insert_iterator working on @p x.
@@ -551,16 +563,16 @@ namespace std
* types for you.
*/
template<typename _Container, typename _Iterator>
- inline insert_iterator<_Container>
+ inline insert_iterator<_Container>
inserter(_Container& __x, _Iterator __i)
{
- return insert_iterator<_Container>(__x,
+ return insert_iterator<_Container>(__x,
typename _Container::iterator(__i));
}
} // namespace std
namespace __gnu_cxx
-{
+{
// This iterator adapter is 'normal' in the sense that it does not
// change the semantics of any of the operators of its iterator
// parameter. Its primary purpose is to convert an iterator that is
@@ -572,56 +584,67 @@ namespace __gnu_cxx
using std::iterator;
template<typename _Iterator, typename _Container>
class __normal_iterator
- : public iterator<typename iterator_traits<_Iterator>::iterator_category,
- typename iterator_traits<_Iterator>::value_type,
- typename iterator_traits<_Iterator>::difference_type,
- typename iterator_traits<_Iterator>::pointer,
- typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator _M_current;
-
+
public:
- typedef typename iterator_traits<_Iterator>::difference_type
- difference_type;
- typedef typename iterator_traits<_Iterator>::reference reference;
- typedef typename iterator_traits<_Iterator>::pointer pointer;
+ typedef typename iterator_traits<_Iterator>::iterator_category
+ iterator_category;
+ typedef typename iterator_traits<_Iterator>::value_type value_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
+ typedef typename iterator_traits<_Iterator>::reference reference;
+ typedef typename iterator_traits<_Iterator>::pointer pointer;
__normal_iterator() : _M_current(_Iterator()) { }
- explicit
+ explicit
__normal_iterator(const _Iterator& __i) : _M_current(__i) { }
// Allow iterator to const_iterator conversion
template<typename _Iter>
- inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
+ inline __normal_iterator(const __normal_iterator<_Iter,
+ _Container>& __i)
: _M_current(__i.base()) { }
// Forward iterator requirements
reference
- operator*() const { return *_M_current; }
-
+ operator*() const
+ { return *_M_current; }
+
pointer
- operator->() const { return _M_current; }
-
+ operator->() const
+ { return _M_current; }
+
__normal_iterator&
- operator++() { ++_M_current; return *this; }
-
+ operator++()
+ {
+ ++_M_current;
+ return *this;
+ }
+
__normal_iterator
- operator++(int) { return __normal_iterator(_M_current++); }
-
+ operator++(int)
+ { return __normal_iterator(_M_current++); }
+
// Bidirectional iterator requirements
__normal_iterator&
- operator--() { --_M_current; return *this; }
-
+ operator--()
+ {
+ --_M_current;
+ return *this;
+ }
+
__normal_iterator
- operator--(int) { return __normal_iterator(_M_current--); }
-
+ operator--(int)
+ { return __normal_iterator(_M_current--); }
+
// Random access iterator requirements
reference
operator[](const difference_type& __n) const
{ return _M_current[__n]; }
-
+
__normal_iterator&
operator+=(const difference_type& __n)
{ _M_current += __n; return *this; }
@@ -629,17 +652,18 @@ namespace __gnu_cxx
__normal_iterator
operator+(const difference_type& __n) const
{ return __normal_iterator(_M_current + __n); }
-
+
__normal_iterator&
operator-=(const difference_type& __n)
{ _M_current -= __n; return *this; }
-
+
__normal_iterator
operator-(const difference_type& __n) const
{ return __normal_iterator(_M_current - __n); }
-
- const _Iterator&
- base() const { return _M_current; }
+
+ const _Iterator&
+ base() const
+ { return _M_current; }
};
// Note: In what follows, the left- and right-hand-side iterators are
@@ -649,99 +673,99 @@ namespace __gnu_cxx
// will make overload resolution ambiguous (when in scope) if we don't
// provide overloads whose operands are of the same type. Can someone
// remind me what generic programming is about? -- Gaby
-
+
// Forward iterator requirements
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() == __rhs.base(); }
+ inline bool
+ operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() == __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() == __rhs.base(); }
+ inline bool
+ operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() == __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() != __rhs.base(); }
+ inline bool
+ operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() != __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() != __rhs.base(); }
+ inline bool
+ operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() != __rhs.base(); }
// Random access iterator requirements
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() < __rhs.base(); }
+ inline bool
+ operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() < __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() < __rhs.base(); }
+ inline bool
+ operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() < __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() > __rhs.base(); }
+ inline bool
+ operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() > __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() > __rhs.base(); }
+ inline bool
+ operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() > __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() <= __rhs.base(); }
+ inline bool
+ operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() <= __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() <= __rhs.base(); }
+ inline bool
+ operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() <= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline bool
- operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() >= __rhs.base(); }
+ inline bool
+ operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() >= __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline bool
- operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
- const __normal_iterator<_Iterator, _Container>& __rhs)
- { return __lhs.base() >= __rhs.base(); }
+ inline bool
+ operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() >= __rhs.base(); }
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// According to the resolution of DR179 not only the various comparison
// operators but also operator- must accept mixed iterator/const_iterator
// parameters.
template<typename _IteratorL, typename _IteratorR, typename _Container>
- inline typename __normal_iterator<_IteratorL, _Container>::difference_type
- operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
- const __normal_iterator<_IteratorR, _Container>& __rhs)
- { return __lhs.base() - __rhs.base(); }
+ inline typename __normal_iterator<_IteratorL, _Container>::difference_type
+ operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
- inline __normal_iterator<_Iterator, _Container>
- operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n,
- const __normal_iterator<_Iterator, _Container>& __i)
- { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
+ inline __normal_iterator<_Iterator, _Container>
+ operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
+ __n, const __normal_iterator<_Iterator, _Container>& __i)
+ { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
} // namespace __gnu_cxx
-#endif
+#endif
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h b/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h
index 7c245d0..c514e81 100644
--- a/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h
+++ b/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h
@@ -1,6 +1,6 @@
// Functions used by iterators -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -61,8 +61,8 @@
* functions, such as distance() and advance().
*/
-#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
-#define __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
+#ifndef _ITERATOR_BASE_FUNCS_H
+#define _ITERATOR_BASE_FUNCS_H 1
#pragma GCC system_header
#include <bits/concept_check.h>
@@ -75,25 +75,28 @@ namespace std
input_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
-
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+
typename iterator_traits<_InputIterator>::difference_type __n = 0;
- while (__first != __last) {
- ++__first; ++__n;
- }
+ while (__first != __last)
+ {
+ ++__first;
+ ++__n;
+ }
return __n;
}
-
+
template<typename _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
return __last - __first;
}
-
+
/**
* @brief A generalization of pointer arithmetic.
* @param first An input iterator.
@@ -111,42 +114,47 @@ namespace std
distance(_InputIterator __first, _InputIterator __last)
{
// concept requirements -- taken care of in __distance
- return __distance(__first, __last, __iterator_category(__first));
+ return std::__distance(__first, __last,
+ std::__iterator_category(__first));
}
-
- template<typename _InputIter, typename _Distance>
+
+ template<typename _InputIterator, typename _Distance>
inline void
- __advance(_InputIter& __i, _Distance __n, input_iterator_tag)
+ __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- while (__n--) ++__i;
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ while (__n--)
+ ++__i;
}
-
+
template<typename _BidirectionalIterator, typename _Distance>
inline void
__advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>)
-
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
if (__n > 0)
- while (__n--) ++__i;
+ while (__n--)
+ ++__i;
else
- while (__n++) --__i;
+ while (__n++)
+ --__i;
}
-
+
template<typename _RandomAccessIterator, typename _Distance>
inline void
__advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
__i += __n;
}
-
+
/**
* @brief A generalization of pointer arithmetic.
* @param i An input iterator.
@@ -164,8 +172,8 @@ namespace std
advance(_InputIterator& __i, _Distance __n)
{
// concept requirements -- taken care of in __advance
- __advance(__i, __n, __iterator_category(__i));
+ std::__advance(__i, __n, std::__iterator_category(__i));
}
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H */
+#endif /* _ITERATOR_BASE_FUNCS_H */
diff --git a/contrib/libstdc++/include/bits/stl_iterator_base_types.h b/contrib/libstdc++/include/bits/stl_iterator_base_types.h
index 8b040e4..c3bb1c5 100644
--- a/contrib/libstdc++/include/bits/stl_iterator_base_types.h
+++ b/contrib/libstdc++/include/bits/stl_iterator_base_types.h
@@ -1,6 +1,6 @@
// Types used in iterator implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -61,8 +61,8 @@
* such as iterator_traits and struct iterator.
*/
-#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
-#define __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
+#ifndef _ITERATOR_BASE_TYPES_H
+#define _ITERATOR_BASE_TYPES_H 1
#pragma GCC system_header
@@ -82,9 +82,11 @@ namespace std
struct output_iterator_tag {};
/// Forward iterators support a superset of input iterator operations.
struct forward_iterator_tag : public input_iterator_tag {};
- /// Bidirectional iterators support a superset of forward iterator operations.
+ /// Bidirectional iterators support a superset of forward iterator
+ /// operations.
struct bidirectional_iterator_tag : public forward_iterator_tag {};
- /// Random-access iterators support a superset of bidirectional iterator operations.
+ /// Random-access iterators support a superset of bidirectional iterator
+ /// operations.
struct random_access_iterator_tag : public bidirectional_iterator_tag {};
//@}
@@ -122,7 +124,8 @@ namespace std
* provide tighter, more correct semantics.
*/
template<typename _Iterator>
- struct iterator_traits {
+ struct iterator_traits
+ {
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
@@ -131,7 +134,8 @@ namespace std
};
template<typename _Tp>
- struct iterator_traits<_Tp*> {
+ struct iterator_traits<_Tp*>
+ {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
@@ -140,7 +144,8 @@ namespace std
};
template<typename _Tp>
- struct iterator_traits<const _Tp*> {
+ struct iterator_traits<const _Tp*>
+ {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
@@ -161,5 +166,5 @@ namespace std
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H */
+#endif /* _ITERATOR_BASE_TYPES_H */
diff --git a/contrib/libstdc++/include/bits/stl_list.h b/contrib/libstdc++/include/bits/stl_list.h
index fcba359..060755a 100644
--- a/contrib/libstdc++/include/bits/stl_list.h
+++ b/contrib/libstdc++/include/bits/stl_list.h
@@ -1,6 +1,6 @@
// List implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,269 +58,289 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_LIST_H
-#define __GLIBCPP_INTERNAL_LIST_H
+#ifndef _LIST_H
+#define _LIST_H 1
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
// Supporting structures are split into common and templated types; the
// latter publicly inherits from the former in an effort to reduce code
// duplication. This results in some "needless" static_cast'ing later on,
// but it's all safe downcasting.
-
+
/// @if maint Common part of a node in the %list. @endif
struct _List_node_base
{
_List_node_base* _M_next; ///< Self-explanatory
_List_node_base* _M_prev; ///< Self-explanatory
+
+ static void
+ swap(_List_node_base& __x, _List_node_base& __y);
+
+ void
+ transfer(_List_node_base * const __first,
+ _List_node_base * const __last);
+
+ void
+ reverse();
+
+ void
+ hook(_List_node_base * const __position);
+
+ void
+ unhook();
};
-
+
/// @if maint An actual node in the %list. @endif
template<typename _Tp>
struct _List_node : public _List_node_base
- {
- _Tp _M_data; ///< User's data.
- };
-
-
- /**
- * @if maint
- * @brief Common part of a list::iterator.
- *
- * A simple type to walk a doubly-linked list. All operations here should
- * be self-explanatory after taking any decent introductory data structures
- * course.
- * @endif
- */
- struct _List_iterator_base
- {
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef bidirectional_iterator_tag iterator_category;
-
- /// The only member points to the %list element.
- _List_node_base* _M_node;
-
- _List_iterator_base(_List_node_base* __x)
- : _M_node(__x)
- { }
-
- _List_iterator_base()
- { }
-
- /// Walk the %list forward.
- void
- _M_incr()
- { _M_node = _M_node->_M_next; }
-
- /// Walk the %list backward.
- void
- _M_decr()
- { _M_node = _M_node->_M_prev; }
-
- bool
- operator==(const _List_iterator_base& __x) const
- { return _M_node == __x._M_node; }
-
- bool
- operator!=(const _List_iterator_base& __x) const
- { return _M_node != __x._M_node; }
- };
-
+ {
+ _Tp _M_data; ///< User's data.
+ };
+
/**
* @brief A list::iterator.
*
- * In addition to being used externally, a list holds one of these
- * internally, pointing to the sequence of data.
- *
* @if maint
* All the functions are op overloads.
* @endif
*/
- template<typename _Tp, typename _Ref, typename _Ptr>
- struct _List_iterator : public _List_iterator_base
- {
- typedef _List_iterator<_Tp,_Tp&,_Tp*> iterator;
- typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
- typedef _List_iterator<_Tp,_Ref,_Ptr> _Self;
-
- typedef _Tp value_type;
- typedef _Ptr pointer;
- typedef _Ref reference;
- typedef _List_node<_Tp> _Node;
-
- _List_iterator(_Node* __x)
- : _List_iterator_base(__x)
- { }
-
- _List_iterator()
- { }
-
- _List_iterator(const iterator& __x)
- : _List_iterator_base(__x._M_node)
- { }
-
- reference
- operator*() const
- { return static_cast<_Node*>(_M_node)->_M_data; }
- // Must downcast from List_node_base to _List_node to get to _M_data.
-
- pointer
- operator->() const
- { return &(operator*()); }
-
- _Self&
- operator++()
- {
- this->_M_incr();
- return *this;
- }
-
- _Self
- operator++(int)
- {
- _Self __tmp = *this;
- this->_M_incr();
- return __tmp;
- }
-
- _Self&
- operator--()
- {
- this->_M_decr();
- return *this;
- }
-
- _Self
- operator--(int)
+ template<typename _Tp>
+ struct _List_iterator
{
- _Self __tmp = *this;
- this->_M_decr();
- return __tmp;
- }
- };
-
-
- /// @if maint Primary default version. @endif
+ typedef _List_iterator<_Tp> _Self;
+ typedef _List_node<_Tp> _Node;
+
+ typedef ptrdiff_t difference_type;
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+
+ _List_iterator() { }
+
+ _List_iterator(_List_node_base* __x)
+ : _M_node(__x) { }
+
+ // Must downcast from List_node_base to _List_node to get to _M_data.
+ reference
+ operator*() const
+ { return static_cast<_Node*>(_M_node)->_M_data; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _M_node->_M_prev;
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_prev;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ // The only member points to the %list element.
+ _List_node_base* _M_node;
+ };
+
/**
+ * @brief A list::const_iterator.
+ *
* @if maint
- * See bits/stl_deque.h's _Deque_alloc_base for an explanation.
+ * All the functions are op overloads.
* @endif
*/
- template<typename _Tp, typename _Allocator, bool _IsStatic>
- class _List_alloc_base
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
- allocator_type;
-
- allocator_type
- get_allocator() const { return _M_node_allocator; }
-
- _List_alloc_base(const allocator_type& __a)
- : _M_node_allocator(__a)
- { }
-
- protected:
- _List_node<_Tp>*
- _M_get_node()
- { return _M_node_allocator.allocate(1); }
-
- void
- _M_put_node(_List_node<_Tp>* __p)
- { _M_node_allocator.deallocate(__p, 1); }
-
- // NOTA BENE
- // The stored instance is not actually of "allocator_type"'s type. Instead
- // we rebind the type to Allocator<List_node<Tp>>, which according to
- // [20.1.5]/4 should probably be the same. List_node<Tp> is not the same
- // size as Tp (it's two pointers larger), and specializations on Tp may go
- // unused because List_node<Tp> is being bound instead.
- //
- // We put this to the test in get_allocator above; if the two types are
- // actually different, there had better be a conversion between them.
- //
- // None of the predefined allocators shipped with the library (as of 3.1)
- // use this instantiation anyhow; they're all instanceless.
- typename _Alloc_traits<_List_node<_Tp>, _Allocator>::allocator_type
- _M_node_allocator;
-
- _List_node<_Tp>* _M_node;
- };
-
- /// @if maint Specialization for instanceless allocators. @endif
- template<typename _Tp, typename _Allocator>
- class _List_alloc_base<_Tp, _Allocator, true>
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
- allocator_type;
-
- allocator_type
- get_allocator() const { return allocator_type(); }
-
- _List_alloc_base(const allocator_type&)
- { }
-
- protected:
- // See comment in primary template class about why this is safe for the
- // standard predefined classes.
- typedef typename _Alloc_traits<_List_node<_Tp>, _Allocator>::_Alloc_type
- _Alloc_type;
-
- _List_node<_Tp>*
- _M_get_node()
- { return _Alloc_type::allocate(1); }
-
- void
- _M_put_node(_List_node<_Tp>* __p)
- { _Alloc_type::deallocate(__p, 1); }
-
- _List_node<_Tp>* _M_node;
- };
-
-
+ template<typename _Tp>
+ struct _List_const_iterator
+ {
+ typedef _List_const_iterator<_Tp> _Self;
+ typedef const _List_node<_Tp> _Node;
+ typedef _List_iterator<_Tp> iterator;
+
+ typedef ptrdiff_t difference_type;
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+
+ _List_const_iterator() { }
+
+ _List_const_iterator(const _List_node_base* __x)
+ : _M_node(__x) { }
+
+ _List_const_iterator(const iterator& __x)
+ : _M_node(__x._M_node) { }
+
+ // Must downcast from List_node_base to _List_node to get to
+ // _M_data.
+ reference
+ operator*() const
+ { return static_cast<_Node*>(_M_node)->_M_data; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _M_node->_M_prev;
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_prev;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ // The only member points to the %list element.
+ const _List_node_base* _M_node;
+ };
+
+ template<typename _Val>
+ inline bool
+ operator==(const _List_iterator<_Val>& __x,
+ const _List_const_iterator<_Val>& __y)
+ { return __x._M_node == __y._M_node; }
+
+ template<typename _Val>
+ inline bool
+ operator!=(const _List_iterator<_Val>& __x,
+ const _List_const_iterator<_Val>& __y)
+ { return __x._M_node != __y._M_node; }
+
+
/**
* @if maint
* See bits/stl_deque.h's _Deque_base for an explanation.
* @endif
*/
- template <typename _Tp, typename _Alloc>
+ template<typename _Tp, typename _Alloc>
class _List_base
- : public _List_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- {
- public:
- typedef _List_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- _Base;
- typedef typename _Base::allocator_type allocator_type;
-
- _List_base(const allocator_type& __a)
- : _Base(__a)
{
- _M_node = _M_get_node();
- _M_node->_M_next = _M_node;
- _M_node->_M_prev = _M_node;
- }
-
- // This is what actually destroys the list.
- ~_List_base()
- {
- __clear();
- _M_put_node(_M_node);
- }
-
- void
- __clear();
- };
-
-
+ protected:
+ // NOTA BENE
+ // The stored instance is not actually of "allocator_type"'s
+ // type. Instead we rebind the type to
+ // Allocator<List_node<Tp>>, which according to [20.1.5]/4
+ // should probably be the same. List_node<Tp> is not the same
+ // size as Tp (it's two pointers larger), and specializations on
+ // Tp may go unused because List_node<Tp> is being bound
+ // instead.
+ //
+ // We put this to the test in the constructors and in
+ // get_allocator, where we use conversions between
+ // allocator_type and _Node_Alloc_type. The conversion is
+ // required by table 32 in [20.1.5].
+ typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
+
+ _Node_Alloc_type;
+
+ struct _List_impl
+ : public _Node_Alloc_type {
+ _List_node_base _M_node;
+ _List_impl (const _Node_Alloc_type& __a)
+ : _Node_Alloc_type(__a)
+ { }
+ };
+
+ _List_impl _M_impl;
+
+ _List_node<_Tp>*
+ _M_get_node()
+ { return _M_impl._Node_Alloc_type::allocate(1); }
+
+ void
+ _M_put_node(_List_node<_Tp>* __p)
+ { _M_impl._Node_Alloc_type::deallocate(__p, 1); }
+
+ public:
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(*static_cast<const _Node_Alloc_type*>(&this->_M_impl)); }
+
+ _List_base(const allocator_type& __a)
+ : _M_impl(__a)
+ { _M_init(); }
+
+ // This is what actually destroys the list.
+ ~_List_base()
+ { _M_clear(); }
+
+ void
+ _M_clear();
+
+ void
+ _M_init()
+ {
+ this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
+ this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
+ }
+ };
+
/**
- * @brief A standard container with linear time access to elements, and
- * fixed time insertion/deletion at any point in the sequence.
+ * @brief A standard container with linear time access to elements,
+ * and fixed time insertion/deletion at any point in the sequence.
*
* @ingroup Containers
* @ingroup Sequences
@@ -331,830 +351,897 @@ namespace std
* <a href="tables.html#68">optional sequence requirements</a> with the
* %exception of @c at and @c operator[].
*
- * This is a @e doubly @e linked %list. Traversal up and down the %list
- * requires linear time, but adding and removing elements (or @e nodes) is
- * done in constant time, regardless of where the change takes place.
- * Unlike std::vector and std::deque, random-access iterators are not
- * provided, so subscripting ( @c [] ) access is not allowed. For algorithms
- * which only need sequential access, this lack makes no difference.
+ * This is a @e doubly @e linked %list. Traversal up and down the
+ * %list requires linear time, but adding and removing elements (or
+ * @e nodes) is done in constant time, regardless of where the
+ * change takes place. Unlike std::vector and std::deque,
+ * random-access iterators are not provided, so subscripting ( @c
+ * [] ) access is not allowed. For algorithms which only need
+ * sequential access, this lack makes no difference.
*
- * Also unlike the other standard containers, std::list provides specialized
- * algorithms %unique to linked lists, such as splicing, sorting, and
- * in-place reversal.
+ * Also unlike the other standard containers, std::list provides
+ * specialized algorithms %unique to linked lists, such as
+ * splicing, sorting, and in-place reversal.
*
* @if maint
* A couple points on memory allocation for list<Tp>:
*
- * First, we never actually allocate a Tp, we allocate List_node<Tp>'s
- * and trust [20.1.5]/4 to DTRT. This is to ensure that after elements from
- * %list<X,Alloc1> are spliced into %list<X,Alloc2>, destroying the memory of
- * the second %list is a valid operation, i.e., Alloc1 giveth and Alloc2
- * taketh away.
+ * First, we never actually allocate a Tp, we allocate
+ * List_node<Tp>'s and trust [20.1.5]/4 to DTRT. This is to ensure
+ * that after elements from %list<X,Alloc1> are spliced into
+ * %list<X,Alloc2>, destroying the memory of the second %list is a
+ * valid operation, i.e., Alloc1 giveth and Alloc2 taketh away.
*
* Second, a %list conceptually represented as
* @code
* A <---> B <---> C <---> D
* @endcode
- * is actually circular; a link exists between A and D. The %list class
- * holds (as its only data member) a private list::iterator pointing to
- * @e D, not to @e A! To get to the head of the %list, we start at the tail
- * and move forward by one. When this member iterator's next/previous
- * pointers refer to itself, the %list is %empty.
- * @endif
+ * is actually circular; a link exists between A and D. The %list
+ * class holds (as its only data member) a private list::iterator
+ * pointing to @e D, not to @e A! To get to the head of the %list,
+ * we start at the tail and move forward by one. When this member
+ * iterator's next/previous pointers refer to itself, the %list is
+ * %empty. @endif
*/
template<typename _Tp, typename _Alloc = allocator<_Tp> >
class list : protected _List_base<_Tp, _Alloc>
- {
- // concept requirements
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
-
- typedef _List_base<_Tp, _Alloc> _Base;
-
- public:
- typedef _Tp value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef _List_iterator<_Tp,_Tp&,_Tp*> iterator;
- typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef typename _Base::allocator_type allocator_type;
-
- protected:
- // Note that pointers-to-_Node's can be ctor-converted to iterator types.
- typedef _List_node<_Tp> _Node;
-
- /** @if maint
- * One data member plus two memory-handling functions. If the _Alloc
- * type requires separate instances, then one of those will also be
- * included, accumulated from the topmost parent.
- * @endif
- */
- using _Base::_M_node;
- using _Base::_M_put_node;
- using _Base::_M_get_node;
-
- /**
- * @if maint
- * @param x An instance of user data.
- *
- * Allocates space for a new node and constructs a copy of @a x in it.
- * @endif
- */
- _Node*
- _M_create_node(const value_type& __x)
{
- _Node* __p = _M_get_node();
- try {
- _Construct(&__p->_M_data, __x);
- }
- catch(...)
+ // concept requirements
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+
+ typedef _List_base<_Tp, _Alloc> _Base;
+
+ public:
+ typedef _Tp value_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef _List_iterator<_Tp> iterator;
+ typedef _List_const_iterator<_Tp> const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef typename _Base::allocator_type allocator_type;
+
+ protected:
+ // Note that pointers-to-_Node's can be ctor-converted to
+ // iterator types.
+ typedef _List_node<_Tp> _Node;
+
+ /** @if maint
+ * One data member plus two memory-handling functions. If the
+ * _Alloc type requires separate instances, then one of those
+ * will also be included, accumulated from the topmost parent.
+ * @endif
+ */
+ using _Base::_M_impl;
+ using _Base::_M_put_node;
+ using _Base::_M_get_node;
+
+ /**
+ * @if maint
+ * @param x An instance of user data.
+ *
+ * Allocates space for a new node and constructs a copy of @a x in it.
+ * @endif
+ */
+ _Node*
+ _M_create_node(const value_type& __x)
{
- _M_put_node(__p);
- __throw_exception_again;
- }
- return __p;
- }
-
- /**
- * @if maint
- * Allocates space for a new node and default-constructs a new instance
- * of @c value_type in it.
- * @endif
- */
- _Node*
- _M_create_node()
- {
- _Node* __p = _M_get_node();
- try {
- _Construct(&__p->_M_data);
+ _Node* __p = this->_M_get_node();
+ try
+ {
+ std::_Construct(&__p->_M_data, __x);
+ }
+ catch(...)
+ {
+ _M_put_node(__p);
+ __throw_exception_again;
+ }
+ return __p;
}
- catch(...)
+
+ /**
+ * @if maint
+ * Allocates space for a new node and default-constructs a new
+ * instance of @c value_type in it.
+ * @endif
+ */
+ _Node*
+ _M_create_node()
{
- _M_put_node(__p);
- __throw_exception_again;
+ _Node* __p = this->_M_get_node();
+ try
+ {
+ std::_Construct(&__p->_M_data);
+ }
+ catch(...)
+ {
+ _M_put_node(__p);
+ __throw_exception_again;
+ }
+ return __p;
}
- return __p;
- }
-
- public:
- // [23.2.2.1] construct/copy/destroy
- // (assign() and get_allocator() are also listed in this section)
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- list(const allocator_type& __a = allocator_type())
- : _Base(__a) { }
-
- /**
- * @brief Create a %list with copies of an exemplar element.
- * @param n The number of elements to initially create.
- * @param value An element to copy.
- *
- * This constructor fills the %list with @a n copies of @a value.
- */
- list(size_type __n, const value_type& __value,
- const allocator_type& __a = allocator_type())
+
+ public:
+ // [23.2.2.1] construct/copy/destroy
+ // (assign() and get_allocator() are also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ list(const allocator_type& __a = allocator_type())
+ : _Base(__a) { }
+
+ /**
+ * @brief Create a %list with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ *
+ * This constructor fills the %list with @a n copies of @a value.
+ */
+ list(size_type __n, const value_type& __value,
+ const allocator_type& __a = allocator_type())
: _Base(__a)
{ this->insert(begin(), __n, __value); }
-
- /**
- * @brief Create a %list with default elements.
- * @param n The number of elements to initially create.
- *
- * This constructor fills the %list with @a n copies of a
- * default-constructed element.
- */
- explicit
- list(size_type __n)
+
+ /**
+ * @brief Create a %list with default elements.
+ * @param n The number of elements to initially create.
+ *
+ * This constructor fills the %list with @a n copies of a
+ * default-constructed element.
+ */
+ explicit
+ list(size_type __n)
: _Base(allocator_type())
{ this->insert(begin(), __n, value_type()); }
-
- /**
- * @brief %List copy constructor.
- * @param x A %list of identical element and allocator types.
- *
- * The newly-created %list uses a copy of the allocation object used
- * by @a x.
- */
- list(const list& __x)
+
+ /**
+ * @brief %List copy constructor.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The newly-created %list uses a copy of the allocation object used
+ * by @a x.
+ */
+ list(const list& __x)
: _Base(__x.get_allocator())
{ this->insert(begin(), __x.begin(), __x.end()); }
-
- /**
- * @brief Builds a %list from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * Create a %list consisting of copies of the elements from [first,last).
- * This is linear in N (where N is distance(first,last)).
- *
- * @if maint
- * We don't need any dispatching tricks here, because insert does all of
- * that anyway.
- * @endif
- */
- template<typename _InputIterator>
- list(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a = allocator_type())
- : _Base(__a)
- { this->insert(begin(), __first, __last); }
-
- /**
- * The dtor only erases the elements, and note that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
- ~list() { }
-
- /**
- * @brief %List assignment operator.
- * @param x A %list of identical element and allocator types.
- *
- * All the elements of @a x are copied, but unlike the copy constructor,
- * the allocator object is not copied.
- */
- list&
- operator=(const list& __x);
-
- /**
- * @brief Assigns a given value to a %list.
- * @param n Number of elements to be assigned.
- * @param val Value to be assigned.
- *
- * This function fills a %list with @a n copies of the given value.
- * Note that the assignment completely changes the %list and that the
- * resulting %list's size is the same as the number of elements assigned.
- * Old data may be lost.
- */
- void
- assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); }
-
- /**
- * @brief Assigns a range to a %list.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * This function fills a %list with copies of the elements in the
- * range [first,last).
- *
- * Note that the assignment completely changes the %list and that the
- * resulting %list's size is the same as the number of elements assigned.
- * Old data may be lost.
- */
- template<typename _InputIterator>
+
+ /**
+ * @brief Builds a %list from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %list consisting of copies of the elements from
+ * [@a first,@a last). This is linear in N (where N is
+ * distance(@a first,@a last)).
+ *
+ * @if maint
+ * We don't need any dispatching tricks here, because insert does all of
+ * that anyway.
+ * @endif
+ */
+ template<typename _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { this->insert(begin(), __first, __last); }
+
+ /**
+ * No explicit dtor needed as the _Base dtor takes care of
+ * things. The _Base dtor only erases the elements, and note
+ * that if the elements themselves are pointers, the pointed-to
+ * memory is not touched in any way. Managing the pointer is
+ * the user's responsibilty.
+ */
+
+ /**
+ * @brief %List assignment operator.
+ * @param x A %list of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy
+ * constructor, the allocator object is not copied.
+ */
+ list&
+ operator=(const list& __x);
+
+ /**
+ * @brief Assigns a given value to a %list.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %list with @a n copies of the given
+ * value. Note that the assignment completely changes the %list
+ * and that the resulting %list's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+
+ /**
+ * @brief Assigns a range to a %list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %list with copies of the elements in the
+ * range [@a first,@a last).
+ *
+ * Note that the assignment completely changes the %list and
+ * that the resulting %list's size is the same as the number of
+ * elements assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %list. Iteration is done in ordinary element order.
+ */
+ iterator
+ begin()
+ { return this->_M_impl._M_node._M_next; }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_node._M_next; }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * element in the %list. Iteration is done in ordinary element
+ * order.
+ */
+ iterator
+ end() { return &this->_M_impl._M_node; }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ end() const
+ { return &this->_M_impl._M_node; }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last
+ * element in the %list. Iteration is done in reverse element
+ * order.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to
+ * the last element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in
+ * reverse element order.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // [23.2.2.2] capacity
+ /**
+ * Returns true if the %list is empty. (Thus begin() would equal
+ * end().)
+ */
+ bool
+ empty() const
+ { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
+
+ /** Returns the number of elements in the %list. */
+ size_type
+ size() const
+ { return std::distance(begin(), end()); }
+
+ /** Returns the size() of the largest possible %list. */
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ /**
+ * @brief Resizes the %list to the specified number of elements.
+ * @param new_size Number of elements the %list should contain.
+ * @param x Data with which new elements should be populated.
+ *
+ * This function will %resize the %list to the specified number
+ * of elements. If the number is smaller than the %list's
+ * current size the %list is truncated, otherwise the %list is
+ * extended and new elements are populated with given data.
+ */
+ void
+ resize(size_type __new_size, const value_type& __x);
+
+ /**
+ * @brief Resizes the %list to the specified number of elements.
+ * @param new_size Number of elements the %list should contain.
+ *
+ * This function will resize the %list to the specified number of
+ * elements. If the number is smaller than the %list's current
+ * size the %list is truncated, otherwise the %list is extended
+ * and new elements are default-constructed.
+ */
+ void
+ resize(size_type __new_size)
+ { this->resize(__new_size, value_type()); }
+
+ // element access
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %list.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %list.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last element
+ * of the %list.
+ */
+ reference
+ back()
+ { return *(--end()); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %list.
+ */
+ const_reference
+ back() const
+ { return *(--end()); }
+
+ // [23.2.2.3] modifiers
+ /**
+ * @brief Add data to the front of the %list.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the front of the %list and assigns the given data
+ * to it. Due to the nature of a %list this operation can be
+ * done in constant time, and does not invalidate iterators and
+ * references.
+ */
+ void
+ push_front(const value_type& __x)
+ { this->_M_insert(begin(), __x); }
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical stack operation. It shrinks the %list by
+ * one. Due to the nature of a %list this operation can be done
+ * in constant time, and only invalidates iterators/references to
+ * the element being removed.
+ *
+ * Note that no data is returned, and if the first element's data
+ * is needed, it should be retrieved before pop_front() is
+ * called.
+ */
void
- assign(_InputIterator __first, _InputIterator __last)
+ pop_front()
+ { this->_M_erase(begin()); }
+
+ /**
+ * @brief Add data to the end of the %list.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the end of the %list and assigns the given data to
+ * it. Due to the nature of a %list this operation can be done
+ * in constant time, and does not invalidate iterators and
+ * references.
+ */
+ void
+ push_back(const value_type& __x)
+ { this->_M_insert(end(), __x); }
+
+ /**
+ * @brief Removes last element.
+ *
+ * This is a typical stack operation. It shrinks the %list by
+ * one. Due to the nature of a %list this operation can be done
+ * in constant time, and only invalidates iterators/references to
+ * the element being removed.
+ *
+ * Note that no data is returned, and if the last element's data
+ * is needed, it should be retrieved before pop_back() is called.
+ */
+ void
+ pop_back()
+ { this->_M_erase(this->_M_impl._M_node._M_prev); }
+
+ /**
+ * @brief Inserts given value into %list before specified iterator.
+ * @param position An iterator into the %list.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value before
+ * the specified location. Due to the nature of a %list this
+ * operation can be done in constant time, and does not
+ * invalidate iterators and references.
+ */
+ iterator
+ insert(iterator __position, const value_type& __x);
+
+ /**
+ * @brief Inserts a number of copies of given data into the %list.
+ * @param position An iterator into the %list.
+ * @param n Number of elements to be inserted.
+ * @param x Data to be inserted.
+ *
+ * This function will insert a specified number of copies of the
+ * given data before the location specified by @a position.
+ *
+ * Due to the nature of a %list this operation can be done in
+ * constant time, and does not invalidate iterators and
+ * references.
+ */
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+ /**
+ * @brief Inserts a range into the %list.
+ * @param position An iterator into the %list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range [@a
+ * first,@a last) into the %list before the location specified by
+ * @a position.
+ *
+ * Due to the nature of a %list this operation can be done in
+ * constant time, and does not invalidate iterators and
+ * references.
+ */
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+
+ /**
+ * @brief Remove element at given position.
+ * @param position Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and thus
+ * shorten the %list by one.
+ *
+ * Due to the nature of a %list this operation can be done in
+ * constant time, and only invalidates iterators/references to
+ * the element being removed. The user is also cautioned that
+ * this function only erases the element, and that if the element
+ * is itself a pointer, the pointed-to memory is not touched in
+ * any way. Managing the pointer is the user's responsibilty.
+ */
+ iterator
+ erase(iterator __position);
+
+ /**
+ * @brief Remove a range of elements.
+ * @param first Iterator pointing to the first element to be erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range @a
+ * [first,last) and shorten the %list accordingly.
+ *
+ * Due to the nature of a %list this operation can be done in
+ * constant time, and only invalidates iterators/references to
+ * the element being removed. The user is also cautioned that
+ * this function only erases the elements, and that if the
+ * elements themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's
+ * responsibilty.
+ */
+ iterator
+ erase(iterator __first, iterator __last)
{
- // Check whether it's an integral type. If so, it's not an iterator.
- typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_assign_dispatch(__first, __last, _Integral());
+ while (__first != __last)
+ __first = erase(__first);
+ return __last;
}
-
- /// Get a copy of the memory allocation object.
- allocator_type
- get_allocator() const { return _Base::get_allocator(); }
-
- // iterators
- /**
- * Returns a read/write iterator that points to the first element in the
- * %list. Iteration is done in ordinary element order.
- */
- iterator
- begin() { return static_cast<_Node*>(_M_node->_M_next); }
-
- /**
- * Returns a read-only (constant) iterator that points to the first element
- * in the %list. Iteration is done in ordinary element order.
- */
- const_iterator
- begin() const { return static_cast<_Node*>(_M_node->_M_next); }
-
- /**
- * Returns a read/write iterator that points one past the last element in
- * the %list. Iteration is done in ordinary element order.
- */
- iterator
- end() { return _M_node; }
-
- /**
- * Returns a read-only (constant) iterator that points one past the last
- * element in the %list. Iteration is done in ordinary element order.
- */
- const_iterator
- end() const { return _M_node; }
-
- /**
- * Returns a read/write reverse iterator that points to the last element in
- * the %list. Iteration is done in reverse element order.
- */
- reverse_iterator
- rbegin() { return reverse_iterator(end()); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to the last
- * element in the %list. Iteration is done in reverse element order.
- */
- const_reverse_iterator
- rbegin() const { return const_reverse_iterator(end()); }
-
- /**
- * Returns a read/write reverse iterator that points to one before the
- * first element in the %list. Iteration is done in reverse element
- * order.
- */
- reverse_iterator
- rend() { return reverse_iterator(begin()); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to one
- * before the first element in the %list. Iteration is done in reverse
- * element order.
- */
- const_reverse_iterator
- rend() const
- { return const_reverse_iterator(begin()); }
-
- // [23.2.2.2] capacity
- /**
- * Returns true if the %list is empty. (Thus begin() would equal end().)
- */
- bool
- empty() const { return _M_node->_M_next == _M_node; }
-
- /** Returns the number of elements in the %list. */
- size_type
- size() const { return distance(begin(), end()); }
-
- /** Returns the size() of the largest possible %list. */
- size_type
- max_size() const { return size_type(-1); }
-
- /**
- * @brief Resizes the %list to the specified number of elements.
- * @param new_size Number of elements the %list should contain.
- * @param x Data with which new elements should be populated.
- *
- * This function will %resize the %list to the specified number of
- * elements. If the number is smaller than the %list's current size the
- * %list is truncated, otherwise the %list is extended and new elements
- * are populated with given data.
- */
- void
- resize(size_type __new_size, const value_type& __x);
-
- /**
- * @brief Resizes the %list to the specified number of elements.
- * @param new_size Number of elements the %list should contain.
- *
- * This function will resize the %list to the specified number of
- * elements. If the number is smaller than the %list's current size the
- * %list is truncated, otherwise the %list is extended and new elements
- * are default-constructed.
- */
- void
- resize(size_type __new_size) { this->resize(__new_size, value_type()); }
-
- // element access
- /**
- * Returns a read/write reference to the data at the first element of the
- * %list.
- */
- reference
- front() { return *begin(); }
-
- /**
- * Returns a read-only (constant) reference to the data at the first
- * element of the %list.
- */
- const_reference
- front() const { return *begin(); }
-
- /**
- * Returns a read/write reference to the data at the last element of the
- * %list.
- */
- reference
- back() { return *(--end()); }
-
- /**
- * Returns a read-only (constant) reference to the data at the last
- * element of the %list.
- */
- const_reference
- back() const { return *(--end()); }
-
- // [23.2.2.3] modifiers
- /**
- * @brief Add data to the front of the %list.
- * @param x Data to be added.
- *
- * This is a typical stack operation. The function creates an element at
- * the front of the %list and assigns the given data to it. Due to the
- * nature of a %list this operation can be done in constant time, and
- * does not invalidate iterators and references.
- */
- void
- push_front(const value_type& __x) { this->insert(begin(), __x); }
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Add data to the front of the %list.
- *
- * This is a typical stack operation. The function creates a
- * default-constructed element at the front of the %list. Due to the
- * nature of a %list this operation can be done in constant time. You
- * should consider using push_front(value_type()) instead.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- void
- push_front() { this->insert(begin(), value_type()); }
- #endif
-
- /**
- * @brief Removes first element.
- *
- * This is a typical stack operation. It shrinks the %list by one.
- * Due to the nature of a %list this operation can be done in constant
- * time, and only invalidates iterators/references to the element being
- * removed.
- *
- * Note that no data is returned, and if the first element's data is
- * needed, it should be retrieved before pop_front() is called.
- */
- void
- pop_front() { this->erase(begin()); }
-
- /**
- * @brief Add data to the end of the %list.
- * @param x Data to be added.
- *
- * This is a typical stack operation. The function creates an element at
- * the end of the %list and assigns the given data to it. Due to the
- * nature of a %list this operation can be done in constant time, and
- * does not invalidate iterators and references.
- */
- void
- push_back(const value_type& __x) { this->insert(end(), __x); }
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Add data to the end of the %list.
- *
- * This is a typical stack operation. The function creates a
- * default-constructed element at the end of the %list. Due to the nature
- * of a %list this operation can be done in constant time. You should
- * consider using push_back(value_type()) instead.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- void
- push_back() { this->insert(end(), value_type()); }
- #endif
-
- /**
- * @brief Removes last element.
- *
- * This is a typical stack operation. It shrinks the %list by one.
- * Due to the nature of a %list this operation can be done in constant
- * time, and only invalidates iterators/references to the element being
- * removed.
- *
- * Note that no data is returned, and if the last element's data is
- * needed, it should be retrieved before pop_back() is called.
- */
- void
- pop_back()
- {
- iterator __tmp = end();
- this->erase(--__tmp);
- }
-
- /**
- * @brief Inserts given value into %list before specified iterator.
- * @param position An iterator into the %list.
- * @param x Data to be inserted.
- * @return An iterator that points to the inserted data.
- *
- * This function will insert a copy of the given value before the specified
- * location.
- * Due to the nature of a %list this operation can be done in constant
- * time, and does not invalidate iterators and references.
- */
- iterator
- insert(iterator __position, const value_type& __x);
-
- #ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Inserts an element into the %list.
- * @param position An iterator into the %list.
- * @return An iterator that points to the inserted element.
- *
- * This function will insert a default-constructed element before the
- * specified location. You should consider using
- * insert(position,value_type()) instead.
- * Due to the nature of a %list this operation can be done in constant
- * time, and does not invalidate iterators and references.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4. You must
- * define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
- * c++config.h.
- */
- iterator
- insert(iterator __position) { return insert(__position, value_type()); }
- #endif
-
- /**
- * @brief Inserts a number of copies of given data into the %list.
- * @param position An iterator into the %list.
- * @param n Number of elements to be inserted.
- * @param x Data to be inserted.
- *
- * This function will insert a specified number of copies of the given data
- * before the location specified by @a position.
- *
- * Due to the nature of a %list this operation can be done in constant
- * time, and does not invalidate iterators and references.
- */
- void
- insert(iterator __pos, size_type __n, const value_type& __x)
- { _M_fill_insert(__pos, __n, __x); }
-
- /**
- * @brief Inserts a range into the %list.
- * @param pos An iterator into the %list.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * This function will insert copies of the data in the range [first,last)
- * into the %list before the location specified by @a pos.
- *
- * Due to the nature of a %list this operation can be done in constant
- * time, and does not invalidate iterators and references.
- */
- template<typename _InputIterator>
+
+ /**
+ * @brief Swaps data with another %list.
+ * @param x A %list of the same element and allocator types.
+ *
+ * This exchanges the elements between two lists in constant
+ * time. Note that the global std::swap() function is
+ * specialized such that std::swap(l1,l2) will feed to this
+ * function.
+ */
void
- insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+ swap(list& __x)
+ { _List_node_base::swap(this->_M_impl._M_node,__x._M_impl._M_node); }
+
+ /**
+ * Erases all the elements. Note that this function only erases
+ * the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibilty.
+ */
+ void
+ clear()
{
- // Check whether it's an integral type. If so, it's not an iterator.
- typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_insert_dispatch(__pos, __first, __last, _Integral());
+ _Base::_M_clear();
+ _Base::_M_init();
}
-
- /**
- * @brief Remove element at given position.
- * @param position Iterator pointing to element to be erased.
- * @return An iterator pointing to the next element (or end()).
- *
- * This function will erase the element at the given position and thus
- * shorten the %list by one.
- *
- * Due to the nature of a %list this operation can be done in constant
- * time, and only invalidates iterators/references to the element being
- * removed.
- * The user is also cautioned that
- * this function only erases the element, and that if the element is itself
- * a pointer, the pointed-to memory is not touched in any way. Managing
- * the pointer is the user's responsibilty.
- */
- iterator
- erase(iterator __position);
-
- /**
- * @brief Remove a range of elements.
- * @param first Iterator pointing to the first element to be erased.
- * @param last Iterator pointing to one past the last element to be
- * erased.
- * @return An iterator pointing to the element pointed to by @a last
- * prior to erasing (or end()).
- *
- * This function will erase the elements in the range [first,last) and
- * shorten the %list accordingly.
- *
- * Due to the nature of a %list this operation can be done in constant
- * time, and only invalidates iterators/references to the element being
- * removed.
- * The user is also cautioned that
- * this function only erases the elements, and that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
- iterator
- erase(iterator __first, iterator __last)
- {
- while (__first != __last)
- erase(__first++);
- return __last;
- }
-
- /**
- * @brief Swaps data with another %list.
- * @param x A %list of the same element and allocator types.
- *
- * This exchanges the elements between two lists in constant time.
- * (It is only swapping a single pointer, so it should be quite fast.)
- * Note that the global std::swap() function is specialized such that
- * std::swap(l1,l2) will feed to this function.
- */
- void
- swap(list& __x) { std::swap(_M_node, __x._M_node); }
-
- /**
- * Erases all the elements. Note that this function only erases the
- * elements, and that if the elements themselves are pointers, the
- * pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
- */
- void
- clear() { _Base::__clear(); }
-
- // [23.2.2.4] list operations
- /**
- * @doctodo
- */
- void
- splice(iterator __position, list& __x)
- {
- if (!__x.empty())
- this->_M_transfer(__position, __x.begin(), __x.end());
- }
-
- /**
- * @doctodo
- */
- void
- splice(iterator __position, list&, iterator __i)
- {
- iterator __j = __i;
- ++__j;
- if (__position == __i || __position == __j) return;
- this->_M_transfer(__position, __i, __j);
- }
-
- /**
- * @doctodo
- */
- void
- splice(iterator __position, list&, iterator __first, iterator __last)
- {
- if (__first != __last)
- this->_M_transfer(__position, __first, __last);
- }
-
- /**
- * @doctodo
- */
- void
- remove(const _Tp& __value);
-
- /**
- * @doctodo
- */
- template<typename _Predicate>
+
+ // [23.2.2.4] list operations
+ /**
+ * @brief Insert contents of another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ *
+ * The elements of @a x are inserted in constant time in front of
+ * the element referenced by @a position. @a x becomes an empty
+ * list.
+ */
+ void
+ splice(iterator __position, list& __x)
+ {
+ if (!__x.empty())
+ this->_M_transfer(__position, __x.begin(), __x.end());
+ }
+
+ /**
+ * @brief Insert element from another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ * @param i Iterator referencing the element to move.
+ *
+ * Removes the element in list @a x referenced by @a i and
+ * inserts it into the current list before @a position.
+ */
+ void
+ splice(iterator __position, list&, iterator __i)
+ {
+ iterator __j = __i;
+ ++__j;
+ if (__position == __i || __position == __j)
+ return;
+ this->_M_transfer(__position, __i, __j);
+ }
+
+ /**
+ * @brief Insert range from another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ * @param first Iterator referencing the start of range in x.
+ * @param last Iterator referencing the end of range in x.
+ *
+ * Removes elements in the range [first,last) and inserts them
+ * before @a position in constant time.
+ *
+ * Undefined if @a position is in [first,last).
+ */
+ void
+ splice(iterator __position, list&, iterator __first, iterator __last)
+ {
+ if (__first != __last)
+ this->_M_transfer(__position, __first, __last);
+ }
+
+ /**
+ * @brief Remove all elements equal to value.
+ * @param value The value to remove.
+ *
+ * Removes every element in the list equal to @a value.
+ * Remaining elements stay in list order. Note that this
+ * function only erases the elements, and that if the elements
+ * themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's
+ * responsibilty.
+ */
+ void
+ remove(const _Tp& __value);
+
+ /**
+ * @brief Remove all elements satisfying a predicate.
+ * @param Predicate Unary predicate function or object.
+ *
+ * Removes every element in the list for which the predicate
+ * returns true. Remaining elements stay in list order. Note
+ * that this function only erases the elements, and that if the
+ * elements themselves are pointers, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibilty.
+ */
+ template<typename _Predicate>
void
remove_if(_Predicate);
-
- /**
- * @doctodo
- */
- void
- unique();
-
- /**
- * @doctodo
- */
- template<typename _BinaryPredicate>
+
+ /**
+ * @brief Remove consecutive duplicate elements.
+ *
+ * For each consecutive set of elements with the same value,
+ * remove all but the first one. Remaining elements stay in
+ * list order. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing
+ * the pointer is the user's responsibilty.
+ */
void
- unique(_BinaryPredicate);
-
- /**
- * @doctodo
- */
- void
- merge(list& __x);
-
- /**
- * @doctodo
- */
- template<typename _StrictWeakOrdering>
+ unique();
+
+ /**
+ * @brief Remove consecutive elements satisfying a predicate.
+ * @param BinaryPredicate Binary predicate function or object.
+ *
+ * For each consecutive set of elements [first,last) that
+ * satisfy predicate(first,i) where i is an iterator in
+ * [first,last), remove all but the first one. Remaining
+ * elements stay in list order. Note that this function only
+ * erases the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibilty.
+ */
+ template<typename _BinaryPredicate>
+ void
+ unique(_BinaryPredicate);
+
+ /**
+ * @brief Merge sorted lists.
+ * @param x Sorted list to merge.
+ *
+ * Assumes that both @a x and this list are sorted according to
+ * operator<(). Merges elements of @a x into this list in
+ * sorted order, leaving @a x empty when complete. Elements in
+ * this list precede elements in @a x that are equal.
+ */
void
- merge(list&, _StrictWeakOrdering);
-
- /**
- * @doctodo
- */
- void
- reverse() { __List_base_reverse(this->_M_node); }
-
- /**
- * @doctodo
- */
- void
- sort();
-
- /**
- * @doctodo
- */
- template<typename _StrictWeakOrdering>
+ merge(list& __x);
+
+ /**
+ * @brief Merge sorted lists according to comparison function.
+ * @param x Sorted list to merge.
+ * @param StrictWeakOrdering Comparison function definining
+ * sort order.
+ *
+ * Assumes that both @a x and this list are sorted according to
+ * StrictWeakOrdering. Merges elements of @a x into this list
+ * in sorted order, leaving @a x empty when complete. Elements
+ * in this list precede elements in @a x that are equivalent
+ * according to StrictWeakOrdering().
+ */
+ template<typename _StrictWeakOrdering>
+ void
+ merge(list&, _StrictWeakOrdering);
+
+ /**
+ * @brief Reverse the elements in list.
+ *
+ * Reverse the order of elements in the list in linear time.
+ */
void
- sort(_StrictWeakOrdering);
-
- protected:
- // Internal assign functions follow.
-
- // called by the range assign to implement [23.1.1]/9
- template<typename _Integer>
+ reverse()
+ { this->_M_impl._M_node.reverse(); }
+
+ /**
+ * @brief Sort the elements.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
void
- _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ sort();
+
+ /**
+ * @brief Sort the elements according to comparison function.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
+ template<typename _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering);
+
+ protected:
+ // Internal assign functions follow.
+
+ // Called by the range assign to implement [23.1.1]/9
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ {
+ _M_fill_assign(static_cast<size_type>(__n),
+ static_cast<value_type>(__val));
+ }
+
+ // Called by the range assign to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type);
+
+ // Called by assign(n,t), and the range assign when it turns out
+ // to be the same thing.
+ void
+ _M_fill_assign(size_type __n, const value_type& __val);
+
+
+ // Internal insert functions follow.
+
+ // Called by the range insert to implement [23.1.1]/9
+ template<typename _Integer>
+ void
+ _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ __true_type)
+ {
+ _M_fill_insert(__pos, static_cast<size_type>(__n),
+ static_cast<value_type>(__x));
+ }
+
+ // Called by the range insert to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ for ( ; __first != __last; ++__first)
+ _M_insert(__pos, *__first);
+ }
+
+ // Called by insert(p,n,x), and the range insert when it turns out
+ // to be the same thing.
+ void
+ _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
{
- _M_fill_assign(static_cast<size_type>(__n),
- static_cast<value_type>(__val));
+ for ( ; __n > 0; --__n)
+ _M_insert(__pos, __x);
}
-
- // called by the range assign to implement [23.1.1]/9
- template<typename _InputIter>
+
+
+ // Moves the elements from [first,last) before position.
void
- _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type);
-
- // Called by assign(n,t), and the range assign when it turns out to be the
- // same thing.
- void
- _M_fill_assign(size_type __n, const value_type& __val);
-
-
- // Internal insert functions follow.
-
- // called by the range insert to implement [23.1.1]/9
- template<typename _Integer>
+ _M_transfer(iterator __position, iterator __first, iterator __last)
+ { __position._M_node->transfer(__first._M_node,__last._M_node); }
+
+ // Inserts new element at position given and with value given.
void
- _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
- __true_type)
+ _M_insert(iterator __position, const value_type& __x)
{
- _M_fill_insert(__pos, static_cast<size_type>(__n),
- static_cast<value_type>(__x));
+ _Node* __tmp = _M_create_node(__x);
+ __tmp->hook(__position._M_node);
}
-
- // called by the range insert to implement [23.1.1]/9
- template<typename _InputIterator>
+
+ // Erases element at position given.
void
- _M_insert_dispatch(iterator __pos,
- _InputIterator __first, _InputIterator __last,
- __false_type)
+ _M_erase(iterator __position)
{
- for ( ; __first != __last; ++__first)
- insert(__pos, *__first);
+ __position._M_node->unhook();
+ _Node* __n = static_cast<_Node*>(__position._M_node);
+ std::_Destroy(&__n->_M_data);
+ _M_put_node(__n);
}
-
- // Called by insert(p,n,x), and the range insert when it turns out to be
- // the same thing.
- void
- _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
- {
- for ( ; __n > 0; --__n)
- insert(__pos, __x);
- }
-
-
- // Moves the elements from [first,last) before position.
- void
- _M_transfer(iterator __position, iterator __first, iterator __last)
- {
- if (__position != __last) {
- // Remove [first, last) from its old position.
- __last._M_node->_M_prev->_M_next = __position._M_node;
- __first._M_node->_M_prev->_M_next = __last._M_node;
- __position._M_node->_M_prev->_M_next = __first._M_node;
-
- // Splice [first, last) into its new position.
- _List_node_base* __tmp = __position._M_node->_M_prev;
- __position._M_node->_M_prev = __last._M_node->_M_prev;
- __last._M_node->_M_prev = __first._M_node->_M_prev;
- __first._M_node->_M_prev = __tmp;
- }
- }
- };
-
-
+ };
+
/**
* @brief List equality comparison.
* @param x A %list.
* @param y A %list of the same type as @a x.
* @return True iff the size and elements of the lists are equal.
*
- * This is an equivalence relation. It is linear in the size of the
- * lists. Lists are considered equivalent if their sizes are equal,
- * and if corresponding elements compare equal.
+ * This is an equivalence relation. It is linear in the size of
+ * the lists. Lists are considered equivalent if their sizes are
+ * equal, and if corresponding elements compare equal.
*/
template<typename _Tp, typename _Alloc>
- inline bool
+ inline bool
operator==(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
{
typedef typename list<_Tp,_Alloc>::const_iterator const_iterator;
const_iterator __end1 = __x.end();
const_iterator __end2 = __y.end();
-
+
const_iterator __i1 = __x.begin();
const_iterator __i2 = __y.begin();
- while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
- ++__i1;
- ++__i2;
- }
+ while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
+ {
+ ++__i1;
+ ++__i2;
+ }
return __i1 == __end1 && __i2 == __end2;
}
-
+
/**
* @brief List ordering relation.
* @param x A %list.
* @param y A %list of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* lists. The elements must be comparable with @c <.
*
- * See std::lexographical_compare() for how the determination is made.
+ * See std::lexicographical_compare() for how the determination is made.
*/
template<typename _Tp, typename _Alloc>
inline bool
operator<(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
- {
- return lexicographical_compare(__x.begin(), __x.end(),
- __y.begin(), __y.end());
- }
-
+ { return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()); }
+
/// Based on operator==
template<typename _Tp, typename _Alloc>
inline bool
operator!=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator>(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator<=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator>=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
{ return !(__x < __y); }
-
+
/// See std::list::swap().
template<typename _Tp, typename _Alloc>
inline void
@@ -1162,4 +1249,5 @@ namespace std
{ __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_LIST_H */
+#endif /* _LIST_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_map.h b/contrib/libstdc++/include/bits/stl_map.h
index ed47bbb..8535ae5 100644
--- a/contrib/libstdc++/include/bits/stl_map.h
+++ b/contrib/libstdc++/include/bits/stl_map.h
@@ -1,6 +1,6 @@
// Map implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,12 +58,12 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_MAP_H
-#define __GLIBCPP_INTERNAL_MAP_H
+#ifndef _MAP_H
+#define _MAP_H 1
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
/**
* @brief A standard container made up of (key,value) pairs, which can be
@@ -89,507 +89,540 @@ namespace std
template <typename _Key, typename _Tp, typename _Compare = less<_Key>,
typename _Alloc = allocator<pair<const _Key, _Tp> > >
class map
- {
- // concept requirements
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept)
-
- public:
- typedef _Key key_type;
- typedef _Tp mapped_type;
- typedef pair<const _Key, _Tp> value_type;
- typedef _Compare key_compare;
-
- class value_compare
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+
+ public:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+
+ class value_compare
: public binary_function<value_type, value_type, bool>
{
- friend class map<_Key,_Tp,_Compare,_Alloc>;
+ friend class map<_Key,_Tp,_Compare,_Alloc>;
protected:
- _Compare comp;
- value_compare(_Compare __c) : comp(__c) {}
+ _Compare comp;
+
+ value_compare(_Compare __c)
+ : comp(__c) { }
+
public:
- bool operator()(const value_type& __x, const value_type& __y) const
- { return comp(__x.first, __y.first); }
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
};
-
- private:
- /// @if maint This turns a red-black tree into a [multi]map. @endif
- typedef _Rb_tree<key_type, value_type,
- _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
- /// @if maint The actual tree structure. @endif
- _Rep_type _M_t;
-
- public:
- // many of these are specified differently in ISO, but the following are
- // "functionally equivalent"
- typedef typename _Rep_type::allocator_type allocator_type;
- typedef typename _Rep_type::reference reference;
- typedef typename _Rep_type::const_reference const_reference;
- typedef typename _Rep_type::iterator iterator;
- typedef typename _Rep_type::const_iterator const_iterator;
- typedef typename _Rep_type::size_type size_type;
- typedef typename _Rep_type::difference_type difference_type;
- typedef typename _Rep_type::pointer pointer;
- typedef typename _Rep_type::const_pointer const_pointer;
- typedef typename _Rep_type::reverse_iterator reverse_iterator;
- typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-
-
- // [23.3.1.1] construct/copy/destroy
- // (get_allocator() is normally listed in this section, but seems to have
- // been accidentally omitted in the printed standard)
- /**
- * @brief Default constructor creates no elements.
- */
- map() : _M_t(_Compare(), allocator_type()) { }
-
- // for some reason this was made a separate function
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- map(const _Compare& __comp, const allocator_type& __a = allocator_type())
+
+ private:
+ /// @if maint This turns a red-black tree into a [multi]map. @endif
+ typedef _Rb_tree<key_type, value_type,
+ _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
+ /// @if maint The actual tree structure. @endif
+ _Rep_type _M_t;
+
+ public:
+ // many of these are specified differently in ISO, but the following are
+ // "functionally equivalent"
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Rep_type::allocator_type allocator_type;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+ // [23.3.1.1] construct/copy/destroy
+ // (get_allocator() is normally listed in this section, but seems to have
+ // been accidentally omitted in the printed standard)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ map()
+ : _M_t(_Compare(), allocator_type()) { }
+
+ // for some reason this was made a separate function
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ map(const _Compare& __comp, const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) { }
-
- /**
- * @brief Map copy constructor.
- * @param x A %map of identical element and allocator types.
- *
- * The newly-created %map uses a copy of the allocation object used
- * by @a x.
- */
- map(const map& __x)
+
+ /**
+ * @brief Map copy constructor.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The newly-created %map uses a copy of the allocation object used
+ * by @a x.
+ */
+ map(const map& __x)
: _M_t(__x._M_t) { }
-
- /**
- * @brief Builds a %map from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * Create a %map consisting of copies of the elements from [first,last).
- * This is linear in N if the range is already sorted, and NlogN
- * otherwise (where N is distance(first,last)).
- */
- template <typename _InputIterator>
- map(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
- { _M_t.insert_unique(__first, __last); }
-
- /**
- * @brief Builds a %map from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param comp A comparison functor.
- * @param a An allocator object.
- *
- * Create a %map consisting of copies of the elements from [first,last).
- * This is linear in N if the range is already sorted, and NlogN
- * otherwise (where N is distance(first,last)).
- */
- template <typename _InputIterator>
- map(_InputIterator __first, _InputIterator __last,
- const _Compare& __comp, const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a)
- { _M_t.insert_unique(__first, __last); }
-
- // FIXME There is no dtor declared, but we should have something generated
- // by Doxygen. I don't know what tags to add to this paragraph to make
- // that happen:
- /**
- * The dtor only erases the elements, and note that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
-
- /**
- * @brief Map assignment operator.
- * @param x A %map of identical element and allocator types.
- *
- * All the elements of @a x are copied, but unlike the copy constructor,
- * the allocator object is not copied.
- */
- map&
- operator=(const map& __x)
- {
- _M_t = __x._M_t;
- return *this;
- }
-
- /// Get a copy of the memory allocation object.
- allocator_type
- get_allocator() const { return _M_t.get_allocator(); }
-
- // iterators
- /**
- * Returns a read/write iterator that points to the first pair in the %map.
- * Iteration is done in ascending order according to the keys.
- */
- iterator
- begin() { return _M_t.begin(); }
-
- /**
- * Returns a read-only (constant) iterator that points to the first pair
- * in the %map. Iteration is done in ascending order according to the
- * keys.
- */
- const_iterator
- begin() const { return _M_t.begin(); }
-
- /**
- * Returns a read/write iterator that points one past the last pair in the
- * %map. Iteration is done in ascending order according to the keys.
- */
- iterator
- end() { return _M_t.end(); }
-
- /**
- * Returns a read-only (constant) iterator that points one past the last
- * pair in the %map. Iteration is done in ascending order according to the
- * keys.
- */
- const_iterator
- end() const { return _M_t.end(); }
-
- /**
- * Returns a read/write reverse iterator that points to the last pair in
- * the %map. Iteration is done in descending order according to the keys.
- */
- reverse_iterator
- rbegin() { return _M_t.rbegin(); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to the last
- * pair in the %map. Iteration is done in descending order according to
- * the keys.
- */
- const_reverse_iterator
- rbegin() const { return _M_t.rbegin(); }
-
- /**
- * Returns a read/write reverse iterator that points to one before the
- * first pair in the %map. Iteration is done in descending order according
- * to the keys.
- */
- reverse_iterator
- rend() { return _M_t.rend(); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to one
- * before the first pair in the %map. Iteration is done in descending
- * order according to the keys.
- */
- const_reverse_iterator
- rend() const { return _M_t.rend(); }
-
- // capacity
- /** Returns true if the %map is empty. (Thus begin() would equal end().) */
- bool
- empty() const { return _M_t.empty(); }
-
- /** Returns the size of the %map. */
- size_type
- size() const { return _M_t.size(); }
-
- /** Returns the maximum size of the %map. */
- size_type
- max_size() const { return _M_t.max_size(); }
-
- // [23.3.1.2] element access
- /**
- * @brief Subscript ( @c [] ) access to %map data.
- * @param k The key for which data should be retrieved.
- * @return A reference to the data of the (key,data) %pair.
- *
- * Allows for easy lookup with the subscript ( @c [] ) operator. Returns
- * data associated with the key specified in subscript. If the key does
- * not exist, a pair with that key is created using default values, which
- * is then returned.
- *
- * Lookup requires logarithmic time.
- */
- mapped_type&
- operator[](const key_type& __k)
- {
- // concept requirements
- __glibcpp_function_requires(_DefaultConstructibleConcept<mapped_type>)
-
- iterator __i = lower_bound(__k);
- // __i->first is greater than or equivalent to __k.
- if (__i == end() || key_comp()(__k, (*__i).first))
- __i = insert(__i, value_type(__k, mapped_type()));
- return (*__i).second;
- }
-
- // modifiers
- /**
- * @brief Attempts to insert a std::pair into the %map.
- * @param x Pair to be inserted (see std::make_pair for easy creation of
- * pairs).
- * @return A pair, of which the first element is an iterator that points
- * to the possibly inserted pair, and the second is a bool that
- * is true if the pair was actually inserted.
- *
- * This function attempts to insert a (key, value) %pair into the %map.
- * A %map relies on unique keys and thus a %pair is only inserted if its
- * first element (the key) is not already present in the %map.
- *
- * Insertion requires logarithmic time.
- */
- pair<iterator,bool>
- insert(const value_type& __x)
- { return _M_t.insert_unique(__x); }
-
- /**
- * @brief Attempts to insert a std::pair into the %map.
- * @param position An iterator that serves as a hint as to where the
- * pair should be inserted.
- * @param x Pair to be inserted (see std::make_pair for easy creation of
- * pairs).
- * @return An iterator that points to the element with key of @a x (may
- * or may not be the %pair passed in).
- *
- * This function is not concerned about whether the insertion took place,
- * and thus does not return a boolean like the single-argument
- * insert() does. Note that the first parameter is only a hint and can
- * potentially improve the performance of the insertion process. A bad
- * hint would cause no gains in efficiency.
- *
- * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
- * for more on "hinting".
- *
- * Insertion requires logarithmic time (if the hint is not taken).
- */
- iterator
- insert(iterator position, const value_type& __x)
- { return _M_t.insert_unique(position, __x); }
-
- /**
- * @brief A template function that attemps to insert a range of elements.
- * @param first Iterator pointing to the start of the range to be
- * inserted.
- * @param last Iterator pointing to the end of the range.
- *
- * Complexity similar to that of the range constructor.
- */
- template <typename _InputIterator>
+
+ /**
+ * @brief Builds a %map from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %map consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template <typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ /**
+ * @brief Builds a %map from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %map consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template <typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp, const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t.insert_unique(__first, __last); }
+
+ // FIXME There is no dtor declared, but we should have something generated
+ // by Doxygen. I don't know what tags to add to this paragraph to make
+ // that happen:
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibilty.
+ */
+
+ /**
+ * @brief Map assignment operator.
+ * @param x A %map of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ map&
+ operator=(const map& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first pair in the
+ * %map.
+ * Iteration is done in ascending order according to the keys.
+ */
+ iterator
+ begin()
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %map. Iteration is done in ascending order according to the
+ * keys.
+ */
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last pair in
+ * the %map. Iteration is done in ascending order according to the keys.
+ */
+ iterator
+ end()
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %map. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last pair in
+ * the %map. Iteration is done in descending order according to the
+ * keys.
+ */
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %map. Iteration is done in descending
+ * order according to the keys.
+ */
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+ // capacity
+ /** Returns true if the %map is empty. (Thus begin() would equal
+ * end().)
+ */
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /** Returns the size of the %map. */
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /** Returns the maximum size of the %map. */
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ // [23.3.1.2] element access
+ /**
+ * @brief Subscript ( @c [] ) access to %map data.
+ * @param k The key for which data should be retrieved.
+ * @return A reference to the data of the (key,data) %pair.
+ *
+ * Allows for easy lookup with the subscript ( @c [] ) operator. Returns
+ * data associated with the key specified in subscript. If the key does
+ * not exist, a pair with that key is created using default values, which
+ * is then returned.
+ *
+ * Lookup requires logarithmic time.
+ */
+ mapped_type&
+ operator[](const key_type& __k)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_DefaultConstructibleConcept<mapped_type>)
+
+ iterator __i = lower_bound(__k);
+ // __i->first is greater than or equivalent to __k.
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __i = insert(__i, value_type(__k, mapped_type()));
+ return (*__i).second;
+ }
+
+ // modifiers
+ /**
+ * @brief Attempts to insert a std::pair into the %map.
+ * @param x Pair to be inserted (see std::make_pair for easy creation of
+ * pairs).
+ * @return A pair, of which the first element is an iterator that points
+ * to the possibly inserted pair, and the second is a bool that
+ * is true if the pair was actually inserted.
+ *
+ * This function attempts to insert a (key, value) %pair into the %map.
+ * A %map relies on unique keys and thus a %pair is only inserted if its
+ * first element (the key) is not already present in the %map.
+ *
+ * Insertion requires logarithmic time.
+ */
+ pair<iterator,bool>
+ insert(const value_type& __x)
+ { return _M_t.insert_unique(__x); }
+
+ /**
+ * @brief Attempts to insert a std::pair into the %map.
+ * @param position An iterator that serves as a hint as to where the
+ * pair should be inserted.
+ * @param x Pair to be inserted (see std::make_pair for easy creation of
+ * pairs).
+ * @return An iterator that points to the element with key of @a x (may
+ * or may not be the %pair passed in).
+ *
+ * This function is not concerned about whether the insertion took place,
+ * and thus does not return a boolean like the single-argument
+ * insert() does. Note that the first parameter is only a hint and can
+ * potentially improve the performance of the insertion process. A bad
+ * hint would cause no gains in efficiency.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator position, const value_type& __x)
+ { return _M_t.insert_unique(position, __x); }
+
+ /**
+ * @brief A template function that attemps to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_unique(__first, __last); }
+
+ /**
+ * @brief Erases an element from a %map.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %map. Note that this function only erases the element, and
+ * that if the element is itself a pointer, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibilty.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all the elements located by the given key from
+ * a %map.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %map.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %map.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
void
- insert(_InputIterator __first, _InputIterator __last)
- { _M_t.insert_unique(__first, __last); }
-
- /**
- * @brief Erases an element from a %map.
- * @param position An iterator pointing to the element to be erased.
- *
- * This function erases an element, pointed to by the given iterator, from
- * a %map. Note that this function only erases the element, and that if
- * the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
- */
- void
- erase(iterator __position) { _M_t.erase(__position); }
-
- /**
- * @brief Erases elements according to the provided key.
- * @param x Key of element to be erased.
- * @return The number of elements erased.
- *
- * This function erases all the elements located by the given key from
- * a %map.
- * Note that this function only erases the element, and that if
- * the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
- */
- size_type
- erase(const key_type& __x) { return _M_t.erase(__x); }
-
- /**
- * @brief Erases a [first,last) range of elements from a %map.
- * @param first Iterator pointing to the start of the range to be erased.
- * @param last Iterator pointing to the end of the range to be erased.
- *
- * This function erases a sequence of elements from a %map.
- * Note that this function only erases the element, and that if
- * the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
- */
- void
- erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); }
-
- /**
- * @brief Swaps data with another %map.
- * @param x A %map of the same element and allocator types.
- *
- * This exchanges the elements between two maps in constant time.
- * (It is only swapping a pointer, an integer, and an instance of
- * the @c Compare type (which itself is often stateless and empty), so it
- * should be quite fast.)
- * Note that the global std::swap() function is specialized such that
- * std::swap(m1,m2) will feed to this function.
- */
- void
- swap(map& __x) { _M_t.swap(__x._M_t); }
-
- /**
- * Erases all elements in a %map. Note that this function only erases
- * the elements, and that if the elements themselves are pointers, the
- * pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
- */
- void
- clear() { _M_t.clear(); }
-
- // observers
- /**
- * Returns the key comparison object out of which the %map was constructed.
- */
- key_compare
- key_comp() const { return _M_t.key_comp(); }
-
- /**
- * Returns a value comparison object, built from the key comparison
- * object out of which the %map was constructed.
- */
- value_compare
- value_comp() const { return value_compare(_M_t.key_comp()); }
-
- // [23.3.1.3] map operations
- /**
- * @brief Tries to locate an element in a %map.
- * @param x Key of (key, value) %pair to be located.
- * @return Iterator pointing to sought-after element, or end() if not
- * found.
- *
- * This function takes a key and tries to locate the element with which
- * the key matches. If successful the function returns an iterator
- * pointing to the sought after %pair. If unsuccessful it returns the
- * past-the-end ( @c end() ) iterator.
- */
- iterator
- find(const key_type& __x) { return _M_t.find(__x); }
-
- /**
- * @brief Tries to locate an element in a %map.
- * @param x Key of (key, value) %pair to be located.
- * @return Read-only (constant) iterator pointing to sought-after
- * element, or end() if not found.
- *
- * This function takes a key and tries to locate the element with which
- * the key matches. If successful the function returns a constant iterator
- * pointing to the sought after %pair. If unsuccessful it returns the
- * past-the-end ( @c end() ) iterator.
- */
- const_iterator
- find(const key_type& __x) const { return _M_t.find(__x); }
-
- /**
- * @brief Finds the number of elements with given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Number of elements with specified key.
- *
- * This function only makes sense for multimaps; for map the result will
- * either be 0 (not present) or 1 (present).
- */
- size_type
- count(const key_type& __x) const
- { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
-
- /**
- * @brief Finds the beginning of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Iterator pointing to first element matching given key, or
- * end() if not found.
- *
- * This function is useful only with multimaps. It returns the first
- * element of a subsequence of elements that matches the given key. If
- * unsuccessful it returns an iterator pointing to the first element that
- * has a greater value than given key or end() if no such element exists.
- */
- iterator
- lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); }
-
- /**
- * @brief Finds the beginning of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Read-only (constant) iterator pointing to first element
- * matching given key, or end() if not found.
- *
- * This function is useful only with multimaps. It returns the first
- * element of a subsequence of elements that matches the given key. If
- * unsuccessful the iterator will point to the next greatest element or,
- * if no such greater element exists, to end().
- */
- const_iterator
- lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); }
-
- /**
- * @brief Finds the end of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Iterator pointing to last element matching given key.
- *
- * This function only makes sense with multimaps.
- */
- iterator
- upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); }
-
- /**
- * @brief Finds the end of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Read-only (constant) iterator pointing to last element matching
- * given key.
- *
- * This function only makes sense with multimaps.
- */
- const_iterator
- upper_bound(const key_type& __x) const
- { return _M_t.upper_bound(__x); }
-
- /**
- * @brief Finds a subsequence matching given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Pair of iterators that possibly points to the subsequence
- * matching given key.
- *
- * This function returns a pair of which the first
- * element possibly points to the first element matching the given key
- * and the second element possibly points to the last element matching the
- * given key. If unsuccessful the first element of the returned pair will
- * contain an iterator pointing to the next greatest element or, if no such
- * greater element exists, to end().
- *
- * This function only makes sense for multimaps.
- */
- pair<iterator,iterator>
- equal_range(const key_type& __x)
- { return _M_t.equal_range(__x); }
-
- /**
- * @brief Finds a subsequence matching given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Pair of read-only (constant) iterators that possibly points to
- * the subsequence matching given key.
- *
- * This function returns a pair of which the first
- * element possibly points to the first element matching the given key
- * and the second element possibly points to the last element matching the
- * given key. If unsuccessful the first element of the returned pair will
- * contain an iterator pointing to the next greatest element or, if no such
- * a greater element exists, to end().
- *
- * This function only makes sense for multimaps.
- */
- pair<const_iterator,const_iterator>
- equal_range(const key_type& __x) const
- { return _M_t.equal_range(__x); }
-
- template <typename _K1, typename _T1, typename _C1, typename _A1>
- friend bool operator== (const map<_K1,_T1,_C1,_A1>&,
- const map<_K1,_T1,_C1,_A1>&);
- template <typename _K1, typename _T1, typename _C1, typename _A1>
- friend bool operator< (const map<_K1,_T1,_C1,_A1>&,
- const map<_K1,_T1,_C1,_A1>&);
- };
-
-
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * @brief Swaps data with another %map.
+ * @param x A %map of the same element and allocator types.
+ *
+ * This exchanges the elements between two maps in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of
+ * the @c Compare type (which itself is often stateless and empty), so it
+ * should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(m1,m2) will feed to this function.
+ */
+ void
+ swap(map& __x)
+ { _M_t.swap(__x._M_t); }
+
+ /**
+ * Erases all elements in a %map. Note that this function only erases
+ * the elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibilty.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // observers
+ /**
+ * Returns the key comparison object out of which the %map was
+ * constructed.
+ */
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+
+ /**
+ * Returns a value comparison object, built from the key comparison
+ * object out of which the %map was constructed.
+ */
+ value_compare
+ value_comp() const
+ { return value_compare(_M_t.key_comp()); }
+
+ // [23.3.1.3] map operations
+ /**
+ * @brief Tries to locate an element in a %map.
+ * @param x Key of (key, value) %pair to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after %pair. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Tries to locate an element in a %map.
+ * @param x Key of (key, value) %pair to be located.
+ * @return Read-only (constant) iterator pointing to sought-after
+ * element, or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns a constant
+ * iterator pointing to the sought after %pair. If unsuccessful it
+ * returns the past-the-end ( @c end() ) iterator.
+ */
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Number of elements with specified key.
+ *
+ * This function only makes sense for multimaps; for map the result will
+ * either be 0 (not present) or 1 (present).
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first element
+ * equal to or greater than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first iterator
+ * greater than key, or end().
+ */
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multimaps.
+ */
+ pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of read-only (constant) iterators that possibly points
+ * to the subsequence matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multimaps.
+ */
+ pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template <typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator== (const map<_K1,_T1,_C1,_A1>&,
+ const map<_K1,_T1,_C1,_A1>&);
+
+ template <typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator< (const map<_K1,_T1,_C1,_A1>&,
+ const map<_K1,_T1,_C1,_A1>&);
+ };
+
/**
* @brief Map equality comparison.
* @param x A %map.
@@ -605,52 +638,52 @@ namespace std
operator==(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return __x._M_t == __y._M_t; }
-
+
/**
* @brief Map ordering relation.
* @param x A %map.
* @param y A %map of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* maps. The elements must be comparable with @c <.
*
- * See std::lexographical_compare() for how the determination is made.
+ * See std::lexicographical_compare() for how the determination is made.
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return __x._M_t < __y._M_t; }
-
+
/// Based on operator==
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator!=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
const map<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__x < __y); }
-
+
/// See std::map::swap().
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline void
@@ -658,4 +691,4 @@ namespace std
{ __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_MAP_H */
+#endif /* _MAP_H */
diff --git a/contrib/libstdc++/include/bits/stl_multimap.h b/contrib/libstdc++/include/bits/stl_multimap.h
index 0fa79a8..e080f9a 100644
--- a/contrib/libstdc++/include/bits/stl_multimap.h
+++ b/contrib/libstdc++/include/bits/stl_multimap.h
@@ -1,6 +1,6 @@
// Multimap implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,28 +58,30 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_MULTIMAP_H
-#define __GLIBCPP_INTERNAL_MULTIMAP_H
+#ifndef _MULTIMAP_H
+#define _MULTIMAP_H 1
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
// Forward declaration of operators < and ==, needed for friend declaration.
-
+
template <typename _Key, typename _Tp,
typename _Compare = less<_Key>,
typename _Alloc = allocator<pair<const _Key, _Tp> > >
- class multimap;
-
+ class multimap;
+
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
- inline bool operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
- const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
-
+ inline bool
+ operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
+ const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
+
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
- inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
- const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
-
+ inline bool
+ operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
+ const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
+
/**
* @brief A standard container made up of (key,value) pairs, which can be
* retrieved based on a key, in logarithmic time.
@@ -103,465 +105,506 @@ namespace std
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
class multimap
- {
- // concept requirements
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept)
-
- public:
- typedef _Key key_type;
- typedef _Tp mapped_type;
- typedef pair<const _Key, _Tp> value_type;
- typedef _Compare key_compare;
-
- class value_compare
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+
+ public:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+
+ class value_compare
: public binary_function<value_type, value_type, bool>
{
- friend class multimap<_Key,_Tp,_Compare,_Alloc>;
+ friend class multimap<_Key,_Tp,_Compare,_Alloc>;
protected:
- _Compare comp;
- value_compare(_Compare __c) : comp(__c) {}
+ _Compare comp;
+
+ value_compare(_Compare __c)
+ : comp(__c) { }
+
public:
- bool operator()(const value_type& __x, const value_type& __y) const
- { return comp(__x.first, __y.first); }
- };
-
- private:
- /// @if maint This turns a red-black tree into a [multi]map. @endif
- typedef _Rb_tree<key_type, value_type,
- _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
- /// @if maint The actual tree structure. @endif
- _Rep_type _M_t;
-
- public:
- // many of these are specified differently in ISO, but the following are
- // "functionally equivalent"
- typedef typename _Rep_type::allocator_type allocator_type;
- typedef typename _Rep_type::reference reference;
- typedef typename _Rep_type::const_reference const_reference;
- typedef typename _Rep_type::iterator iterator;
- typedef typename _Rep_type::const_iterator const_iterator;
- typedef typename _Rep_type::size_type size_type;
- typedef typename _Rep_type::difference_type difference_type;
- typedef typename _Rep_type::pointer pointer;
- typedef typename _Rep_type::const_pointer const_pointer;
- typedef typename _Rep_type::reverse_iterator reverse_iterator;
- typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-
-
- // [23.3.2] construct/copy/destroy
- // (get_allocator() is also listed in this section)
- /**
- * @brief Default constructor creates no elements.
- */
- multimap() : _M_t(_Compare(), allocator_type()) { }
-
- // for some reason this was made a separate function
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- multimap(const _Compare& __comp, const allocator_type& __a = allocator_type())
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
+ };
+
+ private:
+ /// @if maint This turns a red-black tree into a [multi]map. @endif
+ typedef _Rb_tree<key_type, value_type,
+ _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
+ /// @if maint The actual tree structure. @endif
+ _Rep_type _M_t;
+
+ public:
+ // many of these are specified differently in ISO, but the following are
+ // "functionally equivalent"
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Rep_type::allocator_type allocator_type;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+ // [23.3.2] construct/copy/destroy
+ // (get_allocator() is also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ multimap()
+ : _M_t(_Compare(), allocator_type()) { }
+
+ // for some reason this was made a separate function
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ multimap(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) { }
-
- /**
- * @brief %Multimap copy constructor.
- * @param x A %multimap of identical element and allocator types.
- *
- * The newly-created %multimap uses a copy of the allocation object used
- * by @a x.
- */
- multimap(const multimap& __x)
+
+ /**
+ * @brief %Multimap copy constructor.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The newly-created %multimap uses a copy of the allocation object used
+ * by @a x.
+ */
+ multimap(const multimap& __x)
: _M_t(__x._M_t) { }
-
- /**
- * @brief Builds a %multimap from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- *
- * Create a %multimap consisting of copies of the elements from
- * [first,last). This is linear in N if the range is already sorted,
- * and NlogN otherwise (where N is distance(first,last)).
- */
- template <typename _InputIterator>
- multimap(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
+
+ /**
+ * @brief Builds a %multimap from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %multimap consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template <typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
{ _M_t.insert_equal(__first, __last); }
-
- /**
- * @brief Builds a %multimap from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param comp A comparison functor.
- * @param a An allocator object.
- *
- * Create a %multimap consisting of copies of the elements from
- * [first,last). This is linear in N if the range is already sorted,
- * and NlogN otherwise (where N is distance(first,last)).
- */
- template <typename _InputIterator>
- multimap(_InputIterator __first, _InputIterator __last,
- const _Compare& __comp,
- const allocator_type& __a = allocator_type())
+
+ /**
+ * @brief Builds a %multimap from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multimap consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template <typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
: _M_t(__comp, __a)
{ _M_t.insert_equal(__first, __last); }
-
- // FIXME There is no dtor declared, but we should have something generated
- // by Doxygen. I don't know what tags to add to this paragraph to make
- // that happen:
- /**
- * The dtor only erases the elements, and note that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
- */
-
- /**
- * @brief %Multimap assignment operator.
- * @param x A %multimap of identical element and allocator types.
- *
- * All the elements of @a x are copied, but unlike the copy constructor,
- * the allocator object is not copied.
- */
- multimap&
- operator=(const multimap& __x)
- {
- _M_t = __x._M_t;
- return *this;
- }
-
- /// Get a copy of the memory allocation object.
- allocator_type
- get_allocator() const { return _M_t.get_allocator(); }
-
- // iterators
- /**
- * Returns a read/write iterator that points to the first pair in the
- * %multimap. Iteration is done in ascending order according to the keys.
- */
- iterator
- begin() { return _M_t.begin(); }
-
- /**
- * Returns a read-only (constant) iterator that points to the first pair
- * in the %multimap. Iteration is done in ascending order according to the
- * keys.
- */
- const_iterator
- begin() const { return _M_t.begin(); }
-
- /**
- * Returns a read/write iterator that points one past the last pair in the
- * %multimap. Iteration is done in ascending order according to the keys.
- */
- iterator
- end() { return _M_t.end(); }
-
- /**
- * Returns a read-only (constant) iterator that points one past the last
- * pair in the %multimap. Iteration is done in ascending order according
- * to the keys.
- */
- const_iterator
- end() const { return _M_t.end(); }
-
- /**
- * Returns a read/write reverse iterator that points to the last pair in
- * the %multimap. Iteration is done in descending order according to the
- * keys.
- */
- reverse_iterator
- rbegin() { return _M_t.rbegin(); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to the last
- * pair in the %multimap. Iteration is done in descending order according
- * to the keys.
- */
- const_reverse_iterator
- rbegin() const { return _M_t.rbegin(); }
-
- /**
- * Returns a read/write reverse iterator that points to one before the
- * first pair in the %multimap. Iteration is done in descending order
- * according to the keys.
- */
- reverse_iterator
- rend() { return _M_t.rend(); }
-
- /**
- * Returns a read-only (constant) reverse iterator that points to one
- * before the first pair in the %multimap. Iteration is done in descending
- * order according to the keys.
- */
- const_reverse_iterator
- rend() const { return _M_t.rend(); }
-
- // capacity
- /** Returns true if the %multimap is empty. */
- bool
- empty() const { return _M_t.empty(); }
-
- /** Returns the size of the %multimap. */
- size_type
- size() const { return _M_t.size(); }
-
- /** Returns the maximum size of the %multimap. */
- size_type
- max_size() const { return _M_t.max_size(); }
-
- // modifiers
- /**
- * @brief Inserts a std::pair into the %multimap.
- * @param x Pair to be inserted (see std::make_pair for easy creation of
- * pairs).
- * @return An iterator that points to the inserted (key,value) pair.
- *
- * This function inserts a (key, value) pair into the %multimap. Contrary
- * to a std::map the %multimap does not rely on unique keys and thus
- * multiple pairs with the same key can be inserted.
- *
- * Insertion requires logarithmic time.
- */
- iterator
- insert(const value_type& __x) { return _M_t.insert_equal(__x); }
-
- /**
- * @brief Inserts a std::pair into the %multimap.
- * @param position An iterator that serves as a hint as to where the
- * pair should be inserted.
- * @param x Pair to be inserted (see std::make_pair for easy creation of
- * pairs).
- * @return An iterator that points to the inserted (key,value) pair.
- *
- * This function inserts a (key, value) pair into the %multimap. Contrary
- * to a std::map the %multimap does not rely on unique keys and thus
- * multiple pairs with the same key can be inserted.
- * Note that the first parameter is only a hint and can potentially
- * improve the performance of the insertion process. A bad hint would
- * cause no gains in efficiency.
- *
- * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
- * for more on "hinting".
- *
- * Insertion requires logarithmic time (if the hint is not taken).
- */
- iterator
- insert(iterator __position, const value_type& __x)
- { return _M_t.insert_equal(__position, __x); }
-
- /**
- * @brief A template function that attemps to insert a range of elements.
- * @param first Iterator pointing to the start of the range to be
- * inserted.
- * @param last Iterator pointing to the end of the range.
- *
- * Complexity similar to that of the range constructor.
- */
- template <typename _InputIterator>
+
+ // FIXME There is no dtor declared, but we should have something generated
+ // by Doxygen. I don't know what tags to add to this paragraph to make
+ // that happen:
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibilty.
+ */
+
+ /**
+ * @brief %Multimap assignment operator.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ multimap&
+ operator=(const multimap& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first pair in the
+ * %multimap. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ begin()
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %multimap. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last pair in
+ * the %multimap. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ end()
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %multimap. Iteration is done in ascending order according
+ * to the keys.
+ */
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last pair in
+ * the %multimap. Iteration is done in descending order according to the
+ * keys.
+ */
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %multimap. Iteration is done in
+ * descending order according to the keys.
+ */
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+ // capacity
+ /** Returns true if the %multimap is empty. */
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /** Returns the size of the %multimap. */
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /** Returns the maximum size of the %multimap. */
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ // modifiers
+ /**
+ * @brief Inserts a std::pair into the %multimap.
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+ * @return An iterator that points to the inserted (key,value) pair.
+ *
+ * This function inserts a (key, value) pair into the %multimap.
+ * Contrary to a std::map the %multimap does not rely on unique keys and
+ * thus multiple pairs with the same key can be inserted.
+ *
+ * Insertion requires logarithmic time.
+ */
+ iterator
+ insert(const value_type& __x)
+ { return _M_t.insert_equal(__x); }
+
+ /**
+ * @brief Inserts a std::pair into the %multimap.
+ * @param position An iterator that serves as a hint as to where the
+ * pair should be inserted.
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+ * @return An iterator that points to the inserted (key,value) pair.
+ *
+ * This function inserts a (key, value) pair into the %multimap.
+ * Contrary to a std::map the %multimap does not rely on unique keys and
+ * thus multiple pairs with the same key can be inserted.
+ * Note that the first parameter is only a hint and can potentially
+ * improve the performance of the insertion process. A bad hint would
+ * cause no gains in efficiency.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t.insert_equal(__position, __x); }
+
+ /**
+ * @brief A template function that attemps to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_equal(__first, __last); }
+
+ /**
+ * @brief Erases an element from a %multimap.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %multimap. Note that this function only erases the element,
+ * and that if the element is itself a pointer, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibilty.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all elements located by the given key from a
+ * %multimap.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %multimap.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %multimap.
+ * Note that this function only erases the elements, and that if
+ * the elements themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibilty.
+ */
void
- insert(_InputIterator __first, _InputIterator __last)
- { _M_t.insert_equal(__first, __last); }
-
- /**
- * @brief Erases an element from a %multimap.
- * @param position An iterator pointing to the element to be erased.
- *
- * This function erases an element, pointed to by the given iterator, from
- * a %multimap. Note that this function only erases the element, and that
- * if the element is itself a pointer, the pointed-to memory is not
- * touched in any way. Managing the pointer is the user's responsibilty.
- */
- void
- erase(iterator __position) { _M_t.erase(__position); }
-
- /**
- * @brief Erases elements according to the provided key.
- * @param x Key of element to be erased.
- * @return The number of elements erased.
- *
- * This function erases all elements located by the given key from a
- * %multimap.
- * Note that this function only erases the element, and that if
- * the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
- */
- size_type
- erase(const key_type& __x) { return _M_t.erase(__x); }
-
- /**
- * @brief Erases a [first,last) range of elements from a %multimap.
- * @param first Iterator pointing to the start of the range to be erased.
- * @param last Iterator pointing to the end of the range to be erased.
- *
- * This function erases a sequence of elements from a %multimap.
- * Note that this function only erases the elements, and that if
- * the elements themselves are pointers, the pointed-to memory is not
- * touched in any way. Managing the pointer is the user's responsibilty.
- */
- void
- erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); }
-
- /**
- * @brief Swaps data with another %multimap.
- * @param x A %multimap of the same element and allocator types.
- *
- * This exchanges the elements between two multimaps in constant time.
- * (It is only swapping a pointer, an integer, and an instance of
- * the @c Compare type (which itself is often stateless and empty), so it
- * should be quite fast.)
- * Note that the global std::swap() function is specialized such that
- * std::swap(m1,m2) will feed to this function.
- */
- void
- swap(multimap& __x) { _M_t.swap(__x._M_t); }
-
- /**
- * Erases all elements in a %multimap. Note that this function only erases
- * the elements, and that if the elements themselves are pointers, the
- * pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
- */
- void
- clear() { _M_t.clear(); }
-
- // observers
- /**
- * Returns the key comparison object out of which the %multimap
- * was constructed.
- */
- key_compare
- key_comp() const { return _M_t.key_comp(); }
-
- /**
- * Returns a value comparison object, built from the key comparison
- * object out of which the %multimap was constructed.
- */
- value_compare
- value_comp() const { return value_compare(_M_t.key_comp()); }
-
- // multimap operations
- /**
- * @brief Tries to locate an element in a %multimap.
- * @param x Key of (key, value) pair to be located.
- * @return Iterator pointing to sought-after element,
- * or end() if not found.
- *
- * This function takes a key and tries to locate the element with which
- * the key matches. If successful the function returns an iterator
- * pointing to the sought after %pair. If unsuccessful it returns the
- * past-the-end ( @c end() ) iterator.
- */
- iterator
- find(const key_type& __x) { return _M_t.find(__x); }
-
- /**
- * @brief Tries to locate an element in a %multimap.
- * @param x Key of (key, value) pair to be located.
- * @return Read-only (constant) iterator pointing to sought-after
- * element, or end() if not found.
- *
- * This function takes a key and tries to locate the element with which
- * the key matches. If successful the function returns a constant iterator
- * pointing to the sought after %pair. If unsuccessful it returns the
- * past-the-end ( @c end() ) iterator.
- */
- const_iterator
- find(const key_type& __x) const { return _M_t.find(__x); }
-
- /**
- * @brief Finds the number of elements with given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Number of elements with specified key.
- */
- size_type
- count(const key_type& __x) const { return _M_t.count(__x); }
-
- /**
- * @brief Finds the beginning of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Iterator pointing to first element matching given key, or
- * end() if not found.
- *
- * This function returns the first element of a subsequence of elements
- * that matches the given key. If unsuccessful it returns an iterator
- * pointing to the first element that has a greater value than given key
- * or end() if no such element exists.
- */
- iterator
- lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); }
-
- /**
- * @brief Finds the beginning of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Read-only (constant) iterator pointing to first element
- * matching given key, or end() if not found.
- *
- * This function returns the first element of a subsequence of elements
- * that matches the given key. If unsuccessful the iterator will point
- * to the next greatest element or, if no such greater element exists, to
- * end().
- */
- const_iterator
- lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); }
-
- /**
- * @brief Finds the end of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Iterator pointing to last element matching given key.
- */
- iterator
- upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); }
-
- /**
- * @brief Finds the end of a subsequence matching given key.
- * @param x Key of (key, value) pair to be located.
- * @return Read-only (constant) iterator pointing to last element matching
- * given key.
- */
- const_iterator
- upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); }
-
- /**
- * @brief Finds a subsequence matching given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Pair of iterators that possibly points to the subsequence
- * matching given key.
- *
- * This function returns a pair of which the first
- * element possibly points to the first element matching the given key
- * and the second element possibly points to the last element matching the
- * given key. If unsuccessful the first element of the returned pair will
- * contain an iterator pointing to the next greatest element or, if no such
- * greater element exists, to end().
- */
- pair<iterator,iterator>
- equal_range(const key_type& __x) { return _M_t.equal_range(__x); }
-
- /**
- * @brief Finds a subsequence matching given key.
- * @param x Key of (key, value) pairs to be located.
- * @return Pair of read-only (constant) iterators that possibly points to
- * the subsequence matching given key.
- *
- * This function returns a pair of which the first
- * element possibly points to the first element matching the given key
- * and the second element possibly points to the last element matching the
- * given key. If unsuccessful the first element of the returned pair will
- * contain an iterator pointing to the next greatest element or, if no such
- * a greater element exists, to end().
- */
- pair<const_iterator,const_iterator>
- equal_range(const key_type& __x) const { return _M_t.equal_range(__x); }
-
- template <typename _K1, typename _T1, typename _C1, typename _A1>
- friend bool operator== (const multimap<_K1,_T1,_C1,_A1>&,
- const multimap<_K1,_T1,_C1,_A1>&);
- template <typename _K1, typename _T1, typename _C1, typename _A1>
- friend bool operator< (const multimap<_K1,_T1,_C1,_A1>&,
- const multimap<_K1,_T1,_C1,_A1>&);
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * @brief Swaps data with another %multimap.
+ * @param x A %multimap of the same element and allocator types.
+ *
+ * This exchanges the elements between two multimaps in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of
+ * the @c Compare type (which itself is often stateless and empty), so it
+ * should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(m1,m2) will feed to this function.
+ */
+ void
+ swap(multimap& __x)
+ { _M_t.swap(__x._M_t); }
+
+ /**
+ * Erases all elements in a %multimap. Note that this function only
+ * erases the elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibilty.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // observers
+ /**
+ * Returns the key comparison object out of which the %multimap
+ * was constructed.
+ */
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+
+ /**
+ * Returns a value comparison object, built from the key comparison
+ * object out of which the %multimap was constructed.
+ */
+ value_compare
+ value_comp() const
+ { return value_compare(_M_t.key_comp()); }
+
+ // multimap operations
+ /**
+ * @brief Tries to locate an element in a %multimap.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to sought-after element,
+ * or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after %pair. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Tries to locate an element in a %multimap.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to sought-after
+ * element, or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns a constant
+ * iterator pointing to the sought after %pair. If unsuccessful it
+ * returns the past-the-end ( @c end() ) iterator.
+ */
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Number of elements with specified key.
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.count(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first element
+ * equal to or greater than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful the iterator will point
+ * to the next greatest element or, if no such greater element exists, to
+ * end().
+ */
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first iterator
+ * greater than key, or end().
+ */
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ */
+ pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of read-only (constant) iterators that possibly points
+ * to the subsequence matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ */
+ pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template <typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator== (const multimap<_K1,_T1,_C1,_A1>&,
+ const multimap<_K1,_T1,_C1,_A1>&);
+
+ template <typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator< (const multimap<_K1,_T1,_C1,_A1>&,
+ const multimap<_K1,_T1,_C1,_A1>&);
};
-
-
+
/**
* @brief Multimap equality comparison.
* @param x A %multimap.
@@ -576,55 +619,53 @@ namespace std
inline bool
operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
- {
- return __x._M_t == __y._M_t;
- }
-
+ { return __x._M_t == __y._M_t; }
+
/**
* @brief Multimap ordering relation.
* @param x A %multimap.
* @param y A %multimap of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* multimaps. The elements must be comparable with @c <.
*
- * See std::lexographical_compare() for how the determination is made.
+ * See std::lexicographical_compare() for how the determination is made.
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
{ return __x._M_t < __y._M_t; }
-
+
/// Based on operator==
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator!=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
{ return !(__x < __y); }
-
+
/// See std::multimap::swap().
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline void
@@ -633,4 +674,4 @@ namespace std
{ __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_MULTIMAP_H */
+#endif /* _MULTIMAP_H */
diff --git a/contrib/libstdc++/include/bits/stl_multiset.h b/contrib/libstdc++/include/bits/stl_multiset.h
index 2bfc8f1..c82dee6 100644
--- a/contrib/libstdc++/include/bits/stl_multiset.h
+++ b/contrib/libstdc++/include/bits/stl_multiset.h
@@ -1,6 +1,6 @@
// Multiset implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,220 +58,528 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_MULTISET_H
-#define __GLIBCPP_INTERNAL_MULTISET_H
+#ifndef _MULTISET_H
+#define _MULTISET_H 1
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
-// Forward declaration of operators < and ==, needed for friend declaration.
-
-template <class _Key, class _Compare = less<_Key>,
- class _Alloc = allocator<_Key> >
-class multiset;
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y);
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y);
-
-template <class _Key, class _Compare, class _Alloc>
-class multiset
-{
- // concept requirements
- __glibcpp_class_requires(_Key, _SGIAssignableConcept)
- __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
-
-public:
-
- // typedefs:
-
- typedef _Key key_type;
- typedef _Key value_type;
- typedef _Compare key_compare;
- typedef _Compare value_compare;
-private:
- typedef _Rb_tree<key_type, value_type,
- _Identity<value_type>, key_compare, _Alloc> _Rep_type;
- _Rep_type _M_t; // red-black tree representing multiset
-public:
- typedef typename _Rep_type::const_pointer pointer;
- typedef typename _Rep_type::const_pointer const_pointer;
- typedef typename _Rep_type::const_reference reference;
- typedef typename _Rep_type::const_reference const_reference;
- typedef typename _Rep_type::const_iterator iterator;
- typedef typename _Rep_type::const_iterator const_iterator;
- typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
- typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
- typedef typename _Rep_type::size_type size_type;
- typedef typename _Rep_type::difference_type difference_type;
- typedef typename _Rep_type::allocator_type allocator_type;
-
- // allocation/deallocation
-
- multiset() : _M_t(_Compare(), allocator_type()) {}
- explicit multiset(const _Compare& __comp,
- const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a) {}
-
- template <class _InputIterator>
- multiset(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
- { _M_t.insert_equal(__first, __last); }
-
- template <class _InputIterator>
- multiset(_InputIterator __first, _InputIterator __last,
- const _Compare& __comp,
- const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-
- multiset(const multiset<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
-
- multiset<_Key,_Compare,_Alloc>&
- operator=(const multiset<_Key,_Compare,_Alloc>& __x) {
- _M_t = __x._M_t;
- return *this;
- }
-
- // accessors:
-
- key_compare key_comp() const { return _M_t.key_comp(); }
- value_compare value_comp() const { return _M_t.key_comp(); }
- allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
- iterator begin() const { return _M_t.begin(); }
- iterator end() const { return _M_t.end(); }
- reverse_iterator rbegin() const { return _M_t.rbegin(); }
- reverse_iterator rend() const { return _M_t.rend(); }
- bool empty() const { return _M_t.empty(); }
- size_type size() const { return _M_t.size(); }
- size_type max_size() const { return _M_t.max_size(); }
- void swap(multiset<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
- // insert/erase
- iterator insert(const value_type& __x) {
- return _M_t.insert_equal(__x);
- }
- iterator insert(iterator __position, const value_type& __x) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- return _M_t.insert_equal((_Rep_iterator&)__position, __x);
- }
-
- template <class _InputIterator>
- void insert(_InputIterator __first, _InputIterator __last) {
- _M_t.insert_equal(__first, __last);
- }
- void erase(iterator __position) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- _M_t.erase((_Rep_iterator&)__position);
- }
- size_type erase(const key_type& __x) {
- return _M_t.erase(__x);
- }
- void erase(iterator __first, iterator __last) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
- }
- void clear() { _M_t.clear(); }
-
- // multiset operations:
-
- size_type count(const key_type& __x) const { return _M_t.count(__x); }
-
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//214. set::find() missing const overload
- iterator find(const key_type& __x) { return _M_t.find(__x); }
- const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
- iterator lower_bound(const key_type& __x) {
- return _M_t.lower_bound(__x);
- }
- const_iterator lower_bound(const key_type& __x) const {
- return _M_t.lower_bound(__x);
- }
- iterator upper_bound(const key_type& __x) {
- return _M_t.upper_bound(__x);
- }
- const_iterator upper_bound(const key_type& __x) const {
- return _M_t.upper_bound(__x);
- }
- pair<iterator,iterator> equal_range(const key_type& __x) {
- return _M_t.equal_range(__x);
- }
- pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
- return _M_t.equal_range(__x);
- }
-#else
- iterator find(const key_type& __x) const { return _M_t.find(__x); }
- iterator lower_bound(const key_type& __x) const {
- return _M_t.lower_bound(__x);
- }
- iterator upper_bound(const key_type& __x) const {
- return _M_t.upper_bound(__x);
- }
- pair<iterator,iterator> equal_range(const key_type& __x) const {
- return _M_t.equal_range(__x);
- }
-#endif
-
- template <class _K1, class _C1, class _A1>
- friend bool operator== (const multiset<_K1,_C1,_A1>&,
- const multiset<_K1,_C1,_A1>&);
- template <class _K1, class _C1, class _A1>
- friend bool operator< (const multiset<_K1,_C1,_A1>&,
- const multiset<_K1,_C1,_A1>&);
-};
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return __x._M_t == __y._M_t;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return __x._M_t < __y._M_t;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator!=(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return !(__x == __y);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator>(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return __y < __x;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<=(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return !(__y < __x);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator>=(const multiset<_Key,_Compare,_Alloc>& __x,
- const multiset<_Key,_Compare,_Alloc>& __y) {
- return !(__x < __y);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline void swap(multiset<_Key,_Compare,_Alloc>& __x,
- multiset<_Key,_Compare,_Alloc>& __y) {
- __x.swap(__y);
-}
+ // Forward declaration of operators < and ==, needed for friend declaration.
+ template <class _Key, class _Compare = less<_Key>,
+ class _Alloc = allocator<_Key> >
+ class multiset;
+
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator==(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y);
+
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y);
+
+ /**
+ * @brief A standard container made up of elements, which can be retrieved
+ * in logarithmic time.
+ *
+ * @ingroup Containers
+ * @ingroup Assoc_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using equivalent
+ * keys). For a @c multiset<Key> the key_type and value_type are Key.
+ *
+ * Multisets support bidirectional iterators.
+ *
+ * @if maint
+ * The private tree data is declared exactly the same way for set and
+ * multiset; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ * @endif
+ */
+ template <class _Key, class _Compare, class _Alloc>
+ class multiset
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+
+ public:
+ // typedefs:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+
+ private:
+ /// @if maint This turns a red-black tree into a [multi]set. @endif
+ typedef _Rb_tree<key_type, value_type,
+ _Identity<value_type>, key_compare, _Alloc> _Rep_type;
+ /// @if maint The actual tree structure. @endif
+ _Rep_type _M_t;
+
+ public:
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 103. set::iterator is required to be modifiable,
+ // but this allows modification of keys.
+ typedef typename _Rep_type::const_iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+
+ // allocation/deallocation
+
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ multiset()
+ : _M_t(_Compare(), allocator_type()) { }
+
+ explicit
+ multiset(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+ /**
+ * @brief Builds a %multiset from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %multiset consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+
+ /**
+ * @brief Builds a %multiset from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multiset consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t.insert_equal(__first, __last); }
+
+ /**
+ * @brief %Multiset copy constructor.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The newly-created %multiset uses a copy of the allocation object used
+ * by @a x.
+ */
+ multiset(const multiset<_Key,_Compare,_Alloc>& __x)
+ : _M_t(__x._M_t) { }
+
+ /**
+ * @brief %Multiset assignment operator.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ multiset<_Key,_Compare,_Alloc>&
+ operator=(const multiset<_Key,_Compare,_Alloc>& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+
+ /// Returns the comparison object.
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the comparison object.
+ value_compare
+ value_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %multiset. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last element in
+ * the %multiset. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last element
+ * in the %multiset. Iteration is done in descending order according to
+ * the keys.
+ */
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last element
+ * in the %multiset. Iteration is done in descending order according to
+ * the keys.
+ */
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+ /// Returns true if the %set is empty.
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /// Returns the size of the %set.
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /// Returns the maximum size of the %set.
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ /**
+ * @brief Swaps data with another %multiset.
+ * @param x A %multiset of the same element and allocator types.
+ *
+ * This exchanges the elements between two multisets in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of the @c
+ * Compare type (which itself is often stateless and empty), so it should
+ * be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+ swap(multiset<_Key,_Compare,_Alloc>& __x)
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+ /**
+ * @brief Inserts an element into the %multiset.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the inserted element.
+ *
+ * This function inserts an element into the %multiset. Contrary
+ * to a std::set the %multiset does not rely on unique keys and thus
+ * multiple copies of the same element can be inserted.
+ *
+ * Insertion requires logarithmic time.
+ */
+ iterator
+ insert(const value_type& __x)
+ { return _M_t.insert_equal(__x); }
+
+ /**
+ * @brief Inserts an element into the %multiset.
+ * @param position An iterator that serves as a hint as to where the
+ * element should be inserted.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the inserted element.
+ *
+ * This function inserts an element into the %multiset. Contrary
+ * to a std::set the %multiset does not rely on unique keys and thus
+ * multiple copies of the same element can be inserted.
+ *
+ * Note that the first parameter is only a hint and can potentially
+ * improve the performance of the insertion process. A bad hint would
+ * cause no gains in efficiency.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_equal((_Rep_iterator&)__position, __x);
+ }
+
+ /**
+ * @brief A template function that attemps to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template <class _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_equal(__first, __last); }
+
+ /**
+ * @brief Erases an element from a %multiset.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %multiset. Note that this function only erases the element,
+ * and that if the element is itself a pointer, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibilty.
+ */
+ void
+ erase(iterator __position)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
+ }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all elements located by the given key from a
+ * %multiset.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %multiset.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %multiset.
+ * Note that this function only erases the elements, and that if
+ * the elements themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibilty.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
+ }
+
+ /**
+ * Erases all elements in a %multiset. Note that this function only
+ * erases the elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibilty.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // multiset operations:
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of elements to be located.
+ * @return Number of elements with specified key.
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.count(__x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ //@{
+ /**
+ * @brief Tries to locate an element in a %set.
+ * @param x Element to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after element. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multisets.
+ */
+ pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template <class _K1, class _C1, class _A1>
+ friend bool
+ operator== (const multiset<_K1,_C1,_A1>&,
+ const multiset<_K1,_C1,_A1>&);
+
+ template <class _K1, class _C1, class _A1>
+ friend bool
+ operator< (const multiset<_K1,_C1,_A1>&,
+ const multiset<_K1,_C1,_A1>&);
+ };
+
+ /**
+ * @brief Multiset equality comparison.
+ * @param x A %multiset.
+ * @param y A %multiset of the same type as @a x.
+ * @return True iff the size and elements of the multisets are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * multisets.
+ * Multisets are considered equivalent if their sizes are equal, and if
+ * corresponding elements compare equal.
+ */
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator==(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Multiset ordering relation.
+ * @param x A %multiset.
+ * @param y A %multiset of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * maps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Returns !(x == y).
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator!=(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Returns y < x.
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator>(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return __y < __x; }
+
+ /// Returns !(y < x)
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<=(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Returns !(x < y)
+ template <class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator>=(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::multiset::swap().
+ template <class _Key, class _Compare, class _Alloc>
+ inline void
+ swap(multiset<_Key,_Compare,_Alloc>& __x,
+ multiset<_Key,_Compare,_Alloc>& __y)
+ { __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_MULTISET_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _MULTISET_H */
diff --git a/contrib/libstdc++/include/bits/stl_numeric.h b/contrib/libstdc++/include/bits/stl_numeric.h
index 23f2bcc..58762a4 100644
--- a/contrib/libstdc++/include/bits/stl_numeric.h
+++ b/contrib/libstdc++/include/bits/stl_numeric.h
@@ -1,6 +1,6 @@
// Numeric functions implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,78 +58,153 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STL_NUMERIC_H
-#define _CPP_BITS_STL_NUMERIC_H 1
+#ifndef _STL_NUMERIC_H
+#define _STL_NUMERIC_H 1
+
+#include <debug/debug.h>
namespace std
{
+ /**
+ * @brief Accumulate values in a range.
+ *
+ * Accumulates the values in the range [first,last) using operator+(). The
+ * initial value is @a init. The values are processed in order.
+ *
+ * @param first Start of range.
+ * @param last End of range.
+ * @param init Starting value to add other values to.
+ * @return The final sum.
+ */
template<typename _InputIterator, typename _Tp>
_Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
__init = __init + *__first;
return __init;
}
+ /**
+ * @brief Accumulate values in a range with operation.
+ *
+ * Accumulates the values in the range [first,last) using the function
+ * object @a binary_op. The initial value is @a init. The values are
+ * processed in order.
+ *
+ * @param first Start of range.
+ * @param last End of range.
+ * @param init Starting value to add other values to.
+ * @param binary_op Function object to accumulate with.
+ * @return The final sum.
+ */
template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
_Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
_BinaryOperation __binary_op)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
for ( ; __first != __last; ++__first)
__init = __binary_op(__init, *__first);
return __init;
}
+ /**
+ * @brief Compute inner product of two ranges.
+ *
+ * Starting with an initial value of @a init, multiplies successive
+ * elements from the two ranges and adds each product into the accumulated
+ * value using operator+(). The values in the ranges are processed in
+ * order.
+ *
+ * @param first1 Start of range 1.
+ * @param last1 End of range 1.
+ * @param first2 Start of range 2.
+ * @param init Starting value to add other values to.
+ * @return The final inner product.
+ */
template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __init + (*__first1 * *__first2);
return __init;
}
+ /**
+ * @brief Compute inner product of two ranges.
+ *
+ * Starting with an initial value of @a init, applies @a binary_op2 to
+ * successive elements from the two ranges and accumulates each result into
+ * the accumulated value using @a binary_op1. The values in the ranges are
+ * processed in order.
+ *
+ * @param first1 Start of range 1.
+ * @param last1 End of range 1.
+ * @param first2 Start of range 2.
+ * @param init Starting value to add other values to.
+ * @param binary_op1 Function object to accumulate with.
+ * @param binary_op2 Function object to apply to pairs of input values.
+ * @return The final inner product.
+ */
template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
typename _BinaryOperation1, typename _BinaryOperation2>
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _Tp __init,
+ _InputIterator2 __first2, _Tp __init,
_BinaryOperation1 __binary_op1,
_BinaryOperation2 __binary_op2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
return __init;
}
+ /**
+ * @brief Return list of partial sums
+ *
+ * Accumulates the values in the range [first,last) using operator+().
+ * As each successive input value is added into the total, that partial sum
+ * is written to @a result. Therefore, the first value in result is the
+ * first value of the input, the second value in result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
template<typename _InputIterator, typename _OutputIterator>
- _OutputIterator
+ _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last) return __result;
*__result = *__first;
@@ -141,16 +216,31 @@ namespace std
return ++__result;
}
+ /**
+ * @brief Return list of partial sums
+ *
+ * Accumulates the values in the range [first,last) using operator+().
+ * As each successive input value is added into the total, that partial sum
+ * is written to @a result. Therefore, the first value in result is the
+ * first value of the input, the second value in result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation>
- _OutputIterator
+ _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOperation __binary_op)
{
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last) return __result;
*__result = *__first;
@@ -162,6 +252,17 @@ namespace std
return ++__result;
}
+ /**
+ * @brief Return differences between adjacent values.
+ *
+ * Computes the difference between adjacent values in the range
+ * [first,last) using operator-() and writes the result to @a result.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
template<typename _InputIterator, typename _OutputIterator>
_OutputIterator
adjacent_difference(_InputIterator __first,
@@ -170,8 +271,9 @@ namespace std
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last) return __result;
*__result = *__first;
@@ -184,16 +286,29 @@ namespace std
return ++__result;
}
+ /**
+ * @brief Return differences between adjacent values.
+ *
+ * Computes the difference between adjacent values in the range
+ * [first,last) using the function object @a binary_op and writes the
+ * result to @a result.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation>
- _OutputIterator
+ _OutputIterator
adjacent_difference(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOperation __binary_op)
{
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last) return __result;
*__result = *__first;
@@ -208,8 +323,4 @@ namespace std
} // namespace std
-#endif /* _CPP_BITS_STL_NUMERIC_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _STL_NUMERIC_H */
diff --git a/contrib/libstdc++/include/bits/stl_pair.h b/contrib/libstdc++/include/bits/stl_pair.h
index b0411b2..d5146bb 100644
--- a/contrib/libstdc++/include/bits/stl_pair.h
+++ b/contrib/libstdc++/include/bits/stl_pair.h
@@ -1,6 +1,6 @@
// Pair implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,100 +58,90 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_PAIR_H
-#define __GLIBCPP_INTERNAL_PAIR_H
+#ifndef _PAIR_H
+#define _PAIR_H 1
namespace std
{
-
-/// pair holds two objects of arbitrary type.
-template <class _T1, class _T2>
-struct pair {
- typedef _T1 first_type; ///< @c first_type is the first bound type
- typedef _T2 second_type; ///< @c second_type is the second bound type
-
- _T1 first; ///< @c first is a copy of the first object
- _T2 second; ///< @c second is a copy of the second object
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//265. std::pair::pair() effects overly restrictive
- /** The default constructor creates @c first and @c second using their
- * respective default constructors. */
- pair() : first(), second() {}
-#else
- pair() : first(_T1()), second(_T2()) {}
-#endif
- /** Two objects may be passed to a @c pair constructor to be copied. */
- pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
-
- /** There is also a templated copy ctor for the @c pair class itself. */
- template <class _U1, class _U2>
- pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
-};
-
-/// Two pairs of the same type are equal iff their members are equal.
-template <class _T1, class _T2>
-inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
-{
- return __x.first == __y.first && __x.second == __y.second;
-}
-
-/// <http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#pairlt>
-template <class _T1, class _T2>
-inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
-{
- return __x.first < __y.first ||
- (!(__y.first < __x.first) && __x.second < __y.second);
-}
-
-/// Uses @c operator== to find the result.
-template <class _T1, class _T2>
-inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
- return !(__x == __y);
-}
-
-/// Uses @c operator< to find the result.
-template <class _T1, class _T2>
-inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
- return __y < __x;
-}
-
-/// Uses @c operator< to find the result.
-template <class _T1, class _T2>
-inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
- return !(__y < __x);
-}
-
-/// Uses @c operator< to find the result.
-template <class _T1, class _T2>
-inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
- return !(__x < __y);
-}
-
-/**
- * @brief A convenience wrapper for creating a pair from two objects.
- * @param x The first object.
- * @param y The second object.
- * @return A newly-constructed pair<> object of the appropriate type.
- *
- * The standard requires that the objects be passed by reference-to-const,
- * but LWG issue #181 says they should be passed by const value. We follow
- * the LWG by default.
-*/
-template <class _T1, class _T2>
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//181. make_pair() unintended behavior
-inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y)
-#else
-inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y)
-#endif
-{
- return pair<_T1, _T2>(__x, __y);
-}
-
+ /// pair holds two objects of arbitrary type.
+ template<class _T1, class _T2>
+ struct pair
+ {
+ typedef _T1 first_type; ///< @c first_type is the first bound type
+ typedef _T2 second_type; ///< @c second_type is the second bound type
+
+ _T1 first; ///< @c first is a copy of the first object
+ _T2 second; ///< @c second is a copy of the second object
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 265. std::pair::pair() effects overly restrictive
+ /** The default constructor creates @c first and @c second using their
+ * respective default constructors. */
+ pair()
+ : first(), second() { }
+
+ /** Two objects may be passed to a @c pair constructor to be copied. */
+ pair(const _T1& __a, const _T2& __b)
+ : first(__a), second(__b) { }
+
+ /** There is also a templated copy ctor for the @c pair class itself. */
+ template<class _U1, class _U2>
+ pair(const pair<_U1, _U2>& __p)
+ : first(__p.first), second(__p.second) { }
+ };
+
+ /// Two pairs of the same type are equal iff their members are equal.
+ template<class _T1, class _T2>
+ inline bool
+ operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __x.first == __y.first && __x.second == __y.second; }
+
+ /// <http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#pairlt>
+ template<class _T1, class _T2>
+ inline bool
+ operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __x.first < __y.first
+ || (!(__y.first < __x.first) && __x.second < __y.second); }
+
+ /// Uses @c operator== to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x == __y); }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __y < __x; }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__y < __x); }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x < __y); }
+
+ /**
+ * @brief A convenience wrapper for creating a pair from two objects.
+ * @param x The first object.
+ * @param y The second object.
+ * @return A newly-constructed pair<> object of the appropriate type.
+ *
+ * The standard requires that the objects be passed by reference-to-const,
+ * but LWG issue #181 says they should be passed by const value. We follow
+ * the LWG by default.
+ */
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 181. make_pair() unintended behavior
+ template<class _T1, class _T2>
+ inline pair<_T1, _T2>
+ make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_PAIR_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _PAIR_H */
diff --git a/contrib/libstdc++/include/bits/stl_queue.h b/contrib/libstdc++/include/bits/stl_queue.h
index ff2ba26..3583547 100644
--- a/contrib/libstdc++/include/bits/stl_queue.h
+++ b/contrib/libstdc++/include/bits/stl_queue.h
@@ -1,6 +1,6 @@
// Queue implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,25 +58,26 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_QUEUE_H
-#define __GLIBCPP_INTERNAL_QUEUE_H
+#ifndef _QUEUE_H
+#define _QUEUE_H 1
#include <bits/concept_check.h>
+#include <debug/debug.h>
namespace std
{
// Forward declarations of operators < and ==, needed for friend declaration.
-
- template <typename _Tp, typename _Sequence = deque<_Tp> >
- class queue;
-
- template <typename _Tp, typename _Seq>
- inline bool operator==(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
-
- template <typename _Tp, typename _Seq>
- inline bool operator<(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
-
-
+ template<typename _Tp, typename _Sequence = deque<_Tp> >
+ class queue;
+
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator==(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
+
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
+
/**
* @brief A standard container giving FIFO behavior.
*
@@ -101,113 +102,138 @@ namespace std
* which is a typedef for the second Sequence parameter, and @c push and
* @c pop, which are standard %queue/FIFO operations.
*/
- template <typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Sequence>
class queue
- {
- // concept requirements
- typedef typename _Sequence::value_type _Sequence_value_type;
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires(_Sequence, _FrontInsertionSequenceConcept)
- __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
- __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
-
- template <typename _Tp1, typename _Seq1>
- friend bool operator== (const queue<_Tp1, _Seq1>&,
- const queue<_Tp1, _Seq1>&);
- template <typename _Tp1, typename _Seq1>
- friend bool operator< (const queue<_Tp1, _Seq1>&,
- const queue<_Tp1, _Seq1>&);
-
- public:
- typedef typename _Sequence::value_type value_type;
- typedef typename _Sequence::reference reference;
- typedef typename _Sequence::const_reference const_reference;
- typedef typename _Sequence::size_type size_type;
- typedef _Sequence container_type;
-
- protected:
- /**
- * 'c' is the underlying container. Maintainers wondering why this isn't
- * uglified as per style guidelines should note that this name is
- * specified in the standard, [23.2.3.1]. (Why? Presumably for the same
- * reason that it's protected instead of private: to allow derivation.
- * But none of the other containers allow for derivation. Odd.)
- */
- _Sequence c;
-
- public:
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- queue(const _Sequence& __c = _Sequence())
- : c(__c) {}
-
- /**
- * Returns true if the %queue is empty.
- */
- bool
- empty() const { return c.empty(); }
-
- /** Returns the number of elements in the %queue. */
- size_type
- size() const { return c.size(); }
-
- /**
- * Returns a read/write reference to the data at the first element of the
- * %queue.
- */
- reference
- front() { return c.front(); }
-
- /**
- * Returns a read-only (constant) reference to the data at the first
- * element of the %queue.
- */
- const_reference
- front() const { return c.front(); }
-
- /**
- * Returns a read/write reference to the data at the last element of the
- * %queue.
- */
- reference
- back() { return c.back(); }
-
- /**
- * Returns a read-only (constant) reference to the data at the last
- * element of the %queue.
- */
- const_reference
- back() const { return c.back(); }
-
- /**
- * @brief Add data to the end of the %queue.
- * @param x Data to be added.
- *
- * This is a typical %queue operation. The function creates an element at
- * the end of the %queue and assigns the given data to it.
- * The time complexity of the operation depends on the underlying
- * sequence.
- */
- void
- push(const value_type& __x) { c.push_back(__x); }
-
- /**
- * @brief Removes first element.
- *
- * This is a typical %queue operation. It shrinks the %queue by one.
- * The time complexity of the operation depends on the underlying
- * sequence.
- *
- * Note that no data is returned, and if the first element's data is
- * needed, it should be retrieved before pop() is called.
- */
- void
- pop() { c.pop_front(); }
- };
-
-
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept)
+ __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ /**
+ * 'c' is the underlying container. Maintainers wondering why
+ * this isn't uglified as per style guidelines should note that
+ * this name is specified in the standard, [23.2.3.1]. (Why?
+ * Presumably for the same reason that it's protected instead
+ * of private: to allow derivation. But none of the other
+ * containers allow for derivation. Odd.)
+ */
+ _Sequence c;
+
+ public:
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ queue(const _Sequence& __c = _Sequence()) : c(__c) {}
+
+ /**
+ * Returns true if the %queue is empty.
+ */
+ bool
+ empty() const
+ { return c.empty(); }
+
+ /** Returns the number of elements in the %queue. */
+ size_type
+ size() const
+ { return c.size(); }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %queue.
+ */
+ reference
+ front()
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %queue.
+ */
+ const_reference
+ front() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
+ }
+
+ /**
+ * Returns a read/write reference to the data at the last
+ * element of the %queue.
+ */
+ reference
+ back()
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %queue.
+ */
+ const_reference
+ back() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * @brief Add data to the end of the %queue.
+ * @param x Data to be added.
+ *
+ * This is a typical %queue operation. The function creates an
+ * element at the end of the %queue and assigns the given data
+ * to it. The time complexity of the operation depends on the
+ * underlying sequence.
+ */
+ void
+ push(const value_type& __x)
+ { c.push_back(__x); }
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %queue operation. It shrinks the %queue by one.
+ * The time complexity of the operation depends on the underlying
+ * sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ c.pop_front();
+ }
+ };
+
+
/**
* @brief Queue equality comparison.
* @param x A %queue.
@@ -219,212 +245,228 @@ namespace std
* linear in the size of the sequences, and queues are considered equivalent
* if their sequences compare equal.
*/
- template <typename _Tp, typename _Sequence>
- inline bool
- operator==(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ template<typename _Tp, typename _Sequence>
+ inline bool
+ operator==(const queue<_Tp,_Sequence>& __x,
+ const queue<_Tp,_Sequence>& __y)
{ return __x.c == __y.c; }
-
+
/**
* @brief Queue ordering relation.
* @param x A %queue.
* @param y A %queue of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
- * This is an total ordering relation. Complexity and semantics depend on
- * the underlying sequence type, but the expected rules are: this relation
- * is linear in the size of the sequences, the elements must be comparable
- * with @c <, and std::lexographical_compare() is usually used to make the
+ * This is an total ordering relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, the
+ * elements must be comparable with @c <, and
+ * std::lexicographical_compare() is usually used to make the
* determination.
*/
- template <typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Sequence>
inline bool
operator<(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
{ return __x.c < __y.c; }
-
+
/// Based on operator==
- template <typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Sequence>
inline bool
- operator!=(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ operator!=(const queue<_Tp,_Sequence>& __x,
+ const queue<_Tp,_Sequence>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
- template <typename _Tp, typename _Sequence>
- inline bool
+ template<typename _Tp, typename _Sequence>
+ inline bool
operator>(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
- template <typename _Tp, typename _Sequence>
- inline bool
- operator<=(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ template<typename _Tp, typename _Sequence>
+ inline bool
+ operator<=(const queue<_Tp,_Sequence>& __x,
+ const queue<_Tp,_Sequence>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
- template <typename _Tp, typename _Sequence>
- inline bool
- operator>=(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ template<typename _Tp, typename _Sequence>
+ inline bool
+ operator>=(const queue<_Tp,_Sequence>& __x,
+ const queue<_Tp,_Sequence>& __y)
{ return !(__x < __y); }
-
-
+
/**
* @brief A standard container automatically sorting its contents.
*
* @ingroup Containers
* @ingroup Sequences
*
- * This is not a true container, but an @e adaptor. It holds another
- * container, and provides a wrapper interface to that container. The
- * wrapper is what enforces sorting and first-in-first-out %queue behavior.
- * Very few of the standard container/sequence interface requirements are
- * met (e.g., iterators).
+ * This is not a true container, but an @e adaptor. It holds
+ * another container, and provides a wrapper interface to that
+ * container. The wrapper is what enforces sorting and
+ * first-in-first-out %queue behavior. Very few of the standard
+ * container/sequence interface requirements are met (e.g.,
+ * iterators).
*
* The second template parameter defines the type of the underlying
- * sequence/container. It defaults to std::vector, but it can be any type
- * that supports @c front(), @c push_back, @c pop_back, and random-access
- * iterators, such as std::deque or an appropriate user-defined type.
+ * sequence/container. It defaults to std::vector, but it can be
+ * any type that supports @c front(), @c push_back, @c pop_back,
+ * and random-access iterators, such as std::deque or an
+ * appropriate user-defined type.
*
- * The third template parameter supplies the means of making priority
- * comparisons. It defaults to @c less<value_type> but can be anything
- * defining a strict weak ordering.
+ * The third template parameter supplies the means of making
+ * priority comparisons. It defaults to @c less<value_type> but
+ * can be anything defining a strict weak ordering.
*
* Members not found in "normal" containers are @c container_type,
- * which is a typedef for the second Sequence parameter, and @c push,
- * @c pop, and @c top, which are standard %queue/FIFO operations.
+ * which is a typedef for the second Sequence parameter, and @c
+ * push, @c pop, and @c top, which are standard %queue/FIFO
+ * operations.
*
- * @note No equality/comparison operators are provided for %priority_queue.
+ * @note No equality/comparison operators are provided for
+ * %priority_queue.
*
- * @note Sorting of the elements takes place as they are added to, and
- * removed from, the %priority_queue using the %priority_queue's
- * member functions. If you access the elements by other means, and
- * change their data such that the sorting order would be different,
- * the %priority_queue will not re-sort the elements for you. (How
- * could it know to do so?)
+ * @note Sorting of the elements takes place as they are added to,
+ * and removed from, the %priority_queue using the
+ * %priority_queue's member functions. If you access the elements
+ * by other means, and change their data such that the sorting
+ * order would be different, the %priority_queue will not re-sort
+ * the elements for you. (How could it know to do so?)
*/
- template <typename _Tp, typename _Sequence = vector<_Tp>,
- typename _Compare = less<typename _Sequence::value_type> >
+ template<typename _Tp, typename _Sequence = vector<_Tp>,
+ typename _Compare = less<typename _Sequence::value_type> >
class priority_queue
- {
- // concept requirements
- typedef typename _Sequence::value_type _Sequence_value_type;
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires(_Sequence, _SequenceConcept)
- __glibcpp_class_requires(_Sequence, _RandomAccessContainerConcept)
- __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
- __glibcpp_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept)
-
- public:
- typedef typename _Sequence::value_type value_type;
- typedef typename _Sequence::reference reference;
- typedef typename _Sequence::const_reference const_reference;
- typedef typename _Sequence::size_type size_type;
- typedef _Sequence container_type;
-
- protected:
- // See queue::c for notes on these names.
- _Sequence c;
- _Compare comp;
-
- public:
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- priority_queue(const _Compare& __x = _Compare(),
- const _Sequence& __s = _Sequence())
- : c(__s), comp(__x)
- { make_heap(c.begin(), c.end(), comp); }
-
- /**
- * @brief Builds a %queue from a range.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param x A comparison functor describing a strict weak ordering.
- * @param s An initial sequence with which to start.
- *
- * Begins by copying @a s, inserting a copy of the elements from
- * @a [first,last) into the copy of @a s, then ordering the copy
- * according to @a x.
- *
- * For more information on function objects, see the documentation on
- * @link s20_3_1_base functor base classes@endlink.
- */
- template <typename _InputIterator>
- priority_queue(_InputIterator __first, _InputIterator __last,
- const _Compare& __x = _Compare(),
- const _Sequence& __s = _Sequence())
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _SequenceConcept)
+ __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Tp,_Tp,_BinaryFunctionConcept)
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ // See queue::c for notes on these names.
+ _Sequence c;
+ _Compare comp;
+
+ public:
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ priority_queue(const _Compare& __x = _Compare(),
+ const _Sequence& __s = _Sequence())
: c(__s), comp(__x)
- {
- c.insert(c.end(), __first, __last);
- make_heap(c.begin(), c.end(), comp);
+ { std::make_heap(c.begin(), c.end(), comp); }
+
+ /**
+ * @brief Builds a %queue from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param x A comparison functor describing a strict weak ordering.
+ * @param s An initial sequence with which to start.
+ *
+ * Begins by copying @a s, inserting a copy of the elements
+ * from @a [first,last) into the copy of @a s, then ordering
+ * the copy according to @a x.
+ *
+ * For more information on function objects, see the
+ * documentation on @link s20_3_1_base functor base
+ * classes@endlink.
+ */
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x = _Compare(),
+ const _Sequence& __s = _Sequence())
+ : c(__s), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+
+ /**
+ * Returns true if the %queue is empty.
+ */
+ bool
+ empty() const { return c.empty(); }
+
+ /** Returns the number of elements in the %queue. */
+ size_type
+ size() const { return c.size(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %queue.
+ */
+ const_reference
+ top() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
}
-
- /**
- * Returns true if the %queue is empty.
- */
- bool
- empty() const { return c.empty(); }
-
- /** Returns the number of elements in the %queue. */
- size_type
- size() const { return c.size(); }
-
- /**
- * Returns a read-only (constant) reference to the data at the first
- * element of the %queue.
- */
- const_reference
- top() const { return c.front(); }
-
- /**
- * @brief Add data to the %queue.
- * @param x Data to be added.
- *
- * This is a typical %queue operation.
- * The time complexity of the operation depends on the underlying
- * sequence.
- */
- void
- push(const value_type& __x)
- {
- try
+
+ /**
+ * @brief Add data to the %queue.
+ * @param x Data to be added.
+ *
+ * This is a typical %queue operation.
+ * The time complexity of the operation depends on the underlying
+ * sequence.
+ */
+ void
+ push(const value_type& __x)
+ {
+ try
{
- c.push_back(__x);
- push_heap(c.begin(), c.end(), comp);
+ c.push_back(__x);
+ std::push_heap(c.begin(), c.end(), comp);
}
- catch(...)
+ catch(...)
{
c.clear();
- __throw_exception_again;
+ __throw_exception_again;
}
- }
-
- /**
- * @brief Removes first element.
- *
- * This is a typical %queue operation. It shrinks the %queue by one.
- * The time complexity of the operation depends on the underlying
- * sequence.
- *
- * Note that no data is returned, and if the first element's data is
- * needed, it should be retrieved before pop() is called.
- */
- void
- pop()
- {
- try
+ }
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %queue operation. It shrinks the %queue
+ * by one. The time complexity of the operation depends on the
+ * underlying sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ try
{
- pop_heap(c.begin(), c.end(), comp);
+ std::pop_heap(c.begin(), c.end(), comp);
c.pop_back();
}
- catch(...)
+ catch(...)
{
c.clear();
- __throw_exception_again;
+ __throw_exception_again;
}
- }
- };
-
+ }
+ };
+
// No equality/comparison operators are provided for priority_queue.
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_QUEUE_H */
+#endif /* _QUEUE_H */
diff --git a/contrib/libstdc++/include/bits/stl_raw_storage_iter.h b/contrib/libstdc++/include/bits/stl_raw_storage_iter.h
index 59aa004..732142e 100644
--- a/contrib/libstdc++/include/bits/stl_raw_storage_iter.h
+++ b/contrib/libstdc++/include/bits/stl_raw_storage_iter.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H
-#define _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H 1
+#ifndef _STL_RAW_STORAGE_ITERATOR_H
+#define _STL_RAW_STORAGE_ITERATOR_H 1
namespace std
{
@@ -68,35 +68,36 @@ namespace std
* uninitialized memory.
*/
template <class _ForwardIterator, class _Tp>
- class raw_storage_iterator
+ class raw_storage_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_ForwardIterator _M_iter;
public:
- explicit
- raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
+ explicit
+ raw_storage_iterator(_ForwardIterator __x)
+ : _M_iter(__x) {}
- raw_storage_iterator&
+ raw_storage_iterator&
operator*() { return *this; }
- raw_storage_iterator&
- operator=(const _Tp& __element)
+ raw_storage_iterator&
+ operator=(const _Tp& __element)
{
- _Construct(&*_M_iter, __element);
+ std::_Construct(&*_M_iter, __element);
return *this;
- }
+ }
- raw_storage_iterator<_ForwardIterator, _Tp>&
- operator++()
+ raw_storage_iterator<_ForwardIterator, _Tp>&
+ operator++()
{
++_M_iter;
return *this;
}
- raw_storage_iterator<_ForwardIterator, _Tp>
- operator++(int)
+ raw_storage_iterator<_ForwardIterator, _Tp>
+ operator++(int)
{
raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
++_M_iter;
diff --git a/contrib/libstdc++/include/bits/stl_relops.h b/contrib/libstdc++/include/bits/stl_relops.h
index ce3dc0b..3e9f060 100644
--- a/contrib/libstdc++/include/bits/stl_relops.h
+++ b/contrib/libstdc++/include/bits/stl_relops.h
@@ -1,6 +1,6 @@
// std::rel_ops implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -68,74 +68,70 @@
* @endif
*/
-#ifndef _CPP_BITS_STL_RELOPS_H
-#define _CPP_BITS_STL_RELOPS_H 1
+#ifndef _STL_RELOPS_H
+#define _STL_RELOPS_H 1
namespace std
{
namespace rel_ops
{
- /** @namespace std::rel_ops
- * @brief The generated relational operators are sequestered here.
- */
+ /** @namespace std::rel_ops
+ * @brief The generated relational operators are sequestered here.
+ */
-/**
- * @brief Defines @c != for arbitrary types, in terms of @c ==.
- * @param x A thing.
- * @param y Another thing.
- * @return x != y
- *
- * This function uses @c == to determine its result.
-*/
-template <class _Tp>
-inline bool operator!=(const _Tp& __x, const _Tp& __y) {
- return !(__x == __y);
-}
+ /**
+ * @brief Defines @c != for arbitrary types, in terms of @c ==.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x != y
+ *
+ * This function uses @c == to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator!=(const _Tp& __x, const _Tp& __y)
+ { return !(__x == __y); }
-/**
- * @brief Defines @c > for arbitrary types, in terms of @c <.
- * @param x A thing.
- * @param y Another thing.
- * @return x > y
- *
- * This function uses @c < to determine its result.
-*/
-template <class _Tp>
-inline bool operator>(const _Tp& __x, const _Tp& __y) {
- return __y < __x;
-}
+ /**
+ * @brief Defines @c > for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x > y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator>(const _Tp& __x, const _Tp& __y)
+ { return __y < __x; }
-/**
- * @brief Defines @c <= for arbitrary types, in terms of @c <.
- * @param x A thing.
- * @param y Another thing.
- * @return x <= y
- *
- * This function uses @c < to determine its result.
-*/
-template <class _Tp>
-inline bool operator<=(const _Tp& __x, const _Tp& __y) {
- return !(__y < __x);
-}
+ /**
+ * @brief Defines @c <= for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x <= y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator<=(const _Tp& __x, const _Tp& __y)
+ { return !(__y < __x); }
-/**
- * @brief Defines @c >= for arbitrary types, in terms of @c <.
- * @param x A thing.
- * @param y Another thing.
- * @return x >= y
- *
- * This function uses @c < to determine its result.
-*/
-template <class _Tp>
-inline bool operator>=(const _Tp& __x, const _Tp& __y) {
- return !(__x < __y);
-}
+ /**
+ * @brief Defines @c >= for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x >= y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator>=(const _Tp& __x, const _Tp& __y)
+ { return !(__x < __y); }
} // namespace rel_ops
} // namespace std
-#endif /* _CPP_BITS_STL_RELOPS_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _STL_RELOPS_H */
diff --git a/contrib/libstdc++/include/bits/stl_set.h b/contrib/libstdc++/include/bits/stl_set.h
index ee708c2..bb28bdd 100644
--- a/contrib/libstdc++/include/bits/stl_set.h
+++ b/contrib/libstdc++/include/bits/stl_set.h
@@ -1,6 +1,6 @@
// Set implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,217 +58,536 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_SET_H
-#define __GLIBCPP_INTERNAL_SET_H
+#ifndef _SET_H
+#define _SET_H 1
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
-
-// Forward declarations of operators < and ==, needed for friend declaration.
-
-template <class _Key, class _Compare = less<_Key>,
- class _Alloc = allocator<_Key> >
-class set;
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator==(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y);
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y);
-
-
-template <class _Key, class _Compare, class _Alloc>
-class set
-{
- // concept requirements
- __glibcpp_class_requires(_Key, _SGIAssignableConcept)
- __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
-
-public:
- // typedefs:
- typedef _Key key_type;
- typedef _Key value_type;
- typedef _Compare key_compare;
- typedef _Compare value_compare;
-private:
- typedef _Rb_tree<key_type, value_type,
- _Identity<value_type>, key_compare, _Alloc> _Rep_type;
- _Rep_type _M_t; // red-black tree representing set
-public:
- typedef typename _Rep_type::const_pointer pointer;
- typedef typename _Rep_type::const_pointer const_pointer;
- typedef typename _Rep_type::const_reference reference;
- typedef typename _Rep_type::const_reference const_reference;
- typedef typename _Rep_type::const_iterator iterator;
- typedef typename _Rep_type::const_iterator const_iterator;
- typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
- typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
- typedef typename _Rep_type::size_type size_type;
- typedef typename _Rep_type::difference_type difference_type;
- typedef typename _Rep_type::allocator_type allocator_type;
-
- // allocation/deallocation
-
- set() : _M_t(_Compare(), allocator_type()) {}
- explicit set(const _Compare& __comp,
- const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a) {}
-
- template <class _InputIterator>
- set(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
- { _M_t.insert_unique(__first, __last); }
-
- template <class _InputIterator>
- set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
- const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-
- set(const set<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
- set<_Key,_Compare,_Alloc>& operator=(const set<_Key, _Compare, _Alloc>& __x)
- {
- _M_t = __x._M_t;
- return *this;
- }
-
- // accessors:
-
- key_compare key_comp() const { return _M_t.key_comp(); }
- value_compare value_comp() const { return _M_t.key_comp(); }
- allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
- iterator begin() const { return _M_t.begin(); }
- iterator end() const { return _M_t.end(); }
- reverse_iterator rbegin() const { return _M_t.rbegin(); }
- reverse_iterator rend() const { return _M_t.rend(); }
- bool empty() const { return _M_t.empty(); }
- size_type size() const { return _M_t.size(); }
- size_type max_size() const { return _M_t.max_size(); }
- void swap(set<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
- // insert/erase
- pair<iterator,bool> insert(const value_type& __x) {
- pair<typename _Rep_type::iterator, bool> __p = _M_t.insert_unique(__x);
- return pair<iterator, bool>(__p.first, __p.second);
- }
- iterator insert(iterator __position, const value_type& __x) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- return _M_t.insert_unique((_Rep_iterator&)__position, __x);
- }
- template <class _InputIterator>
- void insert(_InputIterator __first, _InputIterator __last) {
- _M_t.insert_unique(__first, __last);
- }
- void erase(iterator __position) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- _M_t.erase((_Rep_iterator&)__position);
- }
- size_type erase(const key_type& __x) {
- return _M_t.erase(__x);
- }
- void erase(iterator __first, iterator __last) {
- typedef typename _Rep_type::iterator _Rep_iterator;
- _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
- }
- void clear() { _M_t.clear(); }
-
- // set operations:
-
- size_type count(const key_type& __x) const {
- return _M_t.find(__x) == _M_t.end() ? 0 : 1;
- }
-
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-//214. set::find() missing const overload
- iterator find(const key_type& __x) { return _M_t.find(__x); }
- const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
- iterator lower_bound(const key_type& __x) {
- return _M_t.lower_bound(__x);
- }
- const_iterator lower_bound(const key_type& __x) const {
- return _M_t.lower_bound(__x);
- }
- iterator upper_bound(const key_type& __x) {
- return _M_t.upper_bound(__x);
- }
- const_iterator upper_bound(const key_type& __x) const {
- return _M_t.upper_bound(__x);
- }
- pair<iterator,iterator> equal_range(const key_type& __x) {
- return _M_t.equal_range(__x);
- }
- pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
- return _M_t.equal_range(__x);
- }
-#else
- iterator find(const key_type& __x) const { return _M_t.find(__x); }
- iterator lower_bound(const key_type& __x) const {
- return _M_t.lower_bound(__x);
- }
- iterator upper_bound(const key_type& __x) const {
- return _M_t.upper_bound(__x);
- }
- pair<iterator,iterator> equal_range(const key_type& __x) const {
- return _M_t.equal_range(__x);
- }
-#endif
-
- template <class _K1, class _C1, class _A1>
- friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
- template <class _K1, class _C1, class _A1>
- friend bool operator< (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
-};
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator==(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return __x._M_t == __y._M_t;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return __x._M_t < __y._M_t;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator!=(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return !(__x == __y);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator>(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return __y < __x;
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator<=(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return !(__y < __x);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline bool operator>=(const set<_Key,_Compare,_Alloc>& __x,
- const set<_Key,_Compare,_Alloc>& __y) {
- return !(__x < __y);
-}
-
-template <class _Key, class _Compare, class _Alloc>
-inline void swap(set<_Key,_Compare,_Alloc>& __x,
- set<_Key,_Compare,_Alloc>& __y) {
- __x.swap(__y);
-}
+ // Forward declarations of operators < and ==, needed for friend declaration.
+ template<class _Key, class _Compare = less<_Key>,
+ class _Alloc = allocator<_Key> >
+ class set;
+
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator==(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y);
+
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y);
+
+ /**
+ * @brief A standard container made up of unique keys, which can be
+ * retrieved in logarithmic time.
+ *
+ * @ingroup Containers
+ * @ingroup Assoc_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using unique keys).
+ *
+ * Sets support bidirectional iterators.
+ *
+ * @param Key Type of key objects.
+ * @param Compare Comparison function object type, defaults to less<Key>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ *
+ * @if maint
+ * The private tree data is declared exactly the same way for set and
+ * multiset; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ * @endif
+ */
+ template<class _Key, class _Compare, class _Alloc>
+ class set
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+
+ public:
+ // typedefs:
+ //@{
+ /// Public typedefs.
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ //@}
+
+ private:
+ typedef _Rb_tree<key_type, value_type,
+ _Identity<value_type>, key_compare, _Alloc> _Rep_type;
+ _Rep_type _M_t; // red-black tree representing set
+ public:
+ //@{
+ /// Iterator-related typedefs.
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 103. set::iterator is required to be modifiable,
+ // but this allows modification of keys.
+ typedef typename _Rep_type::const_iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+ //@}
+
+ // allocation/deallocation
+ /// Default constructor creates no elements.
+ set()
+ : _M_t(_Compare(), allocator_type()) {}
+
+ /**
+ * @brief Default constructor creates no elements.
+ *
+ * @param comp Comparator to use.
+ * @param a Allocator to use.
+ */
+ explicit set(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) {}
+
+ /**
+ * @brief Builds a %set from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %set consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ /**
+ * @brief Builds a %set from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %set consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t.insert_unique(__first, __last); }
+
+ /**
+ * @brief Set copy constructor.
+ * @param x A %set of identical element and allocator types.
+ *
+ * The newly-created %set uses a copy of the allocation object used
+ * by @a x.
+ */
+ set(const set<_Key,_Compare,_Alloc>& __x)
+ : _M_t(__x._M_t) { }
+
+ /**
+ * @brief Set assignment operator.
+ * @param x A %set of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ set<_Key,_Compare,_Alloc>&
+ operator=(const set<_Key, _Compare, _Alloc>& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+
+ /// Returns the comparison object with which the %set was constructed.
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the comparison object with which the %set was constructed.
+ value_compare
+ value_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the allocator object with which the %set was constructed.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %set. Iteration is done in ascending order according to the keys.
+ */
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last element in
+ * the %set. Iteration is done in ascending order according to the keys.
+ */
+ iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last element
+ * in the %set. Iteration is done in descending order according to the
+ * keys.
+ */
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+ /// Returns true if the %set is empty.
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /// Returns the size of the %set.
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /// Returns the maximum size of the %set.
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ /**
+ * @brief Swaps data with another %set.
+ * @param x A %set of the same element and allocator types.
+ *
+ * This exchanges the elements between two sets in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of
+ * the @c Compare type (which itself is often stateless and empty), so it
+ * should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+ swap(set<_Key,_Compare,_Alloc>& __x)
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+ /**
+ * @brief Attempts to insert an element into the %set.
+ * @param x Element to be inserted.
+ * @return A pair, of which the first element is an iterator that points
+ * to the possibly inserted element, and the second is a bool
+ * that is true if the element was actually inserted.
+ *
+ * This function attempts to insert an element into the %set. A %set
+ * relies on unique keys and thus an element is only inserted if it is
+ * not already present in the %set.
+ *
+ * Insertion requires logarithmic time.
+ */
+ pair<iterator,bool>
+ insert(const value_type& __x)
+ {
+ pair<typename _Rep_type::iterator, bool> __p = _M_t.insert_unique(__x);
+ return pair<iterator, bool>(__p.first, __p.second);
+ }
+
+ /**
+ * @brief Attempts to insert an element into the %set.
+ * @param position An iterator that serves as a hint as to where the
+ * element should be inserted.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the element with key of @a x (may
+ * or may not be the element passed in).
+ *
+ * This function is not concerned about whether the insertion took place,
+ * and thus does not return a boolean like the single-argument insert()
+ * does. Note that the first parameter is only a hint and can
+ * potentially improve the performance of the insertion process. A bad
+ * hint would cause no gains in efficiency.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_unique((_Rep_iterator&)__position, __x);
+ }
+
+ /**
+ * @brief A template function that attemps to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_unique(__first, __last); }
+
+ /**
+ * @brief Erases an element from a %set.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %set. Note that this function only erases the element, and
+ * that if the element is itself a pointer, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibilty.
+ */
+ void
+ erase(iterator __position)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
+ }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all the elements located by the given key from
+ * a %set.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
+ size_type
+ erase(const key_type& __x) { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %set.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %set.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibilty.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ {
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
+ }
+
+ /**
+ * Erases all elements in a %set. Note that this function only erases
+ * the elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibilty.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // set operations:
+
+ /**
+ * @brief Finds the number of elements.
+ * @param x Element to located.
+ * @return Number of elements with specified key.
+ *
+ * This function only makes sense for multisets; for set the result will
+ * either be 0 (not present) or 1 (present).
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ //@{
+ /**
+ * @brief Tries to locate an element in a %set.
+ * @param x Element to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after element. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multisets.
+ */
+ pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+ //@}
+
+ template<class _K1, class _C1, class _A1>
+ friend bool
+ operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
+
+ template<class _K1, class _C1, class _A1>
+ friend bool
+ operator< (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
+ };
+
+
+ /**
+ * @brief Set equality comparison.
+ * @param x A %set.
+ * @param y A %set of the same type as @a x.
+ * @return True iff the size and elements of the sets are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the sets.
+ * Sets are considered equivalent if their sizes are equal, and if
+ * corresponding elements compare equal.
+ */
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator==(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Set ordering relation.
+ * @param x A %set.
+ * @param y A %set of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * maps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Returns !(x == y).
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator!=(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Returns y < x.
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator>(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return __y < __x; }
+
+ /// Returns !(y < x)
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator<=(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Returns !(x < y)
+ template<class _Key, class _Compare, class _Alloc>
+ inline bool
+ operator>=(const set<_Key,_Compare,_Alloc>& __x,
+ const set<_Key,_Compare,_Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::set::swap().
+ template<class _Key, class _Compare, class _Alloc>
+ inline void
+ swap(set<_Key,_Compare,_Alloc>& __x, set<_Key,_Compare,_Alloc>& __y)
+ { __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _SET_H */
diff --git a/contrib/libstdc++/include/bits/stl_stack.h b/contrib/libstdc++/include/bits/stl_stack.h
index 7f2496c..ada50ee 100644
--- a/contrib/libstdc++/include/bits/stl_stack.h
+++ b/contrib/libstdc++/include/bits/stl_stack.h
@@ -1,6 +1,6 @@
// Stack implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,26 +58,27 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_STACK_H
-#define __GLIBCPP_INTERNAL_STACK_H
+#ifndef _STACK_H
+#define _STACK_H 1
#include <bits/concept_check.h>
+#include <debug/debug.h>
namespace std
{
- // Forward declarations of operators == and <, needed for friend declaration.
-
- template <typename _Tp, typename _Sequence = deque<_Tp> >
- class stack;
-
- template <typename _Tp, typename _Seq>
- inline bool operator==(const stack<_Tp,_Seq>& __x,
- const stack<_Tp,_Seq>& __y);
-
- template <typename _Tp, typename _Seq>
- inline bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
-
-
+ // Forward declarations of operators == and <, needed for friend
+ // declaration.
+ template<typename _Tp, typename _Sequence = deque<_Tp> >
+ class stack;
+
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+
/**
* @brief A standard container giving FILO behavior.
*
@@ -89,162 +90,183 @@ namespace std
* but does not define anything to do with iterators. Very few of the
* other standard container interfaces are defined.
*
- * This is not a true container, but an @e adaptor. It holds another
- * container, and provides a wrapper interface to that container. The
- * wrapper is what enforces strict first-in-last-out %stack behavior.
+ * This is not a true container, but an @e adaptor. It holds
+ * another container, and provides a wrapper interface to that
+ * container. The wrapper is what enforces strict
+ * first-in-last-out %stack behavior.
*
* The second template parameter defines the type of the underlying
- * sequence/container. It defaults to std::deque, but it can be any type
- * that supports @c back, @c push_back, and @c pop_front, such as
- * std::list, std::vector, or an appropriate user-defined type.
+ * sequence/container. It defaults to std::deque, but it can be
+ * any type that supports @c back, @c push_back, and @c pop_front,
+ * such as std::list, std::vector, or an appropriate user-defined
+ * type.
*
* Members not found in "normal" containers are @c container_type,
- * which is a typedef for the second Sequence parameter, and @c push,
- * @c pop, and @c top, which are standard %stack/FILO operations.
+ * which is a typedef for the second Sequence parameter, and @c
+ * push, @c pop, and @c top, which are standard %stack/FILO
+ * operations.
*/
- template <typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Sequence>
class stack
- {
- // concept requirements
- typedef typename _Sequence::value_type _Sequence_value_type;
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
- __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
-
- template <typename _Tp1, typename _Seq1>
- friend bool operator== (const stack<_Tp1, _Seq1>&,
- const stack<_Tp1, _Seq1>&);
- template <typename _Tp1, typename _Seq1>
- friend bool operator< (const stack<_Tp1, _Seq1>&,
- const stack<_Tp1, _Seq1>&);
-
- public:
- typedef typename _Sequence::value_type value_type;
- typedef typename _Sequence::reference reference;
- typedef typename _Sequence::const_reference const_reference;
- typedef typename _Sequence::size_type size_type;
- typedef _Sequence container_type;
-
- protected:
- // See queue::c for notes on this name.
- _Sequence c;
-
- public:
- // XXX removed old def ctor, added def arg to this one to match 14882
- /**
- * @brief Default constructor creates no elements.
- */
- explicit
- stack(const _Sequence& __c = _Sequence())
- : c(__c) {}
-
- /**
- * Returns true if the %stack is empty.
- */
- bool
- empty() const { return c.empty(); }
-
- /** Returns the number of elements in the %stack. */
- size_type
- size() const { return c.size(); }
-
- /**
- * Returns a read/write reference to the data at the first element of the
- * %stack.
- */
- reference
- top() { return c.back(); }
-
- /**
- * Returns a read-only (constant) reference to the data at the first
- * element of the %stack.
- */
- const_reference
- top() const { return c.back(); }
-
- /**
- * @brief Add data to the top of the %stack.
- * @param x Data to be added.
- *
- * This is a typical %stack operation. The function creates an element at
- * the top of the %stack and assigns the given data to it.
- * The time complexity of the operation depends on the underlying
- * sequence.
- */
- void
- push(const value_type& __x) { c.push_back(__x); }
-
- /**
- * @brief Removes first element.
- *
- * This is a typical %stack operation. It shrinks the %stack by one.
- * The time complexity of the operation depends on the underlying
- * sequence.
- *
- * Note that no data is returned, and if the first element's data is
- * needed, it should be retrieved before pop() is called.
- */
- void
- pop() { c.pop_back(); }
- };
-
-
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ // See queue::c for notes on this name.
+ _Sequence c;
+
+ public:
+ // XXX removed old def ctor, added def arg to this one to match 14882
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ explicit
+ stack(const _Sequence& __c = _Sequence())
+ : c(__c) {}
+
+ /**
+ * Returns true if the %stack is empty.
+ */
+ bool
+ empty() const
+ { return c.empty(); }
+
+ /** Returns the number of elements in the %stack. */
+ size_type
+ size() const
+ { return c.size(); }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %stack.
+ */
+ reference
+ top()
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %stack.
+ */
+ const_reference
+ top() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * @brief Add data to the top of the %stack.
+ * @param x Data to be added.
+ *
+ * This is a typical %stack operation. The function creates an
+ * element at the top of the %stack and assigns the given data
+ * to it. The time complexity of the operation depends on the
+ * underlying sequence.
+ */
+ void
+ push(const value_type& __x)
+ { c.push_back(__x); }
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %stack operation. It shrinks the %stack
+ * by one. The time complexity of the operation depends on the
+ * underlying sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ c.pop_back();
+ }
+ };
+
/**
* @brief Stack equality comparison.
* @param x A %stack.
* @param y A %stack of the same type as @a x.
* @return True iff the size and elements of the stacks are equal.
*
- * This is an equivalence relation. Complexity and semantics depend on the
- * underlying sequence type, but the expected rules are: this relation is
- * linear in the size of the sequences, and stacks are considered equivalent
- * if their sequences compare equal.
+ * This is an equivalence relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, and
+ * stacks are considered equivalent if their sequences compare
+ * equal.
*/
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return __x.c == __y.c; }
-
+
/**
* @brief Stack ordering relation.
* @param x A %stack.
* @param y A %stack of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
- * This is an total ordering relation. Complexity and semantics depend on
- * the underlying sequence type, but the expected rules are: this relation
- * is linear in the size of the sequences, the elements must be comparable
- * with @c <, and std::lexographical_compare() is usually used to make the
+ * This is an total ordering relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, the
+ * elements must be comparable with @c <, and
+ * std::lexicographical_compare() is usually used to make the
* determination.
*/
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return __x.c < __y.c; }
-
+
/// Based on operator==
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator!=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator>(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator<=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
- template <typename _Tp, typename _Seq>
+ template<typename _Tp, typename _Seq>
inline bool
- operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+ operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__x < __y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_STACK_H */
+#endif /* _STACK_H */
diff --git a/contrib/libstdc++/include/bits/stl_tempbuf.h b/contrib/libstdc++/include/bits/stl_tempbuf.h
index 7b88f93..399cffb 100644
--- a/contrib/libstdc++/include/bits/stl_tempbuf.h
+++ b/contrib/libstdc++/include/bits/stl_tempbuf.h
@@ -1,6 +1,6 @@
// Temporary buffer implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,92 +58,114 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_TEMPBUF_H
-#define __GLIBCPP_INTERNAL_TEMPBUF_H
+#ifndef _TEMPBUF_H
+#define _TEMPBUF_H 1
+
+#include <memory>
namespace std
{
+ /**
+ * @if maint
+ * This class is used in two places: stl_algo.h and ext/memory,
+ * where it is wrapped as the temporary_buffer class. See
+ * temporary_buffer docs for more notes.
+ * @endif
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ class _Temporary_buffer
+ {
+ // concept requirements
+ __glibcxx_class_requires(_ForwardIterator, _ForwardIteratorConcept)
+
+ public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef pointer iterator;
+ typedef ptrdiff_t size_type;
+
+ protected:
+ size_type _M_original_len;
+ size_type _M_len;
+ pointer _M_buffer;
+
+ void
+ _M_initialize_buffer(const _Tp&, __true_type) { }
+
+ void
+ _M_initialize_buffer(const _Tp& val, __false_type)
+ { std::uninitialized_fill_n(_M_buffer, _M_len, val); }
+
+ public:
+ /// As per Table mumble.
+ size_type
+ size() const
+ { return _M_len; }
+
+ /// Returns the size requested by the constructor; may be >size().
+ size_type
+ requested_size() const
+ { return _M_original_len; }
+
+ /// As per Table mumble.
+ iterator
+ begin()
+ { return _M_buffer; }
+
+ /// As per Table mumble.
+ iterator
+ end()
+ { return _M_buffer + _M_len; }
+
+ /**
+ * Constructs a temporary buffer of a size somewhere between
+ * zero and the size of the given range.
+ */
+ _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
+
+ ~_Temporary_buffer()
+ {
+ std::_Destroy(_M_buffer, _M_buffer + _M_len);
+ std::return_temporary_buffer(_M_buffer);
+ }
-/**
- * @if maint
- * This class is used in two places: stl_algo.h and ext/memory, where it
- * is wrapped as the temporary_buffer class. See temporary_buffer docs for
- * more notes.
- * @endif
-*/
-template <class _ForwardIterator, class _Tp>
- class _Temporary_buffer
-{
- // concept requirements
- __glibcpp_class_requires(_ForwardIterator, _ForwardIteratorConcept)
-
- ptrdiff_t _M_original_len;
- ptrdiff_t _M_len;
- _Tp* _M_buffer;
-
- // this is basically get_temporary_buffer() all over again
- void _M_allocate_buffer() {
- _M_original_len = _M_len;
- _M_buffer = 0;
-
- if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp)))
- _M_len = INT_MAX / sizeof(_Tp);
-
- while (_M_len > 0) {
- _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
- if (_M_buffer)
- break;
- _M_len /= 2;
+ private:
+ // Disable copy constructor and assignment operator.
+ _Temporary_buffer(const _Temporary_buffer&);
+
+ void
+ operator=(const _Temporary_buffer&);
+ };
+
+
+ template<typename _ForwardIterator, typename _Tp>
+ _Temporary_buffer<_ForwardIterator, _Tp>::
+ _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
+ : _M_original_len(std::distance(__first, __last)),
+ _M_len(0), _M_buffer(0)
+ {
+ // Workaround for a __type_traits bug in the pre-7.3 compiler.
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+ _Trivial;
+
+ try
+ {
+ pair<pointer, size_type> __p(get_temporary_buffer<
+ value_type>(_M_original_len));
+ _M_buffer = __p.first;
+ _M_len = __p.second;
+ if (_M_len > 0)
+ _M_initialize_buffer(*__first, _Trivial());
+ }
+ catch(...)
+ {
+ std::return_temporary_buffer(_M_buffer);
+ _M_buffer = 0;
+ _M_len = 0;
+ __throw_exception_again;
+ }
}
- }
-
- void _M_initialize_buffer(const _Tp&, __true_type) {}
- void _M_initialize_buffer(const _Tp& val, __false_type) {
- uninitialized_fill_n(_M_buffer, _M_len, val);
- }
-
-public:
- /// As per Table mumble.
- ptrdiff_t size() const { return _M_len; }
- /// Returns the size requested by the constructor; may be >size().
- ptrdiff_t requested_size() const { return _M_original_len; }
- /// As per Table mumble.
- _Tp* begin() { return _M_buffer; }
- /// As per Table mumble.
- _Tp* end() { return _M_buffer + _M_len; }
-
- _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
- // Workaround for a __type_traits bug in the pre-7.3 compiler.
- typedef typename __type_traits<_Tp>::has_trivial_default_constructor
- _Trivial;
-
- try {
- _M_len = distance(__first, __last);
- _M_allocate_buffer();
- if (_M_len > 0)
- _M_initialize_buffer(*__first, _Trivial());
- }
- catch(...)
- {
- free(_M_buffer);
- _M_buffer = 0;
- _M_len = 0;
- __throw_exception_again;
- }
- }
-
- ~_Temporary_buffer() {
- _Destroy(_M_buffer, _M_buffer + _M_len);
- free(_M_buffer);
- }
-
-private:
- // Disable copy constructor and assignment operator.
- _Temporary_buffer(const _Temporary_buffer&) {}
- void operator=(const _Temporary_buffer&) {}
-};
-
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_TEMPBUF_H */
+#endif /* _TEMPBUF_H */
diff --git a/contrib/libstdc++/include/bits/stl_threads.h b/contrib/libstdc++/include/bits/stl_threads.h
index b21ebdd..04baf0a 100644
--- a/contrib/libstdc++/include/bits/stl_threads.h
+++ b/contrib/libstdc++/include/bits/stl_threads.h
@@ -1,6 +1,6 @@
// Threading support -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,89 +45,28 @@
* You should not attempt to use it directly.
*/
-#ifndef __SGI_STL_INTERNAL_THREADS_H
-#define __SGI_STL_INTERNAL_THREADS_H
+#ifndef _STL_THREADS_H
+#define _STL_THREADS_H 1
-// The only supported threading model is GCC's own gthr.h abstraction layer.
+#include <cstddef>
+
+// The only supported threading model is GCC's own gthr.h abstraction
+// layer.
#include "bits/gthr.h"
-namespace std
+namespace __gnu_internal
{
- // Class _Refcount_Base provides a type, _RC_t, a data member,
- // _M_ref_count, and member functions _M_incr and _M_decr, which perform
- // atomic preincrement/predecrement. The constructor initializes
- // _M_ref_count.
- struct _Refcount_Base
- {
- // The type _RC_t
- typedef size_t _RC_t;
-
- // The data member _M_ref_count
- volatile _RC_t _M_ref_count;
-
- // Constructor
- __gthread_mutex_t _M_ref_count_lock;
-
- _Refcount_Base(_RC_t __n) : _M_ref_count(__n)
- {
-#ifdef __GTHREAD_MUTEX_INIT
- __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
- _M_ref_count_lock = __tmp;
-#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
- __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
-#else
-#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org.
-#endif
- }
-
- void
- _M_incr()
- {
- __gthread_mutex_lock(&_M_ref_count_lock);
- ++_M_ref_count;
- __gthread_mutex_unlock(&_M_ref_count_lock);
- }
-
- _RC_t
- _M_decr()
- {
- __gthread_mutex_lock(&_M_ref_count_lock);
- volatile _RC_t __tmp = --_M_ref_count;
- __gthread_mutex_unlock(&_M_ref_count_lock);
- return __tmp;
- }
- };
-
- // Atomic swap on unsigned long
- // This is guaranteed to behave as though it were atomic only if all
- // possibly concurrent updates use _Atomic_swap.
- // In some cases the operation is emulated with a lock.
-#if defined (__GTHREAD_MUTEX_INIT)
- // This could be optimized to use the atomicity.h abstraction layer.
- // vyzo: simple _Atomic_swap implementation following the guidelines above
- // We use a template here only to get a unique initialized instance.
- template<int __dummy>
- struct _Swap_lock_struct
- { static __gthread_mutex_t _S_swap_lock; };
-
- template<int __dummy>
- __gthread_mutex_t
- _Swap_lock_struct<__dummy>::_S_swap_lock = __GTHREAD_MUTEX_INIT;
-
- // This should be portable, but performance is expected to be quite
- // awful. This really needs platform specific code.
- inline unsigned long
- _Atomic_swap(unsigned long * __p, unsigned long __q)
- {
- __gthread_mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);
- unsigned long __result = *__p;
- *__p = __q;
- __gthread_mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);
- return __result;
- }
+#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+ extern __gthread_mutex_t _GLIBCXX_mutex;
+ extern __gthread_mutex_t *_GLIBCXX_mutex_address;
+ extern __gthread_once_t _GLIBCXX_once;
+ extern void _GLIBCXX_mutex_init(void);
+ extern void _GLIBCXX_mutex_address_init(void);
#endif
-} //namespace std
+} // namespace __gnu_internal
+namespace __gnu_cxx
+{
// Locking class. Note that this class *does not have a
// constructor*. It must be initialized either statically, with
// __STL_MUTEX_INITIALIZER, or dynamically, by explicitly calling
@@ -140,20 +79,6 @@ namespace std
// 8.5.1 of the C++ standard) can be initialized that way. That
// means we must have no constructors, no base classes, no virtual
// functions, and no private or protected members.
-
-#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
-namespace __gnu_cxx
-{
- extern __gthread_mutex_t _GLIBCPP_mutex;
- extern __gthread_mutex_t *_GLIBCPP_mutex_address;
- extern __gthread_once_t _GLIBCPP_once;
- extern void _GLIBCPP_mutex_init (void);
- extern void _GLIBCPP_mutex_address_init (void);
-}
-#endif
-
-namespace std
-{
struct _STL_mutex_lock
{
// The class must be statically initialized with __STL_MUTEX_INITIALIZER.
@@ -163,36 +88,36 @@ namespace std
#endif
__gthread_mutex_t _M_lock;
- void
- _M_initialize()
+ void
+ _M_initialize()
{
#ifdef __GTHREAD_MUTEX_INIT
// There should be no code in this path given the usage rules above.
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (_M_init_flag) return;
- if (__gthread_once (&__gnu_cxx::_GLIBCPP_once,
- __gnu_cxx::_GLIBCPP_mutex_init) != 0
- && __gthread_active_p ())
+ if (__gthread_once(&__gnu_internal::_GLIBCXX_once,
+ __gnu_internal::_GLIBCXX_mutex_init) != 0
+ && __gthread_active_p())
abort ();
- __gthread_mutex_lock (&__gnu_cxx::_GLIBCPP_mutex);
- if (!_M_init_flag)
+ __gthread_mutex_lock(&__gnu_internal::_GLIBCXX_mutex);
+ if (!_M_init_flag)
{
// Even though we have a global lock, we use __gthread_once to be
// absolutely certain the _M_lock mutex is only initialized once on
// multiprocessor systems.
- __gnu_cxx::_GLIBCPP_mutex_address = &_M_lock;
- if (__gthread_once (&_M_once,
- __gnu_cxx::_GLIBCPP_mutex_address_init) != 0
- && __gthread_active_p ())
- abort ();
+ __gnu_internal::_GLIBCXX_mutex_address = &_M_lock;
+ if (__gthread_once(&_M_once,
+ __gnu_internal::_GLIBCXX_mutex_address_init) != 0
+ && __gthread_active_p())
+ abort();
_M_init_flag = 1;
}
- __gthread_mutex_unlock (&__gnu_cxx::_GLIBCPP_mutex);
+ __gthread_mutex_unlock(&__gnu_internal::_GLIBCXX_mutex);
#endif
}
- void
- _M_acquire_lock()
+ void
+ _M_acquire_lock()
{
#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (!_M_init_flag) _M_initialize();
@@ -200,8 +125,8 @@ namespace std
__gthread_mutex_lock(&_M_lock);
}
- void
- _M_release_lock()
+ void
+ _M_release_lock()
{
#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (!_M_init_flag) _M_initialize();
@@ -209,7 +134,7 @@ namespace std
__gthread_mutex_unlock(&_M_lock);
}
};
-
+
#ifdef __GTHREAD_MUTEX_INIT
#define __STL_MUTEX_INITIALIZER = { __GTHREAD_MUTEX_INIT }
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
@@ -220,25 +145,6 @@ namespace std
#define __STL_MUTEX_INITIALIZER = { 0, __GTHREAD_ONCE_INIT }
#endif
#endif
+} // namespace __gnu_cxx
- // A locking class that uses _STL_mutex_lock. The constructor takes a
- // reference to an _STL_mutex_lock, and acquires a lock. The
- // destructor releases the lock. It's not clear that this is exactly
- // the right functionality. It will probably change in the future.
- struct _STL_auto_lock
- {
- _STL_mutex_lock& _M_lock;
-
- _STL_auto_lock(_STL_mutex_lock& __lock) : _M_lock(__lock)
- { _M_lock._M_acquire_lock(); }
-
- ~_STL_auto_lock() { _M_lock._M_release_lock(); }
-
- private:
- void operator=(const _STL_auto_lock&);
- _STL_auto_lock(const _STL_auto_lock&);
- };
-
-} // namespace std
-
-#endif
+#endif
diff --git a/contrib/libstdc++/include/bits/stl_tree.h b/contrib/libstdc++/include/bits/stl_tree.h
index 1e7fdf5..ac9add8 100644
--- a/contrib/libstdc++/include/bits/stl_tree.h
+++ b/contrib/libstdc++/include/bits/stl_tree.h
@@ -1,6 +1,6 @@
// RB tree implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -60,60 +60,72 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_TREE_H
-#define __GLIBCPP_INTERNAL_TREE_H
-
-/*
-
-Red-black tree class, designed for use in implementing STL
-associative containers (set, multiset, map, and multimap). The
-insertion and deletion algorithms are based on those in Cormen,
-Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),
-except that
-
-(1) the header cell is maintained with links not only to the root
-but also to the leftmost node of the tree, to enable constant time
-begin(), and to the rightmost node of the tree, to enable linear time
-performance when used with the generic set algorithms (set_union,
-etc.);
-
-(2) when a node being deleted has two children its successor node is
-relinked into its place, rather than copied, so that the only
-iterators invalidated are those referring to the deleted node.
-
-*/
+#ifndef _TREE_H
+#define _TREE_H 1
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_function.h>
+#include <bits/cpp_type_traits.h>
namespace std
-{
- enum _Rb_tree_color { _M_red = false, _M_black = true };
+{
+ // Red-black tree class, designed for use in implementing STL
+ // associative containers (set, multiset, map, and multimap). The
+ // insertion and deletion algorithms are based on those in Cormen,
+ // Leiserson, and Rivest, Introduction to Algorithms (MIT Press,
+ // 1990), except that
+ //
+ // (1) the header cell is maintained with links not only to the root
+ // but also to the leftmost node of the tree, to enable constant
+ // time begin(), and to the rightmost node of the tree, to enable
+ // linear time performance when used with the generic set algorithms
+ // (set_union, etc.)
+ //
+ // (2) when a node being deleted has two children its successor node
+ // is relinked into its place, rather than copied, so that the only
+ // iterators invalidated are those referring to the deleted node.
+
+ enum _Rb_tree_color { _S_red = false, _S_black = true };
struct _Rb_tree_node_base
{
typedef _Rb_tree_node_base* _Base_ptr;
-
- _Rb_tree_color _M_color;
- _Base_ptr _M_parent;
- _Base_ptr _M_left;
- _Base_ptr _M_right;
-
- static _Base_ptr
+ typedef const _Rb_tree_node_base* _Const_Base_ptr;
+
+ _Rb_tree_color _M_color;
+ _Base_ptr _M_parent;
+ _Base_ptr _M_left;
+ _Base_ptr _M_right;
+
+ static _Base_ptr
_S_minimum(_Base_ptr __x)
{
while (__x->_M_left != 0) __x = __x->_M_left;
return __x;
}
- static _Base_ptr
+ static _Const_Base_ptr
+ _S_minimum(_Const_Base_ptr __x)
+ {
+ while (__x->_M_left != 0) __x = __x->_M_left;
+ return __x;
+ }
+
+ static _Base_ptr
_S_maximum(_Base_ptr __x)
{
while (__x->_M_right != 0) __x = __x->_M_right;
return __x;
}
+
+ static _Const_Base_ptr
+ _S_maximum(_Const_Base_ptr __x)
+ {
+ while (__x->_M_right != 0) __x = __x->_M_right;
+ return __x;
+ }
};
template<typename _Val>
@@ -122,475 +134,203 @@ namespace std
typedef _Rb_tree_node<_Val>* _Link_type;
_Val _M_value_field;
};
-
- struct _Rb_tree_base_iterator
- {
- typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
- typedef bidirectional_iterator_tag iterator_category;
- typedef ptrdiff_t difference_type;
- _Base_ptr _M_node;
+ _Rb_tree_node_base*
+ _Rb_tree_increment(_Rb_tree_node_base* __x);
- void
- _M_increment()
- {
- if (_M_node->_M_right != 0)
- {
- _M_node = _M_node->_M_right;
- while (_M_node->_M_left != 0)
- _M_node = _M_node->_M_left;
- }
- else
- {
- _Base_ptr __y = _M_node->_M_parent;
- while (_M_node == __y->_M_right)
- {
- _M_node = __y;
- __y = __y->_M_parent;
- }
- if (_M_node->_M_right != __y)
- _M_node = __y;
- }
- }
+ const _Rb_tree_node_base*
+ _Rb_tree_increment(const _Rb_tree_node_base* __x);
- void
- _M_decrement()
- {
- if (_M_node->_M_color == _M_red
- && _M_node->_M_parent->_M_parent == _M_node)
- _M_node = _M_node->_M_right;
- else if (_M_node->_M_left != 0)
- {
- _Base_ptr __y = _M_node->_M_left;
- while (__y->_M_right != 0)
- __y = __y->_M_right;
- _M_node = __y;
- }
- else
- {
- _Base_ptr __y = _M_node->_M_parent;
- while (_M_node == __y->_M_left)
- {
- _M_node = __y;
- __y = __y->_M_parent;
- }
- _M_node = __y;
- }
- }
- };
+ _Rb_tree_node_base*
+ _Rb_tree_decrement(_Rb_tree_node_base* __x);
- template<typename _Val, typename _Ref, typename _Ptr>
- struct _Rb_tree_iterator : public _Rb_tree_base_iterator
+ const _Rb_tree_node_base*
+ _Rb_tree_decrement(const _Rb_tree_node_base* __x);
+
+ template<typename _Tp>
+ struct _Rb_tree_iterator
{
- typedef _Val value_type;
- typedef _Ref reference;
- typedef _Ptr pointer;
- typedef _Rb_tree_iterator<_Val, _Val&, _Val*> iterator;
- typedef _Rb_tree_iterator<_Val, const _Val&, const _Val*>
- const_iterator;
- typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
- typedef _Rb_tree_node<_Val>* _Link_type;
-
- _Rb_tree_iterator() {}
- _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
- _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }
-
- reference
- operator*() const { return _Link_type(_M_node)->_M_value_field; }
-
- pointer
- operator->() const { return &(operator*()); }
-
- _Self&
- operator++()
- {
- _M_increment();
- return *this;
+ typedef _Tp value_type;
+ typedef _Tp& reference;
+ typedef _Tp* pointer;
+
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+
+ typedef _Rb_tree_iterator<_Tp> _Self;
+ typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
+ typedef _Rb_tree_node<_Tp>* _Link_type;
+
+ _Rb_tree_iterator() { }
+
+ _Rb_tree_iterator(_Link_type __x)
+ : _M_node(__x) { }
+
+ reference
+ operator*() const
+ { return static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _Rb_tree_increment(_M_node);
+ return *this;
}
- _Self
- operator++(int)
+ _Self
+ operator++(int)
{
_Self __tmp = *this;
- _M_increment();
+ _M_node = _Rb_tree_increment(_M_node);
return __tmp;
}
-
- _Self&
- operator--() { _M_decrement(); return *this; }
- _Self
- operator--(int)
+ _Self&
+ operator--()
+ {
+ _M_node = _Rb_tree_decrement(_M_node);
+ return *this;
+ }
+
+ _Self
+ operator--(int)
{
_Self __tmp = *this;
- _M_decrement();
+ _M_node = _Rb_tree_decrement(_M_node);
return __tmp;
}
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ _Base_ptr _M_node;
};
- template<typename _Val, typename _Ref, typename _Ptr>
- inline bool
- operator==(const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __x,
- const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __y)
- { return __x._M_node == __y._M_node; }
+ template<typename _Tp>
+ struct _Rb_tree_const_iterator
+ {
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
- template<typename _Val>
- inline bool
- operator==(const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __x,
- const _Rb_tree_iterator<_Val, _Val&, _Val*>& __y)
- { return __x._M_node == __y._M_node; }
+ typedef _Rb_tree_iterator<_Tp> iterator;
- template<typename _Val>
- inline bool
- operator==(const _Rb_tree_iterator<_Val, _Val&, _Val*>& __x,
- const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __y)
- { return __x._M_node == __y._M_node; }
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
- template<typename _Val, typename _Ref, typename _Ptr>
- inline bool
- operator!=(const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __x,
- const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __y)
- { return __x._M_node != __y._M_node; }
+ typedef _Rb_tree_const_iterator<_Tp> _Self;
+ typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
+ typedef const _Rb_tree_node<_Tp>* _Link_type;
- template<typename _Val>
- inline bool
- operator!=(const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __x,
- const _Rb_tree_iterator<_Val, _Val&, _Val*>& __y)
- { return __x._M_node != __y._M_node; }
+ _Rb_tree_const_iterator() { }
- template<typename _Val>
- inline bool
- operator!=(const _Rb_tree_iterator<_Val, _Val&, _Val*>& __x,
- const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __y)
- { return __x._M_node != __y._M_node; }
+ _Rb_tree_const_iterator(_Link_type __x)
+ : _M_node(__x) { }
- inline void
- _Rb_tree_rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
- {
- _Rb_tree_node_base* __y = __x->_M_right;
- __x->_M_right = __y->_M_left;
- if (__y->_M_left !=0)
- __y->_M_left->_M_parent = __x;
- __y->_M_parent = __x->_M_parent;
-
- if (__x == __root)
- __root = __y;
- else if (__x == __x->_M_parent->_M_left)
- __x->_M_parent->_M_left = __y;
- else
- __x->_M_parent->_M_right = __y;
- __y->_M_left = __x;
- __x->_M_parent = __y;
- }
-
- inline void
- _Rb_tree_rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
- {
- _Rb_tree_node_base* __y = __x->_M_left;
- __x->_M_left = __y->_M_right;
- if (__y->_M_right != 0)
- __y->_M_right->_M_parent = __x;
- __y->_M_parent = __x->_M_parent;
-
- if (__x == __root)
- __root = __y;
- else if (__x == __x->_M_parent->_M_right)
- __x->_M_parent->_M_right = __y;
- else
- __x->_M_parent->_M_left = __y;
- __y->_M_right = __x;
- __x->_M_parent = __y;
- }
-
- inline void
- _Rb_tree_rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
- {
- __x->_M_color = _M_red;
- while (__x != __root
- && __x->_M_parent->_M_color == _M_red)
+ _Rb_tree_const_iterator(const iterator& __it)
+ : _M_node(__it._M_node) { }
+
+ reference
+ operator*() const
+ { return static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ _Self&
+ operator++()
{
- if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left)
- {
- _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right;
- if (__y && __y->_M_color == _M_red)
- {
- __x->_M_parent->_M_color = _M_black;
- __y->_M_color = _M_black;
- __x->_M_parent->_M_parent->_M_color = _M_red;
- __x = __x->_M_parent->_M_parent;
- }
- else
- {
- if (__x == __x->_M_parent->_M_right)
- {
- __x = __x->_M_parent;
- _Rb_tree_rotate_left(__x, __root);
- }
- __x->_M_parent->_M_color = _M_black;
- __x->_M_parent->_M_parent->_M_color = _M_red;
- _Rb_tree_rotate_right(__x->_M_parent->_M_parent, __root);
- }
- }
- else
- {
- _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left;
- if (__y && __y->_M_color == _M_red)
- {
- __x->_M_parent->_M_color = _M_black;
- __y->_M_color = _M_black;
- __x->_M_parent->_M_parent->_M_color = _M_red;
- __x = __x->_M_parent->_M_parent;
- }
- else
- {
- if (__x == __x->_M_parent->_M_left)
- {
- __x = __x->_M_parent;
- _Rb_tree_rotate_right(__x, __root);
- }
- __x->_M_parent->_M_color = _M_black;
- __x->_M_parent->_M_parent->_M_color = _M_red;
- _Rb_tree_rotate_left(__x->_M_parent->_M_parent, __root);
- }
- }
+ _M_node = _Rb_tree_increment(_M_node);
+ return *this;
}
- __root->_M_color = _M_black;
- }
-
- inline _Rb_tree_node_base*
- _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* __z,
- _Rb_tree_node_base*& __root,
- _Rb_tree_node_base*& __leftmost,
- _Rb_tree_node_base*& __rightmost)
- {
- _Rb_tree_node_base* __y = __z;
- _Rb_tree_node_base* __x = 0;
- _Rb_tree_node_base* __x_parent = 0;
- if (__y->_M_left == 0) // __z has at most one non-null child. y == z.
- __x = __y->_M_right; // __x might be null.
- else
- if (__y->_M_right == 0) // __z has exactly one non-null child. y == z.
- __x = __y->_M_left; // __x is not null.
- else
- {
- // __z has two non-null children. Set __y to
- __y = __y->_M_right; // __z's successor. __x might be null.
- while (__y->_M_left != 0)
- __y = __y->_M_left;
- __x = __y->_M_right;
- }
- if (__y != __z)
+
+ _Self
+ operator++(int)
{
- // relink y in place of z. y is z's successor
- __z->_M_left->_M_parent = __y;
- __y->_M_left = __z->_M_left;
- if (__y != __z->_M_right)
- {
- __x_parent = __y->_M_parent;
- if (__x) __x->_M_parent = __y->_M_parent;
- __y->_M_parent->_M_left = __x; // __y must be a child of _M_left
- __y->_M_right = __z->_M_right;
- __z->_M_right->_M_parent = __y;
- }
- else
- __x_parent = __y;
- if (__root == __z)
- __root = __y;
- else if (__z->_M_parent->_M_left == __z)
- __z->_M_parent->_M_left = __y;
- else
- __z->_M_parent->_M_right = __y;
- __y->_M_parent = __z->_M_parent;
- std::swap(__y->_M_color, __z->_M_color);
- __y = __z;
- // __y now points to node to be actually deleted
- }
- else
- { // __y == __z
- __x_parent = __y->_M_parent;
- if (__x)
- __x->_M_parent = __y->_M_parent;
- if (__root == __z)
- __root = __x;
- else
- if (__z->_M_parent->_M_left == __z)
- __z->_M_parent->_M_left = __x;
- else
- __z->_M_parent->_M_right = __x;
- if (__leftmost == __z)
- if (__z->_M_right == 0) // __z->_M_left must be null also
- __leftmost = __z->_M_parent;
- // makes __leftmost == _M_header if __z == __root
- else
- __leftmost = _Rb_tree_node_base::_S_minimum(__x);
- if (__rightmost == __z)
- if (__z->_M_left == 0) // __z->_M_right must be null also
- __rightmost = __z->_M_parent;
- // makes __rightmost == _M_header if __z == __root
- else // __x == __z->_M_left
- __rightmost = _Rb_tree_node_base::_S_maximum(__x);
- }
- if (__y->_M_color != _M_red)
- {
- while (__x != __root && (__x == 0 || __x->_M_color == _M_black))
- if (__x == __x_parent->_M_left)
- {
- _Rb_tree_node_base* __w = __x_parent->_M_right;
- if (__w->_M_color == _M_red)
- {
- __w->_M_color = _M_black;
- __x_parent->_M_color = _M_red;
- _Rb_tree_rotate_left(__x_parent, __root);
- __w = __x_parent->_M_right;
- }
- if ((__w->_M_left == 0 ||
- __w->_M_left->_M_color == _M_black) &&
- (__w->_M_right == 0 ||
- __w->_M_right->_M_color == _M_black))
- {
- __w->_M_color = _M_red;
- __x = __x_parent;
- __x_parent = __x_parent->_M_parent;
- }
- else
- {
- if (__w->_M_right == 0
- || __w->_M_right->_M_color == _M_black)
- {
- __w->_M_left->_M_color = _M_black;
- __w->_M_color = _M_red;
- _Rb_tree_rotate_right(__w, __root);
- __w = __x_parent->_M_right;
- }
- __w->_M_color = __x_parent->_M_color;
- __x_parent->_M_color = _M_black;
- if (__w->_M_right)
- __w->_M_right->_M_color = _M_black;
- _Rb_tree_rotate_left(__x_parent, __root);
- break;
- }
- }
- else
- {
- // same as above, with _M_right <-> _M_left.
- _Rb_tree_node_base* __w = __x_parent->_M_left;
- if (__w->_M_color == _M_red)
- {
- __w->_M_color = _M_black;
- __x_parent->_M_color = _M_red;
- _Rb_tree_rotate_right(__x_parent, __root);
- __w = __x_parent->_M_left;
- }
- if ((__w->_M_right == 0 ||
- __w->_M_right->_M_color == _M_black) &&
- (__w->_M_left == 0 ||
- __w->_M_left->_M_color == _M_black))
- {
- __w->_M_color = _M_red;
- __x = __x_parent;
- __x_parent = __x_parent->_M_parent;
- }
- else
- {
- if (__w->_M_left == 0 || __w->_M_left->_M_color == _M_black)
- {
- __w->_M_right->_M_color = _M_black;
- __w->_M_color = _M_red;
- _Rb_tree_rotate_left(__w, __root);
- __w = __x_parent->_M_left;
- }
- __w->_M_color = __x_parent->_M_color;
- __x_parent->_M_color = _M_black;
- if (__w->_M_left)
- __w->_M_left->_M_color = _M_black;
- _Rb_tree_rotate_right(__x_parent, __root);
- break;
- }
- }
- if (__x) __x->_M_color = _M_black;
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_increment(_M_node);
+ return __tmp;
}
- return __y;
- }
- // Base class to encapsulate the differences between old SGI-style
- // allocators and standard-conforming allocators. In order to avoid
- // having an empty base class, we arbitrarily move one of rb_tree's
- // data members into the base class.
+ _Self&
+ operator--()
+ {
+ _M_node = _Rb_tree_decrement(_M_node);
+ return *this;
+ }
- // _Base for general standard-conforming allocators.
- template<typename _Tp, typename _Alloc, bool _S_instanceless>
- class _Rb_tree_alloc_base
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_decrement(_M_node);
+ return __tmp;
+ }
- allocator_type
- get_allocator() const { return _M_node_allocator; }
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
- _Rb_tree_alloc_base(const allocator_type& __a)
- : _M_node_allocator(__a), _M_header(0) {}
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
- protected:
- typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::allocator_type
- _M_node_allocator;
+ _Base_ptr _M_node;
+ };
- _Rb_tree_node<_Tp>* _M_header;
-
- _Rb_tree_node<_Tp>*
- _M_get_node() { return _M_node_allocator.allocate(1); }
+ template<typename _Val>
+ inline bool
+ operator==(const _Rb_tree_iterator<_Val>& __x,
+ const _Rb_tree_const_iterator<_Val>& __y)
+ { return __x._M_node == __y._M_node; }
- void
- _M_put_node(_Rb_tree_node<_Tp>* __p)
- { _M_node_allocator.deallocate(__p, 1); }
- };
+ template<typename _Val>
+ inline bool
+ operator!=(const _Rb_tree_iterator<_Val>& __x,
+ const _Rb_tree_const_iterator<_Val>& __y)
+ { return __x._M_node != __y._M_node; }
- // Specialization for instanceless allocators.
- template<typename _Tp, typename _Alloc>
- class _Rb_tree_alloc_base<_Tp, _Alloc, true>
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
- allocator_type get_allocator() const { return allocator_type(); }
+ void
+ _Rb_tree_rotate_left(_Rb_tree_node_base* const __x,
+ _Rb_tree_node_base*& __root);
- _Rb_tree_alloc_base(const allocator_type&) : _M_header(0) {}
+ void
+ _Rb_tree_rotate_right(_Rb_tree_node_base* const __x,
+ _Rb_tree_node_base*& __root);
- protected:
- _Rb_tree_node<_Tp>* _M_header;
-
- typedef typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::_Alloc_type
- _Alloc_type;
-
- _Rb_tree_node<_Tp>*
- _M_get_node() { return _Alloc_type::allocate(1); }
-
- void
- _M_put_node(_Rb_tree_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); }
- };
-
- template<typename _Tp, typename _Alloc>
- struct _Rb_tree_base : public _Rb_tree_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- {
- typedef _Rb_tree_alloc_base<_Tp,
- _Alloc, _Alloc_traits<_Tp, _Alloc>::_S_instanceless> _Base;
- typedef typename _Base::allocator_type allocator_type;
+ void
+ _Rb_tree_insert_and_rebalance(const bool __insert_left,
+ _Rb_tree_node_base* __x,
+ _Rb_tree_node_base* __p,
+ _Rb_tree_node_base& __header);
- _Rb_tree_base(const allocator_type& __a)
- : _Base(__a) { _M_header = _M_get_node(); }
- ~_Rb_tree_base() { _M_put_node(_M_header); }
- };
+ _Rb_tree_node_base*
+ _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
+ _Rb_tree_node_base& __header);
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc = allocator<_Val> >
- class _Rb_tree : protected _Rb_tree_base<_Val, _Alloc>
+ class _Rb_tree
{
- typedef _Rb_tree_base<_Val, _Alloc> _Base;
-
+ typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other
+ _Node_allocator;
+
protected:
typedef _Rb_tree_node_base* _Base_ptr;
+ typedef const _Rb_tree_node_base* _Const_Base_ptr;
typedef _Rb_tree_node<_Val> _Rb_tree_node;
-
+
public:
typedef _Key key_type;
typedef _Val value_type;
@@ -599,33 +339,40 @@ namespace std
typedef value_type& reference;
typedef const value_type& const_reference;
typedef _Rb_tree_node* _Link_type;
+ typedef const _Rb_tree_node* _Const_Link_type;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
-
- typedef typename _Base::allocator_type allocator_type;
- allocator_type get_allocator() const { return _Base::get_allocator(); }
-
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Node_allocator*>(&this->_M_impl); }
+
protected:
- using _Base::_M_get_node;
- using _Base::_M_put_node;
- using _Base::_M_header;
-
+ _Rb_tree_node*
+ _M_get_node()
+ { return _M_impl._Node_allocator::allocate(1); }
+
+ void
+ _M_put_node(_Rb_tree_node* __p)
+ { _M_impl._Node_allocator::deallocate(__p, 1); }
+
_Link_type
_M_create_node(const value_type& __x)
{
_Link_type __tmp = _M_get_node();
- try
- { _Construct(&__tmp->_M_value_field, __x); }
+ try
+ { std::_Construct(&__tmp->_M_value_field, __x); }
catch(...)
{
- _M_put_node(__tmp);
- __throw_exception_again;
+ _M_put_node(__tmp);
+ __throw_exception_again;
}
return __tmp;
}
-
- _Link_type
- _M_clone_node(_Link_type __x)
+
+ _Link_type
+ _M_clone_node(_Const_Link_type __x)
{
_Link_type __tmp = _M_create_node(__x->_M_value_field);
__tmp->_M_color = __x->_M_color;
@@ -637,512 +384,598 @@ namespace std
void
destroy_node(_Link_type __p)
{
- _Destroy(&__p->_M_value_field);
+ std::_Destroy(&__p->_M_value_field);
_M_put_node(__p);
}
- size_type _M_node_count; // keeps track of size of tree
- _Compare _M_key_compare;
+ protected:
+ template<typename _Key_compare,
+ bool _Is_pod_comparator = std::__is_pod<_Key_compare>::_M_type>
+ struct _Rb_tree_impl : public _Node_allocator
+ {
+ _Key_compare _M_key_compare;
+ _Rb_tree_node_base _M_header;
+ size_type _M_node_count; // Keeps track of size of tree.
+
+ _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
+ const _Key_compare& __comp = _Key_compare())
+ : _Node_allocator(__a), _M_key_compare(__comp), _M_node_count(0)
+ {
+ this->_M_header._M_color = _S_red;
+ this->_M_header._M_parent = 0;
+ this->_M_header._M_left = &this->_M_header;
+ this->_M_header._M_right = &this->_M_header;
+ }
+ };
+
+ // Specialization for _Comparison types that are not capable of
+ // being base classes / super classes.
+ template<typename _Key_compare>
+ struct _Rb_tree_impl<_Key_compare, true> : public _Node_allocator
+ {
+ _Key_compare _M_key_compare;
+ _Rb_tree_node_base _M_header;
+ size_type _M_node_count; // Keeps track of size of tree.
+
+ _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
+ const _Key_compare& __comp = _Key_compare())
+ : _Node_allocator(__a), _M_key_compare(__comp), _M_node_count(0)
+ {
+ this->_M_header._M_color = _S_red;
+ this->_M_header._M_parent = 0;
+ this->_M_header._M_left = &this->_M_header;
+ this->_M_header._M_right = &this->_M_header;
+ }
+ };
- _Link_type&
- _M_root() const { return (_Link_type&) _M_header->_M_parent; }
+ _Rb_tree_impl<_Compare> _M_impl;
- _Link_type&
- _M_leftmost() const { return (_Link_type&) _M_header->_M_left; }
+ protected:
+ _Base_ptr&
+ _M_root()
+ { return this->_M_impl._M_header._M_parent; }
+
+ _Const_Base_ptr
+ _M_root() const
+ { return this->_M_impl._M_header._M_parent; }
+
+ _Base_ptr&
+ _M_leftmost()
+ { return this->_M_impl._M_header._M_left; }
+
+ _Const_Base_ptr
+ _M_leftmost() const
+ { return this->_M_impl._M_header._M_left; }
+
+ _Base_ptr&
+ _M_rightmost()
+ { return this->_M_impl._M_header._M_right; }
+
+ _Const_Base_ptr
+ _M_rightmost() const
+ { return this->_M_impl._M_header._M_right; }
+
+ _Link_type
+ _M_begin()
+ { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); }
- _Link_type&
- _M_rightmost() const { return (_Link_type&) _M_header->_M_right; }
+ _Const_Link_type
+ _M_begin() const
+ { return static_cast<_Const_Link_type>(this->_M_impl._M_header._M_parent); }
- static _Link_type&
- _S_left(_Link_type __x) { return (_Link_type&)(__x->_M_left); }
+ _Link_type
+ _M_end()
+ { return static_cast<_Link_type>(&this->_M_impl._M_header); }
- static _Link_type&
- _S_right(_Link_type __x) { return (_Link_type&)(__x->_M_right); }
+ _Const_Link_type
+ _M_end() const
+ { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
- static _Link_type&
- _S_parent(_Link_type __x) { return (_Link_type&)(__x->_M_parent); }
+ static const_reference
+ _S_value(_Const_Link_type __x)
+ { return __x->_M_value_field; }
- static reference
- _S_value(_Link_type __x) { return __x->_M_value_field; }
+ static const _Key&
+ _S_key(_Const_Link_type __x)
+ { return _KeyOfValue()(_S_value(__x)); }
- static const _Key&
- _S_key(_Link_type __x) { return _KeyOfValue()(_S_value(__x)); }
+ static _Link_type
+ _S_left(_Base_ptr __x)
+ { return static_cast<_Link_type>(__x->_M_left); }
- static _Rb_tree_color&
- _S_color(_Link_type __x) { return __x->_M_color; }
+ static _Const_Link_type
+ _S_left(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x->_M_left); }
- static _Link_type&
- _S_left(_Base_ptr __x) { return (_Link_type&)(__x->_M_left); }
+ static _Link_type
+ _S_right(_Base_ptr __x)
+ { return static_cast<_Link_type>(__x->_M_right); }
- static _Link_type&
- _S_right(_Base_ptr __x) { return (_Link_type&)(__x->_M_right); }
+ static _Const_Link_type
+ _S_right(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x->_M_right); }
- static _Link_type&
- _S_parent(_Base_ptr __x) { return (_Link_type&)(__x->_M_parent); }
+ static const_reference
+ _S_value(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x)->_M_value_field; }
- static reference
- _S_value(_Base_ptr __x) { return ((_Link_type)__x)->_M_value_field; }
+ static const _Key&
+ _S_key(_Const_Base_ptr __x)
+ { return _KeyOfValue()(_S_value(__x)); }
- static const _Key&
- _S_key(_Base_ptr __x) { return _KeyOfValue()(_S_value(_Link_type(__x)));}
+ static _Base_ptr
+ _S_minimum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_minimum(__x); }
- static _Rb_tree_color&
- _S_color(_Base_ptr __x) { return (_Link_type(__x)->_M_color); }
+ static _Const_Base_ptr
+ _S_minimum(_Const_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_minimum(__x); }
- static _Link_type
- _S_minimum(_Link_type __x)
- { return (_Link_type) _Rb_tree_node_base::_S_minimum(__x); }
+ static _Base_ptr
+ _S_maximum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_maximum(__x); }
- static _Link_type
- _S_maximum(_Link_type __x)
- { return (_Link_type) _Rb_tree_node_base::_S_maximum(__x); }
+ static _Const_Base_ptr
+ _S_maximum(_Const_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_maximum(__x); }
public:
- typedef _Rb_tree_iterator<value_type, reference, pointer> iterator;
- typedef _Rb_tree_iterator<value_type, const_reference, const_pointer>
- const_iterator;
+ typedef _Rb_tree_iterator<value_type> iterator;
+ typedef _Rb_tree_const_iterator<value_type> const_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
private:
- iterator
+ iterator
_M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
- _Link_type
- _M_copy(_Link_type __x, _Link_type __p);
+ _Link_type
+ _M_copy(_Const_Link_type __x, _Link_type __p);
- void
+ void
_M_erase(_Link_type __x);
public:
// allocation/deallocation
_Rb_tree()
- : _Base(allocator_type()), _M_node_count(0), _M_key_compare()
- { _M_empty_initialize(); }
+ { }
_Rb_tree(const _Compare& __comp)
- : _Base(allocator_type()), _M_node_count(0), _M_key_compare(__comp)
- { _M_empty_initialize(); }
+ : _M_impl(allocator_type(), __comp)
+ { }
_Rb_tree(const _Compare& __comp, const allocator_type& __a)
- : _Base(__a), _M_node_count(0), _M_key_compare(__comp)
- { _M_empty_initialize(); }
-
- _Rb_tree(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x)
- : _Base(__x.get_allocator()), _M_node_count(0),
- _M_key_compare(__x._M_key_compare)
- {
- if (__x._M_root() == 0)
- _M_empty_initialize();
- else
+ : _M_impl(__a, __comp)
+ { }
+
+ _Rb_tree(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x)
+ : _M_impl(__x.get_allocator(), __x._M_impl._M_key_compare)
+ {
+ if (__x._M_root() != 0)
{
- _S_color(_M_header) = _M_red;
- _M_root() = _M_copy(__x._M_root(), _M_header);
+ _M_root() = _M_copy(__x._M_begin(), _M_end());
_M_leftmost() = _S_minimum(_M_root());
_M_rightmost() = _S_maximum(_M_root());
+ _M_impl._M_node_count = __x._M_impl._M_node_count;
}
- _M_node_count = __x._M_node_count;
}
- ~_Rb_tree() { clear(); }
+ ~_Rb_tree()
+ { _M_erase(_M_begin()); }
- _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>&
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>&
operator=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x);
- private:
- void _M_empty_initialize()
- {
- _S_color(_M_header) = _M_red; // used to distinguish header from
- // __root, in iterator.operator++
- _M_root() = 0;
- _M_leftmost() = _M_header;
- _M_rightmost() = _M_header;
- }
-
- public:
// Accessors.
- _Compare
- key_comp() const { return _M_key_compare; }
+ _Compare
+ key_comp() const
+ { return _M_impl._M_key_compare; }
- iterator
- begin() { return _M_leftmost(); }
+ iterator
+ begin()
+ { return static_cast<_Link_type>(this->_M_impl._M_header._M_left); }
- const_iterator
- begin() const { return _M_leftmost(); }
+ const_iterator
+ begin() const
+ { return static_cast<_Const_Link_type>(this->_M_impl._M_header._M_left); }
- iterator
- end() { return _M_header; }
+ iterator
+ end()
+ { return static_cast<_Link_type>(&this->_M_impl._M_header); }
- const_iterator
- end() const { return _M_header; }
+ const_iterator
+ end() const
+ { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
- reverse_iterator
- rbegin() { return reverse_iterator(end()); }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
- const_reverse_iterator
- rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
- reverse_iterator
- rend() { return reverse_iterator(begin()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
- const_reverse_iterator
- rend() const { return const_reverse_iterator(begin()); }
-
- bool
- empty() const { return _M_node_count == 0; }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
- size_type
- size() const { return _M_node_count; }
+ bool
+ empty() const
+ { return _M_impl._M_node_count == 0; }
- size_type
- max_size() const { return size_type(-1); }
+ size_type
+ size() const
+ { return _M_impl._M_node_count; }
+
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ void
+ swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __t);
- void
- swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __t)
- {
- std::swap(_M_header, __t._M_header);
- std::swap(_M_node_count, __t._M_node_count);
- std::swap(_M_key_compare, __t._M_key_compare);
- }
-
// Insert/erase.
- pair<iterator,bool>
+ pair<iterator,bool>
insert_unique(const value_type& __x);
- iterator
+ iterator
insert_equal(const value_type& __x);
- iterator
+ iterator
insert_unique(iterator __position, const value_type& __x);
- iterator
+ iterator
insert_equal(iterator __position, const value_type& __x);
template<typename _InputIterator>
- void
+ void
insert_unique(_InputIterator __first, _InputIterator __last);
template<typename _InputIterator>
- void
+ void
insert_equal(_InputIterator __first, _InputIterator __last);
- void
+ void
erase(iterator __position);
- size_type
+ size_type
erase(const key_type& __x);
- void
+ void
erase(iterator __first, iterator __last);
- void
+ void
erase(const key_type* __first, const key_type* __last);
- void
- clear()
+ void
+ clear()
{
- if (_M_node_count != 0)
- {
- _M_erase(_M_root());
- _M_leftmost() = _M_header;
- _M_root() = 0;
- _M_rightmost() = _M_header;
- _M_node_count = 0;
- }
- }
+ _M_erase(_M_begin());
+ _M_leftmost() = _M_end();
+ _M_root() = 0;
+ _M_rightmost() = _M_end();
+ _M_impl._M_node_count = 0;
+ }
// Set operations.
- iterator
+ iterator
find(const key_type& __x);
- const_iterator
+ const_iterator
find(const key_type& __x) const;
- size_type
+ size_type
count(const key_type& __x) const;
- iterator
+ iterator
lower_bound(const key_type& __x);
- const_iterator
+ const_iterator
lower_bound(const key_type& __x) const;
- iterator
+ iterator
upper_bound(const key_type& __x);
- const_iterator
+ const_iterator
upper_bound(const key_type& __x) const;
- pair<iterator,iterator>
+ pair<iterator,iterator>
equal_range(const key_type& __x);
- pair<const_iterator, const_iterator>
+ pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const;
// Debugging.
- bool
+ bool
__rb_verify() const;
};
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator==(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ inline bool
+ operator==(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
{
- return __x.size() == __y.size() &&
- equal(__x.begin(), __x.end(), __y.begin());
+ return __x.size() == __y.size()
+ && equal(__x.begin(), __x.end(), __y.begin());
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator<(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ inline bool
+ operator<(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
{
- return lexicographical_compare(__x.begin(), __x.end(),
+ return lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end());
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator!=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
- const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+ inline bool
+ operator!=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
{ return !(__x == __y); }
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator>(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
- const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+ inline bool
+ operator>(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
{ return __y < __x; }
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator<=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
- const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
- { return !(__y < __x); }
+ inline bool
+ operator<=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+ { return !(__y < __x); }
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline bool
- operator>=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
- const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
- { return !(__x < __y); }
+ inline bool
+ operator>=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+ { return !(__x < __y); }
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline void
- swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
+ inline void
+ swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x,
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
{ __x.swap(__y); }
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>&
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>&
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
operator=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x)
{
- if (this != &__x)
+ if (this != &__x)
{
// Note that _Key may be a constant type.
clear();
- _M_node_count = 0;
- _M_key_compare = __x._M_key_compare;
- if (__x._M_root() == 0)
- {
- _M_root() = 0;
- _M_leftmost() = _M_header;
- _M_rightmost() = _M_header;
- }
- else
+ _M_impl._M_key_compare = __x._M_impl._M_key_compare;
+ if (__x._M_root() != 0)
{
- _M_root() = _M_copy(__x._M_root(), _M_header);
+ _M_root() = _M_copy(__x._M_begin(), _M_end());
_M_leftmost() = _S_minimum(_M_root());
_M_rightmost() = _S_maximum(_M_root());
- _M_node_count = __x._M_node_count;
+ _M_impl._M_node_count = __x._M_impl._M_node_count;
}
}
return *this;
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
- _M_insert(_Base_ptr __x_, _Base_ptr __y_, const _Val& __v)
+ _M_insert(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
{
- _Link_type __x = (_Link_type) __x_;
- _Link_type __y = (_Link_type) __y_;
- _Link_type __z;
-
- if (__y == _M_header || __x != 0 ||
- _M_key_compare(_KeyOfValue()(__v), _S_key(__y)))
- {
- __z = _M_create_node(__v);
- _S_left(__y) = __z; // also makes _M_leftmost() = __z
- // when __y == _M_header
- if (__y == _M_header)
- {
- _M_root() = __z;
- _M_rightmost() = __z;
- }
- else if (__y == _M_leftmost())
- _M_leftmost() = __z; // maintain _M_leftmost() pointing to min node
- }
- else
- {
- __z = _M_create_node(__v);
- _S_right(__y) = __z;
- // Maintain _M_rightmost() pointing to max node.
- if (__y == _M_rightmost())
- _M_rightmost() = __z;
- }
- _S_parent(__z) = __y;
- _S_left(__z) = 0;
- _S_right(__z) = 0;
- _Rb_tree_rebalance(__z, _M_header->_M_parent);
- ++_M_node_count;
+ _Link_type __z = _M_create_node(__v);
+ bool __insert_left;
+
+ __insert_left = __x != 0 || __p == _M_end()
+ || _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__p));
+
+ _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
+ this->_M_impl._M_header);
+ ++_M_impl._M_node_count;
return iterator(__z);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
insert_equal(const _Val& __v)
{
- _Link_type __y = _M_header;
- _Link_type __x = _M_root();
- while (__x != 0)
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ while (__x != 0)
{
__y = __x;
- __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
- _S_left(__x) : _S_right(__x);
+ __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
+ _S_left(__x) : _S_right(__x);
}
return _M_insert(__x, __y, __v);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+ swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __t)
+ {
+ if (_M_root() == 0)
+ {
+ if (__t._M_root() != 0)
+ {
+ _M_root() = __t._M_root();
+ _M_leftmost() = __t._M_leftmost();
+ _M_rightmost() = __t._M_rightmost();
+ _M_root()->_M_parent = _M_end();
+
+ __t._M_root() = 0;
+ __t._M_leftmost() = __t._M_end();
+ __t._M_rightmost() = __t._M_end();
+ }
+ }
+ else if (__t._M_root() == 0)
+ {
+ __t._M_root() = _M_root();
+ __t._M_leftmost() = _M_leftmost();
+ __t._M_rightmost() = _M_rightmost();
+ __t._M_root()->_M_parent = __t._M_end();
+
+ _M_root() = 0;
+ _M_leftmost() = _M_end();
+ _M_rightmost() = _M_end();
+ }
+ else
+ {
+ std::swap(_M_root(),__t._M_root());
+ std::swap(_M_leftmost(),__t._M_leftmost());
+ std::swap(_M_rightmost(),__t._M_rightmost());
+
+ _M_root()->_M_parent = _M_end();
+ __t._M_root()->_M_parent = __t._M_end();
+ }
+ // No need to swap header's color as it does not change.
+ std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count);
+ std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- pair<typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator,
+ pair<typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator,
bool>
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
insert_unique(const _Val& __v)
{
- _Link_type __y = _M_header;
- _Link_type __x = _M_root();
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
bool __comp = true;
- while (__x != 0)
+ while (__x != 0)
{
__y = __x;
- __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x));
+ __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x));
__x = __comp ? _S_left(__x) : _S_right(__x);
}
- iterator __j = iterator(__y);
+ iterator __j = iterator(__y);
if (__comp)
- if (__j == begin())
+ if (__j == begin())
return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
else
--__j;
- if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
+ if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
return pair<iterator,bool>(__j, false);
}
-
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
insert_unique(iterator __position, const _Val& __v)
{
- if (__position._M_node == _M_header->_M_left)
- {
+ if (__position._M_node == _M_leftmost())
+ {
// begin()
- if (size() > 0 &&
- _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)))
+ if (size() > 0
+ && _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
return _M_insert(__position._M_node, __position._M_node, __v);
- // first argument just needs to be non-null
+ // First argument just needs to be non-null.
else
return insert_unique(__v).first;
- }
- else if (__position._M_node == _M_header)
- {
+ }
+ else if (__position._M_node == _M_end())
+ {
// end()
- if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v)))
+ if (_M_impl._M_key_compare(_S_key(_M_rightmost()),
+ _KeyOfValue()(__v)))
return _M_insert(0, _M_rightmost(), __v);
else
return insert_unique(__v).first;
- }
- else
+ }
+ else
{
iterator __before = __position;
--__before;
- if (_M_key_compare(_S_key(__before._M_node), _KeyOfValue()(__v))
- && _M_key_compare(_KeyOfValue()(__v),_S_key(__position._M_node)))
+ if (_M_impl._M_key_compare(_S_key(__before._M_node),
+ _KeyOfValue()(__v))
+ && _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
{
if (_S_right(__before._M_node) == 0)
- return _M_insert(0, __before._M_node, __v);
+ return _M_insert(0, __before._M_node, __v);
else
return _M_insert(__position._M_node, __position._M_node, __v);
- // first argument just needs to be non-null
- }
+ // First argument just needs to be non-null.
+ }
else
return insert_unique(__v).first;
}
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
insert_equal(iterator __position, const _Val& __v)
{
- if (__position._M_node == _M_header->_M_left)
- {
+ if (__position._M_node == _M_leftmost())
+ {
// begin()
- if (size() > 0 &&
- !_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)))
+ if (size() > 0
+ && !_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
return _M_insert(__position._M_node, __position._M_node, __v);
- // first argument just needs to be non-null
+ // first argument just needs to be non-null
else
return insert_equal(__v);
- }
- else if (__position._M_node == _M_header)
+ }
+ else if (__position._M_node == _M_end())
{
// end()
- if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost())))
+ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(_M_rightmost())))
return _M_insert(0, _M_rightmost(), __v);
else
return insert_equal(__v);
- }
- else
+ }
+ else
{
iterator __before = __position;
--__before;
- if (!_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))
- && !_M_key_compare(_S_key(__position._M_node),
- _KeyOfValue()(__v)))
+ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__before._M_node))
+ && !_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
{
if (_S_right(__before._M_node) == 0)
- return _M_insert(0, __before._M_node, __v);
+ return _M_insert(0, __before._M_node, __v);
else
return _M_insert(__position._M_node, __position._M_node, __v);
- // first argument just needs to be non-null
- }
+ // First argument just needs to be non-null.
+ }
else
return insert_equal(__v);
}
}
- template<typename _Key, typename _Val, typename _KoV,
+ template<typename _Key, typename _Val, typename _KoV,
typename _Cmp, typename _Alloc>
template<class _II>
- void
+ void
_Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc>::
insert_equal(_II __first, _II __last)
{
@@ -1150,60 +983,58 @@ namespace std
insert_equal(*__first);
}
- template<typename _Key, typename _Val, typename _KoV,
- typename _Cmp, typename _Alloc>
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Cmp, typename _Alloc>
template<class _II>
- void
+ void
_Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc>::
- insert_unique(_II __first, _II __last)
+ insert_unique(_II __first, _II __last)
{
for ( ; __first != __last; ++__first)
insert_unique(*__first);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline void
+ inline void
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(iterator __position)
{
- _Link_type __y =
- (_Link_type) _Rb_tree_rebalance_for_erase(__position._M_node,
- _M_header->_M_parent,
- _M_header->_M_left,
- _M_header->_M_right);
+ _Link_type __y =
+ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase(__position._M_node,
+ this->_M_impl._M_header));
destroy_node(__y);
- --_M_node_count;
+ --_M_impl._M_node_count;
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(const _Key& __x)
{
pair<iterator,iterator> __p = equal_range(__x);
- size_type __n = distance(__p.first, __p.second);
+ size_type __n = std::distance(__p.first, __p.second);
erase(__p.first, __p.second);
return __n;
}
- template<typename _Key, typename _Val, typename _KoV,
+ template<typename _Key, typename _Val, typename _KoV,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type
+ typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type
_Rb_tree<_Key,_Val,_KoV,_Compare,_Alloc>::
- _M_copy(_Link_type __x, _Link_type __p)
+ _M_copy(_Const_Link_type __x, _Link_type __p)
{
// Structural copy. __x and __p must be non-null.
_Link_type __top = _M_clone_node(__x);
__top->_M_parent = __p;
-
- try
+
+ try
{
if (__x->_M_right)
__top->_M_right = _M_copy(_S_right(__x), __top);
__p = __top;
__x = _S_left(__x);
-
- while (__x != 0)
+
+ while (__x != 0)
{
_Link_type __y = _M_clone_node(__x);
__p->_M_left = __y;
@@ -1217,18 +1048,18 @@ namespace std
catch(...)
{
_M_erase(__top);
- __throw_exception_again;
+ __throw_exception_again;
}
return __top;
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- void
+ void
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::_M_erase(_Link_type __x)
{
// Erase without rebalancing.
- while (__x != 0)
+ while (__x != 0)
{
_M_erase(_S_right(__x));
_Link_type __y = _S_left(__x);
@@ -1237,9 +1068,9 @@ namespace std
}
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- void
+ void
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
erase(iterator __first, iterator __last)
{
@@ -1249,214 +1080,202 @@ namespace std
while (__first != __last) erase(__first++);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- void
+ void
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
- erase(const _Key* __first, const _Key* __last)
- {
- while (__first != __last)
- erase(*__first++);
+ erase(const _Key* __first, const _Key* __last)
+ {
+ while (__first != __last)
+ erase(*__first++);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::find(const _Key& __k)
{
- _Link_type __y = _M_header; // Last node which is not less than __k.
- _Link_type __x = _M_root(); // Current node.
-
- while (__x != 0)
- if (!_M_key_compare(_S_key(__x), __k))
+ _Link_type __x = _M_begin(); // Current node.
+ _Link_type __y = _M_end(); // Last node which is not less than __k.
+
+ while (__x != 0)
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
-
- iterator __j = iterator(__y);
- return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ?
- end() : __j;
+
+ iterator __j = iterator(__y);
+ return (__j == end()
+ || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j;
}
-
- template<typename _Key, typename _Val, typename _KeyOfValue,
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
find(const _Key& __k) const
{
- _Link_type __y = _M_header; // Last node which is not less than __k.
- _Link_type __x = _M_root(); // Current node.
-
- while (__x != 0)
+ _Const_Link_type __x = _M_begin(); // Current node.
+ _Const_Link_type __y = _M_end(); // Last node which is not less than __k.
+
+ while (__x != 0)
{
- if (!_M_key_compare(_S_key(__x), __k))
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
- }
- const_iterator __j = const_iterator(__y);
- return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ?
- end() : __j;
+ }
+ const_iterator __j = const_iterator(__y);
+ return (__j == end()
+ || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j;
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
count(const _Key& __k) const
{
pair<const_iterator, const_iterator> __p = equal_range(__k);
- size_type __n = distance(__p.first, __p.second);
+ const size_type __n = std::distance(__p.first, __p.second);
return __n;
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
lower_bound(const _Key& __k)
{
- _Link_type __y = _M_header; /* Last node which is not less than __k. */
- _Link_type __x = _M_root(); /* Current node. */
-
- while (__x != 0)
- if (!_M_key_compare(_S_key(__x), __k))
+ _Link_type __x = _M_begin(); // Current node.
+ _Link_type __y = _M_end(); // Last node which is not less than __k.
+
+ while (__x != 0)
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
-
+
return iterator(__y);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
lower_bound(const _Key& __k) const
{
- _Link_type __y = _M_header; /* Last node which is not less than __k. */
- _Link_type __x = _M_root(); /* Current node. */
-
- while (__x != 0)
- if (!_M_key_compare(_S_key(__x), __k))
+ _Const_Link_type __x = _M_begin(); // Current node.
+ _Const_Link_type __y = _M_end(); // Last node which is not less than __k.
+
+ while (__x != 0)
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
-
+
return const_iterator(__y);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
upper_bound(const _Key& __k)
{
- _Link_type __y = _M_header; /* Last node which is greater than __k. */
- _Link_type __x = _M_root(); /* Current node. */
-
- while (__x != 0)
- if (_M_key_compare(__k, _S_key(__x)))
+ _Link_type __x = _M_begin(); // Current node.
+ _Link_type __y = _M_end(); // Last node which is greater than __k.
+
+ while (__x != 0)
+ if (_M_impl._M_key_compare(__k, _S_key(__x)))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
-
+
return iterator(__y);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
upper_bound(const _Key& __k) const
{
- _Link_type __y = _M_header; /* Last node which is greater than __k. */
- _Link_type __x = _M_root(); /* Current node. */
-
- while (__x != 0)
- if (_M_key_compare(__k, _S_key(__x)))
+ _Const_Link_type __x = _M_begin(); // Current node.
+ _Const_Link_type __y = _M_end(); // Last node which is greater than __k.
+
+ while (__x != 0)
+ if (_M_impl._M_key_compare(__k, _S_key(__x)))
__y = __x, __x = _S_left(__x);
else
__x = _S_right(__x);
-
+
return const_iterator(__y);
}
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- inline
- pair<typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator,
- typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator>
+ inline
+ pair<typename _Rb_tree<_Key,_Val,_KeyOfValue,
+ _Compare,_Alloc>::iterator,
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator>
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
equal_range(const _Key& __k)
{ return pair<iterator, iterator>(lower_bound(__k), upper_bound(__k)); }
- template<typename _Key, typename _Val, typename _KoV,
+ template<typename _Key, typename _Val, typename _KoV,
typename _Compare, typename _Alloc>
- inline
- pair<typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator,
- typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator>
- _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>
- ::equal_range(const _Key& __k) const
- {
- return pair<const_iterator,const_iterator>(lower_bound(__k),
- upper_bound(__k));
- }
-
- inline int
- __black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root)
- {
- if (__node == 0)
- return 0;
- int __sum = 0;
- do
- {
- if (__node->_M_color == _M_black)
- ++__sum;
- if (__node == __root)
- break;
- __node = __node->_M_parent;
- }
- while (1);
- return __sum;
- }
-
- template<typename _Key, typename _Val, typename _KeyOfValue,
+ inline
+ pair<typename _Rb_tree<_Key, _Val, _KoV,
+ _Compare, _Alloc>::const_iterator,
+ typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator>
+ _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::
+ equal_range(const _Key& __k) const
+ { return pair<const_iterator, const_iterator>(lower_bound(__k),
+ upper_bound(__k)); }
+
+ unsigned int
+ _Rb_tree_black_count(const _Rb_tree_node_base* __node,
+ const _Rb_tree_node_base* __root);
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
- bool
+ bool
_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
{
- if (_M_node_count == 0 || begin() == end())
- return _M_node_count == 0 && begin() == end() &&
- _M_header->_M_left == _M_header && _M_header->_M_right == _M_header;
-
- int __len = __black_count(_M_leftmost(), _M_root());
- for (const_iterator __it = begin(); __it != end(); ++__it)
- {
- _Link_type __x = (_Link_type) __it._M_node;
- _Link_type __L = _S_left(__x);
- _Link_type __R = _S_right(__x);
-
- if (__x->_M_color == _M_red)
- if ((__L && __L->_M_color == _M_red)
- || (__R && __R->_M_color == _M_red))
+ if (_M_impl._M_node_count == 0 || begin() == end())
+ return _M_impl._M_node_count == 0 && begin() == end()
+ && this->_M_impl._M_header._M_left == _M_end()
+ && this->_M_impl._M_header._M_right == _M_end();
+
+ unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root());
+ for (const_iterator __it = begin(); __it != end(); ++__it)
+ {
+ _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node);
+ _Const_Link_type __L = _S_left(__x);
+ _Const_Link_type __R = _S_right(__x);
+
+ if (__x->_M_color == _S_red)
+ if ((__L && __L->_M_color == _S_red)
+ || (__R && __R->_M_color == _S_red))
+ return false;
+
+ if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L)))
return false;
-
- if (__L && _M_key_compare(_S_key(__x), _S_key(__L)))
- return false;
- if (__R && _M_key_compare(_S_key(__R), _S_key(__x)))
- return false;
-
- if (!__L && !__R && __black_count(__x, _M_root()) != __len)
- return false;
- }
-
- if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
- return false;
- if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
- return false;
- return true;
+ if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x)))
+ return false;
+
+ if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len)
+ return false;
+ }
+
+ if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
+ return false;
+ if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
+ return false;
+ return true;
}
-} // namespace std
+} // namespace std
+
+#endif
-#endif
diff --git a/contrib/libstdc++/include/bits/stl_uninitialized.h b/contrib/libstdc++/include/bits/stl_uninitialized.h
index b5f7b8c..f4f8d18 100644
--- a/contrib/libstdc++/include/bits/stl_uninitialized.h
+++ b/contrib/libstdc++/include/bits/stl_uninitialized.h
@@ -1,6 +1,6 @@
// Raw memory manipulators -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,39 +58,38 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STL_UNINITIALIZED_H
-#define _CPP_BITS_STL_UNINITIALIZED_H 1
+#ifndef _STL_UNINITIALIZED_H
+#define _STL_UNINITIALIZED_H 1
#include <cstring>
namespace std
{
-
// uninitialized_copy
-
- template<typename _InputIter, typename _ForwardIter>
- inline _ForwardIter
- __uninitialized_copy_aux(_InputIter __first, _InputIter __last,
- _ForwardIter __result,
+ template<typename _InputIterator, typename _ForwardIterator>
+ inline _ForwardIterator
+ __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result,
__true_type)
- { return copy(__first, __last, __result); }
+ { return std::copy(__first, __last, __result); }
- template<typename _InputIter, typename _ForwardIter>
- _ForwardIter
- __uninitialized_copy_aux(_InputIter __first, _InputIter __last,
- _ForwardIter __result,
+ template<typename _InputIterator, typename _ForwardIterator>
+ inline _ForwardIterator
+ __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result,
__false_type)
{
- _ForwardIter __cur = __result;
- try {
- for ( ; __first != __last; ++__first, ++__cur)
- _Construct(&*__cur, *__first);
- return __cur;
- }
+ _ForwardIterator __cur = __result;
+ try
+ {
+ for ( ; __first != __last; ++__first, ++__cur)
+ std::_Construct(&*__cur, *__first);
+ return __cur;
+ }
catch(...)
{
- _Destroy(__result, __cur);
- __throw_exception_again;
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
}
}
@@ -103,52 +102,56 @@ namespace std
*
* Like copy(), but does not require an initialized output range.
*/
- template<typename _InputIter, typename _ForwardIter>
- inline _ForwardIter
- uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
+ template<typename _InputIterator, typename _ForwardIterator>
+ inline _ForwardIterator
+ uninitialized_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
- return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
+ return std::__uninitialized_copy_aux(__first, __last, __result,
+ _Is_POD());
}
inline char*
uninitialized_copy(const char* __first, const char* __last, char* __result)
{
- memmove(__result, __first, __last - __first);
+ std::memmove(__result, __first, __last - __first);
return __result + (__last - __first);
}
- inline wchar_t*
+ inline wchar_t*
uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
wchar_t* __result)
{
- memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
+ std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
return __result + (__last - __first);
}
// Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial.
- template<typename _ForwardIter, typename _Tp>
+ template<typename _ForwardIterator, typename _Tp>
inline void
- __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
+ __uninitialized_fill_aux(_ForwardIterator __first,
+ _ForwardIterator __last,
const _Tp& __x, __true_type)
- { fill(__first, __last, __x); }
+ { std::fill(__first, __last, __x); }
- template<typename _ForwardIter, typename _Tp>
+ template<typename _ForwardIterator, typename _Tp>
void
- __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
+ __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __false_type)
{
- _ForwardIter __cur = __first;
- try {
- for ( ; __cur != __last; ++__cur)
- _Construct(&*__cur, __x);
- }
+ _ForwardIterator __cur = __first;
+ try
+ {
+ for ( ; __cur != __last; ++__cur)
+ std::_Construct(&*__cur, __x);
+ }
catch(...)
{
- _Destroy(__first, __cur);
- __throw_exception_again;
+ std::_Destroy(__first, __cur);
+ __throw_exception_again;
}
}
@@ -161,40 +164,40 @@ namespace std
*
* Like fill(), but does not require an initialized output range.
*/
- template<typename _ForwardIter, typename _Tp>
+ template<typename _ForwardIterator, typename _Tp>
inline void
- uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x)
+ uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __x)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
- __uninitialized_fill_aux(__first, __last, __x, _Is_POD());
+ std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
}
// Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial.
- template<typename _ForwardIter, typename _Size, typename _Tp>
- inline _ForwardIter
- __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ inline _ForwardIterator
+ __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __true_type)
- {
- return fill_n(__first, __n, __x);
- }
+ { return std::fill_n(__first, __n, __x); }
- template<typename _ForwardIter, typename _Size, typename _Tp>
- _ForwardIter
- __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ _ForwardIterator
+ __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __false_type)
{
- _ForwardIter __cur = __first;
- try {
- for ( ; __n > 0; --__n, ++__cur)
- _Construct(&*__cur, __x);
- return __cur;
- }
+ _ForwardIterator __cur = __first;
+ try
+ {
+ for ( ; __n > 0; --__n, ++__cur)
+ std::_Construct(&*__cur, __x);
+ return __cur;
+ }
catch(...)
- {
- _Destroy(__first, __cur);
- __throw_exception_again;
+ {
+ std::_Destroy(__first, __cur);
+ __throw_exception_again;
}
}
@@ -207,16 +210,16 @@ namespace std
*
* Like fill_n(), but does not require an initialized output range.
*/
- template<typename _ForwardIter, typename _Size, typename _Tp>
- inline _ForwardIter
- uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ inline _ForwardIterator
+ uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
- typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
- return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
+ return std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
}
- // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,
+ // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,
// __uninitialized_fill_copy.
// __uninitialized_copy_copy
@@ -224,67 +227,71 @@ namespace std
// copies [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
- template<typename _InputIter1, typename _InputIter2, typename _ForwardIter>
- inline _ForwardIter
- __uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2,
- _ForwardIter __result)
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _ForwardIterator>
+ inline _ForwardIterator
+ __uninitialized_copy_copy(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _ForwardIterator __result)
{
- _ForwardIter __mid = uninitialized_copy(__first1, __last1, __result);
- try {
- return uninitialized_copy(__first2, __last2, __mid);
- }
+ _ForwardIterator __mid = std::uninitialized_copy(__first1, __last1,
+ __result);
+ try
+ {
+ return std::uninitialized_copy(__first2, __last2, __mid);
+ }
catch(...)
- {
- _Destroy(__result, __mid);
- __throw_exception_again;
+ {
+ std::_Destroy(__result, __mid);
+ __throw_exception_again;
}
}
// __uninitialized_fill_copy
// Fills [result, mid) with x, and copies [first, last) into
// [mid, mid + (last - first)).
- template<typename _ForwardIter, typename _Tp, typename _InputIter>
- inline _ForwardIter
- __uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid,
- const _Tp& __x,
- _InputIter __first, _InputIter __last)
+ template<typename _ForwardIterator, typename _Tp, typename _InputIterator>
+ inline _ForwardIterator
+ __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
+ const _Tp& __x, _InputIterator __first,
+ _InputIterator __last)
{
- uninitialized_fill(__result, __mid, __x);
- try {
- return uninitialized_copy(__first, __last, __mid);
- }
+ std::uninitialized_fill(__result, __mid, __x);
+ try
+ {
+ return std::uninitialized_copy(__first, __last, __mid);
+ }
catch(...)
{
- _Destroy(__result, __mid);
- __throw_exception_again;
+ std::_Destroy(__result, __mid);
+ __throw_exception_again;
}
}
// __uninitialized_copy_fill
// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
// fills [first2 + (last1 - first1), last2) with x.
- template<typename _InputIter, typename _ForwardIter, typename _Tp>
+ template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline void
- __uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
- _ForwardIter __first2, _ForwardIter __last2,
- const _Tp& __x)
+ __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2,
+ _ForwardIterator __last2, const _Tp& __x)
{
- _ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2);
- try {
- uninitialized_fill(__mid2, __last2, __x);
- }
+ _ForwardIterator __mid2 = std::uninitialized_copy(__first1, __last1,
+ __first2);
+ try
+ {
+ std::uninitialized_fill(__mid2, __last2, __x);
+ }
catch(...)
{
- _Destroy(__first2, __mid2);
- __throw_exception_again;
+ std::_Destroy(__first2, __mid2);
+ __throw_exception_again;
}
}
} // namespace std
-#endif /* _CPP_BITS_STL_UNINITIALIZED_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _STL_UNINITIALIZED_H */
diff --git a/contrib/libstdc++/include/bits/stl_vector.h b/contrib/libstdc++/include/bits/stl_vector.h
index 5354732..fee413d 100644
--- a/contrib/libstdc++/include/bits/stl_vector.h
+++ b/contrib/libstdc++/include/bits/stl_vector.h
@@ -1,6 +1,6 @@
// Vector implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,79 +58,15 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_VECTOR_H
-#define __GLIBCPP_INTERNAL_VECTOR_H
+#ifndef _VECTOR_H
+#define _VECTOR_H 1
#include <bits/stl_iterator_base_funcs.h>
#include <bits/functexcept.h>
#include <bits/concept_check.h>
-namespace std
+namespace _GLIBCXX_STD
{
- /// @if maint Primary default version. @endif
- /**
- * @if maint
- * See bits/stl_deque.h's _Deque_alloc_base for an explanation.
- * @endif
- */
- template<typename _Tp, typename _Allocator, bool _IsStatic>
- class _Vector_alloc_base
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
- allocator_type;
-
- allocator_type
- get_allocator() const { return _M_data_allocator; }
-
- _Vector_alloc_base(const allocator_type& __a)
- : _M_data_allocator(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
- { }
-
- protected:
- allocator_type _M_data_allocator;
- _Tp* _M_start;
- _Tp* _M_finish;
- _Tp* _M_end_of_storage;
-
- _Tp*
- _M_allocate(size_t __n) { return _M_data_allocator.allocate(__n); }
-
- void
- _M_deallocate(_Tp* __p, size_t __n)
- { if (__p) _M_data_allocator.deallocate(__p, __n); }
- };
-
- /// @if maint Specialization for instanceless allocators. @endif
- template<typename _Tp, typename _Allocator>
- class _Vector_alloc_base<_Tp, _Allocator, true>
- {
- public:
- typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
- allocator_type;
-
- allocator_type
- get_allocator() const { return allocator_type(); }
-
- _Vector_alloc_base(const allocator_type&)
- : _M_start(0), _M_finish(0), _M_end_of_storage(0)
- { }
-
- protected:
- _Tp* _M_start;
- _Tp* _M_finish;
- _Tp* _M_end_of_storage;
-
- typedef typename _Alloc_traits<_Tp, _Allocator>::_Alloc_type _Alloc_type;
-
- _Tp*
- _M_allocate(size_t __n) { return _Alloc_type::allocate(__n); }
-
- void
- _M_deallocate(_Tp* __p, size_t __n) { _Alloc_type::deallocate(__p, __n);}
- };
-
-
/**
* @if maint
* See bits/stl_deque.h's _Deque_base for an explanation.
@@ -138,34 +74,53 @@ namespace std
*/
template<typename _Tp, typename _Alloc>
struct _Vector_base
- : public _Vector_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
{
+ struct _Vector_impl
+ : public _Alloc {
+ _Tp* _M_start;
+ _Tp* _M_finish;
+ _Tp* _M_end_of_storage;
+ _Vector_impl (_Alloc const& __a)
+ : _Alloc(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
+ { }
+ };
+
public:
- typedef _Vector_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- _Base;
- typedef typename _Base::allocator_type allocator_type;
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const { return *static_cast<const _Alloc*>(&this->_M_impl); }
+
+ _Vector_base(const allocator_type& __a) : _M_impl(__a)
+ { }
- _Vector_base(const allocator_type& __a)
- : _Base(__a) { }
-
_Vector_base(size_t __n, const allocator_type& __a)
- : _Base(__a)
+ : _M_impl(__a)
{
- _M_start = _M_allocate(__n);
- _M_finish = _M_start;
- _M_end_of_storage = _M_start + __n;
+ this->_M_impl._M_start = this->_M_allocate(__n);
+ this->_M_impl._M_finish = this->_M_impl._M_start;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
-
- ~_Vector_base()
- { _M_deallocate(_M_start, _M_end_of_storage - _M_start); }
+
+ ~_Vector_base()
+ { _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start); }
+
+ public:
+ _Vector_impl _M_impl;
+
+ _Tp*
+ _M_allocate(size_t __n) { return _M_impl.allocate(__n); }
+
+ void
+ _M_deallocate(_Tp* __p, size_t __n)
+ { if (__p) _M_impl.deallocate(__p, __n); }
};
-
-
+
+
/**
- * @brief A standard container which offers fixed time access to individual
- * elements in any order.
+ * @brief A standard container which offers fixed time access to
+ * individual elements in any order.
*
* @ingroup Containers
* @ingroup Sequences
@@ -176,48 +131,46 @@ namespace std
* <a href="tables.html#68">optional sequence requirements</a> with the
* %exception of @c push_front and @c pop_front.
*
- * In some terminology a %vector can be described as a dynamic C-style array,
- * it offers fast and efficient access to individual elements in any order
- * and saves the user from worrying about memory and size allocation.
- * Subscripting ( @c [] ) access is also provided as with C-style arrays.
+ * In some terminology a %vector can be described as a dynamic
+ * C-style array, it offers fast and efficient access to individual
+ * elements in any order and saves the user from worrying about
+ * memory and size allocation. Subscripting ( @c [] ) access is
+ * also provided as with C-style arrays.
*/
template<typename _Tp, typename _Alloc = allocator<_Tp> >
class vector : protected _Vector_base<_Tp, _Alloc>
{
// Concept requirements.
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
-
- typedef _Vector_base<_Tp, _Alloc> _Base;
- typedef vector<_Tp, _Alloc> vector_type;
-
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ typedef vector<_Tp, _Alloc> vector_type;
+
public:
- typedef _Tp value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
+ typedef _Tp value_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator;
typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
const_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef typename _Base::allocator_type allocator_type;
-
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef typename _Base::allocator_type allocator_type;
+
protected:
/** @if maint
* These two functions and three data members are all from the
- * top-most base class, which varies depending on the type of
- * %allocator. They should be pretty self-explanatory, as
+ * base class. They should be pretty self-explanatory, as
* %vector uses a simple contiguous allocation scheme. @endif
*/
using _Base::_M_allocate;
using _Base::_M_deallocate;
- using _Base::_M_start;
- using _Base::_M_finish;
- using _Base::_M_end_of_storage;
-
+ using _Base::_M_impl;
+
public:
// [23.2.4.1] construct/copy/destroy
// (assign() and get_allocator() are also listed in this section)
@@ -227,35 +180,37 @@ namespace std
explicit
vector(const allocator_type& __a = allocator_type())
: _Base(__a) { }
-
+
/**
* @brief Create a %vector with copies of an exemplar element.
* @param n The number of elements to initially create.
* @param value An element to copy.
- *
+ *
* This constructor fills the %vector with @a n copies of @a value.
*/
vector(size_type __n, const value_type& __value,
const allocator_type& __a = allocator_type())
: _Base(__n, __a)
- { _M_finish = uninitialized_fill_n(_M_start, __n, __value); }
-
+ { this->_M_impl._M_finish = std::uninitialized_fill_n(this->_M_impl._M_start,
+ __n, __value); }
+
/**
* @brief Create a %vector with default elements.
* @param n The number of elements to initially create.
- *
+ *
* This constructor fills the %vector with @a n copies of a
* default-constructed element.
*/
explicit
vector(size_type __n)
: _Base(__n, allocator_type())
- { _M_finish = uninitialized_fill_n(_M_start, __n, value_type()); }
-
+ { this->_M_impl._M_finish = std::uninitialized_fill_n(this->_M_impl._M_start,
+ __n, value_type()); }
+
/**
* @brief %Vector copy constructor.
* @param x A %vector of identical element and allocator types.
- *
+ *
* The newly-created %vector uses a copy of the allocation
* object used by @a x. All the elements of @a x are copied,
* but any extra memory in
@@ -263,21 +218,24 @@ namespace std
*/
vector(const vector& __x)
: _Base(__x.size(), __x.get_allocator())
- { _M_finish = uninitialized_copy(__x.begin(), __x.end(), _M_start); }
-
+ { this->_M_impl._M_finish = std::uninitialized_copy(__x.begin(), __x.end(),
+ this->_M_impl._M_start);
+ }
+
/**
* @brief Builds a %vector from a range.
* @param first An input iterator.
* @param last An input iterator.
- *
+ *
* Create a %vector consisting of copies of the elements from
* [first,last).
*
- * If the iterators are forward, bidirectional, or random-access, then
- * this will call the elements' copy constructor N times (where N is
- * distance(first,last)) and do no memory reallocation. But if only
- * input iterators are used, then this will do at most 2N calls to the
- * copy constructor, and logN memory reallocations.
+ * If the iterators are forward, bidirectional, or
+ * random-access, then this will call the elements' copy
+ * constructor N times (where N is distance(first,last)) and do
+ * no memory reallocation. But if only input iterators are
+ * used, then this will do at most 2N calls to the copy
+ * constructor, and logN memory reallocations.
*/
template<typename _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
@@ -288,25 +246,26 @@ namespace std
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_initialize_dispatch(__first, __last, _Integral());
}
-
+
/**
- * The dtor only erases the elements, and note that if the elements
- * themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
+ * The dtor only erases the elements, and note that if the
+ * elements themselves are pointers, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibilty.
*/
- ~vector() { _Destroy(_M_start, _M_finish); }
-
+ ~vector() { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish); }
+
/**
* @brief %Vector assignment operator.
* @param x A %vector of identical element and allocator types.
- *
+ *
* All the elements of @a x are copied, but any extra memory in
* @a x (for fast expansion) will not be copied. Unlike the
* copy constructor, the allocator object is not copied.
*/
vector&
operator=(const vector& __x);
-
+
/**
* @brief Assigns a given value to a %vector.
* @param n Number of elements to be assigned.
@@ -318,9 +277,9 @@ namespace std
* the number of elements assigned. Old data may be lost.
*/
void
- assign(size_type __n, const value_type& __val)
+ assign(size_type __n, const value_type& __val)
{ _M_fill_assign(__n, __val); }
-
+
/**
* @brief Assigns a range to a %vector.
* @param first An input iterator.
@@ -341,42 +300,43 @@ namespace std
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_assign_dispatch(__first, __last, _Integral());
}
-
+
/// Get a copy of the memory allocation object.
- allocator_type
- get_allocator() const { return _Base::get_allocator(); }
-
+ using _Base::get_allocator;
+
// iterators
/**
- * Returns a read/write iterator that points to the first element in the
- * %vector. Iteration is done in ordinary element order.
+ * Returns a read/write iterator that points to the first
+ * element in the %vector. Iteration is done in ordinary
+ * element order.
*/
iterator
- begin() { return iterator (_M_start); }
-
+ begin() { return iterator (this->_M_impl._M_start); }
+
/**
* Returns a read-only (constant) iterator that points to the
* first element in the %vector. Iteration is done in ordinary
* element order.
*/
const_iterator
- begin() const { return const_iterator (_M_start); }
-
+ begin() const { return const_iterator (this->_M_impl._M_start); }
+
/**
* Returns a read/write iterator that points one past the last
* element in the %vector. Iteration is done in ordinary
* element order.
*/
iterator
- end() { return iterator (_M_finish); }
-
+ end() { return iterator (this->_M_impl._M_finish); }
+
/**
- * Returns a read-only (constant) iterator that points one past the last
- * element in the %vector. Iteration is done in ordinary element order.
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %vector. Iteration is done in
+ * ordinary element order.
*/
const_iterator
- end() const { return const_iterator (_M_finish); }
-
+ end() const { return const_iterator (this->_M_impl._M_finish); }
+
/**
* Returns a read/write reverse iterator that points to the
* last element in the %vector. Iteration is done in reverse
@@ -384,7 +344,7 @@ namespace std
*/
reverse_iterator
rbegin() { return reverse_iterator(end()); }
-
+
/**
* Returns a read-only (constant) reverse iterator that points
* to the last element in the %vector. Iteration is done in
@@ -392,15 +352,15 @@ namespace std
*/
const_reverse_iterator
rbegin() const { return const_reverse_iterator(end()); }
-
+
/**
- * Returns a read/write reverse iterator that points to one before the
- * first element in the %vector. Iteration is done in reverse element
- * order.
+ * Returns a read/write reverse iterator that points to one
+ * before the first element in the %vector. Iteration is done
+ * in reverse element order.
*/
reverse_iterator
rend() { return reverse_iterator(begin()); }
-
+
/**
* Returns a read-only (constant) reverse iterator that points
* to one before the first element in the %vector. Iteration
@@ -408,16 +368,16 @@ namespace std
*/
const_reverse_iterator
rend() const { return const_reverse_iterator(begin()); }
-
+
// [23.2.4.2] capacity
/** Returns the number of elements in the %vector. */
size_type
size() const { return size_type(end() - begin()); }
-
+
/** Returns the size() of the largest possible %vector. */
size_type
max_size() const { return size_type(-1) / sizeof(value_type); }
-
+
/**
* @brief Resizes the %vector to the specified number of elements.
* @param new_size Number of elements the %vector should contain.
@@ -437,7 +397,7 @@ namespace std
else
insert(end(), __new_size - size(), __x);
}
-
+
/**
* @brief Resizes the %vector to the specified number of elements.
* @param new_size Number of elements the %vector should contain.
@@ -450,22 +410,22 @@ namespace std
*/
void
resize(size_type __new_size) { resize(__new_size, value_type()); }
-
+
/**
- * Returns the total number of elements that the %vector can hold before
- * needing to allocate more memory.
+ * Returns the total number of elements that the %vector can
+ * hold before needing to allocate more memory.
*/
size_type
capacity() const
- { return size_type(const_iterator(_M_end_of_storage) - begin()); }
-
+ { return size_type(const_iterator(this->_M_impl._M_end_of_storage) - begin()); }
+
/**
* Returns true if the %vector is empty. (Thus begin() would
* equal end().)
*/
bool
empty() const { return begin() == end(); }
-
+
/**
* @brief Attempt to preallocate enough memory for specified number of
* elements.
@@ -485,11 +445,12 @@ namespace std
*/
void
reserve(size_type __n);
-
+
// element access
/**
* @brief Subscript access to the data contained in the %vector.
- * @param n The index of the element for which data should be accessed.
+ * @param n The index of the element for which data should be
+ * accessed.
* @return Read/write reference to data.
*
* This operator allows for easy, array-style, data access.
@@ -499,7 +460,7 @@ namespace std
*/
reference
operator[](size_type __n) { return *(begin() + __n); }
-
+
/**
* @brief Subscript access to the data contained in the %vector.
* @param n The index of the element for which data should be
@@ -513,16 +474,16 @@ namespace std
*/
const_reference
operator[](size_type __n) const { return *(begin() + __n); }
-
+
protected:
/// @if maint Safety check used only from at(). @endif
void
_M_range_check(size_type __n) const
{
if (__n >= this->size())
- __throw_out_of_range("vector [] access out of range");
+ __throw_out_of_range(__N("vector::_M_range_check"));
}
-
+
public:
/**
* @brief Provides access to the data contained in the %vector.
@@ -531,13 +492,13 @@ namespace std
* @return Read/write reference to data.
* @throw std::out_of_range If @a n is an invalid index.
*
- * This function provides for safer data access. The parameter is first
- * checked that it is in the range of the vector. The function throws
- * out_of_range if the check fails.
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the vector. The
+ * function throws out_of_range if the check fails.
*/
reference
at(size_type __n) { _M_range_check(__n); return (*this)[__n]; }
-
+
/**
* @brief Provides access to the data contained in the %vector.
* @param n The index of the element for which data should be
@@ -551,35 +512,35 @@ namespace std
*/
const_reference
at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; }
-
+
/**
* Returns a read/write reference to the data at the first
* element of the %vector.
*/
reference
front() { return *begin(); }
-
+
/**
* Returns a read-only (constant) reference to the data at the first
* element of the %vector.
*/
const_reference
front() const { return *begin(); }
-
+
/**
- * Returns a read/write reference to the data at the last element of the
- * %vector.
+ * Returns a read/write reference to the data at the last
+ * element of the %vector.
*/
reference
back() { return *(end() - 1); }
-
+
/**
- * Returns a read-only (constant) reference to the data at the last
- * element of the %vector.
+ * Returns a read-only (constant) reference to the data at the
+ * last element of the %vector.
*/
const_reference
back() const { return *(end() - 1); }
-
+
// [23.2.4.3] modifiers
/**
* @brief Add data to the end of the %vector.
@@ -594,30 +555,31 @@ namespace std
void
push_back(const value_type& __x)
{
- if (_M_finish != _M_end_of_storage)
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
- _Construct(_M_finish, __x);
- ++_M_finish;
+ std::_Construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
}
else
_M_insert_aux(end(), __x);
}
-
+
/**
* @brief Removes last element.
*
* This is a typical stack operation. It shrinks the %vector by one.
*
- * Note that no data is returned, and if the last element's data is
- * needed, it should be retrieved before pop_back() is called.
+ * Note that no data is returned, and if the last element's
+ * data is needed, it should be retrieved before pop_back() is
+ * called.
*/
void
pop_back()
{
- --_M_finish;
- _Destroy(_M_finish);
+ --this->_M_impl._M_finish;
+ std::_Destroy(this->_M_impl._M_finish);
}
-
+
/**
* @brief Inserts given value into %vector before specified iterator.
* @param position An iterator into the %vector.
@@ -631,28 +593,7 @@ namespace std
*/
iterator
insert(iterator __position, const value_type& __x);
-
-#ifdef _GLIBCPP_DEPRECATED
- /**
- * @brief Inserts an element into the %vector.
- * @param position An iterator into the %vector.
- * @return An iterator that points to the inserted element.
- *
- * This function will insert a default-constructed element
- * before the specified location. You should consider using
- * insert(position,value_type()) instead. Note that this kind
- * of operation could be expensive for a vector and if it is
- * frequently used the user should consider using std::list.
- *
- * @note This was deprecated in 3.2 and will be removed in 3.4.
- * You must define @c _GLIBCPP_DEPRECATED to make this visible
- * in 3.2; see c++config.h.
- */
- iterator
- insert(iterator __position)
- { return insert(__position, value_type()); }
-#endif
-
+
/**
* @brief Inserts a number of copies of given data into the %vector.
* @param position An iterator into the %vector.
@@ -667,12 +608,12 @@ namespace std
* consider using std::list.
*/
void
- insert(iterator __pos, size_type __n, const value_type& __x)
- { _M_fill_insert(__pos, __n, __x); }
-
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
/**
* @brief Inserts a range into the %vector.
- * @param pos An iterator into the %vector.
+ * @param position An iterator into the %vector.
* @param first An input iterator.
* @param last An input iterator.
*
@@ -686,13 +627,14 @@ namespace std
*/
template<typename _InputIterator>
void
- insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
{
// Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
- _M_insert_dispatch(__pos, __first, __last, _Integral());
+ _M_insert_dispatch(__position, __first, __last, _Integral());
}
-
+
/**
* @brief Remove element at given position.
* @param position Iterator pointing to element to be erased.
@@ -710,7 +652,7 @@ namespace std
*/
iterator
erase(iterator __position);
-
+
/**
* @brief Remove a range of elements.
* @param first Iterator pointing to the first element to be erased.
@@ -731,7 +673,7 @@ namespace std
*/
iterator
erase(iterator __first, iterator __last);
-
+
/**
* @brief Swaps data with another %vector.
* @param x A %vector of the same element and allocator types.
@@ -744,11 +686,11 @@ namespace std
void
swap(vector& __x)
{
- std::swap(_M_start, __x._M_start);
- std::swap(_M_finish, __x._M_finish);
- std::swap(_M_end_of_storage, __x._M_end_of_storage);
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage);
}
-
+
/**
* Erases all the elements. Note that this function only erases the
* elements, and that if the elements themselves are pointers, the
@@ -757,7 +699,7 @@ namespace std
*/
void
clear() { erase(begin(), end()); }
-
+
protected:
/**
* @if maint
@@ -770,10 +712,10 @@ namespace std
_M_allocate_and_copy(size_type __n,
_ForwardIterator __first, _ForwardIterator __last)
{
- pointer __result = _M_allocate(__n);
+ pointer __result = this->_M_allocate(__n);
try
{
- uninitialized_copy(__first, __last, __result);
+ std::uninitialized_copy(__first, __last, __result);
return __result;
}
catch(...)
@@ -782,31 +724,32 @@ namespace std
__throw_exception_again;
}
}
-
-
+
+
// Internal constructor functions follow.
-
+
// Called by the range constructor to implement [23.1.1]/9
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
{
- _M_start = _M_allocate(__n);
- _M_end_of_storage = _M_start + __n;
- _M_finish = uninitialized_fill_n(_M_start, __n, __value);
+ this->_M_impl._M_start = _M_allocate(__n);
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+ this->_M_impl._M_finish = std::uninitialized_fill_n(this->_M_impl._M_start,
+ __n, __value);
}
-
+
// Called by the range constructor to implement [23.1.1]/9
- template<typename _InputIter>
+ template<typename _InputIterator>
void
- _M_initialize_dispatch(_InputIter __first, _InputIter __last,
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
- typedef typename iterator_traits<_InputIter>::iterator_category
+ typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_range_initialize(__first, __last, _IterCategory());
}
-
+
// Called by the second initialize_dispatch above
template<typename _InputIterator>
void
@@ -816,23 +759,24 @@ namespace std
for ( ; __first != __last; ++__first)
push_back(*__first);
}
-
+
// Called by the second initialize_dispatch above
template<typename _ForwardIterator>
- void
+ void
_M_range_initialize(_ForwardIterator __first,
_ForwardIterator __last, forward_iterator_tag)
{
- size_type __n = distance(__first, __last);
- _M_start = _M_allocate(__n);
- _M_end_of_storage = _M_start + __n;
- _M_finish = uninitialized_copy(__first, __last, _M_start);
+ size_type __n = std::distance(__first, __last);
+ this->_M_impl._M_start = this->_M_allocate(__n);
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+ this->_M_impl._M_finish = std::uninitialized_copy(__first, __last,
+ this->_M_impl._M_start);
}
-
-
+
+
// Internal assign functions follow. The *_aux functions do the actual
// assignment work for the range versions.
-
+
// Called by the range assign to implement [23.1.1]/9
template<typename _Integer>
void
@@ -841,37 +785,38 @@ namespace std
_M_fill_assign(static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
-
+
// Called by the range assign to implement [23.1.1]/9
- template<typename _InputIter>
+ template<typename _InputIterator>
void
- _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
{
- typedef typename iterator_traits<_InputIter>::iterator_category
+ typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_assign_aux(__first, __last, _IterCategory());
}
-
+
// Called by the second assign_dispatch above
template<typename _InputIterator>
- void
+ void
_M_assign_aux(_InputIterator __first, _InputIterator __last,
input_iterator_tag);
-
+
// Called by the second assign_dispatch above
template<typename _ForwardIterator>
- void
+ void
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag);
-
+
// Called by assign(n,t), and the range assign when it turns out
// to be the same thing.
void
_M_fill_assign(size_type __n, const value_type& __val);
-
-
+
+
// Internal insert functions follow.
-
+
// Called by the range insert to implement [23.1.1]/9
template<typename _Integer>
void
@@ -881,7 +826,7 @@ namespace std
_M_fill_insert(__pos, static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
-
+
// Called by the range insert to implement [23.1.1]/9
template<typename _InputIterator>
void
@@ -892,35 +837,30 @@ namespace std
_IterCategory;
_M_range_insert(__pos, __first, __last, _IterCategory());
}
-
+
// Called by the second insert_dispatch above
template<typename _InputIterator>
void
- _M_range_insert(iterator __pos, _InputIterator __first,
+ _M_range_insert(iterator __pos, _InputIterator __first,
_InputIterator __last, input_iterator_tag);
-
+
// Called by the second insert_dispatch above
template<typename _ForwardIterator>
void
- _M_range_insert(iterator __pos, _ForwardIterator __first,
+ _M_range_insert(iterator __pos, _ForwardIterator __first,
_ForwardIterator __last, forward_iterator_tag);
-
+
// Called by insert(p,n,x), and the range insert when it turns out to be
// the same thing.
void
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
-
+
// Called by insert(p,x)
void
_M_insert_aux(iterator __position, const value_type& __x);
-
-#ifdef _GLIBCPP_DEPRECATED
- // Unused now (same situation as in deque)
- void _M_insert_aux(iterator __position);
-#endif
};
-
-
+
+
/**
* @brief Vector equality comparison.
* @param x A %vector.
@@ -936,52 +876,52 @@ namespace std
operator==(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{
return __x.size() == __y.size() &&
- equal(__x.begin(), __x.end(), __y.begin());
+ std::equal(__x.begin(), __x.end(), __y.begin());
}
-
+
/**
* @brief Vector ordering relation.
* @param x A %vector.
* @param y A %vector of the same type as @a x.
- * @return True iff @a x is lexographically less than @a y.
+ * @return True iff @a x is lexicographically less than @a y.
*
* This is a total ordering relation. It is linear in the size of the
* vectors. The elements must be comparable with @c <.
*
- * See std::lexographical_compare() for how the determination is made.
+ * See std::lexicographical_compare() for how the determination is made.
*/
template<typename _Tp, typename _Alloc>
inline bool
operator<(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{
- return lexicographical_compare(__x.begin(), __x.end(),
- __y.begin(), __y.end());
+ return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end());
}
-
+
/// Based on operator==
template<typename _Tp, typename _Alloc>
inline bool
operator!=(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{ return !(__x == __y); }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator>(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{ return __y < __x; }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator<=(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{ return !(__y < __x); }
-
+
/// Based on operator<
template<typename _Tp, typename _Alloc>
inline bool
operator>=(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
{ return !(__x < __y); }
-
+
/// See std::vector::swap().
template<typename _Tp, typename _Alloc>
inline void
@@ -989,4 +929,4 @@ namespace std
{ __x.swap(__y); }
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_VECTOR_H */
+#endif /* _VECTOR_H */
diff --git a/contrib/libstdc++/include/bits/stream_iterator.h b/contrib/libstdc++/include/bits/stream_iterator.h
index 4897fc3..fa11bd6 100644
--- a/contrib/libstdc++/include/bits/stream_iterator.h
+++ b/contrib/libstdc++/include/bits/stream_iterator.h
@@ -1,6 +1,6 @@
// Stream iterators
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,17 +32,20 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STREAM_ITERATOR_H
-#define _CPP_BITS_STREAM_ITERATOR_H 1
+#ifndef _STREAM_ITERATOR_H
+#define _STREAM_ITERATOR_H 1
#pragma GCC system_header
+#include <debug/debug.h>
+
namespace std
{
- template<typename _Tp, typename _CharT = char,
- typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
- class istream_iterator
- : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
+ /// Provides input iterator semantics for streams.
+ template<typename _Tp, typename _CharT = char,
+ typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
+ class istream_iterator
+ : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
{
public:
typedef _CharT char_type;
@@ -50,107 +53,162 @@ namespace std
typedef basic_istream<_CharT, _Traits> istream_type;
private:
- istream_type* _M_stream;
- _Tp _M_value;
- bool _M_ok;
-
- public:
- istream_iterator() : _M_stream(0), _M_ok(false) {}
-
- istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
+ istream_type* _M_stream;
+ _Tp _M_value;
+ bool _M_ok;
- istream_iterator(const istream_iterator& __obj)
- : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
- _M_ok(__obj._M_ok)
+ public:
+ /// Construct end of input stream iterator.
+ istream_iterator()
+ : _M_stream(0), _M_ok(false) {}
+
+ /// Construct start of input stream iterator.
+ istream_iterator(istream_type& __s)
+ : _M_stream(&__s)
+ { _M_read(); }
+
+ istream_iterator(const istream_iterator& __obj)
+ : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
+ _M_ok(__obj._M_ok)
{ }
const _Tp&
- operator*() const { return _M_value; }
+ operator*() const
+ {
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_deref_istream)
+ ._M_iterator(*this));
+ return _M_value;
+ }
const _Tp*
operator->() const { return &(operator*()); }
- istream_iterator&
- operator++()
- { _M_read(); return *this; }
+ istream_iterator&
+ operator++()
+ {
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_inc_istream)
+ ._M_iterator(*this));
+ _M_read();
+ return *this;
+ }
- istream_iterator
- operator++(int)
+ istream_iterator
+ operator++(int)
{
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_inc_istream)
+ ._M_iterator(*this));
istream_iterator __tmp = *this;
_M_read();
return __tmp;
}
- bool
+ bool
_M_equal(const istream_iterator& __x) const
- { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);}
+ { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
- private:
- void
- _M_read()
+ private:
+ void
+ _M_read()
{
_M_ok = (_M_stream && *_M_stream) ? true : false;
- if (_M_ok)
+ if (_M_ok)
{
*_M_stream >> _M_value;
_M_ok = *_M_stream ? true : false;
}
}
};
-
+
+ /// Return true if x and y are both end or not end, or x and y are the same.
template<typename _Tp, typename _CharT, typename _Traits, typename _Dist>
- inline bool
+ inline bool
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
- const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
+ const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
{ return __x._M_equal(__y); }
+ /// Return false if x and y are both end or not end, or x and y are the same.
template <class _Tp, class _CharT, class _Traits, class _Dist>
- inline bool
+ inline bool
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
- const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
+ const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
{ return !__x._M_equal(__y); }
-
- template<typename _Tp, typename _CharT = char,
+ /**
+ * @brief Provides output iterator semantics for streams.
+ *
+ * This class provides an iterator to write to an ostream. The type Tp is
+ * the only type written by this iterator and there must be an
+ * operator<<(Tp) defined.
+ *
+ * @param Tp The type to write to the ostream.
+ * @param CharT The ostream char_type.
+ * @param Traits The ostream char_traits.
+ */
+ template<typename _Tp, typename _CharT = char,
typename _Traits = char_traits<_CharT> >
- class ostream_iterator
- : public iterator<output_iterator_tag, void, void, void, void>
+ class ostream_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
{
public:
+ //@{
+ /// Public typedef
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_ostream<_CharT, _Traits> ostream_type;
+ //@}
private:
- ostream_type* _M_stream;
- const _CharT* _M_string;
+ ostream_type* _M_stream;
+ const _CharT* _M_string;
public:
+ /// Construct from an ostream.
ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
- ostream_iterator(ostream_type& __s, const _CharT* __c)
+ /**
+ * Construct from an ostream.
+ *
+ * The delimiter string @a c is written to the stream after every Tp
+ * written to the stream. The delimiter is not copied, and thus must
+ * not be destroyed while this iterator is in use.
+ *
+ * @param s Underlying ostream to write to.
+ * @param c CharT delimiter string to insert.
+ */
+ ostream_iterator(ostream_type& __s, const _CharT* __c)
: _M_stream(&__s), _M_string(__c) { }
+ /// Copy constructor.
ostream_iterator(const ostream_iterator& __obj)
: _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
- ostream_iterator&
- operator=(const _Tp& __value)
- {
+ /// Writes @a value to underlying ostream using operator<<. If
+ /// constructed with delimiter string, writes delimiter to ostream.
+ ostream_iterator&
+ operator=(const _Tp& __value)
+ {
+ __glibcxx_requires_cond(_M_stream != 0,
+ _M_message(__gnu_debug::__msg_output_ostream)
+ ._M_iterator(*this));
*_M_stream << __value;
if (_M_string) *_M_stream << _M_string;
return *this;
}
-
- ostream_iterator&
- operator*() { return *this; }
-
- ostream_iterator&
- operator++() { return *this; }
-
- ostream_iterator&
- operator++(int) { return *this; }
+
+ ostream_iterator&
+ operator*()
+ { return *this; }
+
+ ostream_iterator&
+ operator++()
+ { return *this; }
+
+ ostream_iterator&
+ operator++(int)
+ { return *this; }
};
} // namespace std
#endif
diff --git a/contrib/libstdc++/include/bits/streambuf.tcc b/contrib/libstdc++/include/bits/streambuf.tcc
index be85862..554d061 100644
--- a/contrib/libstdc++/include/bits/streambuf.tcc
+++ b/contrib/libstdc++/include/bits/streambuf.tcc
@@ -32,90 +32,14 @@
// ISO C++ 14882: 27.5 Stream buffers
//
-#ifndef _CPP_BITS_STREAMBUF_TCC
-#define _CPP_BITS_STREAMBUF_TCC 1
+#ifndef _STREAMBUF_TCC
+#define _STREAMBUF_TCC 1
#pragma GCC system_header
-namespace std
+namespace std
{
template<typename _CharT, typename _Traits>
- const size_t
- basic_streambuf<_CharT, _Traits>::_S_pback_size;
-
- template<typename _CharT, typename _Traits>
- typename basic_streambuf<_CharT, _Traits>::int_type
- basic_streambuf<_CharT, _Traits>::
- sbumpc()
- {
- int_type __ret;
- if (_M_in_cur && _M_in_cur < _M_in_end)
- {
- char_type __c = *(this->gptr());
- _M_in_cur_move(1);
- __ret = traits_type::to_int_type(__c);
- }
- else
- __ret = this->uflow();
- return __ret;
- }
-
- template<typename _CharT, typename _Traits>
- typename basic_streambuf<_CharT, _Traits>::int_type
- basic_streambuf<_CharT, _Traits>::
- sputbackc(char_type __c)
- {
- int_type __ret;
- bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur;
- if (!__testpos || !traits_type::eq(__c, this->gptr()[-1]))
- __ret = this->pbackfail(traits_type::to_int_type(__c));
- else
- {
- _M_in_cur_move(-1);
- __ret = traits_type::to_int_type(*this->gptr());
- }
- return __ret;
- }
-
- template<typename _CharT, typename _Traits>
- typename basic_streambuf<_CharT, _Traits>::int_type
- basic_streambuf<_CharT, _Traits>::
- sungetc()
- {
- int_type __ret;
- if (_M_in_cur && _M_in_beg < _M_in_cur)
- {
- _M_in_cur_move(-1);
- __ret = traits_type::to_int_type(*_M_in_cur);
- }
- else
- __ret = this->pbackfail();
- return __ret;
- }
-
- // Don't test against _M_buf + _M_buf_size, because _M_buf reflects
- // allocated space, and on certain (rare but entirely legal)
- // situations, there will be no allocated space yet the internal
- // buffers will still be valid. (This happens if setp is used to set
- // the internal buffer to say some externally-allocated sequence.)
- template<typename _CharT, typename _Traits>
- typename basic_streambuf<_CharT, _Traits>::int_type
- basic_streambuf<_CharT, _Traits>::
- sputc(char_type __c)
- {
- int_type __ret;
- if (_M_out_buf_size())
- {
- *_M_out_cur = __c;
- _M_out_cur_move(1);
- __ret = traits_type::to_int_type(__c);
- }
- else
- __ret = this->overflow(traits_type::to_int_type(__c));
- return __ret;
- }
-
- template<typename _CharT, typename _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::
xsgetn(char_type* __s, streamsize __n)
@@ -123,20 +47,20 @@ namespace std
streamsize __ret = 0;
while (__ret < __n)
{
- size_t __buf_len = _M_in_end - _M_in_cur;
- if (__buf_len > 0)
+ const size_t __buf_len = this->egptr() - this->gptr();
+ if (__buf_len)
{
- size_t __remaining = __n - __ret;
- size_t __len = min(__buf_len, __remaining);
- traits_type::copy(__s, _M_in_cur, __len);
+ const size_t __remaining = __n - __ret;
+ const size_t __len = std::min(__buf_len, __remaining);
+ traits_type::copy(__s, this->gptr(), __len);
__ret += __len;
__s += __len;
- _M_in_cur_move(__len);
+ this->gbump(__len);
}
-
+
if (__ret < __n)
{
- int_type __c = this->uflow();
+ const int_type __c = this->uflow();
if (!traits_type::eq_int_type(__c, traits_type::eof()))
{
traits_type::assign(*__s++, traits_type::to_char_type(__c));
@@ -149,11 +73,6 @@ namespace std
return __ret;
}
- // Don't test against _M_buf + _M_buf_size, because _M_buf reflects
- // allocated space, and on certain (rare but entirely legal)
- // situations, there will be no allocated space yet the internal
- // buffers will still be valid. (This happens if setp is used to set
- // the internal buffer to say some externally-allocated sequence.)
template<typename _CharT, typename _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::
@@ -162,15 +81,15 @@ namespace std
streamsize __ret = 0;
while (__ret < __n)
{
- off_type __buf_len = _M_out_buf_size();
- if (__buf_len > 0)
+ const size_t __buf_len = this->epptr() - this->pptr();
+ if (__buf_len)
{
- off_type __remaining = __n - __ret;
- off_type __len = min(__buf_len, __remaining);
- traits_type::copy(_M_out_cur, __s, __len);
+ const size_t __remaining = __n - __ret;
+ const size_t __len = std::min(__buf_len, __remaining);
+ traits_type::copy(this->pptr(), __s, __len);
__ret += __len;
__s += __len;
- _M_out_cur_move(__len);
+ this->pbump(__len);
}
if (__ret < __n)
@@ -194,64 +113,51 @@ namespace std
// necessary.
template<typename _CharT, typename _Traits>
streamsize
- __copy_streambufs(basic_ios<_CharT, _Traits>& __ios,
- basic_streambuf<_CharT, _Traits>* __sbin,
- basic_streambuf<_CharT, _Traits>* __sbout)
- {
- streamsize __ret = 0;
- try
- {
- typename _Traits::int_type __c = __sbin->sgetc();
- while (!_Traits::eq_int_type(__c, _Traits::eof()))
- {
- const size_t __n = __sbin->_M_in_end - __sbin->_M_in_cur;
- if (__n > 1)
- {
- const size_t __wrote = __sbout->sputn(__sbin->_M_in_cur,
- __n);
- __sbin->_M_in_cur_move(__wrote);
- __ret += __wrote;
- if (__wrote < __n)
- break;
- __c = __sbin->underflow();
- }
- else
- {
- __c = __sbout->sputc(_Traits::to_char_type(__c));
- if (_Traits::eq_int_type(__c, _Traits::eof()))
- break;
- ++__ret;
- __c = __sbin->snextc();
- }
- }
- }
- catch(exception& __fail)
- {
- __ios.setstate(ios_base::failbit);
- if ((__ios.exceptions() & ios_base::failbit) != 0)
- __throw_exception_again;
- }
- return __ret;
- }
+ __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
+ basic_streambuf<_CharT, _Traits>* __sbout)
+ {
+ streamsize __ret = 0;
+ typename _Traits::int_type __c = __sbin->sgetc();
+ while (!_Traits::eq_int_type(__c, _Traits::eof()))
+ {
+ const size_t __n = __sbin->egptr() - __sbin->gptr();
+ if (__n > 1)
+ {
+ const size_t __wrote = __sbout->sputn(__sbin->gptr(), __n);
+ __sbin->gbump(__wrote);
+ __ret += __wrote;
+ if (__wrote < __n)
+ break;
+ __c = __sbin->underflow();
+ }
+ else
+ {
+ __c = __sbout->sputc(_Traits::to_char_type(__c));
+ if (_Traits::eq_int_type(__c, _Traits::eof()))
+ break;
+ ++__ret;
+ __c = __sbin->snextc();
+ }
+ }
+ return __ret;
+ }
// Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
+ // which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template class basic_streambuf<char>;
extern template
streamsize
- __copy_streambufs(basic_ios<char>&, basic_streambuf<char>*,
- basic_streambuf<char>*);
+ __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_streambuf<wchar_t>;
extern template
streamsize
- __copy_streambufs(basic_ios<wchar_t>&, basic_streambuf<wchar_t>*,
- basic_streambuf<wchar_t>*);
+ __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*);
#endif
#endif
} // namespace std
-#endif
+#endif
diff --git a/contrib/libstdc++/include/bits/streambuf_iterator.h b/contrib/libstdc++/include/bits/streambuf_iterator.h
index d482aba..9709335 100644
--- a/contrib/libstdc++/include/bits/streambuf_iterator.h
+++ b/contrib/libstdc++/include/bits/streambuf_iterator.h
@@ -1,6 +1,6 @@
// Streambuf iterators
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -33,177 +33,223 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STREAMBUF_ITERATOR_H
-#define _CPP_BITS_STREAMBUF_ITERATOR_H 1
+#ifndef _STREAMBUF_ITERATOR_H
+#define _STREAMBUF_ITERATOR_H 1
#pragma GCC system_header
#include <streambuf>
+#include <debug/debug.h>
// NB: Should specialize copy, find algorithms for streambuf iterators.
namespace std
{
// 24.5.3 Template class istreambuf_iterator
+ /// Provides input iterator semantics for streambufs.
template<typename _CharT, typename _Traits>
class istreambuf_iterator
: public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
- _CharT*, _CharT&>
+ _CharT*, _CharT&>
{
public:
// Types:
- typedef _CharT char_type;
- typedef _Traits traits_type;
- typedef typename _Traits::int_type int_type;
- typedef basic_streambuf<_CharT, _Traits> streambuf_type;
- typedef basic_istream<_CharT, _Traits> istream_type;
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename _Traits::int_type int_type;
+ typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+ typedef basic_istream<_CharT, _Traits> istream_type;
+ //@}
private:
- // 24.5.3 istreambuf_iterator
- // p 1
+ // 24.5.3 istreambuf_iterator
+ // p 1
// If the end of stream is reached (streambuf_type::sgetc()
// returns traits_type::eof()), the iterator becomes equal to
// the "end of stream" iterator value.
// NB: This implementation assumes the "end of stream" value
// is EOF, or -1.
- mutable streambuf_type* _M_sbuf;
- int_type _M_c;
+ mutable streambuf_type* _M_sbuf;
+ int_type _M_c;
public:
- istreambuf_iterator() throw()
+ /// Construct end of input stream iterator.
+ istreambuf_iterator() throw()
: _M_sbuf(0), _M_c(traits_type::eof()) { }
-
+
+ /// Construct start of input stream iterator.
istreambuf_iterator(istream_type& __s) throw()
: _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
+ /// Construct start of streambuf iterator.
istreambuf_iterator(streambuf_type* __s) throw()
: _M_sbuf(__s), _M_c(traits_type::eof()) { }
-
- // NB: The result of operator*() on an end of stream is undefined.
- char_type
+
+ /// Return the current character pointed to by iterator. This returns
+ /// streambuf.sgetc(). It cannot be assigned. NB: The result of
+ /// operator*() on an end of stream is undefined.
+ char_type
operator*() const
- { return traits_type::to_char_type(_M_get()); }
-
- istreambuf_iterator&
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ // Dereferencing a past-the-end istreambuf_iterator is a
+ // libstdc++ extension
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_deref_istreambuf)
+ ._M_iterator(*this));
+#endif
+ return traits_type::to_char_type(_M_get());
+ }
+
+ /// Advance the iterator. Calls streambuf.sbumpc().
+ istreambuf_iterator&
operator++()
- {
+ {
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_inc_istreambuf)
+ ._M_iterator(*this));
const int_type __eof = traits_type::eof();
if (_M_sbuf && traits_type::eq_int_type(_M_sbuf->sbumpc(), __eof))
_M_sbuf = 0;
else
_M_c = __eof;
- return *this;
+ return *this;
}
+ /// Advance the iterator. Calls streambuf.sbumpc().
istreambuf_iterator
operator++(int)
{
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_inc_istreambuf)
+ ._M_iterator(*this));
+
const int_type __eof = traits_type::eof();
istreambuf_iterator __old = *this;
if (_M_sbuf
- && traits_type::eq_int_type((__old._M_c = _M_sbuf->sbumpc()),
+ && traits_type::eq_int_type((__old._M_c = _M_sbuf->sbumpc()),
__eof))
_M_sbuf = 0;
else
_M_c = __eof;
- return __old;
+ return __old;
}
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 110 istreambuf_iterator::equal not const
// NB: there is also number 111 (NAD, Future) pending on this function.
- bool
+ /// Return true both iterators are end or both are not end.
+ bool
equal(const istreambuf_iterator& __b) const
{
- const int_type __eof = traits_type::eof();
- bool __thiseof = traits_type::eq_int_type(_M_get(), __eof);
- bool __beof = traits_type::eq_int_type(__b._M_get(), __eof);
+ const bool __thiseof = _M_at_eof();
+ const bool __beof = __b._M_at_eof();
return (__thiseof && __beof || (!__thiseof && !__beof));
}
-#endif
private:
- int_type
+ int_type
_M_get() const
- {
+ {
const int_type __eof = traits_type::eof();
int_type __ret = __eof;
if (_M_sbuf)
- {
+ {
if (!traits_type::eq_int_type(_M_c, __eof))
__ret = _M_c;
- else
- if (traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof))
- _M_sbuf = 0;
+ else if (traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
+ __eof))
+ _M_sbuf = 0;
}
return __ret;
}
+
+ bool
+ _M_at_eof() const
+ {
+ const int_type __eof = traits_type::eof();
+ return traits_type::eq_int_type(_M_get(), __eof);
+ }
};
template<typename _CharT, typename _Traits>
- inline bool
+ inline bool
operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return __a.equal(__b); }
template<typename _CharT, typename _Traits>
- inline bool
+ inline bool
operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return !__a.equal(__b); }
+ /// Provides output iterator semantics for streambufs.
template<typename _CharT, typename _Traits>
class ostreambuf_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
public:
// Types:
+ //@{
+ /// Public typedefs
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
typedef basic_ostream<_CharT, _Traits> ostream_type;
+ //@}
private:
- streambuf_type* _M_sbuf;
- bool _M_failed;
+ streambuf_type* _M_sbuf;
+ bool _M_failed;
public:
+ /// Construct output iterator from ostream.
ostreambuf_iterator(ostream_type& __s) throw ()
: _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
-
+
+ /// Construct output iterator from streambuf.
ostreambuf_iterator(streambuf_type* __s) throw ()
: _M_sbuf(__s), _M_failed(!_M_sbuf) { }
- ostreambuf_iterator&
+ /// Write character to streambuf. Calls streambuf.sputc().
+ ostreambuf_iterator&
operator=(_CharT __c)
{
- if (!_M_failed &&
+ if (!_M_failed &&
_Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
_M_failed = true;
return *this;
}
- ostreambuf_iterator&
- operator*() throw()
+ /// Return *this.
+ ostreambuf_iterator&
+ operator*()
{ return *this; }
- ostreambuf_iterator&
- operator++(int) throw()
+ /// Return *this.
+ ostreambuf_iterator&
+ operator++(int)
{ return *this; }
- ostreambuf_iterator&
- operator++() throw()
+ /// Return *this.
+ ostreambuf_iterator&
+ operator++()
{ return *this; }
- bool
+ /// Return true if previous operator=() failed.
+ bool
failed() const throw()
{ return _M_failed; }
- ostreambuf_iterator&
+ ostreambuf_iterator&
_M_put(const _CharT* __ws, streamsize __len)
{
- if (__builtin_expect(!_M_failed, true) &&
- __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false))
+ if (__builtin_expect(!_M_failed, true)
+ && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
+ false))
_M_failed = true;
return *this;
}
diff --git a/contrib/libstdc++/include/bits/stringfwd.h b/contrib/libstdc++/include/bits/stringfwd.h
index db40bef..99d3ce3 100644
--- a/contrib/libstdc++/include/bits/stringfwd.h
+++ b/contrib/libstdc++/include/bits/stringfwd.h
@@ -36,8 +36,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_STRINGFWD_H
-#define _CPP_BITS_STRINGFWD_H 1
+#ifndef _STRINGFWD_H
+#define _STRINGFWD_H 1
#pragma GCC system_header
@@ -45,25 +45,25 @@
namespace std
{
- template<typename _Alloc>
+ template<typename _Alloc>
class allocator;
template<class _CharT>
struct char_traits;
- template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
-
+
template<> struct char_traits<char>;
typedef basic_string<char> string;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<> struct char_traits<wchar_t>;
typedef basic_string<wchar_t> wstring;
#endif
} // namespace std
-#endif // _CPP_BITS_STRINGFWD_H
+#endif // _STRINGFWD_H
diff --git a/contrib/libstdc++/include/bits/type_traits.h b/contrib/libstdc++/include/bits/type_traits.h
index 61bc436..9b91e5c 100644
--- a/contrib/libstdc++/include/bits/type_traits.h
+++ b/contrib/libstdc++/include/bits/type_traits.h
@@ -1,6 +1,6 @@
// Type traits implementation -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -46,8 +46,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_TYPE_TRAITS_H
-#define _CPP_BITS_TYPE_TRAITS_H 1
+#ifndef _TYPE_TRAITS_H
+#define _TYPE_TRAITS_H 1
#pragma GCC system_header
@@ -74,10 +74,10 @@ attain their correct values by one of these means:
EXAMPLE:
//Copy an array of elements which have non-trivial copy constructors
-template <class _Tp> void
+template <class _Tp> void
copy(_Tp* __source,_Tp* __destination,int __n,__false_type);
//Copy an array of elements which have trivial copy constructors. Use memcpy.
-template <class _Tp> void
+template <class _Tp> void
copy(_Tp* __source,_Tp* __destination,int __n,__true_type);
//Copy an array of any type by using the most efficient copy mechanism
@@ -91,16 +91,17 @@ struct __true_type {};
struct __false_type {};
template <class _Tp>
-struct __type_traits {
- typedef __true_type this_dummy_member_must_be_first;
- /* Do not remove this member. It informs a compiler which
- automatically specializes __type_traits that this
- __type_traits template is special. It just makes sure that
- things work if an implementation is using a template
- called __type_traits for something unrelated. */
+ struct __type_traits
+ {
+ typedef __true_type this_dummy_member_must_be_first;
+ /* Do not remove this member. It informs a compiler which
+ automatically specializes __type_traits that this
+ __type_traits template is special. It just makes sure that
+ things work if an implementation is using a template
+ called __type_traits for something unrelated. */
/* The following restrictions should be observed for the sake of
- compilers which automatically produce type specific specializations
+ compilers which automatically produce type specific specializations
of this class:
- You may reorder the members below if you wish
- You may remove any of the members below if you wish
@@ -108,231 +109,296 @@ struct __type_traits {
name change in the compiler
- Members you add will be treated like regular members unless
you add the appropriate support in the compiler. */
-
- typedef __false_type has_trivial_default_constructor;
- typedef __false_type has_trivial_copy_constructor;
- typedef __false_type has_trivial_assignment_operator;
- typedef __false_type has_trivial_destructor;
- typedef __false_type is_POD_type;
-};
+
+ typedef __false_type has_trivial_default_constructor;
+ typedef __false_type has_trivial_copy_constructor;
+ typedef __false_type has_trivial_assignment_operator;
+ typedef __false_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+ };
// Provide some specializations.
-template<> struct __type_traits<bool> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<char> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<signed char> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<unsigned char> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<wchar_t> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<short> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<unsigned short> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<int> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<unsigned int> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<long> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<unsigned long> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<long long> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<unsigned long long> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<float> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<double> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-template<> struct __type_traits<long double> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
+template<>
+ struct __type_traits<bool>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<char>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<signed char>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<unsigned char>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<wchar_t>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<short>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<unsigned short>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<int>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<unsigned int>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<long>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<unsigned long>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<long long>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<unsigned long long>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<float>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<double>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+template<>
+ struct __type_traits<long double>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
template <class _Tp>
-struct __type_traits<_Tp*> {
- typedef __true_type has_trivial_default_constructor;
- typedef __true_type has_trivial_copy_constructor;
- typedef __true_type has_trivial_assignment_operator;
- typedef __true_type has_trivial_destructor;
- typedef __true_type is_POD_type;
-};
-
-
-// The following could be written in terms of numeric_limits.
+ struct __type_traits<_Tp*>
+ {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+ };
+
+// The following could be written in terms of numeric_limits.
// We're doing it separately to reduce the number of dependencies.
-template <class _Tp> struct _Is_integer {
- typedef __false_type _Integral;
-};
-
-template<> struct _Is_integer<bool> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<char> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<signed char> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<unsigned char> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<wchar_t> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<short> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<unsigned short> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<int> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<unsigned int> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<long> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<unsigned long> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<long long> {
- typedef __true_type _Integral;
-};
-
-template<> struct _Is_integer<unsigned long long> {
- typedef __true_type _Integral;
-};
-
-template<typename _Tp> struct _Is_normal_iterator {
- typedef __false_type _Normal;
-};
+template <class _Tp>
+ struct _Is_integer
+ {
+ typedef __false_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<bool>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<char>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<signed char>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<unsigned char>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<wchar_t>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<short>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<unsigned short>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<int>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<unsigned int>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<long>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<unsigned long>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<long long>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<>
+ struct _Is_integer<unsigned long long>
+ {
+ typedef __true_type _Integral;
+ };
+
+template<typename _Tp>
+ struct _Is_normal_iterator
+ {
+ typedef __false_type _Normal;
+ };
// Forward declaration hack, should really include this from somewhere.
namespace __gnu_cxx
{
- template<typename _Iterator, typename _Container> class __normal_iterator;
+ template<typename _Iterator, typename _Container>
+ class __normal_iterator;
}
template<typename _Iterator, typename _Container>
-struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > {
- typedef __true_type _Normal;
-};
+ struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
+ _Container> >
+ {
+ typedef __true_type _Normal;
+ };
-#endif /* _CPP_BITS_TYPE_TRAITS_H */
+#endif /* _TYPE_TRAITS_H */
// Local Variables:
// mode:C++
diff --git a/contrib/libstdc++/include/bits/valarray_after.h b/contrib/libstdc++/include/bits/valarray_after.h
new file mode 100644
index 0000000..b74cab5
--- /dev/null
+++ b/contrib/libstdc++/include/bits/valarray_after.h
@@ -0,0 +1,499 @@
+// The template and inlines for the -*- C++ -*- internal _Meta class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
+
+/** @file valarray_meta.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VALARRAY_AFTER_H
+#define _VALARRAY_AFTER_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+
+ //
+ // gslice_array closure.
+ //
+ template<class _Dom> class _GBase {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _GBase (const _Dom& __e, const valarray<size_t>& __i)
+ : _M_expr (__e), _M_index(__i) {}
+ value_type operator[] (size_t __i) const
+ { return _M_expr[_M_index[__i]]; }
+ size_t size () const { return _M_index.size(); }
+
+ private:
+ const _Dom& _M_expr;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<typename _Tp> class _GBase<_Array<_Tp> > {
+ public:
+ typedef _Tp value_type;
+
+ _GBase (_Array<_Tp> __a, const valarray<size_t>& __i)
+ : _M_array (__a), _M_index(__i) {}
+ value_type operator[] (size_t __i) const
+ { return _M_array._M_data[_M_index[__i]]; }
+ size_t size () const { return _M_index.size(); }
+
+ private:
+ const _Array<_Tp> _M_array;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<class _Dom> struct _GClos<_Expr,_Dom> : _GBase<_Dom> {
+ typedef _GBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _GClos (const _Dom& __e, const valarray<size_t>& __i)
+ : _Base (__e, __i) {}
+ };
+
+ template<typename _Tp>
+ struct _GClos<_ValArray,_Tp> : _GBase<_Array<_Tp> > {
+ typedef _GBase<_Array<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _GClos (_Array<_Tp> __a, const valarray<size_t>& __i)
+ : _Base (__a, __i) {}
+ };
+
+ //
+ // indirect_array closure
+ //
+ template<class _Dom> class _IBase {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _IBase (const _Dom& __e, const valarray<size_t>& __i)
+ : _M_expr (__e), _M_index (__i) {}
+ value_type operator[] (size_t __i) const
+ { return _M_expr[_M_index[__i]]; }
+ size_t size() const { return _M_index.size(); }
+
+ private:
+ const _Dom& _M_expr;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<class _Dom> struct _IClos<_Expr,_Dom> : _IBase<_Dom> {
+ typedef _IBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _IClos (const _Dom& __e, const valarray<size_t>& __i)
+ : _Base (__e, __i) {}
+ };
+
+ template<typename _Tp>
+ struct _IClos<_ValArray,_Tp> : _IBase<valarray<_Tp> > {
+ typedef _IBase<valarray<_Tp> > _Base;
+ typedef _Tp value_type;
+
+ _IClos (const valarray<_Tp>& __a, const valarray<size_t>& __i)
+ : _Base (__a, __i) {}
+ };
+
+ //
+ // class _Expr
+ //
+ template<class _Clos, typename _Tp>
+ class _Expr
+ {
+ public:
+ typedef _Tp value_type;
+
+ _Expr(const _Clos&);
+
+ const _Clos& operator()() const;
+
+ value_type operator[](size_t) const;
+ valarray<value_type> operator[](slice) const;
+ valarray<value_type> operator[](const gslice&) const;
+ valarray<value_type> operator[](const valarray<bool>&) const;
+ valarray<value_type> operator[](const valarray<size_t>&) const;
+
+ _Expr<_UnClos<__unary_plus,std::_Expr,_Clos>, value_type>
+ operator+() const;
+
+ _Expr<_UnClos<__negate,std::_Expr,_Clos>, value_type>
+ operator-() const;
+
+ _Expr<_UnClos<__bitwise_not,std::_Expr,_Clos>, value_type>
+ operator~() const;
+
+ _Expr<_UnClos<__logical_not,std::_Expr,_Clos>, bool>
+ operator!() const;
+
+ size_t size() const;
+ value_type sum() const;
+
+ valarray<value_type> shift(int) const;
+ valarray<value_type> cshift(int) const;
+
+ value_type min() const;
+ value_type max() const;
+
+ valarray<value_type> apply(value_type (*)(const value_type&)) const;
+ valarray<value_type> apply(value_type (*)(value_type)) const;
+
+ private:
+ const _Clos _M_closure;
+ };
+
+ template<class _Clos, typename _Tp>
+ inline
+ _Expr<_Clos,_Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {}
+
+ template<class _Clos, typename _Tp>
+ inline const _Clos&
+ _Expr<_Clos,_Tp>::operator()() const
+ { return _M_closure; }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos,_Tp>::operator[](size_t __i) const
+ { return _M_closure[__i]; }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos,_Tp>::operator[](slice __s) const
+ { return _M_closure[__s]; }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos,_Tp>::operator[](const gslice& __gs) const
+ { return _M_closure[__gs]; }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos,_Tp>::operator[](const valarray<bool>& __m) const
+ { return _M_closure[__m]; }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos,_Tp>::operator[](const valarray<size_t>& __i) const
+ { return _M_closure[__i]; }
+
+ template<class _Clos, typename _Tp>
+ inline size_t
+ _Expr<_Clos,_Tp>::size() const { return _M_closure.size (); }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::shift(int __n) const
+ { return valarray<_Tp>(_M_closure).shift(__n); }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::cshift(int __n) const
+ { return valarray<_Tp>(_M_closure).cshift(__n); }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const
+ { return valarray<_Tp>(_M_closure).apply(__f); }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const
+ { return valarray<_Tp>(_M_closure).apply(__f); }
+
+ // XXX: replace this with a more robust summation algorithm.
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos,_Tp>::sum() const
+ {
+ size_t __n = _M_closure.size();
+ if (__n == 0)
+ return _Tp();
+ else
+ {
+ _Tp __s = _M_closure[--__n];
+ while (__n != 0)
+ __s += _M_closure[--__n];
+ return __s;
+ }
+ }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::min() const
+ { return __valarray_min(_M_closure); }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::max() const
+ { return __valarray_max(_M_closure); }
+
+ template<class _Dom, typename _Tp>
+ inline _Expr<_UnClos<__logical_not,_Expr,_Dom>, bool>
+ _Expr<_Dom,_Tp>::operator!() const
+ {
+ typedef _UnClos<__logical_not,std::_Expr,_Dom> _Closure;
+ return _Expr<_Closure,_Tp>(_Closure(this->_M_closure));
+ }
+
+#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \
+ template<class _Dom, typename _Tp> \
+ inline _Expr<_UnClos<_Name,std::_Expr,_Dom>,_Tp> \
+ _Expr<_Dom,_Tp>::operator _Op() const \
+ { \
+ typedef _UnClos<_Name,std::_Expr,_Dom> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(this->_M_closure)); \
+ }
+
+ _DEFINE_EXPR_UNARY_OPERATOR(+, __unary_plus)
+ _DEFINE_EXPR_UNARY_OPERATOR(-, __negate)
+ _DEFINE_EXPR_UNARY_OPERATOR(~, __bitwise_not)
+
+#undef _DEFINE_EXPR_UNARY_OPERATOR
+
+
+#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \
+ template<class _Dom1, class _Dom2> \
+ inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, \
+ typename __fun<_Name, typename _Dom1::value_type>::result_type>\
+ operator _Op(const _Expr<_Dom1,typename _Dom1::value_type>& __v, \
+ const _Expr<_Dom2,typename _Dom2::value_type>& __w) \
+ { \
+ typedef typename _Dom1::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2> _Closure; \
+ return _Expr<_Closure,_Value>(_Closure(__v(), __w())); \
+ } \
+ \
+template<class _Dom> \
+inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>,\
+ typename __fun<_Name, typename _Dom::value_type>::result_type>\
+operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __v, \
+ const typename _Dom::value_type& __t) \
+{ \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name,_Expr,_Constant,_Dom,_Arg> _Closure; \
+ return _Expr<_Closure,_Value>(_Closure(__v(), __t)); \
+} \
+ \
+template<class _Dom> \
+inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>,\
+ typename __fun<_Name, typename _Dom::value_type>::result_type>\
+operator _Op(const typename _Dom::value_type& __t, \
+ const _Expr<_Dom,typename _Dom::value_type>& __v) \
+{ \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name,_Constant,_Expr,_Arg,_Dom> _Closure; \
+ return _Expr<_Closure,_Value>(_Closure(__t, __v())); \
+} \
+ \
+template<class _Dom> \
+inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>,\
+ typename __fun<_Name, typename _Dom::value_type>::result_type>\
+operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __e, \
+ const valarray<typename _Dom::value_type>& __v) \
+{ \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name,_Expr,_ValArray,_Dom,_Arg> _Closure; \
+ return _Expr<_Closure,_Value>(_Closure(__e(), __v)); \
+} \
+ \
+template<class _Dom> \
+inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>,\
+ typename __fun<_Name, typename _Dom::value_type>::result_type>\
+operator _Op(const valarray<typename _Dom::value_type>& __v, \
+ const _Expr<_Dom,typename _Dom::value_type>& __e) \
+{ \
+ typedef typename _Dom::value_type _Tp; \
+ typedef typename __fun<_Name, _Tp>::result_type _Value; \
+ typedef _BinClos<_Name,_ValArray,_Expr,_Tp,_Dom> _Closure; \
+ return _Expr<_Closure,_Value> (_Closure (__v, __e ())); \
+}
+
+ _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
+ _DEFINE_EXPR_BINARY_OPERATOR(-, __minus)
+ _DEFINE_EXPR_BINARY_OPERATOR(*, __multiplies)
+ _DEFINE_EXPR_BINARY_OPERATOR(/, __divides)
+ _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
+ _DEFINE_EXPR_BINARY_OPERATOR(^, __bitwise_xor)
+ _DEFINE_EXPR_BINARY_OPERATOR(&, __bitwise_and)
+ _DEFINE_EXPR_BINARY_OPERATOR(|, __bitwise_or)
+ _DEFINE_EXPR_BINARY_OPERATOR(<<, __shift_left)
+ _DEFINE_EXPR_BINARY_OPERATOR(>>, __shift_right)
+ _DEFINE_EXPR_BINARY_OPERATOR(&&, __logical_and)
+ _DEFINE_EXPR_BINARY_OPERATOR(||, __logical_or)
+ _DEFINE_EXPR_BINARY_OPERATOR(==, __equal_to)
+ _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
+ _DEFINE_EXPR_BINARY_OPERATOR(<, __less)
+ _DEFINE_EXPR_BINARY_OPERATOR(>, __greater)
+ _DEFINE_EXPR_BINARY_OPERATOR(<=, __less_equal)
+ _DEFINE_EXPR_BINARY_OPERATOR(>=, __greater_equal)
+
+#undef _DEFINE_EXPR_BINARY_OPERATOR
+
+#define _DEFINE_EXPR_UNARY_FUNCTION(_Name) \
+ template<class _Dom> \
+ inline _Expr<_UnClos<__##_Name,_Expr,_Dom>,typename _Dom::value_type>\
+ _Name(const _Expr<_Dom,typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _UnClos<__##_Name,_Expr,_Dom> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__e())); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_UnClos<__##_Name,_ValArray,_Tp>,_Tp> \
+ _Name(const valarray<_Tp>& __v) \
+ { \
+ typedef _UnClos<__##_Name,_ValArray,_Tp> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__v)); \
+ }
+
+ _DEFINE_EXPR_UNARY_FUNCTION(abs)
+ _DEFINE_EXPR_UNARY_FUNCTION(cos)
+ _DEFINE_EXPR_UNARY_FUNCTION(acos)
+ _DEFINE_EXPR_UNARY_FUNCTION(cosh)
+ _DEFINE_EXPR_UNARY_FUNCTION(sin)
+ _DEFINE_EXPR_UNARY_FUNCTION(asin)
+ _DEFINE_EXPR_UNARY_FUNCTION(sinh)
+ _DEFINE_EXPR_UNARY_FUNCTION(tan)
+ _DEFINE_EXPR_UNARY_FUNCTION(tanh)
+ _DEFINE_EXPR_UNARY_FUNCTION(atan)
+ _DEFINE_EXPR_UNARY_FUNCTION(exp)
+ _DEFINE_EXPR_UNARY_FUNCTION(log)
+ _DEFINE_EXPR_UNARY_FUNCTION(log10)
+ _DEFINE_EXPR_UNARY_FUNCTION(sqrt)
+
+#undef _DEFINE_EXPR_UNARY_FUNCTION
+
+#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun) \
+ template<class _Dom1, class _Dom2> \
+ inline _Expr<_BinClos<__##_Fun,_Expr,_Expr,_Dom1,_Dom2>, \
+ typename _Dom1::value_type> \
+ _Fun(const _Expr<_Dom1,typename _Dom1::value_type>& __e1, \
+ const _Expr<_Dom2,typename _Dom2::value_type>& __e2) \
+ { \
+ typedef typename _Dom1::value_type _Tp; \
+ typedef _BinClos<__##_Fun,_Expr,_Expr,_Dom1,_Dom2> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__e1(), __e2())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _Expr, _ValArray, _Dom, \
+ typename _Dom::value_type>, \
+ typename _Dom::value_type> \
+ _Fun(const _Expr<_Dom,typename _Dom::value_type>& __e, \
+ const valarray<typename _Dom::value_type>& __v) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Expr, _ValArray, _Dom, _Tp> _Closure;\
+ return _Expr<_Closure,_Tp>(_Closure(__e(), __v)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _ValArray, _Expr, \
+ typename _Dom::value_type,_Dom>, \
+ typename _Dom::value_type> \
+ _Fun(const valarray<typename _Dom::valarray>& __v, \
+ const _Expr<_Dom,typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun,_ValArray,_Expr,_Tp,_Dom> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__v, __e())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun,_Expr,_Constant,_Dom, \
+ typename _Dom::value_type>, \
+ typename _Dom::value_type> \
+ _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
+ const typename _Dom::value_type& __t) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun,_Expr,_Constant,_Dom,_Tp> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__e(), __t)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun,_Constant,_Expr, \
+ typename _Dom::value_type,_Dom>, \
+ typename _Dom::value_type> \
+ _Fun(const typename _Dom::value_type& __t, \
+ const _Expr<_Dom,typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Constant,_Expr,_Tp,_Dom> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__t, __e())); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun,_ValArray,_ValArray,_Tp,_Tp>, _Tp> \
+ _Fun(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
+ { \
+ typedef _BinClos<__##_Fun,_ValArray,_ValArray,_Tp,_Tp> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__v, __w)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun,_ValArray,_Constant,_Tp,_Tp>,_Tp> \
+ _Fun(const valarray<_Tp>& __v, const _Tp& __t) \
+ { \
+ typedef _BinClos<__##_Fun,_ValArray,_Constant,_Tp,_Tp> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__v, __t)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun,_Constant,_ValArray,_Tp,_Tp>,_Tp> \
+ _Fun(const _Tp& __t, const valarray<_Tp>& __v) \
+ { \
+ typedef _BinClos<__##_Fun,_Constant,_ValArray,_Tp,_Tp> _Closure; \
+ return _Expr<_Closure,_Tp>(_Closure(__t, __v)); \
+ }
+
+_DEFINE_EXPR_BINARY_FUNCTION(atan2)
+_DEFINE_EXPR_BINARY_FUNCTION(pow)
+
+#undef _DEFINE_EXPR_BINARY_FUNCTION
+
+} // std::
+
+
+#endif /* _CPP_VALARRAY_AFTER_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/valarray_array.h b/contrib/libstdc++/include/bits/valarray_array.h
index c880478..e18e8e8 100644
--- a/contrib/libstdc++/include/bits/valarray_array.h
+++ b/contrib/libstdc++/include/bits/valarray_array.h
@@ -1,6 +1,7 @@
// The template and inlines for the -*- C++ -*- internal _Array helper class.
-// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,8 +35,8 @@
* You should not attempt to use it directly.
*/
-#ifndef _CPP_BITS_ARRAY_H
-#define _CPP_BITS_ARRAY_H 1
+#ifndef _VALARRAY_ARRAY_H
+#define _VALARRAY_ARRAY_H 1
#pragma GCC system_header
@@ -50,18 +51,18 @@ namespace std
//
// Helper functions on raw pointers
//
-
+
// We get memory by the old fashion way
inline void*
__valarray_get_memory(size_t __n)
{ return operator new(__n); }
-
+
template<typename _Tp>
inline _Tp*__restrict__
__valarray_get_storage(size_t __n)
{
return static_cast<_Tp*__restrict__>
- (__valarray_get_memory(__n * sizeof(_Tp)));
+ (std::__valarray_get_memory(__n * sizeof(_Tp)));
}
// Return memory to the system
@@ -87,7 +88,7 @@ namespace std
// For fundamental types, it suffices to say 'memset()'
inline static void
_S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
- { memset(__b, 0, (__e - __b)*sizeof(_Tp)); }
+ { std::memset(__b, 0, (__e - __b)*sizeof(_Tp)); }
};
template<typename _Tp>
@@ -97,7 +98,7 @@ namespace std
_Array_default_ctor<_Tp, __is_fundamental<_Tp>::_M_type>::
_S_do_it(__b, __e);
}
-
+
// Turn a raw-memory into an array of _Tp filled with __t
// This is the required in valarray<T> v(n, t). Also
// used in valarray<>::resize().
@@ -149,7 +150,7 @@ namespace std
inline static void
_S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
_Tp* __restrict__ __o)
- { memcpy(__o, __b, (__e - __b)*sizeof(_Tp)); }
+ { std::memcpy(__o, __b, (__e - __b)*sizeof(_Tp)); }
};
template<typename _Tp>
@@ -195,13 +196,13 @@ namespace std
if (!__is_fundamental<_Tp>::_M_type)
while (__b != __e) { __b->~_Tp(); ++__b; }
}
-
+
// Fill a plain array __a[<__n>] with __t
template<typename _Tp>
inline void
__valarray_fill (_Tp* __restrict__ __a, size_t __n, const _Tp& __t)
{ while (__n--) *__a++ = __t; }
-
+
// fill strided array __a[<__n-1 : __s>] with __t
template<typename _Tp>
inline void
@@ -215,7 +216,7 @@ namespace std
__valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
size_t __n, const _Tp& __t)
{ for (size_t __j=0; __j<__n; ++__j, ++__i) __a[*__i] = __t; }
-
+
// copy plain array __a[<__n>] in __b[<__n>]
// For non-fundamental types, it is wrong to say 'memcpy()'
template<typename _Tp, bool>
@@ -223,7 +224,7 @@ namespace std
{
inline static void
_S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
- { while (__n--) *__b++ = *__a++; }
+ { while (__n--) *__b++ = *__a++; }
};
template<typename _Tp>
@@ -231,7 +232,7 @@ namespace std
{
inline static void
_S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
- { memcpy (__b, __a, __n * sizeof (_Tp)); }
+ { std::memcpy (__b, __a, __n * sizeof (_Tp)); }
};
// Copy a plain array __a[<__n>] into a play array __b[<>]
@@ -269,7 +270,7 @@ namespace std
__dst[__i * __s2] = __src [ __i * __s1];
}
-
+
// Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
template<typename _Tp>
inline void
@@ -340,7 +341,7 @@ namespace std
}
return __r;
}
-
+
template<typename _Ta>
inline typename _Ta::value_type
__valarray_max(const _Ta& __a)
@@ -356,13 +357,13 @@ namespace std
}
return __r;
}
-
+
//
// Helper class _Array, first layer of valarray abstraction.
// All operations on valarray should be forwarded to this class
// whenever possible. -- gdr
//
-
+
template<typename _Tp>
struct _Array
{
@@ -375,34 +376,34 @@ namespace std
_Tp* const __restrict__ _M_data;
};
-
+
template<typename _Tp>
inline void
__valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t)
- { __valarray_fill (__a._M_data, __n, __t); }
-
+ { std::__valarray_fill (__a._M_data, __n, __t); }
+
template<typename _Tp>
inline void
__valarray_fill (_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t)
- { __valarray_fill (__a._M_data, __n, __s, __t); }
-
+ { std::__valarray_fill (__a._M_data, __n, __s, __t); }
+
template<typename _Tp>
inline void
- __valarray_fill (_Array<_Tp> __a, _Array<size_t> __i,
+ __valarray_fill (_Array<_Tp> __a, _Array<size_t> __i,
size_t __n, const _Tp& __t)
- { __valarray_fill (__a._M_data, __i._M_data, __n, __t); }
+ { std::__valarray_fill (__a._M_data, __i._M_data, __n, __t); }
// Copy a plain array __a[<__n>] into a play array __b[<>]
template<typename _Tp>
inline void
__valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)
- { __valarray_copy(__a._M_data, __n, __b._M_data); }
-
+ { std::__valarray_copy(__a._M_data, __n, __b._M_data); }
+
// Copy strided array __a[<__n : __s>] in plain __b[<__n>]
template<typename _Tp>
inline void
__valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b)
- { __valarray_copy(__a._M_data, __n, __s, __b._M_data); }
+ { std::__valarray_copy(__a._M_data, __n, __s, __b._M_data); }
// Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>]
template<typename _Tp>
@@ -416,22 +417,22 @@ namespace std
inline void
__valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1,
_Array<_Tp> __b, size_t __s2)
- { __valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
+ { std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
+
-
// Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
template<typename _Tp>
inline void
- __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i,
+ __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i,
_Array<_Tp> __b, size_t __n)
- { __valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); }
-
+ { std::__valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); }
+
// Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
template<typename _Tp>
inline void
- __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
+ __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
_Array<size_t> __i)
- { __valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); }
+ { std::__valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); }
// Copy the __n first elements of an indexed array __src[<__i>] into
// another indexed array __dst[<__j>].
@@ -440,29 +441,29 @@ namespace std
__valarray_copy(_Array<_Tp> __src, size_t __n, _Array<size_t> __i,
_Array<_Tp> __dst, _Array<size_t> __j)
{
- __valarray_copy(__src._M_data, __n, __i._M_data,
- __dst._M_data, __j._M_data);
+ std::__valarray_copy(__src._M_data, __n, __i._M_data,
+ __dst._M_data, __j._M_data);
}
template<typename _Tp>
inline
_Array<_Tp>::_Array (size_t __n)
: _M_data(__valarray_get_storage<_Tp>(__n))
- { __valarray_default_construct(_M_data, _M_data + __n); }
+ { std::__valarray_default_construct(_M_data, _M_data + __n); }
template<typename _Tp>
inline
_Array<_Tp>::_Array (_Tp* const __restrict__ __p) : _M_data (__p) {}
-
+
template<typename _Tp>
- inline _Array<_Tp>::_Array (const valarray<_Tp>& __v)
+ inline _Array<_Tp>::_Array (const valarray<_Tp>& __v)
: _M_data (__v._M_data) {}
-
+
template<typename _Tp>
inline
- _Array<_Tp>::_Array (const _Tp* __restrict__ __b, size_t __s)
+ _Array<_Tp>::_Array (const _Tp* __restrict__ __b, size_t __s)
: _M_data(__valarray_get_storage<_Tp>(__s))
- { __valarray_copy_construct(__b, __s, _M_data); }
+ { std::__valarray_copy_construct(__b, __s, _M_data); }
template<typename _Tp>
inline _Tp*
@@ -489,7 +490,7 @@ _Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \
\
template<typename _Tp, class _Dom> \
void \
-_Array_augmented_##_Name (_Array<_Tp> __a, \
+_Array_augmented_##_Name (_Array<_Tp> __a, \
const _Expr<_Dom,_Tp>& __e, size_t __n) \
{ \
_Tp* __p (__a._M_data); \
@@ -498,9 +499,9 @@ _Array_augmented_##_Name (_Array<_Tp> __a, \
\
template<typename _Tp> \
inline void \
-_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, size_t __s, \
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, size_t __s, \
_Array<_Tp> __b) \
-{ \
+{ \
_Tp* __q (__b._M_data); \
for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) \
*__p _Op##= *__q; \
@@ -508,7 +509,7 @@ _Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, size_t __s, \
\
template<typename _Tp> \
inline void \
-_Array_augmented_##_Name (_Array<_Tp> __a, _Array<_Tp> __b, \
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array<_Tp> __b, \
size_t __n, size_t __s) \
{ \
_Tp* __q (__b._M_data); \
@@ -551,7 +552,7 @@ _Array_augmented_##_Name (_Array<_Tp> __a, _Array<size_t> __i, \
const _Expr<_Dom, _Tp>& __e, size_t __n) \
{ \
size_t* __j (__i._M_data); \
- for (size_t __k=0; __k<__n; ++__k, ++__j) \
+ for (size_t __k=0; __k<__n; ++__k, ++__j) \
__a._M_data[*__j] _Op##= __e[__k]; \
} \
\
@@ -610,21 +611,15 @@ _Array_augmented_##_Name (_Array<_Tp> __a, _Array<bool> __m, \
_DEFINE_ARRAY_FUNCTION(%, __modulus)
_DEFINE_ARRAY_FUNCTION(^, __bitwise_xor)
_DEFINE_ARRAY_FUNCTION(|, __bitwise_or)
- _DEFINE_ARRAY_FUNCTION(&, __bitwise_and)
+ _DEFINE_ARRAY_FUNCTION(&, __bitwise_and)
_DEFINE_ARRAY_FUNCTION(<<, __shift_left)
_DEFINE_ARRAY_FUNCTION(>>, __shift_right)
-#undef _DEFINE_VALARRAY_FUNCTION
-
-} // std::
+#undef _DEFINE_VALARRAY_FUNCTION
+} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-# include <bits/valarray_array.tcc>
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/valarray_array.tcc>
#endif
-
-#endif /* _CPP_BITS_ARRAY_H */
-// Local Variables:
-// mode:c++
-// End:
+#endif /* _ARRAY_H */
diff --git a/contrib/libstdc++/include/bits/valarray_array.tcc b/contrib/libstdc++/include/bits/valarray_array.tcc
index ba4b083..fac5de6 100644
--- a/contrib/libstdc++/include/bits/valarray_array.tcc
+++ b/contrib/libstdc++/include/bits/valarray_array.tcc
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- internal _Array helper class.
-// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,133 +29,212 @@
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
-#ifndef _CPP_BITS_VALARRAY_ARRAY_TCC
-#define _CPP_BITS_VALARRAY_ARRAY_TCC 1
+#ifndef _VALARRAY_ARRAY_TCC
+#define _VALARRAY_ARRAY_TCC 1
namespace std
{
-
-export template<typename _Tp>
-void
-__valarray_fill (_Array<_Tp> __a, size_t __n, _Array<bool> __m, const _Tp& __t)
-{
- _Tp* __p = __a._M_data;
- bool* __ok (__m._M_data);
- for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) {
- while (! *__ok) {
- ++__ok;
- ++__p;
- }
- *__p = __t;
+ template<typename _Tp>
+ void
+ __valarray_fill(_Array<_Tp> __a, size_t __n, _Array<bool> __m,
+ const _Tp& __t)
+ {
+ _Tp* __p = __a._M_data;
+ bool* __ok (__m._M_data);
+ for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p)
+ {
+ while (!*__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__p = __t;
+ }
}
-}
-export template<typename _Tp>
-void
-__valarray_copy (_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n)
-{
- _Tp* __p (__a._M_data);
- bool* __ok (__m._M_data);
- for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) {
- while (! *__ok) {
- ++__ok;
- ++__p;
- }
- *__q = *__p;
+ // Copy n elements of a into consecutive elements of b. When m is
+ // false, the corresponding element of a is skipped. m must contain
+ // at least n true elements. a must contain at least n elements and
+ // enough elements to match up with m through the nth true element
+ // of m. I.e. if n is 10, m has 15 elements with 5 false followed
+ // by 10 true, a must have 15 elements.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b,
+ size_t __n)
+ {
+ _Tp* __p (__a._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __q = __b._M_data; __q < __b._M_data + __n;
+ ++__q, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__q = *__p;
+ }
}
-}
-export template<typename _Tp>
-void
-__valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m)
-{
- _Tp* __q (__b._M_data);
- bool* __ok (__m._M_data);
- for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++__ok, ++__q) {
- while (! *__ok) {
- ++__ok;
- ++__q;
- }
- *__q = *__p;
+ // Copy n consecutive elements from a into elements of b. Elements
+ // of b are skipped if the corresponding element of m is false. m
+ // must contain at least n true elements. b must have at least as
+ // many elements as the index of the nth true element of m. I.e. if
+ // m has 15 elements with 5 false followed by 10 true, b must have
+ // at least 15 elements.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
+ _Array<bool> __m)
+ {
+ _Tp* __q (__b._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __p = __a._M_data; __p < __a._M_data+__n;
+ ++__p, ++__ok, ++__q)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__q;
+ }
+ *__q = *__p;
+ }
}
-}
-export template<typename _Tp, class _Dom>
-void
-__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
-{
- _Tp* __p (__a._M_data);
- for (size_t __i=0; __i<__n; ++__i, ++__p) *__p = __e[__i];
-}
-
-export template<typename _Tp, class _Dom>
-void
-__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n,
- _Array<_Tp> __a, size_t __s)
-{
- _Tp* __p (__a._M_data);
- for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p = __e[__i];
-}
-
-export template<typename _Tp, class _Dom>
-void
-__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n,
- _Array<_Tp> __a, _Array<size_t> __i)
-{
- size_t* __j (__i._M_data);
- for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] = __e[__k];
-}
-
-export template<typename _Tp, class _Dom>
-void
-__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n,
- _Array<_Tp> __a, _Array<bool> __m)
-{
- bool* __ok (__m._M_data);
- _Tp* __p (__a._M_data);
- for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) {
- while (! *__ok) {
- ++__ok;
- ++__p;
- }
- *__p = __e[__i];
+ // Copy n elements from a into elements of b. Elements of a are
+ // skipped if the corresponding element of m is false. Elements of
+ // b are skipped if the corresponding element of k is false. m and
+ // k must contain at least n true elements. a and b must have at
+ // least as many elements as the index of the nth true element of m.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, size_t __n,
+ _Array<_Tp> __b, _Array<bool> __k)
+ {
+ _Tp* __p (__a._M_data);
+ _Tp* __q (__b._M_data);
+ bool* __srcok (__m._M_data);
+ bool* __dstok (__k._M_data);
+ for (size_t __i = 0; __i < __n;
+ ++__srcok, ++__p, ++__dstok, ++__q, ++__i)
+ {
+ while (! *__srcok)
+ {
+ ++__srcok;
+ ++__p;
+ }
+ while (! *__dstok)
+ {
+ ++__dstok;
+ ++__q;
+ }
+ *__q = *__p;
+ }
}
-}
+ // Copy n consecutive elements of e into consecutive elements of a.
+ // I.e. a[i] = e[i].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__p)
+ *__p = __e[__i];
+ }
-export template<typename _Tp, class _Dom>
-void
-__valarray_copy_construct (const _Expr<_Dom, _Tp>& __e, size_t __n,
- _Array<_Tp> __a)
-{
- _Tp* __p (__a._M_data);
- for (size_t __i=0; __i<__n; ++__i, ++__p) new (__p) _Tp(__e[__i]);
-}
+ // Copy n consecutive elements of e into elements of a using stride
+ // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, size_t __s)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, __p += __s)
+ *__p = __e[__i];
+ }
+ // Copy n consecutive elements of e into elements of a indexed by
+ // contents of i. I.e., a[i[0]] = e[0].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, _Array<size_t> __i)
+ {
+ size_t* __j (__i._M_data);
+ for (size_t __k = 0; __k < __n; ++__k, ++__j)
+ __a._M_data[*__j] = __e[__k];
+ }
-export template<typename _Tp>
-void
-__valarray_copy_construct (_Array<_Tp> __a, _Array<bool> __m,
- _Array<_Tp> __b, size_t __n)
-{
- _Tp* __p (__a._M_data);
- bool* __ok (__m._M_data);
- for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) {
- while (! *__ok) {
- ++__ok;
- ++__p;
- }
- new (__q) _Tp(*__p);
+ // Copy n elements of e indexed by contents of f into elements of a
+ // indexed by contents of i. I.e., a[i[0]] = e[f[0]].
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __e, _Array<size_t> __f,
+ size_t __n,
+ _Array<_Tp> __a, _Array<size_t> __i)
+ {
+ size_t* __g (__f._M_data);
+ size_t* __j (__i._M_data);
+ for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g)
+ __a._M_data[*__j] = __e._M_data[*__g];
}
-}
+ // Copy n consecutive elements of e into elements of a. Elements of
+ // a are skipped if the corresponding element of m is false. m must
+ // have at least n true elements and a must have at least as many
+ // elements as the index of the nth true element of m. I.e. if m
+ // has 5 false followed by 10 true elements and n == 10, a must have
+ // at least 15 elements.
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, _Array<bool> __m)
+ {
+ bool* __ok (__m._M_data);
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__p = __e[__i];
+ }
+ }
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__p)
+ new (__p) _Tp(__e[__i]);
+ }
-} // std::
-#endif /* _CPP_BITS_VALARRAY_ARRAY_TCC */
+ template<typename _Tp>
+ void
+ __valarray_copy_construct(_Array<_Tp> __a, _Array<bool> __m,
+ _Array<_Tp> __b, size_t __n)
+ {
+ _Tp* __p (__a._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ new (__q) _Tp(*__p);
+ }
+ }
+} // namespace std
-// Local Variables:
-// mode:c++
-// End:
+#endif /* _VALARRAY_ARRAY_TCC */
diff --git a/contrib/libstdc++/include/bits/valarray_before.h b/contrib/libstdc++/include/bits/valarray_before.h
new file mode 100644
index 0000000..263ac2f
--- /dev/null
+++ b/contrib/libstdc++/include/bits/valarray_before.h
@@ -0,0 +1,701 @@
+// The template and inlines for the -*- C++ -*- internal _Meta class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
+
+/** @file valarray_meta.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VALARRAY_BEFORE_H
+#define _VALARRAY_BEFORE_H 1
+
+#pragma GCC system_header
+
+#include <bits/slice_array.h>
+
+namespace std
+{
+ //
+ // Implementing a loosened valarray return value is tricky.
+ // First we need to meet 26.3.1/3: we should not add more than
+ // two levels of template nesting. Therefore we resort to template
+ // template to "flatten" loosened return value types.
+ // At some point we use partial specialization to remove one level
+ // template nesting due to _Expr<>
+ //
+
+ // This class is NOT defined. It doesn't need to.
+ template<typename _Tp1, typename _Tp2> class _Constant;
+
+ // Implementations of unary functions applied to valarray<>s.
+ // I use hard-coded object functions here instead of a generic
+ // approach like pointers to function:
+ // 1) correctness: some functions take references, others values.
+ // we can't deduce the correct type afterwards.
+ // 2) efficiency -- object functions can be easily inlined
+ // 3) be Koenig-lookup-friendly
+
+ struct __abs
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return abs(__t); }
+ };
+
+ struct __cos
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return cos(__t); }
+ };
+
+ struct __acos
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return acos(__t); }
+ };
+
+ struct __cosh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return cosh(__t); }
+ };
+
+ struct __sin
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return sin(__t); }
+ };
+
+ struct __asin
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return asin(__t); }
+ };
+
+ struct __sinh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return sinh(__t); }
+ };
+
+ struct __tan
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return tan(__t); }
+ };
+
+ struct __atan
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return atan(__t); }
+ };
+
+ struct __tanh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return tanh(__t); }
+ };
+
+ struct __exp
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return exp(__t); }
+ };
+
+ struct __log
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return log(__t); }
+ };
+
+ struct __log10
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return log10(__t); }
+ };
+
+ struct __sqrt
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return sqrt(__t); }
+ };
+
+ // In the past, we used to tailor operator applications semantics
+ // to the specialization of standard function objects (i.e. plus<>, etc.)
+ // That is incorrect. Therefore we provide our own surrogates.
+
+ struct __unary_plus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return +__t; }
+ };
+
+ struct __negate
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return -__t; }
+ };
+
+ struct __bitwise_not
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const { return ~__t; }
+ };
+
+ struct __plus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x + __y; }
+ };
+
+ struct __minus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x - __y; }
+ };
+
+ struct __multiplies
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x * __y; }
+ };
+
+ struct __divides
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x / __y; }
+ };
+
+ struct __modulus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x % __y; }
+ };
+
+ struct __bitwise_xor
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x ^ __y; }
+ };
+
+ struct __bitwise_and
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x & __y; }
+ };
+
+ struct __bitwise_or
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x | __y; }
+ };
+
+ struct __shift_left
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x << __y; }
+ };
+
+ struct __shift_right
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >> __y; }
+ };
+
+ struct __logical_and
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x && __y; }
+ };
+
+ struct __logical_or
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x || __y; }
+ };
+
+ struct __logical_not
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x) const { return !__x; }
+ };
+
+ struct __equal_to
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x == __y; }
+ };
+
+ struct __not_equal_to
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x != __y; }
+ };
+
+ struct __less
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x < __y; }
+ };
+
+ struct __greater
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x > __y; }
+ };
+
+ struct __less_equal
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x <= __y; }
+ };
+
+ struct __greater_equal
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >= __y; }
+ };
+
+ // The few binary functions we miss.
+ struct __atan2
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return atan2(__x, __y); }
+ };
+
+ struct __pow
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return pow(__x, __y); }
+ };
+
+
+ // We need these bits in order to recover the return type of
+ // some functions/operators now that we're no longer using
+ // function templates.
+ template<typename, typename _Tp>
+ struct __fun
+ {
+ typedef _Tp result_type;
+ };
+
+ // several specializations for relational operators.
+ template<typename _Tp>
+ struct __fun<__logical_not, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__logical_and, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__logical_or, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__less, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__greater, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__less_equal, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__greater_equal, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__equal_to, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__not_equal_to, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ //
+ // Apply function taking a value/const reference closure
+ //
+
+ template<typename _Dom, typename _Arg>
+ class _FunBase
+ {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _FunBase(const _Dom& __e, value_type __f(_Arg))
+ : _M_expr(__e), _M_func(__f) {}
+
+ value_type operator[](size_t __i) const
+ { return _M_func (_M_expr[__i]); }
+
+ size_t size() const { return _M_expr.size ();}
+
+ private:
+ const _Dom& _M_expr;
+ value_type (*_M_func)(_Arg);
+ };
+
+ template<class _Dom>
+ struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type>
+ {
+ typedef _FunBase<_Dom, typename _Dom::value_type> _Base;
+ typedef typename _Base::value_type value_type;
+ typedef value_type _Tp;
+
+ _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {}
+ };
+
+ template<typename _Tp>
+ struct _ValFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, _Tp>
+ {
+ typedef _FunBase<valarray<_Tp>, _Tp> _Base;
+ typedef _Tp value_type;
+
+ _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {}
+ };
+
+ template<class _Dom>
+ struct _RefFunClos<_Expr,_Dom> :
+ _FunBase<_Dom, const typename _Dom::value_type&>
+ {
+ typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base;
+ typedef typename _Base::value_type value_type;
+ typedef value_type _Tp;
+
+ _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&))
+ : _Base(__e, __f) {}
+ };
+
+ template<typename _Tp>
+ struct _RefFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, const _Tp&>
+ {
+ typedef _FunBase<valarray<_Tp>, const _Tp&> _Base;
+ typedef _Tp value_type;
+
+ _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&))
+ : _Base(__v, __f) {}
+ };
+
+ //
+ // Unary expression closure.
+ //
+
+ template<class _Oper, class _Arg>
+ class _UnBase
+ {
+ public:
+ typedef typename _Arg::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _UnBase(const _Arg& __e) : _M_expr(__e) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr[__i]); }
+
+ size_t size() const { return _M_expr.size(); }
+
+ private:
+ const _Arg& _M_expr;
+ };
+
+ template<class _Oper, class _Dom>
+ struct _UnClos<_Oper, _Expr, _Dom> : _UnBase<_Oper, _Dom>
+ {
+ typedef _Dom _Arg;
+ typedef _UnBase<_Oper, _Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _UnClos(const _Arg& __e) : _Base(__e) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _UnClos<_Oper, _ValArray, _Tp> : _UnBase<_Oper, valarray<_Tp> >
+ {
+ typedef valarray<_Tp> _Arg;
+ typedef _UnBase<_Oper, valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _UnClos(const _Arg& __e) : _Base(__e) {}
+ };
+
+
+ //
+ // Binary expression closure.
+ //
+
+ template<class _Oper, class _FirstArg, class _SecondArg>
+ class _BinBase
+ {
+ public:
+ typedef typename _FirstArg::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase(const _FirstArg& __e1, const _SecondArg& __e2)
+ : _M_expr1(__e1), _M_expr2(__e2) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1[__i], _M_expr2[__i]); }
+
+ size_t size() const { return _M_expr1.size(); }
+
+ private:
+ const _FirstArg& _M_expr1;
+ const _SecondArg& _M_expr2;
+ };
+
+
+ template<class _Oper, class _Clos>
+ class _BinBase2
+ {
+ public:
+ typedef typename _Clos::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase2(const _Clos& __e, const _Vt& __t)
+ : _M_expr1(__e), _M_expr2(__t) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1[__i], _M_expr2); }
+
+ size_t size() const { return _M_expr1.size(); }
+
+ private:
+ const _Clos& _M_expr1;
+ const _Vt& _M_expr2;
+ };
+
+ template<class _Oper, class _Clos>
+ class _BinBase1
+ {
+ public:
+ typedef typename _Clos::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase1(const _Vt& __t, const _Clos& __e)
+ : _M_expr1(__t), _M_expr2(__e) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1, _M_expr2[__i]); }
+
+ size_t size() const { return _M_expr2.size(); }
+
+ private:
+ const _Vt& _M_expr1;
+ const _Clos& _M_expr2;
+ };
+
+ template<class _Oper, class _Dom1, class _Dom2>
+ struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2>
+ : _BinBase<_Oper,_Dom1,_Dom2>
+ {
+ typedef _BinBase<_Oper,_Dom1,_Dom2> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper,_ValArray,_ValArray,_Tp,_Tp>
+ : _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> >
+ {
+ typedef _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > _Base;
+ typedef _Tp value_type;
+
+ _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w)
+ : _Base(__v, __w) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper,_Expr,_ValArray,_Dom,typename _Dom::value_type>
+ : _BinBase<_Oper,_Dom,valarray<typename _Dom::value_type> >
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2)
+ : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom>
+ : _BinBase<_Oper,valarray<typename _Dom::value_type>,_Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2)
+ : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper,_Expr,_Constant,_Dom,typename _Dom::value_type>
+ : _BinBase2<_Oper,_Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase2<_Oper,_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper,_Constant,_Expr,typename _Dom::value_type,_Dom>
+ : _BinBase1<_Oper,_Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase1<_Oper,_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper,_ValArray,_Constant,_Tp,_Tp>
+ : _BinBase2<_Oper,valarray<_Tp> >
+ {
+ typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper,_Constant,_ValArray,_Tp,_Tp>
+ : _BinBase1<_Oper,valarray<_Tp> >
+ {
+ typedef _BinBase1<_Oper,valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {}
+ };
+
+
+ //
+ // slice_array closure.
+ //
+ template<typename _Dom> class _SBase {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _SBase (const _Dom& __e, const slice& __s)
+ : _M_expr (__e), _M_slice (__s) {}
+ value_type operator[] (size_t __i) const
+ { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; }
+ size_t size() const { return _M_slice.size (); }
+
+ private:
+ const _Dom& _M_expr;
+ const slice& _M_slice;
+ };
+
+ template<typename _Tp> class _SBase<_Array<_Tp> > {
+ public:
+ typedef _Tp value_type;
+
+ _SBase (_Array<_Tp> __a, const slice& __s)
+ : _M_array (__a._M_data+__s.start()), _M_size (__s.size()),
+ _M_stride (__s.stride()) {}
+ value_type operator[] (size_t __i) const
+ { return _M_array._M_data[__i * _M_stride]; }
+ size_t size() const { return _M_size; }
+
+ private:
+ const _Array<_Tp> _M_array;
+ const size_t _M_size;
+ const size_t _M_stride;
+ };
+
+ template<class _Dom> struct _SClos<_Expr,_Dom> : _SBase<_Dom> {
+ typedef _SBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {}
+ };
+
+ template<typename _Tp>
+ struct _SClos<_ValArray,_Tp> : _SBase<_Array<_Tp> > {
+ typedef _SBase<_Array<_Tp> > _Base;
+ typedef _Tp value_type;
+
+ _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {}
+ };
+
+} // std::
+
+
+#endif /* _CPP_VALARRAY_BEFORE_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/vector.tcc b/contrib/libstdc++/include/bits/vector.tcc
index da5cf7e..abd1ba7 100644
--- a/contrib/libstdc++/include/bits/vector.tcc
+++ b/contrib/libstdc++/include/bits/vector.tcc
@@ -1,6 +1,6 @@
// Vector implementation (out of line) -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,10 +58,10 @@
* You should not attempt to use it directly.
*/
-#ifndef __GLIBCPP_INTERNAL_VECTOR_TCC
-#define __GLIBCPP_INTERNAL_VECTOR_TCC
+#ifndef _VECTOR_TCC
+#define _VECTOR_TCC 1
-namespace std
+namespace _GLIBCXX_STD
{
template<typename _Tp, typename _Alloc>
void
@@ -69,58 +69,61 @@ namespace std
reserve(size_type __n)
{
if (__n > this->max_size())
- __throw_length_error("vector::reserve");
+ __throw_length_error(__N("vector::reserve"));
if (this->capacity() < __n)
{
const size_type __old_size = size();
- pointer __tmp = _M_allocate_and_copy(__n, _M_start, _M_finish);
- _Destroy(_M_start, _M_finish);
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __tmp;
- _M_finish = __tmp + __old_size;
- _M_end_of_storage = _M_start + __n;
+ pointer __tmp = _M_allocate_and_copy(__n,
+ this->_M_impl._M_start,
+ this->_M_impl._M_finish);
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish);
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_finish = __tmp + __old_size;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
}
-
+
template<typename _Tp, typename _Alloc>
typename vector<_Tp,_Alloc>::iterator
vector<_Tp,_Alloc>::
insert(iterator __position, const value_type& __x)
{
size_type __n = __position - begin();
- if (_M_finish != _M_end_of_storage && __position == end())
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage && __position == end())
{
- _Construct(_M_finish, __x);
- ++_M_finish;
+ std::_Construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
}
else
_M_insert_aux(__position, __x);
return begin() + __n;
}
-
+
template<typename _Tp, typename _Alloc>
typename vector<_Tp,_Alloc>::iterator
vector<_Tp,_Alloc>::
erase(iterator __position)
{
if (__position + 1 != end())
- copy(__position + 1, end(), __position);
- --_M_finish;
- _Destroy(_M_finish);
+ std::copy(__position + 1, end(), __position);
+ --this->_M_impl._M_finish;
+ std::_Destroy(this->_M_impl._M_finish);
return __position;
}
-
+
template<typename _Tp, typename _Alloc>
typename vector<_Tp,_Alloc>::iterator
vector<_Tp,_Alloc>::
erase(iterator __first, iterator __last)
{
iterator __i(copy(__last, end(), __first));
- _Destroy(__i, end());
- _M_finish = _M_finish - (__last - __first);
+ std::_Destroy(__i, end());
+ this->_M_impl._M_finish = this->_M_impl._M_finish - (__last - __first);
return __first;
}
-
+
template<typename _Tp, typename _Alloc>
vector<_Tp,_Alloc>&
vector<_Tp,_Alloc>::
@@ -132,26 +135,27 @@ namespace std
if (__xlen > capacity())
{
pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end());
- _Destroy(_M_start, _M_finish);
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __tmp;
- _M_end_of_storage = _M_start + __xlen;
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish);
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
}
else if (size() >= __xlen)
{
iterator __i(copy(__x.begin(), __x.end(), begin()));
- _Destroy(__i, end());
+ std::_Destroy(__i, end());
}
else
{
- copy(__x.begin(), __x.begin() + size(), _M_start);
- uninitialized_copy(__x.begin() + size(), __x.end(), _M_finish);
+ std::copy(__x.begin(), __x.begin() + size(), this->_M_impl._M_start);
+ std::uninitialized_copy(__x.begin() + size(), __x.end(), this->_M_impl._M_finish);
}
- _M_finish = _M_start + __xlen;
+ this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
}
return *this;
}
-
+
template<typename _Tp, typename _Alloc>
void
vector<_Tp,_Alloc>::
@@ -164,17 +168,18 @@ namespace std
}
else if (__n > size())
{
- fill(begin(), end(), __val);
- _M_finish = uninitialized_fill_n(_M_finish, __n - size(), __val);
+ std::fill(begin(), end(), __val);
+ this->_M_impl._M_finish
+ = std::uninitialized_fill_n(this->_M_impl._M_finish, __n - size(), __val);
}
else
erase(fill_n(begin(), __n, __val), end());
}
-
- template<typename _Tp, typename _Alloc> template<typename _InputIter>
+
+ template<typename _Tp, typename _Alloc> template<typename _InputIterator>
void
vector<_Tp,_Alloc>::
- _M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag)
+ _M_assign_aux(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
iterator __cur(begin());
for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
@@ -184,124 +189,86 @@ namespace std
else
insert(end(), __first, __last);
}
-
- template<typename _Tp, typename _Alloc> template<typename _ForwardIter>
+
+ template<typename _Tp, typename _Alloc> template<typename _ForwardIterator>
void
vector<_Tp,_Alloc>::
- _M_assign_aux(_ForwardIter __first, _ForwardIter __last,
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag)
{
- size_type __len = distance(__first, __last);
-
+ size_type __len = std::distance(__first, __last);
+
if (__len > capacity())
{
pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
- _Destroy(_M_start, _M_finish);
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __tmp;
- _M_end_of_storage = _M_finish = _M_start + __len;
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish);
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_finish = this->_M_impl._M_start + __len;
}
else if (size() >= __len)
{
- iterator __new_finish(copy(__first, __last, _M_start));
- _Destroy(__new_finish, end());
- _M_finish = __new_finish.base();
+ iterator __new_finish(copy(__first, __last, this->_M_impl._M_start));
+ std::_Destroy(__new_finish, end());
+ this->_M_impl._M_finish = __new_finish.base();
}
else
{
- _ForwardIter __mid = __first;
- advance(__mid, size());
- copy(__first, __mid, _M_start);
- _M_finish = uninitialized_copy(__mid, __last, _M_finish);
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, this->_M_impl._M_start);
+ this->_M_impl._M_finish = std::uninitialized_copy(__mid, __last, this->_M_impl._M_finish);
}
}
-
+
template<typename _Tp, typename _Alloc>
void
vector<_Tp,_Alloc>::
_M_insert_aux(iterator __position, const _Tp& __x)
{
- if (_M_finish != _M_end_of_storage)
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
- _Construct(_M_finish, *(_M_finish - 1));
- ++_M_finish;
+ std::_Construct(this->_M_impl._M_finish, *(this->_M_impl._M_finish - 1));
+ ++this->_M_impl._M_finish;
_Tp __x_copy = __x;
- copy_backward(__position, iterator(_M_finish-2), iterator(_M_finish-1));
+ std::copy_backward(__position,
+ iterator(this->_M_impl._M_finish-2),
+ iterator(this->_M_impl._M_finish-1));
*__position = __x_copy;
}
else
{
const size_type __old_size = size();
const size_type __len = __old_size != 0 ? 2 * __old_size : 1;
- iterator __new_start(_M_allocate(__len));
+ iterator __new_start(this->_M_allocate(__len));
iterator __new_finish(__new_start);
try
{
- __new_finish = uninitialized_copy(iterator(_M_start), __position,
- __new_start);
- _Construct(__new_finish.base(), __x);
+ __new_finish = std::uninitialized_copy(iterator(this->_M_impl._M_start),
+ __position,
+ __new_start);
+ std::_Construct(__new_finish.base(), __x);
++__new_finish;
- __new_finish = uninitialized_copy(__position, iterator(_M_finish),
- __new_finish);
+ __new_finish = std::uninitialized_copy(__position,
+ iterator(this->_M_impl._M_finish),
+ __new_finish);
}
catch(...)
{
- _Destroy(__new_start,__new_finish);
+ std::_Destroy(__new_start,__new_finish);
_M_deallocate(__new_start.base(),__len);
__throw_exception_again;
}
- _Destroy(begin(), end());
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __new_start.base();
- _M_finish = __new_finish.base();
- _M_end_of_storage = __new_start.base() + __len;
- }
- }
-
- #ifdef _GLIBCPP_DEPRECATED
- template<typename _Tp, typename _Alloc>
- void
- vector<_Tp,_Alloc>::
- _M_insert_aux(iterator __position)
- {
- if (_M_finish != _M_end_of_storage)
- {
- _Construct(_M_finish, *(_M_finish - 1));
- ++_M_finish;
- copy_backward(__position, iterator(_M_finish - 2),
- iterator(_M_finish - 1));
- *__position = value_type();
- }
- else
- {
- const size_type __old_size = size();
- const size_type __len = __old_size != 0 ? 2 * __old_size : 1;
- pointer __new_start = _M_allocate(__len);
- pointer __new_finish = __new_start;
- try
- {
- __new_finish = uninitialized_copy(iterator(_M_start), __position,
- __new_start);
- _Construct(__new_finish);
- ++__new_finish;
- __new_finish = uninitialized_copy(__position, iterator(_M_finish),
- __new_finish);
- }
- catch(...)
- {
- _Destroy(__new_start,__new_finish);
- _M_deallocate(__new_start,__len);
- __throw_exception_again;
- }
- _Destroy(begin(), end());
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __new_start;
- _M_finish = __new_finish;
- _M_end_of_storage = __new_start + __len;
+ std::_Destroy(begin(), end());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start.base();
+ this->_M_impl._M_finish = __new_finish.base();
+ this->_M_impl._M_end_of_storage = __new_start.base() + __len;
}
}
- #endif
-
+
template<typename _Tp, typename _Alloc>
void
vector<_Tp,_Alloc>::
@@ -309,56 +276,61 @@ namespace std
{
if (__n != 0)
{
- if (size_type(_M_end_of_storage - _M_finish) >= __n)
+ if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n)
{
value_type __x_copy = __x;
const size_type __elems_after = end() - __position;
- iterator __old_finish(_M_finish);
+ iterator __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
- uninitialized_copy(_M_finish - __n, _M_finish, _M_finish);
- _M_finish += __n;
- copy_backward(__position, __old_finish - __n, __old_finish);
- fill(__position, __position + __n, __x_copy);
+ std::uninitialized_copy(this->_M_impl._M_finish - __n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish += __n;
+ std::copy_backward(__position, __old_finish - __n, __old_finish);
+ std::fill(__position, __position + __n, __x_copy);
}
else
{
- uninitialized_fill_n(_M_finish, __n - __elems_after, __x_copy);
- _M_finish += __n - __elems_after;
- uninitialized_copy(__position, __old_finish, _M_finish);
- _M_finish += __elems_after;
- fill(__position, __old_finish, __x_copy);
+ std::uninitialized_fill_n(this->_M_impl._M_finish,
+ __n - __elems_after,
+ __x_copy);
+ this->_M_impl._M_finish += __n - __elems_after;
+ std::uninitialized_copy(__position, __old_finish, this->_M_impl._M_finish);
+ this->_M_impl._M_finish += __elems_after;
+ std::fill(__position, __old_finish, __x_copy);
}
}
else
{
const size_type __old_size = size();
- const size_type __len = __old_size + max(__old_size, __n);
- iterator __new_start(_M_allocate(__len));
+ const size_type __len = __old_size + std::max(__old_size, __n);
+ iterator __new_start(this->_M_allocate(__len));
iterator __new_finish(__new_start);
try
{
- __new_finish = uninitialized_copy(begin(), __position,
- __new_start);
- __new_finish = uninitialized_fill_n(__new_finish, __n, __x);
- __new_finish = uninitialized_copy(__position, end(),
- __new_finish);
+ __new_finish = std::uninitialized_copy(begin(), __position,
+ __new_start);
+ __new_finish = std::uninitialized_fill_n(__new_finish, __n, __x);
+ __new_finish = std::uninitialized_copy(__position, end(),
+ __new_finish);
}
catch(...)
{
- _Destroy(__new_start,__new_finish);
+ std::_Destroy(__new_start,__new_finish);
_M_deallocate(__new_start.base(),__len);
__throw_exception_again;
}
- _Destroy(_M_start, _M_finish);
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __new_start.base();
- _M_finish = __new_finish.base();
- _M_end_of_storage = __new_start.base() + __len;
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish);
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start.base();
+ this->_M_impl._M_finish = __new_finish.base();
+ this->_M_impl._M_end_of_storage = __new_start.base() + __len;
}
}
}
-
+
template<typename _Tp, typename _Alloc> template<typename _InputIterator>
void
vector<_Tp,_Alloc>::
@@ -372,66 +344,71 @@ namespace std
++__pos;
}
}
-
+
template<typename _Tp, typename _Alloc> template<typename _ForwardIterator>
void
vector<_Tp,_Alloc>::
- _M_range_insert(iterator __position,_ForwardIterator __first,
+ _M_range_insert(iterator __position,_ForwardIterator __first,
_ForwardIterator __last, forward_iterator_tag)
{
if (__first != __last)
{
- size_type __n = distance(__first, __last);
- if (size_type(_M_end_of_storage - _M_finish) >= __n)
+ size_type __n = std::distance(__first, __last);
+ if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n)
{
const size_type __elems_after = end() - __position;
- iterator __old_finish(_M_finish);
+ iterator __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
- uninitialized_copy(_M_finish - __n, _M_finish, _M_finish);
- _M_finish += __n;
- copy_backward(__position, __old_finish - __n, __old_finish);
- copy(__first, __last, __position);
+ std::uninitialized_copy(this->_M_impl._M_finish - __n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish);
+ this->_M_impl._M_finish += __n;
+ std::copy_backward(__position, __old_finish - __n, __old_finish);
+ std::copy(__first, __last, __position);
}
else
{
_ForwardIterator __mid = __first;
- advance(__mid, __elems_after);
- uninitialized_copy(__mid, __last, _M_finish);
- _M_finish += __n - __elems_after;
- uninitialized_copy(__position, __old_finish, _M_finish);
- _M_finish += __elems_after;
- copy(__first, __mid, __position);
+ std::advance(__mid, __elems_after);
+ std::uninitialized_copy(__mid, __last, this->_M_impl._M_finish);
+ this->_M_impl._M_finish += __n - __elems_after;
+ std::uninitialized_copy(__position, __old_finish, this->_M_impl._M_finish);
+ this->_M_impl._M_finish += __elems_after;
+ std::copy(__first, __mid, __position);
}
}
else
{
const size_type __old_size = size();
- const size_type __len = __old_size + max(__old_size, __n);
- iterator __new_start(_M_allocate(__len));
+ const size_type __len = __old_size + std::max(__old_size, __n);
+ iterator __new_start(this->_M_allocate(__len));
iterator __new_finish(__new_start);
try
{
- __new_finish = uninitialized_copy(iterator(_M_start),
- __position, __new_start);
- __new_finish = uninitialized_copy(__first, __last, __new_finish);
- __new_finish = uninitialized_copy(__position, iterator(_M_finish),
- __new_finish);
+ __new_finish = std::uninitialized_copy(iterator(this->_M_impl._M_start),
+ __position, __new_start);
+ __new_finish = std::uninitialized_copy(__first, __last,
+ __new_finish);
+ __new_finish = std::uninitialized_copy(__position,
+ iterator(this->_M_impl._M_finish),
+ __new_finish);
}
catch(...)
{
- _Destroy(__new_start,__new_finish);
+ std::_Destroy(__new_start,__new_finish);
_M_deallocate(__new_start.base(), __len);
__throw_exception_again;
}
- _Destroy(_M_start, _M_finish);
- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
- _M_start = __new_start.base();
- _M_finish = __new_finish.base();
- _M_end_of_storage = __new_start.base() + __len;
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish);
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start.base();
+ this->_M_impl._M_finish = __new_finish.base();
+ this->_M_impl._M_end_of_storage = __new_start.base() + __len;
}
}
}
} // namespace std
-#endif /* __GLIBCPP_INTERNAL_VECTOR_TCC */
+#endif /* _VECTOR_TCC */
diff --git a/contrib/libstdc++/include/c/std_cctype.h b/contrib/libstdc++/include/c/std_cctype.h
index 9d84a3d..3231f48 100644
--- a/contrib/libstdc++/include/c/std_cctype.h
+++ b/contrib/libstdc++/include/c/std_cctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,11 +31,11 @@
// ISO C++ 14882: <ccytpe>
//
-#ifndef _CPP_CCTYPE
-#define _CPP_CCTYPE 1
+#ifndef _GLIBCXX_CCTYPE
+#define _GLIBCXX_CCTYPE 1
#pragma GCC system_header
#include_next <ctype.h>
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c/std_cerrno.h b/contrib/libstdc++/include/c/std_cerrno.h
index 646d609..84e0e53 100644
--- a/contrib/libstdc++/include/c/std_cerrno.h
+++ b/contrib/libstdc++/include/c/std_cerrno.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,8 +40,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CERRNO
-#define _CPP_CERRNO 1
+#ifndef _GLIBCXX_CERRNO
+#define _GLIBCXX_CERRNO 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cfloat.h b/contrib/libstdc++/include/c/std_cfloat.h
index 9c95760..e9319d3 100644
--- a/contrib/libstdc++/include/c/std_cfloat.h
+++ b/contrib/libstdc++/include/c/std_cfloat.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 18.2.2 Implementation properties: C library
//
-#ifndef _CPP_CFLOAT
-#define _CPP_CFLOAT 1
+#ifndef _GLIBCXX_CFLOAT
+#define _GLIBCXX_CFLOAT 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_climits.h b/contrib/libstdc++/include/c/std_climits.h
index 9194cb9..e1986f2 100644
--- a/contrib/libstdc++/include/c/std_climits.h
+++ b/contrib/libstdc++/include/c/std_climits.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 18.2.2 Implementation properties: C library
//
-#ifndef _CPP_CLIMITS
-#define _CPP_CLIMITS 1
+#ifndef _GLIBCXX_CLIMITS
+#define _GLIBCXX_CLIMITS 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_clocale.h b/contrib/libstdc++/include/c/std_clocale.h
index b6b3c22..6aa937b 100644
--- a/contrib/libstdc++/include/c/std_clocale.h
+++ b/contrib/libstdc++/include/c/std_clocale.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 18.2.2 Implementation properties: C library
//
-#ifndef _CPP_CLOCALE
-#define _CPP_CLOCALE 1
+#ifndef _GLIBCXX_CLOCALE
+#define _GLIBCXX_CLOCALE 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cmath.h b/contrib/libstdc++/include/c/std_cmath.h
index beb7141..fcaa759 100644
--- a/contrib/libstdc++/include/c/std_cmath.h
+++ b/contrib/libstdc++/include/c/std_cmath.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,9 +31,9 @@
// ISO C++ 14882: 26.5 C library
//
-#ifndef _CPP_CMATH
-#define _CPP_CMATH 1
-
+#ifndef _GLIBCXX_CMATH
+#define _GLIBCXX_CMATH 1
+
#pragma GCC system_header
#include <bits/c++config.h>
@@ -79,7 +79,7 @@
#undef islessgreater
#undef isunordered
-namespace std
+namespace std
{
inline double
abs(double __x)
@@ -93,11 +93,11 @@ namespace std
abs(long double __x)
{ return __builtin_fabsl(__x); }
-#if _GLIBCPP_HAVE_MODFF
- inline float
+#if _GLIBCXX_HAVE_MODFF
+ inline float
modf(float __x, float* __iptr) { return modff(__x, __iptr); }
#else
- inline float
+ inline float
modf(float __x, float* __iptr)
{
double __tmp;
@@ -107,13 +107,13 @@ namespace std
}
#endif
-#if _GLIBCPP_HAVE_MODFL
- inline long double
+#if _GLIBCXX_HAVE_MODFL
+ inline long double
modf(long double __x, long double* __iptr) { return modfl(__x, __iptr); }
#else
- inline long double
- modf(long double __x, long double* __iptr)
- {
+ inline long double
+ modf(long double __x, long double* __iptr)
+ {
double __tmp;
double __res = modf(static_cast<double>(__x), &__tmp);
* __iptr = static_cast<long double>(__tmp);
diff --git a/contrib/libstdc++/include/c/std_csetjmp.h b/contrib/libstdc++/include/c/std_csetjmp.h
index fe3f9c7..022753f 100644
--- a/contrib/libstdc++/include/c/std_csetjmp.h
+++ b/contrib/libstdc++/include/c/std_csetjmp.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 20.4.6 C library
//
-#ifndef _CPP_CSETJMP
-#define _CPP_CSETJMP 1
+#ifndef _GLIBCXX_CSETJMP
+#define _GLIBCXX_CSETJMP 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_csignal.h b/contrib/libstdc++/include/c/std_csignal.h
index 09614e7..6fa9607 100644
--- a/contrib/libstdc++/include/c/std_csignal.h
+++ b/contrib/libstdc++/include/c/std_csignal.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 20.4.6 C library
//
-#ifndef _CPP_CSIGNAL
-#define _CPP_CSIGNAL 1
+#ifndef _GLIBCXX_CSIGNAL
+#define _GLIBCXX_CSIGNAL 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cstdarg.h b/contrib/libstdc++/include/c/std_cstdarg.h
index 39d019b..0c23634 100644
--- a/contrib/libstdc++/include/c/std_cstdarg.h
+++ b/contrib/libstdc++/include/c/std_cstdarg.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 20.4.6 C library
//
-#ifndef _CPP_CSTDARG
-#define _CPP_CSTDARG 1
+#ifndef _GLIBCXX_CSTDARG
+#define _GLIBCXX_CSTDARG 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cstddef.h b/contrib/libstdc++/include/c/std_cstddef.h
index 82561cd..4178ecf 100644
--- a/contrib/libstdc++/include/c/std_cstddef.h
+++ b/contrib/libstdc++/include/c/std_cstddef.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 18.1 Types
//
-#ifndef _CPP_CSTDDEF
-#define _CPP_CSTDDEF 1
+#ifndef _GLIBCXX_CSTDDEF
+#define _GLIBCXX_CSTDDEF 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cstdio.h b/contrib/libstdc++/include/c/std_cstdio.h
index 3d6272a..fa04bc4 100644
--- a/contrib/libstdc++/include/c/std_cstdio.h
+++ b/contrib/libstdc++/include/c/std_cstdio.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 27.8.2 C Library files
//
-#ifndef _CPP_CSTDIO
-#define _CPP_CSTDIO 1
+#ifndef _GLIBCXX_CSTDIO
+#define _GLIBCXX_CSTDIO 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cstdlib.h b/contrib/libstdc++/include/c/std_cstdlib.h
index 57ade0d..90b2f10 100644
--- a/contrib/libstdc++/include/c/std_cstdlib.h
+++ b/contrib/libstdc++/include/c/std_cstdlib.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,11 +31,11 @@
// ISO C++ 14882: 20.4.6 C library
//
-#ifndef _CPP_CSTDLIB
-#define _CPP_CSTDLIB 1
+#ifndef _GLIBCXX_CSTDLIB
+#define _GLIBCXX_CSTDLIB 1
#pragma GCC system_header
#include_next <stdlib.h>
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c/std_cstring.h b/contrib/libstdc++/include/c/std_cstring.h
index 656ff52..72ee44f 100644
--- a/contrib/libstdc++/include/c/std_cstring.h
+++ b/contrib/libstdc++/include/c/std_cstring.h
@@ -31,8 +31,8 @@
// ISO C++ 14882: 20.4.6 C library
//
-#ifndef _CPP_CSTRING
-#define _CPP_CSTRING 1
+#ifndef _GLIBCXX_CSTRING
+#define _GLIBCXX_CSTRING 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_ctime.h b/contrib/libstdc++/include/c/std_ctime.h
index ba9103e..197a1f8 100644
--- a/contrib/libstdc++/include/c/std_ctime.h
+++ b/contrib/libstdc++/include/c/std_ctime.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 20.5 Date and time
//
-#ifndef _CPP_CTIME
-#define _CPP_CTIME 1
+#ifndef _GLIBCXX_CTIME
+#define _GLIBCXX_CTIME 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c/std_cwchar.h b/contrib/libstdc++/include/c/std_cwchar.h
index d06f5e4..0d2f6be 100644
--- a/contrib/libstdc++/include/c/std_cwchar.h
+++ b/contrib/libstdc++/include/c/std_cwchar.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,8 +31,8 @@
// ISO C++ 14882: 21.4
//
-#ifndef _CPP_CWCHAR
-#define _CPP_CWCHAR 1
+#ifndef _GLIBCXX_CWCHAR
+#define _GLIBCXX_CWCHAR 1
#pragma GCC system_header
@@ -40,18 +40,18 @@
#include <cstddef>
#include <ctime>
-#if _GLIBCPP_HAVE_WCHAR_H
+#if _GLIBCXX_HAVE_WCHAR_H
#include_next <wchar.h>
#endif
// Need to do a bit of trickery here with mbstate_t as char_traits
// assumes it is in wchar.h, regardless of wchar_t specializations.
-#ifndef _GLIBCPP_HAVE_MBSTATE_T
+#ifndef _GLIBCXX_HAVE_MBSTATE_T
namespace std
{
- extern "C"
+ extern "C"
{
- typedef struct
+ typedef struct
{
int __fill[6];
} mbstate_t;
@@ -59,4 +59,4 @@ namespace std
}
#endif
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c/std_cwctype.h b/contrib/libstdc++/include/c/std_cwctype.h
index d515698..9302864 100644
--- a/contrib/libstdc++/include/c/std_cwctype.h
+++ b/contrib/libstdc++/include/c/std_cwctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,15 +31,15 @@
// ISO C++ 14882: <cwctype>
//
-#ifndef _CPP_CWCTYPE
-#define _CPP_CWCTYPE 1
+#ifndef _GLIBCXX_CWCTYPE
+#define _GLIBCXX_CWCTYPE 1
#pragma GCC system_header
#include <bits/c++config.h>
-#if _GLIBCPP_HAVE_WCTYPE_H
+#if _GLIBCXX_HAVE_WCTYPE_H
#include_next <wctype.h>
#endif
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_compatibility/ctype.h b/contrib/libstdc++/include/c_compatibility/ctype.h
index 1989347..3a610d1 100644
--- a/contrib/libstdc++/include/c_compatibility/ctype.h
+++ b/contrib/libstdc++/include/c_compatibility/ctype.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_CTYPE_H_
-#define _CPP_CTYPE_H_ 1
+#ifndef _GLIBCXX_CTYPE_H
+#define _GLIBCXX_CTYPE_H 1
#include <cctype>
diff --git a/contrib/libstdc++/include/c_compatibility/errno.h b/contrib/libstdc++/include/c_compatibility/errno.h
index f890b53..f6b2b76 100644
--- a/contrib/libstdc++/include/c_compatibility/errno.h
+++ b/contrib/libstdc++/include/c_compatibility/errno.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_ERRNO_H_
-#define _CPP_ERRNO_H_ 1
+#ifndef _GLIBCXX_ERRNO_H
+#define _GLIBCXX_ERRNO_H 1
#include <cerrno>
diff --git a/contrib/libstdc++/include/c_compatibility/float.h b/contrib/libstdc++/include/c_compatibility/float.h
index 7d7b9d44..5eaaba6 100644
--- a/contrib/libstdc++/include/c_compatibility/float.h
+++ b/contrib/libstdc++/include/c_compatibility/float.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_FLOAT_H_
-#define _CPP_FLOAT_H_ 1
+#ifndef _GLIBCXX_FLOAT_H
+#define _GLIBCXX_FLOAT_H 1
#include <cfloat>
diff --git a/contrib/libstdc++/include/c_compatibility/iso646.h b/contrib/libstdc++/include/c_compatibility/iso646.h
index 25b6140..83c5364 100644
--- a/contrib/libstdc++/include/c_compatibility/iso646.h
+++ b/contrib/libstdc++/include/c_compatibility/iso646.h
@@ -27,9 +27,9 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_ISO646_H_
-#define _CPP_ISO646_H_ 1
+#ifndef _GLIBCXX_ISO646_H
+#define _GLIBCXX_ISO646_H 1
#include <ciso646>
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_compatibility/limits.h b/contrib/libstdc++/include/c_compatibility/limits.h
index 9ddbce8..d9a753c 100644
--- a/contrib/libstdc++/include/c_compatibility/limits.h
+++ b/contrib/libstdc++/include/c_compatibility/limits.h
@@ -27,9 +27,9 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_LIMITS_H_
-#define _CPP_LIMITS_H_ 1
+#ifndef _GLIBCXX_LIMITS_H
+#define _GLIBCXX_LIMITS_H 1
#include <climits>
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_compatibility/locale.h b/contrib/libstdc++/include/c_compatibility/locale.h
index 4d7d72d..549bd7d 100644
--- a/contrib/libstdc++/include/c_compatibility/locale.h
+++ b/contrib/libstdc++/include/c_compatibility/locale.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_LOCALE_H_
-#define _CPP_LOCALE_H_ 1
+#ifndef _GLIBCXX_LOCALE_H
+#define _GLIBCXX_LOCALE_H 1
#include <clocale>
@@ -36,4 +36,4 @@ using std::lconv;
using std::setlocale;
using std::localeconv;
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_compatibility/math.h b/contrib/libstdc++/include/c_compatibility/math.h
index 4c4fd0a..1cd48cf 100644
--- a/contrib/libstdc++/include/c_compatibility/math.h
+++ b/contrib/libstdc++/include/c_compatibility/math.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_MATH_H_
-#define _CPP_MATH_H_ 1
+#ifndef _GLIBCXX_MATH_H
+#define _GLIBCXX_MATH_H 1
#include <cmath>
@@ -56,7 +56,7 @@ using std::fabs;
using std::floor;
using std::fmod;
-#if _GLIBCPP_USE_C99
+#if _GLIBCXX_USE_C99
using std::fpclassify;
using std::isfinite;
using std::isinf;
diff --git a/contrib/libstdc++/include/c_compatibility/setjmp.h b/contrib/libstdc++/include/c_compatibility/setjmp.h
index f194253..0bcad03 100644
--- a/contrib/libstdc++/include/c_compatibility/setjmp.h
+++ b/contrib/libstdc++/include/c_compatibility/setjmp.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_SETJMP_H_
-#define _CPP_SETJMP_H_ 1
+#ifndef _GLIBCXX_SETJMP_H
+#define _GLIBCXX_SETJMP_H 1
#include <csetjmp>
diff --git a/contrib/libstdc++/include/c_compatibility/signal.h b/contrib/libstdc++/include/c_compatibility/signal.h
index 724ac8a..b43deb5 100644
--- a/contrib/libstdc++/include/c_compatibility/signal.h
+++ b/contrib/libstdc++/include/c_compatibility/signal.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_SIGNAL_H_
-#define _CPP_SIGNAL_H_ 1
+#ifndef _GLIBCXX_SIGNAL_H
+#define _GLIBCXX_SIGNAL_H 1
#include <csignal>
diff --git a/contrib/libstdc++/include/c_compatibility/stdarg.h b/contrib/libstdc++/include/c_compatibility/stdarg.h
index a1a62b1..76d6c74 100644
--- a/contrib/libstdc++/include/c_compatibility/stdarg.h
+++ b/contrib/libstdc++/include/c_compatibility/stdarg.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_STDARG_H_
-#define _CPP_STDARG_H_ 1
+#ifndef _GLIBCXX_STDARG_H
+#define _GLIBCXX_STDARG_H 1
#include <cstdarg>
diff --git a/contrib/libstdc++/include/c_compatibility/stddef.h b/contrib/libstdc++/include/c_compatibility/stddef.h
index 094c380..4dac7db 100644
--- a/contrib/libstdc++/include/c_compatibility/stddef.h
+++ b/contrib/libstdc++/include/c_compatibility/stddef.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_STDDEF_H_
-#define _CPP_STDDEF_H_ 1
+#ifndef _GLIBCXX_STDDEF_H
+#define _GLIBCXX_STDDEF_H 1
#include <cstddef>
diff --git a/contrib/libstdc++/include/c_compatibility/stdio.h b/contrib/libstdc++/include/c_compatibility/stdio.h
index 930ffd4..2686a72 100644
--- a/contrib/libstdc++/include/c_compatibility/stdio.h
+++ b/contrib/libstdc++/include/c_compatibility/stdio.h
@@ -27,13 +27,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_STDIO_H_
-#define _CPP_STDIO_H_ 1
+#ifndef _GLIBCXX_STDIO_H
+#define _GLIBCXX_STDIO_H 1
#include <cstdio>
using std::FILE;
-using std::fpos_t;
+using std::fpos_t;
using std::remove;
using std::rename;
diff --git a/contrib/libstdc++/include/c_compatibility/stdlib.h b/contrib/libstdc++/include/c_compatibility/stdlib.h
index d516034..2b05c1a 100644
--- a/contrib/libstdc++/include/c_compatibility/stdlib.h
+++ b/contrib/libstdc++/include/c_compatibility/stdlib.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_STDLIB_H_
-#define _CPP_STDLIB_H_ 1
+#ifndef _GLIBCXX_STDLIB_H
+#define _GLIBCXX_STDLIB_H 1
#include <cstdlib>
diff --git a/contrib/libstdc++/include/c_compatibility/string.h b/contrib/libstdc++/include/c_compatibility/string.h
index b639157..a399f60 100644
--- a/contrib/libstdc++/include/c_compatibility/string.h
+++ b/contrib/libstdc++/include/c_compatibility/string.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_STRING_H_
-#define _CPP_STRING_H_ 1
+#ifndef _GLIBCXX_STRING_H
+#define _GLIBCXX_STRING_H 1
#include <cstring>
@@ -55,4 +55,4 @@ using std::memset;
using std::strerror;
using std::strlen;
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_compatibility/time.h b/contrib/libstdc++/include/c_compatibility/time.h
index 6d07aa1..0e7e2ad 100644
--- a/contrib/libstdc++/include/c_compatibility/time.h
+++ b/contrib/libstdc++/include/c_compatibility/time.h
@@ -27,11 +27,11 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_TIME_H_
-#define _CPP_TIME_H_ 1
+#ifndef _GLIBCXX_TIME_H
+#define _GLIBCXX_TIME_H 1
#include <ctime>
-
+
// Get rid of those macros defined in <time.h> in lieu of real functions.
#undef clock
#undef difftime
diff --git a/contrib/libstdc++/include/c_compatibility/wchar.h b/contrib/libstdc++/include/c_compatibility/wchar.h
index e9485a5..a962ff2f 100644
--- a/contrib/libstdc++/include/c_compatibility/wchar.h
+++ b/contrib/libstdc++/include/c_compatibility/wchar.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,14 +27,14 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_WCHAR_H_
-#define _CPP_WCHAR_H_ 1
+#ifndef _GLIBCXX_WCHAR_H
+#define _GLIBCXX_WCHAR_H 1
#include <cwchar>
using std::mbstate_t;
-#if _GLIBCPP_USE_WCHAR_T
+#if _GLIBCXX_USE_WCHAR_T
using std::wint_t;
using std::btowc;
@@ -50,11 +50,17 @@ using std::fwscanf;
using std::swprintf;
using std::swscanf;
using std::vfwprintf;
+#if _GLIBCXX_HAVE_VFWSCANF
using std::vfwscanf;
+#endif
using std::vswprintf;
+#if _GLIBCXX_HAVE_VSWSCANF
using std::vswscanf;
+#endif
using std::vwprintf;
+#if _GLIBCXX_HAVE_VWSCANF
using std::vwscanf;
+#endif
using std::wprintf;
using std::wscanf;
using std::getwc;
@@ -69,7 +75,9 @@ using std::putwchar;
using std::ungetwc;
using std::wcrtomb;
using std::wcstod;
+#if _GLIBCXX_HAVE_WCSTOF
using std::wcstof;
+#endif
using std::wcstol;
using std::wcstoul;
using std::wcscpy;
@@ -95,12 +103,12 @@ using std::wmemmove;
using std::wmemset;
using std::wcsftime;
-#if _GLIBCPP_USE_C99
+#if _GLIBCXX_USE_C99
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
#endif
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
#endif
diff --git a/contrib/libstdc++/include/c_compatibility/wctype.h b/contrib/libstdc++/include/c_compatibility/wctype.h
index 2c75ec8..6086f3d 100644
--- a/contrib/libstdc++/include/c_compatibility/wctype.h
+++ b/contrib/libstdc++/include/c_compatibility/wctype.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _CPP_CWCTYPE_H_
-#define _CPP_CWCTYPE_H_ 1
+#ifndef _GLIBCXX_CWCTYPE_H
+#define _GLIBCXX_CWCTYPE_H 1
#include <cwctype>
@@ -52,4 +52,4 @@ using std::towupper;
using std::wctrans;
using std::wctype;
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_std/cmath.tcc b/contrib/libstdc++/include/c_std/cmath.tcc
index 9b86bbb..d771467 100644
--- a/contrib/libstdc++/include/c_std/cmath.tcc
+++ b/contrib/libstdc++/include/c_std/cmath.tcc
@@ -1,6 +1,6 @@
// -*- C++ -*- C math library.
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,13 +29,13 @@
// This file was written by Gabriel Dos Reis <gdr@codesourcery.com>
-#ifndef _CPP_BITS_CMATH_TCC
-#define _CPP_BITS_CMATH_TCC 1
+#ifndef _GLIBCXX_CMATH_TCC
+#define _GLIBCXX_CMATH_TCC 1
-namespace std
+namespace std
{
- export template<typename _Tp>
- _Tp
+ template<typename _Tp>
+ inline _Tp
__cmath_power(_Tp __x, unsigned int __n)
{
_Tp __y = __n % 2 ? __x : 1;
diff --git a/contrib/libstdc++/include/c_std/std_cassert.h b/contrib/libstdc++/include/c_std/std_cassert.h
index 06a0577..9fc1079 100644
--- a/contrib/libstdc++/include/c_std/std_cassert.h
+++ b/contrib/libstdc++/include/c_std/std_cassert.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
diff --git a/contrib/libstdc++/include/c_std/std_cctype.h b/contrib/libstdc++/include/c_std/std_cctype.h
index 4700809..65a4214 100644
--- a/contrib/libstdc++/include/c_std/std_cctype.h
+++ b/contrib/libstdc++/include/c_std/std_cctype.h
@@ -40,8 +40,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CCTYPE
-#define _CPP_CCTYPE 1
+#ifndef _GLIBCXX_CCTYPE
+#define _GLIBCXX_CCTYPE 1
#pragma GCC system_header
@@ -80,4 +80,4 @@ namespace std
using ::toupper;
}
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cerrno.h b/contrib/libstdc++/include/c_std/std_cerrno.h
index 7fcecd4..7915e14 100644
--- a/contrib/libstdc++/include/c_std/std_cerrno.h
+++ b/contrib/libstdc++/include/c_std/std_cerrno.h
@@ -40,8 +40,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CERRNO
-#define _CPP_CERRNO 1
+#ifndef _GLIBCXX_CERRNO
+#define _GLIBCXX_CERRNO 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_cfloat.h b/contrib/libstdc++/include/c_std/std_cfloat.h
index 3cc8d72..4c5bb00 100644
--- a/contrib/libstdc++/include/c_std/std_cfloat.h
+++ b/contrib/libstdc++/include/c_std/std_cfloat.h
@@ -40,8 +40,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CFLOAT
-#define _CPP_CFLOAT 1
+#ifndef _GLIBCXX_CFLOAT
+#define _GLIBCXX_CFLOAT 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_climits.h b/contrib/libstdc++/include/c_std/std_climits.h
index 242913e..f4e1d8f 100644
--- a/contrib/libstdc++/include/c_std/std_climits.h
+++ b/contrib/libstdc++/include/c_std/std_climits.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CLIMITS
-#define _CPP_CLIMITS 1
+#ifndef _GLIBCXX_CLIMITS
+#define _GLIBCXX_CLIMITS 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_clocale.h b/contrib/libstdc++/include/c_std/std_clocale.h
index 66747d9..988b849 100644
--- a/contrib/libstdc++/include/c_std/std_clocale.h
+++ b/contrib/libstdc++/include/c_std/std_clocale.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CLOCALE
-#define _CPP_CLOCALE 1
+#ifndef _GLIBCXX_CLOCALE
+#define _GLIBCXX_CLOCALE 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_cmath.h b/contrib/libstdc++/include/c_std/std_cmath.h
index 1264c4d..66866b2 100644
--- a/contrib/libstdc++/include/c_std/std_cmath.h
+++ b/contrib/libstdc++/include/c_std/std_cmath.h
@@ -41,12 +41,13 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CMATH
-#define _CPP_CMATH 1
+#ifndef _GLIBCXX_CMATH
+#define _GLIBCXX_CMATH 1
#pragma GCC system_header
#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
#include <math.h>
@@ -76,92 +77,8 @@
#undef tan
#undef tanh
-// ...and in the darkness bind them...
-namespace __gnu_cxx
-{
- namespace __c99_binding
- {
-#if _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK || \
- _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC
- extern "C" float (acosf)(float);
- extern "C" float (asinf)(float);
- extern "C" float (atanf)(float);
- extern "C" float (atan2f)(float, float);
- extern "C" float (ceilf)(float);
- extern "C" float (coshf)(float);
- extern "C" float (expf)(float);
- extern "C" float (floorf)(float);
- extern "C" float (fmodf)(float, float);
- extern "C" float (frexpf)(float, int*);
- extern "C" float (ldexpf)(float, int);
- extern "C" float (logf)(float);
- extern "C" float (log10f)(float);
- extern "C" float (modff)(float, float*);
- extern "C" float (powf)(float, float);
- extern "C" float (sinhf)(float);
- extern "C" float (tanf)(float);
- extern "C" float (tanhf)(float);
-#endif
-#if !_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC
-#if _GLIBCPP_HAVE_ACOSF
- using ::acosf;
-#endif
-#if _GLIBCPP_HAVE_ASINF
- using ::asinf;
-#endif
-#if _GLIBCPP_HAVE_ATANF
- using ::atanf;
-#endif
-#if _GLIBCPP_HAVE_ATAN2F
- using ::atan2f;
-#endif
-#if _GLIBCPP_HAVE_CEILF
- using ::ceilf;
-#endif
-#if _GLIBCPP_HAVE_COSHF
- using ::coshf;
-#endif
-#if _GLIBCPP_HAVE_EXPF
- using ::expf;
-#endif
-#if _GLIBCPP_HAVE_FLOORF
- using ::floorf;
-#endif
-#if _GLIBCPP_HAVE_FMODF
- using ::fmodf;
-#endif
-#if _GLIBCPP_HAVE_FREXPF
- using ::frexpf;
-#endif
-#if _GLIBCPP_HAVE_LDEXPF
- using ::ldexpf;
-#endif
-#if _GLIBCPP_HAVE_LOGF
- using ::logf;
-#endif
-#if _GLIBCPP_HAVE_LOG10F
- using ::log10f;
-#endif
-#if _GLIBCPP_HAVE_MODFF
- using ::modff;
-#endif
-#if _GLIBCPP_HAVE_POWF
- using ::powf;
-#endif
-#if _GLIBCPP_HAVE_SINHF
- using ::sinhf;
-#endif
-#if _GLIBCPP_HAVE_TANF
- using ::tanf;
-#endif
-#if _GLIBCPP_HAVE_TANHF
- using ::tanhf;
-#endif
-#endif /* _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC */
- }
-}
-namespace std
+namespace std
{
// Forward declaration of a helper function. This really should be
// an `exported' forward declaration.
@@ -179,97 +96,83 @@ namespace std
abs(long double __x)
{ return __builtin_fabsl(__x); }
-#if _GLIBCPP_HAVE_ACOSF
- inline float
- acos(float __x) { return __gnu_cxx::__c99_binding::acosf(__x); }
-#else
- inline float
- acos(float __x) { return ::acos(static_cast<double>(__x)); }
-#endif
-
using ::acos;
-
-#if _GLIBCPP_HAVE_ACOSL
- inline long double
- acos(long double __x) { return ::acosl(__x); }
-#else
- inline long double
- acos(long double __x) { return ::acos(static_cast<double>(__x)); }
-#endif
+
+ inline float
+ acos(float __x)
+ { return __builtin_acosf(__x); }
+
+ inline long double
+ acos(long double __x)
+ { return __builtin_acosl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ acos(_Tp __x)
+ {
+ return __builtin_acos(__x);
+ }
using ::asin;
-#if _GLIBCPP_HAVE_ASINF
- inline float
- asin(float __x) { return __gnu_cxx::__c99_binding::asinf(__x); }
-#else
- inline float
- asin(float __x) { return ::asin(static_cast<double>(__x)); }
-#endif
+ inline float
+ asin(float __x)
+ { return __builtin_asinf(__x); }
-#if _GLIBCPP_HAVE_ASINL
- inline long double
- asin(long double __x) { return ::asinl(__x); }
-#else
- inline long double
- asin(long double __x) { return ::asin(static_cast<double>(__x)); }
-#endif
+ inline long double
+ asin(long double __x)
+ { return __builtin_asinl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ asin(_Tp __x)
+ { return __builtin_asin(__x); }
using ::atan;
-#if _GLIBCPP_HAVE_ATANF
- inline float
- atan(float __x) { return __gnu_cxx::__c99_binding::atanf(__x); }
-#else
- inline float
- atan(float __x) { return ::atan(static_cast<double>(__x)); }
-#endif
+ inline float
+ atan(float __x)
+ { return __builtin_atanf(__x); }
-#if _GLIBCPP_HAVE_ATANL
- inline long double
- atan(long double __x) { return ::atanl(__x); }
-#else
- inline long double
- atan(long double __x) { return ::atan(static_cast<double>(__x)); }
-#endif
+ inline long double
+ atan(long double __x)
+ { return __builtin_atanl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ atan(_Tp __x)
+ { return __builtin_atan(__x); }
using ::atan2;
-#if _GLIBCPP_HAVE_ATAN2F
- inline float
- atan2(float __y, float __x) { return __gnu_cxx::__c99_binding::atan2f(__y, __x); }
-#else
- inline float
+ inline float
atan2(float __y, float __x)
- { return ::atan2(static_cast<double>(__y), static_cast<double>(__x)); }
-#endif
+ { return __builtin_atan2f(__y, __x); }
-#if _GLIBCPP_HAVE_ATAN2L
- inline long double
- atan2(long double __y, long double __x) { return ::atan2l(__y, __x); }
-#else
- inline long double
- atan2(long double __y, long double __x)
- { return ::atan2(static_cast<double>(__y), static_cast<double>(__x)); }
-#endif
+ inline long double
+ atan2(long double __y, long double __x)
+ { return __builtin_atan2l(__y, __x); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type
+ && __is_integer<_Up>::_M_type>::_M_type
+ atan2(_Tp __y, _Up __x)
+ { return __builtin_atan2(__y, __x); }
using ::ceil;
-#if _GLIBCPP_HAVE_CEILF
- inline float
- ceil(float __x) { return __gnu_cxx::__c99_binding::ceilf(__x); }
-#else
- inline float
- ceil(float __x) { return ::ceil(static_cast<double>(__x)); }
-#endif
+ inline float
+ ceil(float __x)
+ { return __builtin_ceilf(__x); }
-#if _GLIBCPP_HAVE_CEILL
- inline long double
- ceil(long double __x) { return ::ceill(__x); }
-#else
- inline long double
- ceil(long double __x) { return ::ceil(static_cast<double>(__x)); }
-#endif
+ inline long double
+ ceil(long double __x)
+ { return __builtin_ceill(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ ceil(_Tp __x)
+ { return __builtin_ceil(__x); }
using ::cos;
@@ -281,41 +184,40 @@ namespace std
cos(long double __x)
{ return __builtin_cosl(__x); }
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ cos(_Tp __x)
+ { return __builtin_cos(__x); }
+
using ::cosh;
-#if _GLIBCPP_HAVE_COSHF
- inline float
- cosh(float __x) { return __gnu_cxx::__c99_binding::coshf(__x); }
-#else
- inline float
- cosh(float __x) { return ::cosh(static_cast<double>(__x)); }
-#endif
+ inline float
+ cosh(float __x)
+ { return __builtin_coshf(__x); }
-#if _GLIBCPP_HAVE_COSHL
- inline long double
- cosh(long double __x) { return ::coshl(__x); }
-#else
- inline long double
- cosh(long double __x) { return ::cosh(static_cast<double>(__x)); }
-#endif
+ inline long double
+ cosh(long double __x)
+ { return __builtin_coshl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ cosh(_Tp __x)
+ { return __builtin_cosh(__x); }
using ::exp;
-#if _GLIBCPP_HAVE_EXPF
- inline float
- exp(float __x) { return __gnu_cxx::__c99_binding::expf(__x); }
-#else
- inline float
- exp(float __x) { return ::exp(static_cast<double>(__x)); }
-#endif
+ inline float
+ exp(float __x)
+ { return __builtin_expf(__x); }
-#if _GLIBCPP_HAVE_EXPL
- inline long double
- exp(long double __x) { return ::expl(__x); }
-#else
- inline long double
- exp(long double __x) { return ::exp(static_cast<double>(__x)); }
-#endif
+ inline long double
+ exp(long double __x)
+ { return __builtin_expl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ exp(_Tp __x)
+ { return __builtin_exp(__x); }
using ::fabs;
@@ -327,148 +229,105 @@ namespace std
fabs(long double __x)
{ return __builtin_fabsl(__x); }
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ fabs(_Tp __x)
+ { return __builtin_fabs(__x); }
+
using ::floor;
-#if _GLIBCPP_HAVE_FLOORF
- inline float
- floor(float __x) { return __gnu_cxx::__c99_binding::floorf(__x); }
-#else
- inline float
- floor(float __x) { return ::floor(static_cast<double>(__x)); }
-#endif
+ inline float
+ floor(float __x)
+ { return __builtin_floorf(__x); }
-#if _GLIBCPP_HAVE_FLOORL
- inline long double
- floor(long double __x) { return ::floorl(__x); }
-#else
- inline long double
- floor(long double __x) { return ::floor(static_cast<double>(__x)); }
-#endif
+ inline long double
+ floor(long double __x)
+ { return __builtin_floorl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ floor(_Tp __x)
+ { return __builtin_floor(__x); }
using ::fmod;
-#if _GLIBCPP_HAVE_FMODF
- inline float
- fmod(float __x, float __y) { return __gnu_cxx::__c99_binding::fmodf(__x, __y); }
-#else
- inline float
+ inline float
fmod(float __x, float __y)
- { return ::fmod(static_cast<double>(__x), static_cast<double>(__y)); }
-#endif
+ { return __builtin_fmodf(__x, __y); }
-#if _GLIBCPP_HAVE_FMODL
- inline long double
- fmod(long double __x, long double __y) { return ::fmodl(__x, __y); }
-#else
- inline long double
- fmod(long double __x, long double __y)
- { return ::fmod(static_cast<double>(__x), static_cast<double>(__y)); }
-#endif
+ inline long double
+ fmod(long double __x, long double __y)
+ { return __builtin_fmodl(__x, __y); }
using ::frexp;
-#if _GLIBCPP_HAVE_FREXPF
- inline float
- frexp(float __x, int* __exp) { return __gnu_cxx::__c99_binding::frexpf(__x, __exp); }
-#else
- inline float
- frexp(float __x, int* __exp) { return ::frexp(__x, __exp); }
-#endif
+ inline float
+ frexp(float __x, int* __exp)
+ { return __builtin_frexpf(__x, __exp); }
-#if _GLIBCPP_HAVE_FREXPL
- inline long double
- frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); }
-#else
- inline long double
- frexp(long double __x, int* __exp)
- { return ::frexp(static_cast<double>(__x), __exp); }
-#endif
+ inline long double
+ frexp(long double __x, int* __exp)
+ { return __builtin_frexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ frexp(_Tp __x, int* __exp)
+ { return __builtin_frexp(__x, __exp); }
using ::ldexp;
-#if _GLIBCPP_HAVE_LDEXPF
- inline float
- ldexp(float __x, int __exp) { return __gnu_cxx::__c99_binding::ldexpf(__x, __exp); }
-#else
- inline float
+ inline float
ldexp(float __x, int __exp)
- { return ::ldexp(static_cast<double>(__x), __exp); }
-#endif
+ { return __builtin_ldexpf(__x, __exp); }
-#if _GLIBCPP_HAVE_LDEXPL
- inline long double
- ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); }
-#else
- inline long double
- ldexp(long double __x, int __exp)
- { return ::ldexp(static_cast<double>(__x), __exp); }
-#endif
+ inline long double
+ ldexp(long double __x, int __exp)
+ { return __builtin_ldexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ ldexp(_Tp __x, int __exp)
+ { return __builtin_ldexp(__x, __exp); }
using ::log;
-#if _GLIBCPP_HAVE_LOGF
- inline float
- log(float __x) { return __gnu_cxx::__c99_binding::logf(__x); }
-#else
- inline float log(float __x)
- { return ::log(static_cast<double>(__x)); }
-#endif
+ inline float
+ log(float __x)
+ { return __builtin_logf(__x); }
-#if _GLIBCPP_HAVE_LOGL
- inline long double
- log(long double __x) { return ::logl(__x); }
-#else
- inline long double
- log(long double __x) { return ::log(static_cast<double>(__x)); }
-#endif
+ inline long double
+ log(long double __x)
+ { return __builtin_logl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ log(_Tp __x)
+ { return __builtin_log(__x); }
using ::log10;
-#if _GLIBCPP_HAVE_LOG10F
- inline float
- log10(float __x) { return __gnu_cxx::__c99_binding::log10f(__x); }
-#else
- inline float
- log10(float __x) { return ::log10(static_cast<double>(__x)); }
-#endif
+ inline float
+ log10(float __x)
+ { return __builtin_log10f(__x); }
-#if _GLIBCPP_HAVE_LOG10L
- inline long double
- log10(long double __x) { return ::log10l(__x); }
-#else
- inline long double
- log10(long double __x) { return ::log10(static_cast<double>(__x)); }
-#endif
+ inline long double
+ log10(long double __x)
+ { return __builtin_log10l(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ log10(_Tp __x)
+ { return __builtin_log10(__x); }
using ::modf;
-#if _GLIBCPP_HAVE_MODFF
- inline float
- modf(float __x, float* __iptr) { return __gnu_cxx::__c99_binding::modff(__x, __iptr); }
-#else
- inline float
+ inline float
modf(float __x, float* __iptr)
- {
- double __tmp;
- double __res = ::modf(static_cast<double>(__x), &__tmp);
- *__iptr = static_cast<float>(__tmp);
- return __res;
- }
-#endif
+ { return __builtin_modff(__x, __iptr); }
-#if _GLIBCPP_HAVE_MODFL
- inline long double
- modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); }
-#else
- inline long double
- modf(long double __x, long double* __iptr)
- {
- double __tmp;
- double __res = ::modf(static_cast<double>(__x), &__tmp);
- * __iptr = static_cast<long double>(__tmp);
- return __res;
- }
-#endif
+ inline long double
+ modf(long double __x, long double* __iptr)
+ { return __builtin_modfl(__x, __iptr); }
template<typename _Tp>
inline _Tp
@@ -481,33 +340,23 @@ namespace std
using ::pow;
-#if _GLIBCPP_HAVE_POWF
- inline float
- pow(float __x, float __y) { return __gnu_cxx::__c99_binding::powf(__x, __y); }
-#else
- inline float
+ inline float
pow(float __x, float __y)
- { return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }
-#endif
+ { return __builtin_powf(__x, __y); }
-#if _GLIBCPP_HAVE_POWL
- inline long double
- pow(long double __x, long double __y) { return ::powl(__x, __y); }
-#else
- inline long double
- pow(long double __x, long double __y)
- { return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }
-#endif
+ inline long double
+ pow(long double __x, long double __y)
+ { return __builtin_powl(__x, __y); }
- inline double
+ inline double
pow(double __x, int __i)
{ return __pow_helper(__x, __i); }
- inline float
+ inline float
pow(float __x, int __n)
{ return __pow_helper(__x, __n); }
- inline long double
+ inline long double
pow(long double __x, int __n)
{ return __pow_helper(__x, __n); }
@@ -521,23 +370,25 @@ namespace std
sin(long double __x)
{ return __builtin_sinl(__x); }
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ sin(_Tp __x)
+ { return __builtin_sin(__x); }
+
using ::sinh;
-#if _GLIBCPP_HAVE_SINHF
- inline float
- sinh(float __x) { return __gnu_cxx::__c99_binding::sinhf(__x); }
-#else
- inline float
- sinh(float __x) { return ::sinh(static_cast<double>(__x)); }
-#endif
+ inline float
+ sinh(float __x)
+ { return __builtin_sinhf(__x); }
-#if _GLIBCPP_HAVE_SINHL
- inline long double
- sinh(long double __x) { return ::sinhl(__x); }
-#else
- inline long double
- sinh(long double __x) { return ::sinh(static_cast<double>(__x)); }
-#endif
+ inline long double
+ sinh(long double __x)
+ { return __builtin_sinhl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ sinh(_Tp __x)
+ { return __builtin_sinh(__x); }
using ::sqrt;
@@ -549,107 +400,104 @@ namespace std
sqrt(long double __x)
{ return __builtin_sqrtl(__x); }
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ sqrt(_Tp __x)
+ { return __builtin_sqrt(__x); }
+
using ::tan;
-#if _GLIBCPP_HAVE_TANF
- inline float
- tan(float __x) { return __gnu_cxx::__c99_binding::tanf(__x); }
-#else
- inline float
- tan(float __x) { return ::tan(static_cast<double>(__x)); }
-#endif
+ inline float
+ tan(float __x)
+ { return __builtin_tanf(__x); }
-#if _GLIBCPP_HAVE_TANL
- inline long double
- tan(long double __x) { return ::tanl(__x); }
-#else
- inline long double
- tan(long double __x) { return ::tan(static_cast<double>(__x)); }
-#endif
+ inline long double
+ tan(long double __x)
+ { return __builtin_tanl(__x); }
+
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ tan(_Tp __x)
+ { return __builtin_tan(__x); }
using ::tanh;
-#if _GLIBCPP_HAVE_TANHF
- inline float
- tanh(float __x) { return __gnu_cxx::__c99_binding::tanhf(__x); }
-#else
- inline float
- tanh(float __x) { return ::tanh(static_cast<double>(__x)); }
-#endif
+ inline float
+ tanh(float __x)
+ { return __builtin_tanhf(__x); }
-#if _GLIBCPP_HAVE_TANHL
- inline long double
- tanh(long double __x) { return ::tanhl(__x); }
-#else
- inline long double
- tanh(long double __x) { return ::tanh(static_cast<double>(__x)); }
-#endif
-}
+ inline long double
+ tanh(long double __x)
+ { return __builtin_tanhl(__x); }
+ template<typename _Tp>
+ inline typename __enable_if<double, __is_integer<_Tp>::_M_type>::_M_type
+ tanh(_Tp __x)
+ { return __builtin_tanh(__x); }
+}
-#if _GLIBCPP_USE_C99
-#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC
+#if _GLIBCXX_USE_C99_MATH
+#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
// These are possible macros imported from C99-land. For strict
// conformance, remove possible C99-injected names from the global
-// namespace, and sequester them in the __gnu_cxx extension namespace.
+// namespace, and sequester them in the __gnu_cxx extension namespace.
namespace __gnu_cxx
{
template<typename _Tp>
- int
+ int
__capture_fpclassify(_Tp __f) { return fpclassify(__f); }
template<typename _Tp>
- int
+ int
__capture_isfinite(_Tp __f) { return isfinite(__f); }
template<typename _Tp>
- int
+ int
__capture_isinf(_Tp __f) { return isinf(__f); }
template<typename _Tp>
- int
+ int
__capture_isnan(_Tp __f) { return isnan(__f); }
template<typename _Tp>
- int
+ int
__capture_isnormal(_Tp __f) { return isnormal(__f); }
template<typename _Tp>
- int
+ int
__capture_signbit(_Tp __f) { return signbit(__f); }
template<typename _Tp>
- int
+ int
__capture_isgreater(_Tp __f1, _Tp __f2)
{ return isgreater(__f1, __f2); }
template<typename _Tp>
- int
- __capture_isgreaterequal(_Tp __f1, _Tp __f2)
+ int
+ __capture_isgreaterequal(_Tp __f1, _Tp __f2)
{ return isgreaterequal(__f1, __f2); }
template<typename _Tp>
- int
+ int
__capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
template<typename _Tp>
- int
- __capture_islessequal(_Tp __f1, _Tp __f2)
+ int
+ __capture_islessequal(_Tp __f1, _Tp __f2)
{ return islessequal(__f1, __f2); }
template<typename _Tp>
- int
- __capture_islessgreater(_Tp __f1, _Tp __f2)
+ int
+ __capture_islessgreater(_Tp __f1, _Tp __f2)
{ return islessgreater(__f1, __f2); }
template<typename _Tp>
- int
- __capture_isunordered(_Tp __f1, _Tp __f2)
+ int
+ __capture_isunordered(_Tp __f1, _Tp __f2)
{ return isunordered(__f1, __f2); }
-}
-#endif /* _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC */
-#endif
+}
+// Only undefine the C99 FP macros, if actually captured for namespace movement
#undef fpclassify
#undef isfinite
#undef isinf
@@ -662,9 +510,11 @@ namespace __gnu_cxx
#undef islessequal
#undef islessgreater
#undef isunordered
+#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
+#endif
-#if _GLIBCPP_USE_C99
-#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC
+#if _GLIBCXX_USE_C99_MATH
+#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
namespace __gnu_cxx
{
template<typename _Tp>
@@ -676,47 +526,47 @@ namespace __gnu_cxx
isfinite(_Tp __f) { return __capture_isfinite(__f); }
template<typename _Tp>
- int
+ int
isinf(_Tp __f) { return __capture_isinf(__f); }
template<typename _Tp>
- int
+ int
isnan(_Tp __f) { return __capture_isnan(__f); }
template<typename _Tp>
- int
+ int
isnormal(_Tp __f) { return __capture_isnormal(__f); }
template<typename _Tp>
- int
+ int
signbit(_Tp __f) { return __capture_signbit(__f); }
template<typename _Tp>
- int
+ int
isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); }
template<typename _Tp>
- int
- isgreaterequal(_Tp __f1, _Tp __f2)
+ int
+ isgreaterequal(_Tp __f1, _Tp __f2)
{ return __capture_isgreaterequal(__f1, __f2); }
template<typename _Tp>
- int
+ int
isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); }
template<typename _Tp>
- int
- islessequal(_Tp __f1, _Tp __f2)
+ int
+ islessequal(_Tp __f1, _Tp __f2)
{ return __capture_islessequal(__f1, __f2); }
template<typename _Tp>
- int
- islessgreater(_Tp __f1, _Tp __f2)
+ int
+ islessgreater(_Tp __f1, _Tp __f2)
{ return __capture_islessgreater(__f1, __f2); }
template<typename _Tp>
- int
- isunordered(_Tp __f1, _Tp __f2)
+ int
+ isunordered(_Tp __f1, _Tp __f2)
{ return __capture_isunordered(__f1, __f2); }
}
@@ -735,12 +585,11 @@ namespace std
using __gnu_cxx::islessgreater;
using __gnu_cxx::isunordered;
}
-#endif /* _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC */
+#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
#endif
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-# include <bits/cmath.tcc>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/cmath.tcc>
#endif
#endif
diff --git a/contrib/libstdc++/include/c_std/std_csetjmp.h b/contrib/libstdc++/include/c_std/std_csetjmp.h
index f6df581..d5fe073 100644
--- a/contrib/libstdc++/include/c_std/std_csetjmp.h
+++ b/contrib/libstdc++/include/c_std/std_csetjmp.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSETJMP
-#define _CPP_CSETJMP 1
+#ifndef _GLIBCXX_CSETJMP
+#define _GLIBCXX_CSETJMP 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_csignal.h b/contrib/libstdc++/include/c_std/std_csignal.h
index 1017161..5734cf6 100644
--- a/contrib/libstdc++/include/c_std/std_csignal.h
+++ b/contrib/libstdc++/include/c_std/std_csignal.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSIGNAL
-#define _CPP_CSIGNAL 1
+#ifndef _GLIBCXX_CSIGNAL
+#define _GLIBCXX_CSIGNAL 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_cstdarg.h b/contrib/libstdc++/include/c_std/std_cstdarg.h
index 9383ade..ca362e4 100644
--- a/contrib/libstdc++/include/c_std/std_cstdarg.h
+++ b/contrib/libstdc++/include/c_std/std_cstdarg.h
@@ -40,8 +40,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSTDARG
-#define _CPP_CSTDARG 1
+#ifndef _GLIBCXX_CSTDARG
+#define _GLIBCXX_CSTDARG 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_cstddef.h b/contrib/libstdc++/include/c_std/std_cstddef.h
index 7a740af..4fa82c6 100644
--- a/contrib/libstdc++/include/c_std/std_cstddef.h
+++ b/contrib/libstdc++/include/c_std/std_cstddef.h
@@ -40,14 +40,14 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSTDDEF
-#define _CPP_CSTDDEF 1
+#ifndef _GLIBCXX_CSTDDEF
+#define _GLIBCXX_CSTDDEF 1
#pragma GCC system_header
#include <stddef.h>
-namespace std
+namespace std
{
using ::ptrdiff_t;
using ::size_t;
diff --git a/contrib/libstdc++/include/c_std/std_cstdio.h b/contrib/libstdc++/include/c_std/std_cstdio.h
index 3b4a685..f31e58e 100644
--- a/contrib/libstdc++/include/c_std/std_cstdio.h
+++ b/contrib/libstdc++/include/c_std/std_cstdio.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSTDIO
-#define _CPP_CSTDIO 1
+#ifndef _GLIBCXX_CSTDIO
+#define _GLIBCXX_CSTDIO 1
#pragma GCC system_header
@@ -94,7 +94,7 @@
#undef vprintf
#undef vsprintf
-namespace std
+namespace std
{
using ::FILE;
using ::fpos_t;
@@ -142,7 +142,7 @@ namespace std
using ::vsprintf;
}
-#if _GLIBCPP_USE_C99
+#if _GLIBCXX_USE_C99
#undef snprintf
#undef vfscanf
@@ -152,7 +152,7 @@ namespace std
namespace __gnu_cxx
{
-#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" int
(snprintf)(char * restrict, size_t, const char * restrict, ...);
extern "C" int
@@ -163,7 +163,7 @@ namespace __gnu_cxx
extern "C" int
(vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
#endif
-#if !_GLIBCPP_USE_C99_DYNAMIC
+#if !_GLIBCXX_USE_C99_DYNAMIC
using ::snprintf;
using ::vfscanf;
using ::vscanf;
@@ -180,6 +180,6 @@ namespace std
using __gnu_cxx::vsnprintf;
using __gnu_cxx::vsscanf;
}
-#endif
+#endif
#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstdlib.h b/contrib/libstdc++/include/c_std/std_cstdlib.h
index e1436be..d2d6e37 100644
--- a/contrib/libstdc++/include/c_std/std_cstdlib.h
+++ b/contrib/libstdc++/include/c_std/std_cstdlib.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSTDLIB
-#define _CPP_CSTDLIB 1
+#ifndef _GLIBCXX_CSTDLIB
+#define _GLIBCXX_CSTDLIB 1
#pragma GCC system_header
@@ -81,7 +81,7 @@
#undef wcstombs
#undef wctomb
-namespace std
+namespace std
{
using ::div_t;
using ::ldiv_t;
@@ -101,9 +101,11 @@ namespace std
using ::labs;
using ::ldiv;
using ::malloc;
+#ifdef _GLIBCXX_HAVE_MBSTATE_T
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
+#endif // _GLIBCXX_HAVE_MBSTATE_T
using ::qsort;
using ::rand;
using ::realloc;
@@ -112,17 +114,19 @@ namespace std
using ::strtol;
using ::strtoul;
using ::system;
+#ifdef _GLIBCXX_USE_WCHAR_T
using ::wcstombs;
using ::wctomb;
+#endif // _GLIBCXX_USE_WCHAR_T
- inline long
+ inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
-}
+}
-#if _GLIBCPP_USE_C99
+#if _GLIBCXX_USE_C99
#undef _Exit
#undef llabs
@@ -135,57 +139,57 @@ namespace std
namespace __gnu_cxx
{
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using ::lldiv_t;
#endif
-#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" void (_Exit)(int);
#endif
-#if !_GLIBCPP_USE_C99_DYNAMIC
+#if !_GLIBCXX_USE_C99_DYNAMIC
using ::_Exit;
#endif
- inline long long
+ inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
- inline long long
+ inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
- inline lldiv_t
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
- inline lldiv_t
+ inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#endif
-#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
extern "C" long long int (atoll)(const char *);
extern "C" long long int
(strtoll)(const char * restrict, char ** restrict, int);
extern "C" unsigned long long int
(strtoull)(const char * restrict, char ** restrict, int);
#endif
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using ::atoll;
using ::strtoll;
using ::strtoull;
#endif
using ::strtof;
- using ::strtold;
-}
+ using ::strtold;
+}
namespace std
{
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using __gnu_cxx::lldiv_t;
#endif
using __gnu_cxx::_Exit;
using __gnu_cxx::abs;
- using __gnu_cxx::llabs;
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+ using __gnu_cxx::llabs;
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using __gnu_cxx::div;
using __gnu_cxx::lldiv;
#endif
@@ -197,4 +201,4 @@ namespace std
}
#endif
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstring.h b/contrib/libstdc++/include/c_std/std_cstring.h
index 066342a..dad40c2 100644
--- a/contrib/libstdc++/include/c_std/std_cstring.h
+++ b/contrib/libstdc++/include/c_std/std_cstring.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CSTRING
-#define _CPP_CSTRING 1
+#ifndef _GLIBCXX_CSTRING
+#define _GLIBCXX_CSTRING 1
#pragma GCC system_header
@@ -74,7 +74,7 @@
#undef strerror
#undef strlen
-namespace std
+namespace std
{
using ::memcpy;
using ::memmove;
diff --git a/contrib/libstdc++/include/c_std/std_ctime.h b/contrib/libstdc++/include/c_std/std_ctime.h
index 1b4c09b..fe890df 100644
--- a/contrib/libstdc++/include/c_std/std_ctime.h
+++ b/contrib/libstdc++/include/c_std/std_ctime.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CTIME
-#define _CPP_CTIME 1
+#ifndef _GLIBCXX_CTIME
+#define _GLIBCXX_CTIME 1
#pragma GCC system_header
diff --git a/contrib/libstdc++/include/c_std/std_cwchar.h b/contrib/libstdc++/include/c_std/std_cwchar.h
index 8b33c52..d9e11e9 100644
--- a/contrib/libstdc++/include/c_std/std_cwchar.h
+++ b/contrib/libstdc++/include/c_std/std_cwchar.h
@@ -41,8 +41,8 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CWCHAR
-#define _CPP_CWCHAR 1
+#ifndef _GLIBCXX_CWCHAR
+#define _GLIBCXX_CWCHAR 1
#pragma GCC system_header
@@ -50,23 +50,23 @@
#include <cstddef>
#include <ctime>
-#if _GLIBCPP_HAVE_WCHAR_H
+#if _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
#endif
// Need to do a bit of trickery here with mbstate_t as char_traits
// assumes it is in wchar.h, regardless of wchar_t specializations.
-#ifndef _GLIBCPP_HAVE_MBSTATE_T
-extern "C"
+#ifndef _GLIBCXX_HAVE_MBSTATE_T
+extern "C"
{
- typedef struct
+ typedef struct
{
int __fill[6];
} mbstate_t;
}
#endif
-namespace std
+namespace std
{
using ::mbstate_t;
}
@@ -92,11 +92,17 @@ namespace std
#undef swscanf
#undef ungetwc
#undef vfwprintf
-#undef vfwscanf
+#if _GLIBCXX_HAVE_VFWSCANF
+# undef vfwscanf
+#endif
#undef vswprintf
-#undef vswscanf
+#if _GLIBCXX_HAVE_VSWSCANF
+# undef vswscanf
+#endif
#undef vwprintf
-#undef vwscanf
+#if _GLIBCXX_HAVE_VWSCANF
+# undef vwscanf
+#endif
#undef wcrtomb
#undef wcscat
#undef wcschr
@@ -115,7 +121,9 @@ namespace std
#undef wcsspn
#undef wcsstr
#undef wcstod
-#undef wcstof
+#if _GLIBCXX_HAVE_WCSTOF
+# undef wcstof
+#endif
#undef wcstok
#undef wcstol
#undef wcstoul
@@ -129,7 +137,7 @@ namespace std
#undef wprintf
#undef wscanf
-#if _GLIBCPP_USE_WCHAR_T
+#if _GLIBCXX_USE_WCHAR_T
namespace std
{
using ::wint_t;
@@ -154,11 +162,17 @@ namespace std
using ::swscanf;
using ::ungetwc;
using ::vfwprintf;
+#if _GLIBCXX_HAVE_VFWSCANF
using ::vfwscanf;
+#endif
using ::vswprintf;
+#if _GLIBCXX_HAVE_VSWSCANF
using ::vswscanf;
+#endif
using ::vwprintf;
+#if _GLIBCXX_HAVE_VWSCANF
using ::vwscanf;
+#endif
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
@@ -173,7 +187,9 @@ namespace std
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
+#if _GLIBCXX_HAVE_WCSTOF
using ::wcstof;
+#endif
using ::wcstok;
using ::wcstol;
using ::wcstoul;
@@ -207,7 +223,7 @@ namespace std
using ::wcsstr;
inline wchar_t*
- wcsstr(wchar_t* __s1, wchar_t* __s2)
+ wcsstr(wchar_t* __s1, const wchar_t* __s2)
{ return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
using ::wmemchr;
@@ -217,7 +233,7 @@ namespace std
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
}
-#if _GLIBCPP_USE_C99
+#if _GLIBCXX_USE_C99
#undef wcstold
#undef wcstoll
@@ -225,20 +241,20 @@ namespace std
namespace __gnu_cxx
{
-#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" long double
(wcstold)(const wchar_t * restrict, wchar_t ** restrict);
#endif
-#if !_GLIBCPP_USE_C99_DYNAMIC
+#if !_GLIBCXX_USE_C99_DYNAMIC
using ::wcstold;
#endif
-#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
extern "C" long long int
(wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
extern "C" unsigned long long int
(wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
#endif
-#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using ::wcstoll;
using ::wcstoull;
#endif
@@ -252,6 +268,6 @@ namespace std
}
#endif
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
-#endif
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cwctype.h b/contrib/libstdc++/include/c_std/std_cwctype.h
index e469194..970c53a 100644
--- a/contrib/libstdc++/include/c_std/std_cwctype.h
+++ b/contrib/libstdc++/include/c_std/std_cwctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -41,21 +41,23 @@
* contained in the namespace @c std.
*/
-#ifndef _CPP_CWCTYPE
-#define _CPP_CWCTYPE 1
+#ifndef _GLIBCXX_CWCTYPE
+#define _GLIBCXX_CWCTYPE 1
#pragma GCC system_header
#include <bits/c++config.h>
-#if _GLIBCPP_HAVE_WCTYPE_H
+#if _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
#endif
// Get rid of those macros defined in <wctype.h> in lieu of real functions.
#undef iswalnum
#undef iswalpha
-#undef iswblank
+#if _GLIBCXX_HAVE_ISWBLANK
+# undef iswblank
+#endif
#undef iswcntrl
#undef iswdigit
#undef iswgraph
@@ -66,24 +68,26 @@
#undef iswspace
#undef iswupper
#undef iswxdigit
-#undef iswctype
+#undef iswctype
#undef towlower
#undef towupper
#undef towctrans
#undef wctrans
#undef wctype
-#if _GLIBCPP_USE_WCHAR_T
+#if _GLIBCXX_USE_WCHAR_T
namespace std
{
- using ::wint_t; // cwchar
+ using ::wint_t; // cwchar
using ::wctype_t;
using ::wctrans_t;
using ::iswalnum;
using ::iswalpha;
+#if _GLIBCXX_HAVE_ISWBLANK
using ::iswblank;
+#endif
using ::iswcntrl;
using ::iswdigit;
using ::iswgraph;
@@ -101,6 +105,6 @@ namespace std
using ::wctrans;
using ::wctype;
}
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
-#endif
+#endif
diff --git a/contrib/libstdc++/include/debug/bitset b/contrib/libstdc++/include/debug/bitset
new file mode 100644
index 0000000..2e2364f
--- /dev/null
+++ b/contrib/libstdc++/include/debug/bitset
@@ -0,0 +1,299 @@
+// Debugging bitset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_BITSET
+#define _GLIBCXX_DEBUG_BITSET
+
+#include <bitset>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<size_t _Nb>
+ class bitset
+ : public _GLIBCXX_STD::bitset<_Nb>,
+ public __gnu_debug::_Safe_sequence_base
+ {
+ typedef _GLIBCXX_STD::bitset<_Nb> _Base;
+ typedef __gnu_debug::_Safe_sequence_base _Safe_base;
+
+ public:
+ // bit reference:
+ class reference
+ : private _Base::reference, public __gnu_debug::_Safe_iterator_base
+ {
+ typedef typename _Base::reference _Base_ref;
+
+ friend class bitset;
+ reference();
+
+ reference(const _Base_ref& __base, bitset* __seq)
+ : _Base_ref(__base), _Safe_iterator_base(__seq, false)
+ { }
+
+ public:
+ reference(const reference& __x)
+ : _Base_ref(__x), _Safe_iterator_base(__x, false)
+ { }
+
+ reference&
+ operator=(bool __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_write)
+ ._M_iterator(*this));
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ reference&
+ operator=(const reference& __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __x._M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(__x));
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_write)
+ ._M_iterator(*this));
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ bool
+ operator~() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(*this));
+ return ~(*static_cast<const _Base_ref*>(this));
+ }
+
+ operator bool() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(*this));
+ return *static_cast<const _Base_ref*>(this);
+ }
+
+ reference&
+ flip()
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(::__gnu_debug::__msg_bad_bitset_flip)
+ ._M_iterator(*this));
+ _Base_ref::flip();
+ return *this;
+ }
+ };
+
+ // 23.3.5.1 constructors:
+ bitset() : _Base() { }
+
+ bitset(unsigned long __val) : _Base(__val) { }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ explicit
+ bitset(const std::basic_string<_CharT,_Traits,_Allocator>& __str,
+ typename std::basic_string<_CharT,_Traits,_Allocator>::size_type
+ __pos = 0,
+ typename std::basic_string<_CharT,_Traits,_Allocator>::size_type
+ __n = (std::basic_string<_CharT,_Traits,_Allocator>::npos))
+ : _Base(__str, __pos, __n) { }
+
+ bitset(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ // 23.3.5.2 bitset operations:
+ bitset<_Nb>&
+ operator&=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() &= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator|=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() |= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator^=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() ^= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator<<=(size_t __pos)
+ {
+ _M_base() <<= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator>>=(size_t __pos)
+ {
+ _M_base() >>= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ set()
+ {
+ _Base::set();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 186. bitset::set() second parameter should be bool
+ bitset<_Nb>&
+ set(size_t __pos, bool __val = true)
+ {
+ _Base::set(__pos, __val);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset()
+ {
+ _Base::reset();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset(size_t __pos)
+ {
+ _Base::reset(__pos);
+ return *this;
+ }
+
+ bitset<_Nb> operator~() const { return bitset(~_M_base()); }
+
+ bitset<_Nb>&
+ flip()
+ {
+ _Base::flip();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ flip(size_t __pos)
+ {
+ _Base::flip(__pos);
+ return *this;
+ }
+
+ // element access:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ reference
+ operator[](size_t __pos)
+ {
+ __glibcxx_check_subscript(__pos);
+ return reference(_M_base()[__pos], this);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ bool
+ operator[](size_t __pos) const
+ {
+ __glibcxx_check_subscript(__pos);
+ return _M_base()[__pos];
+ }
+
+ using _Base::to_ulong;
+
+ template <typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_string<_CharT, _Traits, _Allocator>
+ to_string() const
+ { return _M_base().template to_string<_CharT, _Traits, _Allocator>(); }
+
+ using _Base::count;
+ using _Base::size;
+
+ bool
+ operator==(const bitset<_Nb>& __rhs) const
+ { return _M_base() == __rhs; }
+
+ bool
+ operator!=(const bitset<_Nb>& __rhs) const
+ { return _M_base() != __rhs; }
+
+ using _Base::test;
+ using _Base::any;
+ using _Base::none;
+
+ bitset<_Nb>
+ operator<<(size_t __pos) const
+ { return bitset<_Nb>(_M_base() << __pos); }
+
+ bitset<_Nb>
+ operator>>(size_t __pos) const
+ { return bitset<_Nb>(_M_base() >> __pos); }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) &= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) |= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) ^= __y; }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+ { return __is >> __x._M_base(); }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x)
+ { return __os << __x._M_base(); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/debug.h b/contrib/libstdc++/include/debug/debug.h
new file mode 100644
index 0000000..87bbcfa
--- /dev/null
+++ b/contrib/libstdc++/include/debug/debug.h
@@ -0,0 +1,531 @@
+// Debugging support implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_DEBUG_H
+#define _GLIBCXX_DEBUG_DEBUG_H 1
+
+/**
+ * Macros used by the implementation to verify certain
+ * properties. These macros may only be used directly by the debug
+ * wrappers. Note that these are macros (instead of the more obviously
+ * "correct" choice of making them functions) because we need line and
+ * file information at the call site, to minimize the distance between
+ * the user error and where the error is reported.
+ *
+ */
+#define _GLIBCXX_DEBUG_VERIFY(_Condition,_ErrorMessage) \
+ do { \
+ if (! (_Condition)) \
+ ::__gnu_debug::_Error_formatter::_M_at(__FILE__, __LINE__) \
+ ._ErrorMessage._M_error(); \
+ } while (false)
+
+// Verify that [_First, _Last) forms a valid iterator range.
+#define __glibcxx_check_valid_range(_First,_Last) \
+_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__valid_range(_First, _Last), \
+ _M_message(::__gnu_debug::__msg_valid_range) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that we can insert into *this with the iterator _Position.
+ * Insertion into a container at a specific position requires that
+ * the iterator be nonsingular (i.e., either dereferenceable or
+ * past-the-end) and that it reference the sequence we are inserting
+ * into. Note that this macro is only valid when the container is a
+ * _Safe_sequence and the iterator is a _Safe_iterator.
+*/
+#define __glibcxx_check_insert(_Position) \
+_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(), \
+ _M_message(::__gnu_debug::__msg_insert_singular) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(::__gnu_debug::__msg_insert_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can insert the values in the iterator range
+ * [_First, _Last) into *this with the iterator _Position. Insertion
+ * into a container at a specific position requires that the iterator
+ * be nonsingular (i.e., either dereferenceable or past-the-end),
+ * that it reference the sequence we are inserting into, and that the
+ * iterator range [_First, Last) is a valid (possibly empty)
+ * range. Note that this macro is only valid when the container is a
+ * _Safe_sequence and the iterator is a _Safe_iterator.
+ *
+ * @tbd We would like to be able to check for noninterference of
+ * _Position and the range [_First, _Last), but that can't (in
+ * general) be done.
+*/
+#define __glibcxx_check_insert_range(_Position,_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(), \
+ _M_message(::__gnu_debug::__msg_insert_singular) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(::__gnu_debug::__msg_insert_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can erase the element referenced by the iterator
+ * _Position. We can erase the element if the _Position iterator is
+ * dereferenceable and references this sequence.
+*/
+#define __glibcxx_check_erase(_Position) \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_dereferenceable(), \
+ _M_message(::__gnu_debug::__msg_erase_bad) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(::__gnu_debug::__msg_erase_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can erase the elements in the iterator range
+ * [_First, _Last). We can erase the elements if [_First, _Last) is a
+ * valid iterator range within this sequence.
+*/
+#define __glibcxx_check_erase_range(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(_First._M_attached_to(this), \
+ _M_message(::__gnu_debug::__msg_erase_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+// Verify that the subscript _N is less than the container's size.
+#define __glibcxx_check_subscript(_N) \
+_GLIBCXX_DEBUG_VERIFY(_N < this->size(), \
+ _M_message(::__gnu_debug::__msg_subscript_oob) \
+ ._M_sequence(*this, "this") \
+ ._M_integer(_N, #_N) \
+ ._M_integer(this->size(), "size"))
+
+// Verify that the container is nonempty
+#define __glibcxx_check_nonempty() \
+_GLIBCXX_DEBUG_VERIFY(! this->empty(), \
+ _M_message(::__gnu_debug::__msg_empty) \
+ ._M_sequence(*this, "this"))
+
+// Verify that the < operator for elements in the sequence is a
+// StrictWeakOrdering by checking that it is irreflexive.
+#define __glibcxx_check_strict_weak_ordering(_First,_Last) \
+_GLIBCXX_DEBUG_ASSERT(_First == _Last || !(*_First < *_First))
+
+// Verify that the predicate is StrictWeakOrdering by checking that it
+// is irreflexive.
+#define __glibcxx_check_strict_weak_ordering_pred(_First,_Last,_Pred) \
+_GLIBCXX_DEBUG_ASSERT(_First == _Last || !_Pred(*_First, *_First))
+
+
+// Verify that the iterator range [_First, _Last) is sorted
+#define __glibcxx_check_sorted(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+__glibcxx_check_strict_weak_ordering(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_sorted(_First, _Last), \
+ _M_message(::__gnu_debug::__msg_unsorted) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that the iterator range [_First, _Last) is sorted by the
+ predicate _Pred. */
+#define __glibcxx_check_sorted_pred(_First,_Last,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+__glibcxx_check_strict_weak_ordering_pred(_First,_Last,_Pred); \
+_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_sorted(_First, _Last, _Pred), \
+ _M_message(::__gnu_debug::__msg_unsorted_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value. */
+#define __glibcxx_check_partitioned(_First,_Last,_Value) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_partitioned(_First, _Last, \
+ _Value), \
+ _M_message(::__gnu_debug::__msg_unpartitioned) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Value))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value and predicate _Pred. */
+#define __glibcxx_check_partitioned_pred(_First,_Last,_Value,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_partitioned(_First, _Last, \
+ _Value, _Pred), \
+ _M_message(::__gnu_debug::__msg_unpartitioned_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred) \
+ ._M_string(#_Value))
+
+// Verify that the iterator range [_First, _Last) is a heap
+#define __glibcxx_check_heap(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(::std::__is_heap(_First, _Last), \
+ _M_message(::__gnu_debug::__msg_not_heap) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that the iterator range [_First, _Last) is a heap
+ w.r.t. the predicate _Pred. */
+#define __glibcxx_check_heap_pred(_First,_Last,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(::std::__is_heap(_First, _Last, _Pred), \
+ _M_message(::__gnu_debug::__msg_not_heap_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred))
+
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+# define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_ASSERT(_String != 0)
+# define __glibcxx_check_string_len(_String,_Len) \
+ _GLIBCXX_DEBUG_ASSERT(_String != 0 || _Len == 0)
+#else
+# define __glibcxx_check_string(_String)
+# define __glibcxx_check_string_len(_String,_Len)
+#endif
+
+/** Macros used by the implementation outside of debug wrappers to
+ * verify certain properties. The __glibcxx_requires_xxx macros are
+ * merely wrappers around the __glibcxx_check_xxx wrappers when we
+ * are compiling with debug mode, but disappear when we are in
+ * release mode so that there is no checking performed in, e.g., the
+ * standard library algorithms.
+*/
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_DEBUG_ASSERT(_Condition) assert(_Condition)
+
+# ifdef _GLIBXX_DEBUG_PEDANTIC
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) assert(_Condition)
+# else
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
+# endif
+
+# define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg)
+# define __glibcxx_requires_valid_range(_First,_Last) \
+ __glibcxx_check_valid_range(_First,_Last)
+# define __glibcxx_requires_sorted(_First,_Last) \
+ __glibcxx_check_sorted(_First,_Last)
+# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \
+ __glibcxx_check_sorted_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_partitioned(_First,_Last,_Value) \
+ __glibcxx_check_partitioned(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_pred(_First,_Last,_Value,_Pred) \
+ __glibcxx_check_partitioned_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_heap(_First,_Last) \
+ __glibcxx_check_heap(_First,_Last)
+# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \
+ __glibcxx_check_heap_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_nonempty() __glibcxx_check_nonempty()
+# define __glibcxx_requires_string(_String) __glibcxx_check_string(_String)
+# define __glibcxx_requires_string_len(_String,_Len) \
+ __glibcxx_check_string_len(_String,_Len)
+# define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N)
+#else
+# define _GLIBCXX_DEBUG_ASSERT(_Condition)
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
+# define __glibcxx_requires_cond(_Cond,_Msg)
+# define __glibcxx_requires_valid_range(_First,_Last)
+# define __glibcxx_requires_sorted(_First,_Last)
+# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_partitioned(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_heap(_First,_Last)
+# define __glibcxx_requires_heap_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_nonempty()
+# define __glibcxx_requires_string(_String)
+# define __glibcxx_requires_string_len(_String,_Len)
+# define __glibcxx_requires_subscript(_N)
+#endif
+
+#include <cassert> // TBD: temporary
+
+#include <stddef.h> // for ptrdiff_t
+#include <bits/stl_iterator_base_types.h> // for iterator_traits, categories
+#include <bits/type_traits.h> // for _Is_integer
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ // An arbitrary iterator pointer is not singular.
+ inline bool
+ __check_singular_aux(const void*) { return false; }
+
+ // We may have an iterator that derives from _Safe_iterator_base but isn't
+ // a _Safe_iterator.
+ template<typename _Iterator>
+ inline bool
+ __check_singular(_Iterator& __x)
+ { return __gnu_debug::__check_singular_aux(&__x); }
+
+ /** Non-NULL pointers are nonsingular. */
+ template<typename _Tp>
+ inline bool
+ __check_singular(const _Tp* __ptr)
+ { return __ptr == 0; }
+
+ /** Safe iterators know if they are singular. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __check_singular(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ { return __x._M_singular(); }
+
+ /** Assume that some arbitrary iterator is dereferenceable, because we
+ can't prove that it isn't. */
+ template<typename _Iterator>
+ inline bool
+ __check_dereferenceable(_Iterator&)
+ { return true; }
+
+ /** Non-NULL pointers are dereferenceable. */
+ template<typename _Tp>
+ inline bool
+ __check_dereferenceable(const _Tp* __ptr)
+ { return __ptr; }
+
+ /** Safe iterators know if they are singular. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __check_dereferenceable(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ { return __x._M_dereferenceable(); }
+
+ /** If the distance between two random access iterators is
+ * nonnegative, assume the range is valid.
+ */
+ template<typename _RandomAccessIterator>
+ inline bool
+ __valid_range_aux2(const _RandomAccessIterator& __first,
+ const _RandomAccessIterator& __last,
+ std::random_access_iterator_tag)
+ { return __last - __first >= 0; }
+
+ /** Can't test for a valid range with input iterators, because
+ * iteration may be destructive. So we just assume that the range
+ * is valid.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range_aux2(const _InputIterator&, const _InputIterator&,
+ std::input_iterator_tag)
+ { return true; }
+
+ /** We say that integral types for a valid range, and defer to other
+ * routines to realize what to do with integral types instead of
+ * iterators.
+ */
+ template<typename _Integral>
+ inline bool
+ __valid_range_aux(const _Integral&, const _Integral&, __true_type)
+ { return true; }
+
+ /** We have iterators, so figure out what kind of iterators that are
+ * to see if we can check the range ahead of time.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range_aux(const _InputIterator& __first,
+ const _InputIterator& __last, __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+ return __gnu_debug::__valid_range_aux2(__first, __last, _Category());
+ }
+
+ /** Don't know what these iterators are, or if they are even
+ * iterators (we may get an integral type for InputIterator), so
+ * see if they are integral and pass them on to the next phase
+ * otherwise.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range(const _InputIterator& __first, const _InputIterator& __last)
+ {
+ typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+ return __gnu_debug::__valid_range_aux(__first, __last, _Integral());
+ }
+
+ /** Safe iterators know how to check if they form a valid range. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __valid_range(const _Safe_iterator<_Iterator, _Sequence>& __first,
+ const _Safe_iterator<_Iterator, _Sequence>& __last)
+ { return __first._M_valid_range(__last); }
+
+ /* Checks that [first, last) is a valid range, and then returns
+ * __first. This routine is useful when we can't use a separate
+ * assertion statement because, e.g., we are in a constructor.
+ */
+ template<typename _InputIterator>
+ inline _InputIterator
+ __check_valid_range(const _InputIterator& __first,
+ const _InputIterator& __last)
+ {
+ _GLIBCXX_DEBUG_ASSERT(__gnu_debug::__valid_range(__first, __last));
+ return __first;
+ }
+
+ /** Checks that __s is non-NULL or __n == 0, and then returns __s. */
+ template<typename _CharT, typename _Integer>
+ inline const _CharT*
+ __check_string(const _CharT* __s, const _Integer& __n)
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ _GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
+#endif
+ return __s;
+ }
+
+ /** Checks that __s is non-NULL and then returns __s. */
+ template<typename _CharT>
+ inline const _CharT*
+ __check_string(const _CharT* __s)
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ _GLIBCXX_DEBUG_ASSERT(__s != 0);
+#endif
+ return __s;
+ }
+
+ // Can't check if an input iterator sequence is sorted, because we
+ // can't step through the sequence.
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted_aux(const _InputIterator&, const _InputIterator&,
+ std::input_iterator_tag)
+ { return true; }
+
+ // Can verify if a forward iterator sequence is in fact sorted using
+ // std::__is_sorted
+ template<typename _ForwardIterator>
+ inline bool
+ __check_sorted_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next) {
+ if (*__next < *__first)
+ return false;
+ }
+
+ return true;
+ }
+
+ // Can't check if an input iterator sequence is sorted, because we can't step
+ // through the sequence.
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted_aux(const _InputIterator&, const _InputIterator&,
+ _Predicate, std::input_iterator_tag)
+ { return true; }
+
+ // Can verify if a forward iterator sequence is in fact sorted using
+ // std::__is_sorted
+ template<typename _ForwardIterator, typename _Predicate>
+ inline bool
+ __check_sorted_aux(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred, std::forward_iterator_tag)
+ {
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next) {
+ if (__pred(*__next, *__first))
+ return false;
+ }
+
+ return true;
+ }
+
+ // Determine if a sequence is sorted.
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted(const _InputIterator& __first, const _InputIterator& __last)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+ return __gnu_debug::__check_sorted_aux(__first, __last, _Category());
+ }
+
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted(const _InputIterator& __first, const _InputIterator& __last,
+ _Predicate __pred)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+ return __gnu_debug::__check_sorted_aux(__first, __last, __pred,
+ _Category());
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 270. Binary search requirements overly strict
+ // Determine if a sequence is partitioned w.r.t. this element.
+ template<typename _ForwardIterator, typename _Tp>
+ inline bool
+ __check_partitioned(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value)
+ {
+ while (__first != __last && *__first < __value)
+ ++__first;
+ while (__first != __last && !(*__first < __value))
+ ++__first;
+ return __first == __last;
+ }
+
+ // Determine if a sequence is partitioned w.r.t. this element.
+ template<typename _ForwardIterator, typename _Tp, typename _Pred>
+ inline bool
+ __check_partitioned(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value, _Pred __pred)
+ {
+ while (__first != __last && __pred(*__first, __value))
+ ++__first;
+ while (__first != __last && !__pred(*__first, __value))
+ ++__first;
+ return __first == __last;
+ }
+} // namespace __gnu_debug
+
+#ifdef _GLIBCXX_DEBUG
+// We need the error formatter
+# include <debug/formatter.h>
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/debug/deque b/contrib/libstdc++/include/debug/deque
new file mode 100644
index 0000000..c39a49c
--- /dev/null
+++ b/contrib/libstdc++/include/debug/deque
@@ -0,0 +1,386 @@
+// Debugging deque implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_DEQUE
+#define _GLIBCXX_DEBUG_DEQUE 1
+
+#include <deque>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class deque
+ : public _GLIBCXX_STD::deque<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<deque<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::deque<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<deque> _Safe_base;
+
+ public:
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,deque>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,deque>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.1.1 construct/copy/destroy:
+ explicit deque(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit deque(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+ { }
+
+ deque(const deque<_Tp,_Allocator>& __x) : _Base(__x), _Safe_base() { }
+
+ deque(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~deque() { }
+
+ deque<_Tp,_Allocator>&
+ operator=(const deque<_Tp,_Allocator>& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ this->_M_invalidate_all();
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // 23.2.1.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
+
+ bool __invalidate_all = __sz > this->size();
+ if (__sz < this->size())
+ this->_M_invalidate_if(_After_nth(__sz, _M_base().begin()));
+
+ _Base::resize(__sz, __c);
+
+ if (__invalidate_all)
+ this->_M_invalidate_all();
+ }
+
+ using _Base::empty;
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // 23.2.1.3 modifiers:
+ void
+ push_front(const _Tp& __x)
+ {
+ _Base::push_front(__x);
+ this->_M_invalidate_all();
+ }
+
+ void
+ push_back(const _Tp& __x)
+ {
+ _Base::push_back(__x);
+ this->_M_invalidate_all();
+ }
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ typename _Base::iterator __res = _Base::insert(__position.base(), __x);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ _Base::insert(__position.base(), __n, __x);
+ this->_M_invalidate_all();
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+ _Base::insert(__position.base(), __first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ pop_front()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = begin();
+ __victim._M_invalidate();
+ _Base::pop_front();
+ }
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end();
+ --__victim;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ if (__position == begin() || __position == end()-1)
+ {
+ __position._M_invalidate();
+ return iterator(_Base::erase(__position.base()), this);
+ }
+ else
+ {
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ if (__first == begin() || __last == end())
+ {
+ this->_M_detach_singular();
+ for (iterator __position = __first; __position != __last; )
+ {
+ iterator __victim = __position++;
+ __victim._M_invalidate();
+ }
+ try
+ {
+ return iterator(_Base::erase(__first.base(), __last.base()),
+ this);
+ }
+ catch (...)
+ {
+ this->_M_revalidate_singular();
+ __throw_exception_again;
+ }
+ }
+ else
+ {
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+ }
+
+ void
+ swap(deque<_Tp,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/formatter.h b/contrib/libstdc++/include/debug/formatter.h
new file mode 100644
index 0000000..db555b0
--- /dev/null
+++ b/contrib/libstdc++/include/debug/formatter.h
@@ -0,0 +1,391 @@
+// Debug-mode error formatting implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_FORMATTER_H
+#define _GLIBCXX_DEBUG_FORMATTER_H 1
+
+#include <typeinfo>
+#include <debug/debug.h>
+
+namespace __gnu_debug
+{
+ using std::type_info;
+
+ /** Determine if the two types are the same. */
+ template<typename _Type1, typename _Type2>
+ struct __is_same
+ {
+ static const bool value = false;
+ };
+
+ template<typename _Type>
+ struct __is_same<_Type, _Type>
+ {
+ static const bool value = true;
+ };
+
+ template<bool> struct __truth { };
+
+ class _Safe_sequence_base;
+
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ template<typename _Sequence>
+ class _Safe_sequence;
+
+ enum _Debug_msg_id
+ {
+ // General checks
+ __msg_valid_range,
+ __msg_insert_singular,
+ __msg_insert_different,
+ __msg_erase_bad,
+ __msg_erase_different,
+ __msg_subscript_oob,
+ __msg_empty,
+ __msg_unpartitioned,
+ __msg_unpartitioned_pred,
+ __msg_unsorted,
+ __msg_unsorted_pred,
+ __msg_not_heap,
+ __msg_not_heap_pred,
+ // std::bitset checks
+ __msg_bad_bitset_write,
+ __msg_bad_bitset_read,
+ __msg_bad_bitset_flip,
+ // std::list checks
+ __msg_self_splice,
+ __msg_splice_alloc,
+ __msg_splice_bad,
+ __msg_splice_other,
+ __msg_splice_overlap,
+ // iterator checks
+ __msg_init_singular,
+ __msg_init_copy_singular,
+ __msg_init_const_singular,
+ __msg_copy_singular,
+ __msg_bad_deref,
+ __msg_bad_inc,
+ __msg_bad_dec,
+ __msg_iter_subscript_oob,
+ __msg_advance_oob,
+ __msg_retreat_oob,
+ __msg_iter_compare_bad,
+ __msg_compare_different,
+ __msg_iter_order_bad,
+ __msg_order_different,
+ __msg_distance_bad,
+ __msg_distance_different,
+ // istream_iterator
+ __msg_deref_istream,
+ __msg_inc_istream,
+ // ostream_iterator
+ __msg_output_ostream,
+ // istreambuf_iterator
+ __msg_deref_istreambuf,
+ __msg_inc_istreambuf
+ };
+
+ class _Error_formatter
+ {
+ /// Whether an iterator is constant, mutable, or unknown
+ enum _Constness
+ {
+ __unknown_constness,
+ __const_iterator,
+ __mutable_iterator,
+ __last_constness
+ };
+
+ // The state of the iterator (fine-grained), if we know it.
+ enum _Iterator_state
+ {
+ __unknown_state,
+ __singular, // singular, may still be attached to a sequence
+ __begin, // dereferenceable, and at the beginning
+ __middle, // dereferenceable, not at the beginning
+ __end, // past-the-end, may be at beginning if sequence empty
+ __last_state
+ };
+
+ // Tags denoting the type of parameter for construction
+ struct _Is_iterator { };
+ struct _Is_sequence { };
+
+ // A parameter that may be referenced by an error message
+ struct _Parameter
+ {
+ enum
+ {
+ __unused_param,
+ __iterator,
+ __sequence,
+ __integer,
+ __string
+ } _M_kind;
+
+ union
+ {
+ // When _M_kind == __iterator
+ struct
+ {
+ const char* _M_name;
+ const void* _M_address;
+ const type_info* _M_type;
+ _Constness _M_constness;
+ _Iterator_state _M_state;
+ const void* _M_sequence;
+ const type_info* _M_seq_type;
+ } _M_iterator;
+
+ // When _M_kind == __sequence
+ struct
+ {
+ const char* _M_name;
+ const void* _M_address;
+ const type_info* _M_type;
+ } _M_sequence;
+
+ // When _M_kind == __integer
+ struct
+ {
+ const char* _M_name;
+ long _M_value;
+ } _M_integer;
+
+ // When _M_kind == __string
+ struct
+ {
+ const char* _M_name;
+ const char* _M_value;
+ } _M_string;
+ } _M_variant;
+
+ _Parameter() : _M_kind(__unused_param), _M_variant() { }
+
+ _Parameter(long __value, const char* __name)
+ : _M_kind(__integer), _M_variant()
+ {
+ _M_variant._M_integer._M_name = __name;
+ _M_variant._M_integer._M_value = __value;
+ }
+
+ _Parameter(const char* __value, const char* __name)
+ : _M_kind(__string), _M_variant()
+ {
+ _M_variant._M_string._M_name = __name;
+ _M_variant._M_string._M_value = __value;
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ _Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it,
+ const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness =
+ __is_same<_Safe_iterator<_Iterator, _Sequence>,
+ typename _Sequence::iterator>::
+ value? __mutable_iterator : __const_iterator;
+ _M_variant._M_iterator._M_sequence = __it._M_get_sequence();
+ _M_variant._M_iterator._M_seq_type = &typeid(_Sequence);
+
+ if (__it._M_singular())
+ _M_variant._M_iterator._M_state = __singular;
+ else
+ {
+ bool __is_begin = __it._M_is_begin();
+ bool __is_end = __it._M_is_end();
+ if (__is_end)
+ _M_variant._M_iterator._M_state = __end;
+ else if (__is_begin)
+ _M_variant._M_iterator._M_state = __begin;
+ else
+ _M_variant._M_iterator._M_state = __middle;
+ }
+ }
+
+ template<typename _Type>
+ _Parameter(const _Type*& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __mutable_iterator;
+ _M_variant._M_iterator._M_state = __it? __unknown_state : __singular;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Type>
+ _Parameter(_Type*& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __const_iterator;
+ _M_variant._M_iterator._M_state = __it? __unknown_state : __singular;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Iterator>
+ _Parameter(const _Iterator& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __unknown_constness;
+ _M_variant._M_iterator._M_state =
+ __gnu_debug::__check_singular(__it)? __singular : __unknown_state;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Sequence>
+ _Parameter(const _Safe_sequence<_Sequence>& __seq,
+ const char* __name, _Is_sequence)
+ : _M_kind(__sequence), _M_variant()
+ {
+ _M_variant._M_sequence._M_name = __name;
+ _M_variant._M_sequence._M_address =
+ static_cast<const _Sequence*>(&__seq);
+ _M_variant._M_sequence._M_type = &typeid(_Sequence);
+ }
+
+ template<typename _Sequence>
+ _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence)
+ : _M_kind(__sequence), _M_variant()
+ {
+ _M_variant._M_sequence._M_name = __name;
+ _M_variant._M_sequence._M_address = &__seq;
+ _M_variant._M_sequence._M_type = &typeid(_Sequence);
+ }
+
+ void
+ _M_print_field(const _Error_formatter* __formatter,
+ const char* __name) const;
+
+ void
+ _M_print_description(const _Error_formatter* __formatter) const;
+ };
+
+ friend struct _Parameter;
+
+ public:
+ template<typename _Iterator>
+ const _Error_formatter&
+ _M_iterator(const _Iterator& __it, const char* __name = 0) const
+ {
+ if (_M_num_parameters < __max_parameters)
+ _M_parameters[_M_num_parameters++] = _Parameter(__it, __name,
+ _Is_iterator());
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_integer(long __value, const char* __name = 0) const
+ {
+ if (_M_num_parameters < __max_parameters)
+ _M_parameters[_M_num_parameters++] = _Parameter(__value, __name);
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_string(const char* __value, const char* __name = 0) const
+ {
+ if (_M_num_parameters < __max_parameters)
+ _M_parameters[_M_num_parameters++] = _Parameter(__value, __name);
+ return *this;
+ }
+
+ template<typename _Sequence>
+ const _Error_formatter&
+ _M_sequence(const _Sequence& __seq, const char* __name = 0) const
+ {
+ if (_M_num_parameters < __max_parameters)
+ _M_parameters[_M_num_parameters++] = _Parameter(__seq, __name,
+ _Is_sequence());
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_message(const char* __text) const
+ { _M_text = __text; return *this; }
+
+ const _Error_formatter&
+ _M_message(_Debug_msg_id __id) const;
+
+ void
+ _M_error() const;
+
+ private:
+ _Error_formatter(const char* __file, size_t __line)
+ : _M_file(__file), _M_line(__line), _M_num_parameters(0), _M_text(0),
+ _M_max_length(78), _M_column(1), _M_first_line(true), _M_wordwrap(false)
+ { }
+
+ template<typename _Tp>
+ void
+ _M_format_word(char*, int, const char*, _Tp) const;
+
+ void
+ _M_print_word(const char* __word) const;
+
+ void
+ _M_print_string(const char* __string) const;
+
+ enum { __max_parameters = 9 };
+
+ const char* _M_file;
+ size_t _M_line;
+ mutable _Parameter _M_parameters[__max_parameters];
+ mutable size_t _M_num_parameters;
+ mutable const char* _M_text;
+ mutable size_t _M_max_length;
+ enum { _M_indent = 4 } ;
+ mutable size_t _M_column;
+ mutable bool _M_first_line;
+ mutable bool _M_wordwrap;
+
+ public:
+ static _Error_formatter
+ _M_at(const char* __file, size_t __line)
+ { return _Error_formatter(__file, __line); }
+ };
+} // namespace __gnu_debug
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_map b/contrib/libstdc++/include/debug/hash_map
new file mode 100644
index 0000000..570a9af
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_map
@@ -0,0 +1,38 @@
+// Debugging hash_map/hash_multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_MAP
+#define _GLIBCXX_DEBUG_HASH_MAP 1
+
+#include <hash_map>
+#include <debug/dbg_hash_map.h>
+#include <debug/dbg_hash_multimap.h>
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_map.h b/contrib/libstdc++/include/debug/hash_map.h
new file mode 100644
index 0000000..c2cd7b8
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_map.h
@@ -0,0 +1,270 @@
+// Debugging hash_map implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_MAP_H
+#define _GLIBCXX_DEBUG_HASH_MAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Value, typename _Tp,
+ typename _HashFcn = __gnu_cxx::hash<_Value>,
+ typename _EqualKey = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class hash_map
+ : public __gnu_cxx::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>,
+ public __gnu_debug::_Safe_sequence<hash_map<_Value, _Tp, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ typedef __gnu_cxx::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>
+ _Base;
+ typedef __gnu_debug::_Safe_sequence<hash_map> _Safe_base;
+
+ public:
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::data_type data_type;
+ typedef typename _Base::mapped_type mapped_type;
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_map>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ hash_map>
+ const_iterator;
+
+ typedef typename _Base::allocator_type allocator_type;
+
+ using _Base::hash_funct;
+ using _Base::key_eq;
+ using _Base::get_allocator;
+
+ hash_map() { }
+
+ explicit hash_map(size_type __n) : _Base(__n) { }
+
+ hash_map(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
+
+ hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
+
+ template<typename _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
+
+ template<typename _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
+
+ template<typename _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
+ __eql, __a) { }
+
+ hash_map(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ using _Base::size;
+ using _Base::max_size;
+ using _Base::empty;
+
+ void
+ swap(hash_map& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ iterator
+ begin() { return iterator(_Base::begin(), this); }
+
+ iterator
+ end() { return iterator(_Base::end(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ std::pair<typename _Base::iterator, bool> __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first.base(), __last.base());
+ }
+
+
+ std::pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ {
+ std::pair<typename _Base::iterator, bool> __res =
+ _Base::insert_noresize(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ using _Base::operator[];
+ using _Base::count;
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ return this->erase(__victim), 1;
+ else
+ return 0;
+ }
+
+ void
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ _Base::erase(__it.base());
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::resize;
+ using _Base::bucket_count;
+ using _Base::max_bucket_count;
+ using _Base::elems_in_bucket;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline bool
+ operator==(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() == __y._M_base(); }
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline bool
+ operator!=(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() != __y._M_base(); }
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline void
+ swap(hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
+ hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
+ { __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_multimap.h b/contrib/libstdc++/include/debug/hash_multimap.h
new file mode 100644
index 0000000..83b4425
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_multimap.h
@@ -0,0 +1,261 @@
+// Debugging hash_multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_MULTIMAP_H
+#define _GLIBCXX_DEBUG_HASH_MULTIMAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Value, typename _Tp,
+ typename _HashFcn = __gnu_cxx::hash<_Value>,
+ typename _EqualKey = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class hash_multimap
+ : public __gnu_cxx::hash_multimap<_Value,_Tp,_HashFcn, _EqualKey,_Alloc>,
+ public __gnu_debug::_Safe_sequence<hash_multimap<_Value, _Tp, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ typedef __gnu_cxx::hash_multimap<_Value,_Tp,_HashFcn, _EqualKey,_Alloc>
+ _Base;
+ typedef __gnu_debug::_Safe_sequence<hash_multimap> _Safe_base;
+
+ public:
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::data_type data_type;
+ typedef typename _Base::mapped_type mapped_type;
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ hash_multimap> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ hash_multimap> const_iterator;
+
+ typedef typename _Base::allocator_type allocator_type;
+
+ using _Base::hash_funct;
+ using _Base::key_eq;
+ using _Base::get_allocator;
+
+ hash_multimap() { }
+
+ explicit hash_multimap(size_type __n) : _Base(__n) { }
+
+ hash_multimap(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
+
+ hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
+
+ template<typename _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
+
+ template<typename _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
+
+ template<typename _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
+ __eql, __a) { }
+
+ using _Base::size;
+ using _Base::max_size;
+ using _Base::empty;
+
+ void
+ swap(hash_multimap& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ iterator
+ begin() { return iterator(_Base::begin(), this); }
+
+ iterator
+ end() { return iterator(_Base::end(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first.base(), __last.base());
+ }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return iterator(_Base::insert_noresize(__obj), this); }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ using _Base::count;
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__key);
+ size_t __num_victims = 0;
+ while (__victims.first != __victims.second)
+ {
+ this->erase(__victims.first++);
+ ++__num_victims;
+ }
+ return __num_victims;
+ }
+
+ void
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ _Base::erase(__it.base());
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::resize;
+ using _Base::bucket_count;
+ using _Base::max_bucket_count;
+ using _Base::elems_in_bucket;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline bool
+ operator==(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
+ const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
+ { return __x._M_base() == __y._M_base(); }
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline bool
+ operator!=(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
+ const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
+ { return __x._M_base() != __y._M_base(); }
+
+ template<typename _Value, typename _Tp, typename _HashFcn,
+ typename _EqualKey, typename _Alloc>
+ inline void
+ swap(hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
+ hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
+ { __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_multiset.h b/contrib/libstdc++/include/debug/hash_multiset.h
new file mode 100644
index 0000000..705d8da
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_multiset.h
@@ -0,0 +1,236 @@
+// Debugging hash_multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_MULTISET_H
+#define _GLIBCXX_DEBUG_HASH_MULTISET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Value,
+ typename _HashFcn = __gnu_cxx::hash<_Value>,
+ typename _EqualKey = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class hash_multiset
+ : public __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>,
+ public __gnu_debug::_Safe_sequence<hash_multiset<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ typedef __gnu_cxx:: hash_multiset<_Value,_HashFcn, _EqualKey,_Alloc>
+ _Base;
+ typedef __gnu_debug::_Safe_sequence<hash_multiset> _Safe_base;
+
+ public:
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ hash_multiset> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ hash_multiset> const_iterator;
+
+ typedef typename _Base::allocator_type allocator_type;
+
+ using _Base::hash_funct;
+ using _Base::key_eq;
+ using _Base::get_allocator;
+
+ hash_multiset() { }
+
+ explicit hash_multiset(size_type __n) : _Base(__n) { }
+
+ hash_multiset(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
+
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l)
+ { }
+
+ template<typename _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n)
+ { }
+
+ template<typename _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf)
+ { }
+
+ template<typename _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
+ __eql, __a)
+ { }
+
+ hash_multiset(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ using _Base::size;
+ using _Base::max_size;
+ using _Base::empty;
+
+ void
+ swap(hash_multiset& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ iterator begin() const { return iterator(_Base::begin(), this); }
+ iterator end() const { return iterator(_Base::end(), this); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first.base(), __last.base());
+ }
+
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return iterator(_Base::insert_noresize(__obj), this); }
+
+ iterator
+ find(const key_type& __key) const
+ { return iterator(_Base::find(__key), this); }
+
+ using _Base::count;
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __count = 0;
+ std::pair<iterator, iterator> __victims = this->equal_range(__key);
+ while (__victims.first != __victims.second)
+ {
+ this->erase(__victims++);
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ _Base::erase(__it.base());
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::resize;
+ using _Base::bucket_count;
+ using _Base::max_bucket_count;
+ using _Base::elems_in_bucket;
+
+ _Base& _M_base() { return *this; }
+ const _Base& _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
+ inline bool
+ operator==(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() == __y._M_base(); }
+
+template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
+ inline bool
+ operator!=(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() != __y._M_base(); }
+
+template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
+ inline void
+ swap(hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_set b/contrib/libstdc++/include/debug/hash_set
new file mode 100644
index 0000000..282cba2
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_set
@@ -0,0 +1,38 @@
+// Debugging hash_set/hash_multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_SET
+#define _GLIBCXX_DEBUG_HASH_SET 1
+
+#include <hash_set>
+#include <debug/dbg_hash_set.h>
+#include <debug/dbg_hash_multiset.h>
+
+#endif
diff --git a/contrib/libstdc++/include/debug/hash_set.h b/contrib/libstdc++/include/debug/hash_set.h
new file mode 100644
index 0000000..0f56d88
--- /dev/null
+++ b/contrib/libstdc++/include/debug/hash_set.h
@@ -0,0 +1,245 @@
+// Debugging hash_set implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_HASH_SET_H
+#define _GLIBCXX_DEBUG_HASH_SET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Value,
+ typename _HashFcn = __gnu_cxx::hash<_Value>,
+ typename _EqualKey = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class hash_set
+ : public __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>,
+ public __gnu_debug::_Safe_sequence<hash_set<_Value, _HashFcn, _EqualKey,
+ _Alloc> >
+ {
+ typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Base;
+ typedef __gnu_debug::_Safe_sequence<hash_set> _Safe_base;
+
+ public:
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_set>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ hash_set>
+ const_iterator;
+
+ typedef typename _Base::allocator_type allocator_type;
+
+ using _Base::hash_funct;
+ using _Base::key_eq;
+ using _Base::get_allocator;
+
+ hash_set() { }
+
+ explicit hash_set(size_type __n) : _Base(__n) { }
+
+ hash_set(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
+
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
+
+ template<typename _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
+
+ template<typename _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
+
+ template<typename _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
+ __eql, __a) { }
+
+ hash_set(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ using _Base::size;
+ using _Base::max_size;
+ using _Base::empty;
+
+ void
+ swap(hash_set& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ iterator
+ begin() const { return iterator(_Base::begin(), this); }
+
+ iterator
+ end() const { return iterator(_Base::end(), this); }
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ std::pair<typename _Base::iterator, bool> __res =
+ _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first.base(), __last.base());
+ }
+
+
+ std::pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ {
+ std::pair<typename _Base::iterator, bool> __res =
+ _Base::insert_noresize(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ find(const key_type& __key) const
+ { return iterator(_Base::find(__key), this); }
+
+ using _Base::count;
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ return this->erase(__victim), 1;
+ else
+ return 0;
+ }
+
+ void
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ _Base::erase(__it.base());
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ _Base::erase(__first.base(), __last.base());
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::resize;
+ using _Base::bucket_count;
+ using _Base::max_bucket_count;
+ using _Base::elems_in_bucket;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Value, typename _HashFcn, typename _EqualKey,
+ typename _Alloc>
+ inline bool
+ operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() == __y._M_base(); }
+
+ template<typename _Value, typename _HashFcn, typename _EqualKey,
+ typename _Alloc>
+ inline bool
+ operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { return __x._M_base() != __y._M_base(); }
+
+ template<typename _Value, typename _HashFcn, typename _EqualKey,
+ typename _Alloc>
+ inline void
+ swap(hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
+ hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
+ { __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/list b/contrib/libstdc++/include/debug/list
new file mode 100644
index 0000000..556c9d9
--- /dev/null
+++ b/contrib/libstdc++/include/debug/list
@@ -0,0 +1,505 @@
+// Debugging list implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_LIST
+#define _GLIBCXX_DEBUG_LIST 1
+
+#include <list>
+#include <bits/stl_algo.h>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug_def
+{
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class list
+ : public _GLIBCXX_STD::list<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<list<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::list<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<list> _Safe_base;
+
+ public:
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, list>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, list>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.2.1 construct/copy/destroy:
+ explicit list(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit list(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+ { }
+
+
+ list(const list& __x) : _Base(__x), _Safe_base() { }
+
+ list(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~list() { }
+
+ list&
+ operator=(const list& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ this->_M_invalidate_all();
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // 23.2.2.2 capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ this->_M_detach_singular();
+
+ // if __sz < size(), invalidate all iterators in [begin+__sz, end())
+ iterator __victim = begin();
+ iterator __end = end();
+ for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
+ ++__victim;
+
+ while (__victim != __end)
+ {
+ iterator __real_victim = __victim++;
+ __real_victim._M_invalidate();
+ }
+
+ try
+ {
+ _Base::resize(__sz, __c);
+ }
+ catch(...)
+ {
+ this->_M_revalidate_singular();
+ __throw_exception_again;
+ }
+ }
+
+ // element access:
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // 23.2.2.3 modifiers:
+ using _Base::push_front;
+
+ void
+ pop_front()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = begin();
+ __victim._M_invalidate();
+ _Base::pop_front();
+ }
+
+ using _Base::push_back;
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end();
+ --__victim;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ _Base::insert(__position.base(), __n, __x);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+ _Base::insert(__position.base(), __first, __last);
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ return iterator(_Base::erase(__position.base()), this);
+ }
+
+ iterator
+ erase(iterator __position, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__position, __last);
+ for (iterator __victim = __position; __victim != __last; )
+ {
+ iterator __old = __victim;
+ ++__victim;
+ __old._M_invalidate();
+ }
+ return iterator(_Base::erase(__position.base(), __last.base()), this);
+ }
+
+ void
+ swap(list& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ // 23.2.2.4 list operations:
+ void
+ splice(iterator __position, list& __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(&__x != this,
+ _M_message(::__gnu_debug::__msg_self_splice)
+ ._M_sequence(*this, "this"));
+ this->splice(__position, __x, __x.begin(), __x.end());
+ }
+
+ void
+ splice(iterator __position, list& __x, iterator __i)
+ {
+ __glibcxx_check_insert(__position);
+ _GLIBCXX_DEBUG_VERIFY(__x.get_allocator() == this->get_allocator(),
+ _M_message(::__gnu_debug::__msg_splice_alloc)
+ ._M_sequence(*this)._M_sequence(__x, "__x"));
+ _GLIBCXX_DEBUG_VERIFY(__i._M_dereferenceable(),
+ _M_message(::__gnu_debug::__msg_splice_bad)
+ ._M_iterator(__i, "__i"));
+ _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(&__x),
+ _M_message(::__gnu_debug::__msg_splice_other)
+ ._M_iterator(__i, "__i")._M_sequence(__x, "__x"));
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 250. splicing invalidates iterators
+ this->_M_transfer_iter(__i);
+ _Base::splice(__position.base(), __x._M_base(), __i.base());
+ }
+
+ void
+ splice(iterator __position, list& __x, iterator __first, iterator __last)
+ {
+ __glibcxx_check_insert(__position);
+ __glibcxx_check_valid_range(__first, __last);
+ _GLIBCXX_DEBUG_VERIFY(__first._M_attached_to(&__x),
+ _M_message(::__gnu_debug::__msg_splice_other)
+ ._M_sequence(__x, "x")
+ ._M_iterator(__first, "first"));
+ _GLIBCXX_DEBUG_VERIFY(__x.get_allocator() == this->get_allocator(),
+ _M_message(::__gnu_debug::__msg_splice_alloc)
+ ._M_sequence(*this)._M_sequence(__x));
+
+ for (iterator __tmp = __first; __tmp != __last; )
+ {
+ _GLIBCXX_DEBUG_VERIFY(&__x != this || __tmp != __position,
+ _M_message(::__gnu_debug::__msg_splice_overlap)
+ ._M_iterator(__tmp, "position")
+ ._M_iterator(__first, "first")
+ ._M_iterator(__last, "last"));
+ iterator __victim = __tmp++;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 250. splicing invalidates iterators
+ this->_M_transfer_iter(__victim);
+ }
+
+ _Base::splice(__position.base(), __x._M_base(), __first.base(),
+ __last.base());
+ }
+
+ void
+ remove(const _Tp& __value)
+ {
+ for (iterator __x = begin(); __x.base() != _Base::end(); )
+ {
+ if (*__x == __value)
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ template<class _Predicate>
+ void
+ remove_if(_Predicate __pred)
+ {
+ for (iterator __x = begin(); __x.base() != _Base::end(); )
+ {
+ if (__pred(*__x))
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ void
+ unique()
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (*__first == *__next)
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<class _BinaryPredicate>
+ void
+ unique(_BinaryPredicate __binary_pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ void
+ merge(list& __x)
+ {
+ __glibcxx_check_sorted(_Base::begin(), _Base::end());
+ __glibcxx_check_sorted(__x.begin().base(), __x.end().base());
+ for (iterator __tmp = __x.begin(); __tmp != __x.end(); )
+ {
+ iterator __victim = __tmp++;
+ __victim._M_attach(&__x);
+ }
+ _Base::merge(__x._M_base());
+ }
+
+ template<class _Compare>
+ void
+ merge(list& __x, _Compare __comp)
+ {
+ __glibcxx_check_sorted_pred(_Base::begin(), _Base::end(), __comp);
+ __glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
+ __comp);
+ for (iterator __tmp = __x.begin(); __tmp != __x.end(); )
+ {
+ iterator __victim = __tmp++;
+ __victim._M_attach(&__x);
+ }
+ _Base::merge(__x._M_base(), __comp);
+ }
+
+ void
+ sort() { _Base::sort(); }
+
+ template<typename _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering __pred) { _Base::sort(__pred); }
+
+ using _Base::reverse;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/map b/contrib/libstdc++/include/debug/map
new file mode 100644
index 0000000..2c38404
--- /dev/null
+++ b/contrib/libstdc++/include/debug/map
@@ -0,0 +1,38 @@
+// Debugging map/multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_MAP
+#define _GLIBCXX_DEBUG_MAP 1
+
+#include <map>
+#include <debug/map.h>
+#include <debug/multimap.h>
+
+#endif
diff --git a/contrib/libstdc++/include/debug/map.h b/contrib/libstdc++/include/debug/map.h
new file mode 100644
index 0000000..2a6794b
--- /dev/null
+++ b/contrib/libstdc++/include/debug/map.h
@@ -0,0 +1,323 @@
+// Debugging map implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_MAP_H
+#define _GLIBCXX_DEBUG_MAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace __gnu_debug_def
+{
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class map
+ : public _GLIBCXX_STD::map<_Key, _Tp, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<map<_Key, _Tp, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::map<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<map> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, map>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, map>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit map(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a), _Safe_base() { }
+
+ map(const map<_Key,_Tp,_Compare,_Allocator>& __x)
+ : _Base(__x), _Safe_base() { }
+
+ map(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~map() { }
+
+ map<_Key,_Tp,_Compare,_Allocator>&
+ operator=(const map<_Key,_Tp,_Compare,_Allocator>& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 133. map missing get_allocator()
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // 23.3.1.2 element access:
+ using _Base::operator[];
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first, this),
+ __res.second);
+ }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(map<_Key,_Tp,_Compare,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 map operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator==(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator!=(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator<(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator<=(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator>=(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator>(const map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline void
+ swap(map<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/multimap.h b/contrib/libstdc++/include/debug/multimap.h
new file mode 100644
index 0000000..4de1e3b
--- /dev/null
+++ b/contrib/libstdc++/include/debug/multimap.h
@@ -0,0 +1,314 @@
+// Debugging multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_MULTIMAP_H
+#define _GLIBCXX_DEBUG_MULTIMAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace __gnu_debug_def
+{
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class multimap
+ : public _GLIBCXX_STD::multimap<_Key, _Tp, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<multimap<_Key,_Tp,_Compare,_Allocator> >
+ {
+ typedef _GLIBCXX_STD::multimap<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<multimap> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multimap>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ multimap> const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit multimap(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ multimap(const multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+ : _Base(__x), _Safe_base() { }
+
+ multimap(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~multimap() { }
+
+ multimap<_Key,_Tp,_Compare,_Allocator>&
+ operator=(const multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x), this); }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 multimap operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator==(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator!=(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator<(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator<=(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator>=(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline bool
+ operator>(const multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ const multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ inline void
+ swap(multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
+ multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/multiset.h b/contrib/libstdc++/include/debug/multiset.h
new file mode 100644
index 0000000..92042fe
--- /dev/null
+++ b/contrib/libstdc++/include/debug/multiset.h
@@ -0,0 +1,320 @@
+// Debugging multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_MULTISET_H
+#define _GLIBCXX_DEBUG_MULTISET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace __gnu_debug_def
+{
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class multiset
+ : public _GLIBCXX_STD::multiset<_Key, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<multiset<_Key, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::multiset<_Key, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<multiset> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multiset>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ multiset> const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit multiset(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ multiset(const multiset<_Key,_Compare,_Allocator>& __x)
+ : _Base(__x), _Safe_base() { }
+
+ multiset(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~multiset() { }
+
+ multiset<_Key,_Compare,_Allocator>&
+ operator=(const multiset<_Key,_Compare,_Allocator>& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x), this); }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(multiset<_Key,_Compare,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // multiset operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const multiset<_Key,_Compare,_Allocator>& __lhs,
+ const multiset<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key,_Compare,_Allocator>& __x,
+ multiset<_Key,_Compare,_Allocator>& __y)
+ { return __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/safe_base.h b/contrib/libstdc++/include/debug/safe_base.h
new file mode 100644
index 0000000..a1af33a
--- /dev/null
+++ b/contrib/libstdc++/include/debug/safe_base.h
@@ -0,0 +1,207 @@
+// Safe sequence/iterator base implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_SAFE_BASE_H
+#define _GLIBCXX_DEBUG_SAFE_BASE_H 1
+
+namespace __gnu_debug
+{
+ class _Safe_sequence_base;
+
+ /** \brief Basic functionality for a "safe" iterator.
+ *
+ * The %_Safe_iterator_base base class implements the functionality
+ * of a safe iterator that is not specific to a particular iterator
+ * type. It contains a pointer back to the sequence it references
+ * along with iterator version information and pointers to form a
+ * doubly-linked list of iterators referenced by the container.
+ *
+ * This class must not perform any operations that can throw an
+ * exception, or the exception guarantees of derived iterators will
+ * be broken.
+ */
+ class _Safe_iterator_base
+ {
+ public:
+ /** The sequence this iterator references; may be NULL to indicate
+ a singular iterator. */
+ _Safe_sequence_base* _M_sequence;
+
+ /** The version number of this iterator. The sentinel value 0 is
+ * used to indicate an invalidated iterator (i.e., one that is
+ * singular because of an operation on the container). This
+ * version number must equal the version number in the sequence
+ * referenced by _M_sequence for the iterator to be
+ * non-singular.
+ */
+ unsigned int _M_version;
+
+ /** Pointer to the previous iterator in the sequence's list of
+ iterators. Only valid when _M_sequence != NULL. */
+ _Safe_iterator_base* _M_prior;
+
+ /** Pointer to the next iterator in the sequence's list of
+ iterators. Only valid when _M_sequence != NULL. */
+ _Safe_iterator_base* _M_next;
+
+ protected:
+ /** Initializes the iterator and makes it singular. */
+ _Safe_iterator_base()
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { }
+
+ /** Initialize the iterator to reference the sequence pointed to
+ * by @p__seq. @p __constant is true when we are initializing a
+ * constant iterator, and false if it is a mutable iterator. Note
+ * that @p __seq may be NULL, in which case the iterator will be
+ * singular. Otherwise, the iterator will reference @p __seq and
+ * be nonsingular.
+ */
+ _Safe_iterator_base(const _Safe_sequence_base* __seq, bool __constant)
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { this->_M_attach(const_cast<_Safe_sequence_base*>(__seq), __constant); }
+
+ /** Initializes the iterator to reference the same sequence that
+ @p __x does. @p __constant is true if this is a constant
+ iterator, and false if it is mutable. */
+ _Safe_iterator_base(const _Safe_iterator_base& __x, bool __constant)
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { this->_M_attach(__x._M_sequence, __constant); }
+
+ _Safe_iterator_base&
+ operator=(const _Safe_iterator_base&);
+
+ explicit
+ _Safe_iterator_base(const _Safe_iterator_base&);
+
+ ~_Safe_iterator_base() { this->_M_detach(); }
+
+ public:
+ /** Attaches this iterator to the given sequence, detaching it
+ * from whatever sequence it was attached to originally. If the
+ * new sequence is the NULL pointer, the iterator is left
+ * unattached.
+ */
+ void _M_attach(_Safe_sequence_base* __seq, bool __constant);
+
+ /** Detach the iterator for whatever sequence it is attached to,
+ * if any.
+ */
+ void _M_detach();
+
+ /** Determines if we are attached to the given sequence. */
+ bool _M_attached_to(const _Safe_sequence_base* __seq) const
+ { return _M_sequence == __seq; }
+
+ /** Is this iterator singular? */
+ bool _M_singular() const;
+
+ /** Can we compare this iterator to the given iterator @p __x?
+ Returns true if both iterators are nonsingular and reference
+ the same sequence. */
+ bool _M_can_compare(const _Safe_iterator_base& __x) const;
+ };
+
+ /**
+ * @brief Base class that supports tracking of iterators that
+ * reference a sequence.
+ *
+ * The %_Safe_sequence_base class provides basic support for
+ * tracking iterators into a sequence. Sequences that track
+ * iterators must derived from %_Safe_sequence_base publicly, so
+ * that safe iterators (which inherit _Safe_iterator_base) can
+ * attach to them. This class contains two linked lists of
+ * iterators, one for constant iterators and one for mutable
+ * iterators, and a version number that allows very fast
+ * invalidation of all iterators that reference the container.
+ *
+ * This class must ensure that no operation on it may throw an
+ * exception, otherwise "safe" sequences may fail to provide the
+ * exception-safety guarantees required by the C++ standard.
+ */
+ class _Safe_sequence_base
+ {
+ public:
+ /// The list of mutable iterators that reference this container
+ _Safe_iterator_base* _M_iterators;
+
+ /// The list of constant iterators that reference this container
+ _Safe_iterator_base* _M_const_iterators;
+
+ /// The container version number. This number may never be 0.
+ mutable unsigned int _M_version;
+
+ protected:
+ // Initialize with a version number of 1 and no iterators
+ _Safe_sequence_base()
+ : _M_iterators(0), _M_const_iterators(0), _M_version(1)
+ { }
+
+ /** Notify all iterators that reference this sequence that the
+ sequence is being destroyed. */
+ ~_Safe_sequence_base()
+ { this->_M_detach_all(); }
+
+ /** Detach all iterators, leaving them singular. */
+ void
+ _M_detach_all();
+
+ /** Detach all singular iterators.
+ * @post for all iterators i attached to this sequence,
+ * i->_M_version == _M_version.
+ */
+ void
+ _M_detach_singular();
+
+ /** Revalidates all attached singular iterators. This method may
+ * be used to validate iterators that were invalidated before
+ * (but for some reasion, such as an exception, need to become
+ * valid again).
+ */
+ void
+ _M_revalidate_singular();
+
+ /** Swap this sequence with the given sequence. This operation
+ * also swaps ownership of the iterators, so that when the
+ * operation is complete all iterators that originally referenced
+ * one container now reference the other container.
+ */
+ void
+ _M_swap(_Safe_sequence_base& __x);
+
+ public:
+ /** Invalidates all iterators. */
+ void
+ _M_invalidate_all() const
+ { if (++_M_version == 0) _M_version = 1; }
+ };
+} // namespace __gnu_debug
+
+#endif
diff --git a/contrib/libstdc++/include/debug/safe_iterator.h b/contrib/libstdc++/include/debug/safe_iterator.h
new file mode 100644
index 0000000..8a4123a
--- /dev/null
+++ b/contrib/libstdc++/include/debug/safe_iterator.h
@@ -0,0 +1,618 @@
+// Safe iterator implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_H
+#define _GLIBCXX_DEBUG_SAFE_ITERATOR_H 1
+
+#include <bits/stl_pair.h>
+#include <debug/debug.h>
+#include <debug/formatter.h>
+#include <debug/safe_base.h>
+#include <bits/cpp_type_traits.h>
+
+namespace __gnu_debug
+{
+ using std::iterator_traits;
+ using std::pair;
+
+ /** Iterators that derive from _Safe_iterator_base but that aren't
+ * _Safe_iterators can be determined singular or non-singular via
+ * _Safe_iterator_base.
+ */
+ inline bool __check_singular_aux(const _Safe_iterator_base* __x)
+ { return __x->_M_singular(); }
+
+ /** \brief Safe iterator wrapper.
+ *
+ * The class template %_Safe_iterator is a wrapper around an
+ * iterator that tracks the iterator's movement among sequences and
+ * checks that operations performed on the "safe" iterator are
+ * legal. In additional to the basic iterator operations (which are
+ * validated, and then passed to the underlying iterator),
+ * %_Safe_iterator has member functions for iterator invalidation,
+ * attaching/detaching the iterator from sequences, and querying
+ * the iterator's state.
+ */
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator : public _Safe_iterator_base
+ {
+ typedef _Safe_iterator _Self;
+
+ /** The precision to which we can calculate the distance between
+ * two iterators.
+ */
+ enum _Distance_precision
+ {
+ __dp_equality, //< Can compare iterator equality, only
+ __dp_sign, //< Can determine equality and ordering
+ __dp_exact //< Can determine distance precisely
+ };
+
+ /// The underlying iterator
+ _Iterator _M_current;
+
+ /// Determine if this is a constant iterator.
+ bool
+ _M_constant() const
+ {
+ typedef typename _Sequence::const_iterator const_iterator;
+ return __is_same<const_iterator, _Safe_iterator>::value;
+ }
+
+ typedef iterator_traits<_Iterator> _Traits;
+
+ public:
+ typedef _Iterator _Base_iterator;
+ typedef typename _Traits::iterator_category iterator_category;
+ typedef typename _Traits::value_type value_type;
+ typedef typename _Traits::difference_type difference_type;
+ typedef typename _Traits::reference reference;
+ typedef typename _Traits::pointer pointer;
+
+ /// @post the iterator is singular and unattached
+ _Safe_iterator() : _M_current() { }
+
+ /**
+ * @brief Safe iterator construction from an unsafe iterator and
+ * its sequence.
+ *
+ * @pre @p seq is not NULL
+ * @post this is not singular
+ */
+ _Safe_iterator(const _Iterator& __i, const _Sequence* __seq)
+ : _Safe_iterator_base(__seq, _M_constant()), _M_current(__i)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__msg_init_singular)
+ ._M_iterator(*this, "this"));
+ }
+
+ /**
+ * @brief Copy construction.
+ * @pre @p x is not singular
+ */
+ _Safe_iterator(const _Safe_iterator& __x)
+ : _Safe_iterator_base(__x, _M_constant()), _M_current(__x._M_current)
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_init_copy_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ }
+
+ /**
+ * @brief Converting constructor from a mutable iterator to a
+ * constant iterator.
+ *
+ * @pre @p x is not singular
+ */
+ template<typename _MutableIterator>
+ _Safe_iterator(
+ const _Safe_iterator<_MutableIterator,
+ typename std::__enable_if<
+ _Sequence,
+ (std::__are_same<_MutableIterator,
+ typename _Sequence::iterator::_Base_iterator>::_M_type)
+ >::_M_type>& __x)
+ : _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_init_const_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ }
+
+ /**
+ * @brief Copy assignment.
+ * @pre @p x is not singular
+ */
+ _Safe_iterator&
+ operator=(const _Safe_iterator& __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_copy_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ _M_current = __x._M_current;
+ this->_M_attach(static_cast<_Sequence*>(__x._M_sequence));
+ return *this;
+ }
+
+ /**
+ * @brief Iterator dereference.
+ * @pre iterator is dereferenceable
+ */
+ reference
+ operator*() const
+ {
+
+ _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(),
+ _M_message(__msg_bad_deref)
+ ._M_iterator(*this, "this"));
+ return *_M_current;
+ }
+
+ /**
+ * @brief Iterator dereference.
+ * @pre iterator is dereferenceable
+ * @todo Make this correct w.r.t. iterators that return proxies
+ * @todo Use addressof() instead of & operator
+ */
+ pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(),
+ _M_message(__msg_bad_deref)
+ ._M_iterator(*this, "this"));
+ return &*_M_current;
+ }
+
+ // ------ Input iterator requirements ------
+ /**
+ * @brief Iterator preincrement
+ * @pre iterator is incrementable
+ */
+ _Safe_iterator&
+ operator++()
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_incrementable(),
+ _M_message(__msg_bad_inc)
+ ._M_iterator(*this, "this"));
+ ++_M_current;
+ return *this;
+ }
+
+ /**
+ * @brief Iterator postincrement
+ * @pre iterator is incrementable
+ */
+ _Safe_iterator
+ operator++(int)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_incrementable(),
+ _M_message(__msg_bad_inc)
+ ._M_iterator(*this, "this"));
+ _Safe_iterator __tmp(*this);
+ ++_M_current;
+ return __tmp;
+ }
+
+ // ------ Bidirectional iterator requirements ------
+ /**
+ * @brief Iterator predecrement
+ * @pre iterator is decrementable
+ */
+ _Safe_iterator&
+ operator--()
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
+ _M_message(__msg_bad_dec)
+ ._M_iterator(*this, "this"));
+ --_M_current;
+ return *this;
+ }
+
+ /**
+ * @brief Iterator postdecrement
+ * @pre iterator is decrementable
+ */
+ _Safe_iterator
+ operator--(int)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
+ _M_message(__msg_bad_dec)
+ ._M_iterator(*this, "this"));
+ _Safe_iterator __tmp(*this);
+ --_M_current;
+ return __tmp;
+ }
+
+ // ------ Random access iterator requirements ------
+ reference
+ operator[](const difference_type& __n) const
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n)
+ && this->_M_can_advance(__n+1),
+ _M_message(__msg_iter_subscript_oob)
+ ._M_iterator(*this)._M_integer(__n));
+
+ return _M_current[__n];
+ }
+
+ _Safe_iterator&
+ operator+=(const difference_type& __n)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n),
+ _M_message(__msg_advance_oob)
+ ._M_iterator(*this)._M_integer(__n));
+ _M_current += __n;
+ return *this;
+ }
+
+ _Safe_iterator
+ operator+(const difference_type& __n) const
+ {
+ _Safe_iterator __tmp(*this);
+ __tmp += __n;
+ return __tmp;
+ }
+
+ _Safe_iterator&
+ operator-=(const difference_type& __n)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(-__n),
+ _M_message(__msg_retreat_oob)
+ ._M_iterator(*this)._M_integer(__n));
+ _M_current += -__n;
+ return *this;
+ }
+
+ _Safe_iterator
+ operator-(const difference_type& __n) const
+ {
+ _Safe_iterator __tmp(*this);
+ __tmp -= __n;
+ return __tmp;
+ }
+
+ // ------ Utilities ------
+ /**
+ * @brief Return the underlying iterator
+ */
+ _Iterator
+ base() const { return _M_current; }
+
+ /**
+ * @brief Conversion to underlying non-debug iterator to allow
+ * better interaction with non-debug containers.
+ */
+ operator _Iterator() const { return _M_current; }
+
+ /** Attach iterator to the given sequence. */
+ void
+ _M_attach(const _Sequence* __seq)
+ {
+ _Safe_iterator_base::_M_attach(const_cast<_Sequence*>(__seq),
+ _M_constant());
+ }
+
+ /** Invalidate the iterator, making it singular. */
+ void
+ _M_invalidate();
+
+ /// Is the iterator dereferenceable?
+ bool
+ _M_dereferenceable() const
+ { return !this->_M_singular() && !_M_is_end(); }
+
+ /// Is the iterator incrementable?
+ bool
+ _M_incrementable() const { return this->_M_dereferenceable(); }
+
+ // Is the iterator decrementable?
+ bool
+ _M_decrementable() const { return !_M_singular() && !_M_is_begin(); }
+
+ // Can we advance the iterator @p __n steps (@p __n may be negative)
+ bool
+ _M_can_advance(const difference_type& __n) const;
+
+ // Is the iterator range [*this, __rhs) valid?
+ template<typename _Other>
+ bool
+ _M_valid_range(const _Safe_iterator<_Other, _Sequence>& __rhs) const;
+
+ // The sequence this iterator references.
+ const _Sequence*
+ _M_get_sequence() const
+ { return static_cast<const _Sequence*>(_M_sequence); }
+
+ /** Determine the distance between two iterators with some known
+ * precision.
+ */
+ template<typename _Iterator1, typename _Iterator2>
+ static pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs)
+ {
+ typedef typename iterator_traits<_Iterator1>::iterator_category
+ _Category;
+ return _M_get_distance(__lhs, __rhs, _Category());
+ }
+
+ template<typename _Iterator1, typename _Iterator2>
+ static pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs,
+ std::random_access_iterator_tag)
+ {
+ return std::make_pair(__rhs.base() - __lhs.base(), __dp_exact);
+ }
+
+ template<typename _Iterator1, typename _Iterator2>
+ static pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs,
+ std::forward_iterator_tag)
+ {
+ return std::make_pair(__lhs.base() == __rhs.base()? 0 : 1,
+ __dp_equality);
+ }
+
+ /// Is this iterator equal to the sequence's begin() iterator?
+ bool _M_is_begin() const
+ { return *this == static_cast<const _Sequence*>(_M_sequence)->begin(); }
+
+ /// Is this iterator equal to the sequence's end() iterator?
+ bool _M_is_end() const
+ { return *this == static_cast<const _Sequence*>(_M_sequence)->end(); }
+ };
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator==(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() == __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator==(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() == __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator!=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() != __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator!=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() != __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator<(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() < __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator<(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() < __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator<=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() <= __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator<=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() <= __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator>(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() > __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator>(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() > __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator>=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() >= __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator>=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() >= __rhs.base();
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // According to the resolution of DR179 not only the various comparison
+ // operators but also operator- must accept mixed iterator/const_iterator
+ // parameters.
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline typename _Safe_iterator<_IteratorL, _Sequence>::difference_type
+ operator-(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_distance_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_distance_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() - __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline _Safe_iterator<_Iterator, _Sequence>
+ operator+(typename _Safe_iterator<_Iterator,_Sequence>::difference_type __n,
+ const _Safe_iterator<_Iterator, _Sequence>& __i)
+ { return __i + __n; }
+} // namespace __gnu_debug
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <debug/safe_iterator.tcc>
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/debug/safe_iterator.tcc b/contrib/libstdc++/include/debug/safe_iterator.tcc
new file mode 100644
index 0000000..cede969
--- /dev/null
+++ b/contrib/libstdc++/include/debug/safe_iterator.tcc
@@ -0,0 +1,140 @@
+// Debugging iterator implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+/** @file safe_iterator.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC
+#define _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC 1
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ bool
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_can_advance(const difference_type& __n) const
+ {
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ if (this->_M_singular())
+ return false;
+ if (__n == 0)
+ return true;
+ if (__n < 0)
+ {
+ const_iterator __begin =
+ static_cast<const _Sequence*>(_M_sequence)->begin();
+ pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(__begin, *this);
+ bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n
+ || __dist.second != __dp_exact && __dist.first > 0);
+ return __ok;
+ }
+ else
+ {
+ const_iterator __end =
+ static_cast<const _Sequence*>(_M_sequence)->end();
+ pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(*this, __end);
+ bool __ok = (__dist.second == __dp_exact && __dist.first >= __n
+ || __dist.second != __dp_exact && __dist.first > 0);
+ return __ok;
+ }
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ template<typename _Other>
+ bool
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_valid_range(const _Safe_iterator<_Other, _Sequence>& __rhs) const
+ {
+ if (!_M_can_compare(__rhs))
+ return false;
+
+ /* Determine if we can order the iterators without the help of
+ the container */
+ pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(*this, __rhs);
+ switch (__dist.second) {
+ case __dp_equality:
+ if (__dist.first == 0)
+ return true;
+ break;
+
+ case __dp_sign:
+ case __dp_exact:
+ return __dist.first >= 0;
+ }
+
+ /* We can only test for equality, but check if one of the
+ iterators is at an extreme. */
+ if (_M_is_begin() || __rhs._M_is_end())
+ return true;
+ else if (_M_is_end() || __rhs._M_is_begin())
+ return false;
+
+ // Assume that this is a valid range; we can't check anything else
+ return true;
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ void
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_invalidate()
+ {
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ if (!this->_M_singular())
+ {
+ for (_Safe_iterator_base* iter = _M_sequence->_M_iterators; iter; )
+ {
+ iterator* __victim = static_cast<iterator*>(iter);
+ iter = iter->_M_next;
+ if (this->base() == __victim->base())
+ __victim->_M_version = 0;
+ }
+ for (_Safe_iterator_base* iter2 = _M_sequence->_M_const_iterators;
+ iter2; /* increment in loop */)
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(iter2);
+ iter2 = iter2->_M_next;
+ if (this->base() == __victim->base())
+ __victim->_M_version = 0;
+ }
+ _M_version = 0;
+ }
+ }
+} // namespace __gnu_debug
+
+#endif
+
diff --git a/contrib/libstdc++/include/debug/safe_sequence.h b/contrib/libstdc++/include/debug/safe_sequence.h
new file mode 100644
index 0000000..f050530
--- /dev/null
+++ b/contrib/libstdc++/include/debug/safe_sequence.h
@@ -0,0 +1,180 @@
+// Safe sequence implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_SAFE_SEQUENCE_H
+#define _GLIBCXX_DEBUG_SAFE_SEQUENCE_H 1
+
+#include <debug/debug.h>
+#include <debug/safe_base.h>
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ /** A simple function object that returns true if the passed-in
+ * value is not equal to the stored value. It saves typing over
+ * using both bind1st and not_equal.
+ */
+ template<typename _Type>
+ class _Not_equal_to
+ {
+ _Type __value;
+
+ public:
+ explicit _Not_equal_to(const _Type& __v) : __value(__v) { }
+
+ bool
+ operator()(const _Type& __x) const
+ { return __value != __x; }
+ };
+
+ /** A function object that returns true when the given random access
+ iterator is at least @c n steps away from the given iterator. */
+ template<typename _Iterator>
+ class _After_nth_from
+ {
+ typedef typename std::iterator_traits<_Iterator>::difference_type
+ difference_type;
+
+ _Iterator _M_base;
+ difference_type _M_n;
+
+ public:
+ _After_nth_from(const difference_type& __n, const _Iterator& __base)
+ : _M_base(__base), _M_n(__n) { }
+
+ bool
+ operator()(const _Iterator& __x) const
+ { return __x - _M_base >= _M_n; }
+ };
+
+ /**
+ * @brief Base class for constructing a "safe" sequence type that
+ * tracks iterators that reference it.
+ *
+ * The class template %_Safe_sequence simplifies the construction of
+ * "safe" sequences that track the iterators that reference the
+ * sequence, so that the iterators are notified of changes in the
+ * sequence that may affect their operation, e.g., if the container
+ * invalidates its iterators or is destructed. This class template
+ * may only be used by deriving from it and passing the name of the
+ * derived class as its template parameter via the curiously
+ * recurring template pattern. The derived class must have @c
+ * iterator and @const_iterator types that are instantiations of
+ * class template _Safe_iterator for this sequence. Iterators will
+ * then be tracked automatically.
+ */
+ template<typename _Sequence>
+ class _Safe_sequence : public _Safe_sequence_base
+ {
+ public:
+ /** Invalidates all iterators @c x that reference this sequence,
+ are not singular, and for which @c pred(x) returns @c
+ true. The user of this routine should be careful not to make
+ copies of the iterators passed to @p pred, as the copies may
+ interfere with the invalidation. */
+ template<typename _Predicate>
+ void
+ _M_invalidate_if(_Predicate __pred);
+
+ /** Transfers all iterators that reference this memory location
+ to this sequence from whatever sequence they are attached
+ to. */
+ template<typename _Iterator>
+ void
+ _M_transfer_iter(const _Safe_iterator<_Iterator, _Sequence>& __x);
+ };
+
+ template<typename _Sequence>
+ template<typename _Predicate>
+ void
+ _Safe_sequence<_Sequence>::
+ _M_invalidate_if(_Predicate __pred)
+ {
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ for (_Safe_iterator_base* __iter = _M_iterators; __iter; )
+ {
+ iterator* __victim = static_cast<iterator*>(__iter);
+ __iter = __iter->_M_next;
+ if (!__victim->_M_singular())
+ {
+ if (__pred(__victim->base()))
+ __victim->_M_invalidate();
+ }
+ }
+
+ for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; )
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(__iter2);
+ __iter2 = __iter2->_M_next;
+ if (!__victim->_M_singular())
+ {
+ if (__pred(__victim->base()))
+ __victim->_M_invalidate();
+ }
+ }
+ }
+
+ template<typename _Sequence>
+ template<typename _Iterator>
+ void
+ _Safe_sequence<_Sequence>::
+ _M_transfer_iter(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ {
+ _Safe_sequence_base* __from = __x._M_sequence;
+ if (!__from)
+ return;
+
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ for (_Safe_iterator_base* __iter = __from->_M_iterators; __iter; )
+ {
+ iterator* __victim = static_cast<iterator*>(__iter);
+ __iter = __iter->_M_next;
+ if (!__victim->_M_singular() && __victim->base() == __x.base())
+ __victim->_M_attach(static_cast<_Sequence*>(this));
+ }
+
+ for (_Safe_iterator_base* __iter2 = __from->_M_const_iterators;
+ __iter2;)
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(__iter2);
+ __iter2 = __iter2->_M_next;
+ if (!__victim->_M_singular() && __victim->base() == __x.base())
+ __victim->_M_attach(static_cast<_Sequence*>(this));
+ }
+ }
+} // namespace __gnu_debug
+
+#endif
diff --git a/contrib/libstdc++/include/debug/set b/contrib/libstdc++/include/debug/set
new file mode 100644
index 0000000..a1a69ef
--- /dev/null
+++ b/contrib/libstdc++/include/debug/set
@@ -0,0 +1,38 @@
+// Debugging set/multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_SET
+#define _GLIBCXX_DEBUG_SET 1
+
+#include <set>
+#include <debug/set.h>
+#include <debug/multiset.h>
+
+#endif
diff --git a/contrib/libstdc++/include/debug/set.h b/contrib/libstdc++/include/debug/set.h
new file mode 100644
index 0000000..8656cb0
--- /dev/null
+++ b/contrib/libstdc++/include/debug/set.h
@@ -0,0 +1,325 @@
+// Debugging set implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_SET_H
+#define _GLIBCXX_DEBUG_SET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace __gnu_debug_def
+{
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class set
+ : public _GLIBCXX_STD::set<_Key,_Compare,_Allocator>,
+ public __gnu_debug::_Safe_sequence<set<_Key, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::set<_Key,_Compare,_Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<set> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, set>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, set>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit set(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ set(const set<_Key,_Compare,_Allocator>& __x)
+ : _Base(__x), _Safe_base() { }
+
+ set(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ ~set() { }
+
+ set<_Key,_Compare,_Allocator>&
+ operator=(const set<_Key,_Compare,_Allocator>& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first, this),
+ __res.second);
+ }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(set<_Key,_Compare,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // set operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const set<_Key,_Compare,_Allocator>& __lhs,
+ const set<_Key,_Compare,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key,_Compare,_Allocator>& __x,
+ set<_Key,_Compare,_Allocator>& __y)
+ { return __x.swap(__y); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/debug/string b/contrib/libstdc++/include/debug/string
new file mode 100644
index 0000000..a91c004e9
--- /dev/null
+++ b/contrib/libstdc++/include/debug/string
@@ -0,0 +1,1001 @@
+// Debugging string implementation -*- C++ -*-
+
+// Copyright (C) 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_STRING
+#define _GLIBCXX_DEBUG_STRING 1
+
+#include <string>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug
+{
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ class basic_string
+ : public std::basic_string<_CharT, _Traits, _Allocator>,
+ public __gnu_debug::_Safe_sequence<basic_string<_CharT, _Traits,
+ _Allocator> >
+ {
+ typedef std::basic_string<_CharT, _Traits, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<basic_string> _Safe_base;
+
+ public:
+ // types:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::size_type size_type;
+ typedef typename _Allocator::difference_type difference_type;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, basic_string>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ basic_string> const_iterator;
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::npos;
+
+ // 21.3.1 construct/copy/destroy:
+ explicit basic_string(const _Allocator& __a = _Allocator())
+ : _Base(__a)
+ { }
+
+ // Provides conversion from a release-mode string to a debug-mode string
+ basic_string(const _Base& __base) : _Base(__base), _Safe_base() { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 42. string ctors specify wrong default allocator
+ basic_string(const basic_string& __str)
+ : _Base(__str, 0, _Base::npos, __str.get_allocator()), _Safe_base()
+ { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 42. string ctors specify wrong default allocator
+ basic_string(const basic_string& __str, size_type __pos,
+ size_type __n = _Base::npos,
+ const _Allocator& __a = _Allocator())
+ : _Base(__str, __pos, __n, __a)
+ { }
+
+ basic_string(const _CharT* __s, size_type __n,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_string(__s, __n), __n, __a)
+ { }
+
+ basic_string(const _CharT* __s, const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_string(__s), __a)
+ { this->assign(__s); }
+
+ basic_string(size_type __n, _CharT __c,
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __c, __a)
+ { }
+
+ template<typename _InputIterator>
+ basic_string(_InputIterator __begin, _InputIterator __end,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__begin, __end), __end, __a)
+ { }
+
+ ~basic_string() { }
+
+ basic_string&
+ operator=(const basic_string& __str)
+ {
+ *static_cast<_Base*>(this) = __str;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator=(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ *static_cast<_Base*>(this) = __s;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator=(_CharT __c)
+ {
+ *static_cast<_Base*>(this) = __c;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ // 21.3.2 iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // 21.3.3 capacity:
+ using _Base::size;
+ using _Base::length;
+ using _Base::max_size;
+
+ void
+ resize(size_type __n, _CharT __c)
+ {
+ _Base::resize(__n, __c);
+ this->_M_invalidate_all();
+ }
+
+ void
+ resize(size_type __n)
+ { this->resize(__n, _CharT()); }
+
+ using _Base::capacity;
+ using _Base::reserve;
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::empty;
+
+ // 21.3.4 element access:
+ const_reference
+ operator[](size_type __pos) const
+ {
+ _GLIBCXX_DEBUG_VERIFY(__pos <= this->size(),
+ _M_message(::__gnu_debug::__msg_subscript_oob)
+ ._M_sequence(*this, "this")
+ ._M_integer(__pos, "__pos")
+ ._M_integer(this->size(), "size"));
+ return _M_base()[__pos];
+ }
+
+ reference
+ operator[](size_type __pos)
+ {
+ __glibcxx_check_subscript(__pos);
+ return _M_base()[__pos];
+ }
+
+ using _Base::at;
+
+ // 21.3.5 modifiers:
+ basic_string&
+ operator+=(const basic_string& __str)
+ {
+ _M_base() += __str;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator+=(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _M_base() += __s;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator+=(_CharT __c)
+ {
+ _M_base() += __c;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const basic_string& __str)
+ {
+ _Base::append(__str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const basic_string& __str, size_type __pos, size_type __n)
+ {
+ _Base::append(__str, __pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string_len(__s, __n);
+ _Base::append(__s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::append(__s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(size_type __n, _CharT __c)
+ {
+ _Base::append(__n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ append(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::append(__first, __last);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 7. string clause minor problems
+ void
+ push_back(_CharT __c)
+ {
+ _Base::push_back(__c);
+ this->_M_invalidate_all();
+ }
+
+ basic_string&
+ assign(const basic_string& __x)
+ {
+ _Base::assign(__x);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const basic_string& __str, size_type __pos, size_type __n)
+ {
+ _Base::assign(__str, __pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string_len(__s, __n);
+ _Base::assign(__s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::assign(__s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(size_type __n, _CharT __c)
+ {
+ _Base::assign(__n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str)
+ {
+ _Base::insert(__pos1, __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str,
+ size_type __pos2, size_type __n)
+ {
+ _Base::insert(__pos1, __str, __pos2, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string(__s);
+ _Base::insert(__pos, __s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::insert(__pos, __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, size_type __n, _CharT __c)
+ {
+ _Base::insert(__pos, __n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ iterator
+ insert(iterator __p, _CharT __c)
+ {
+ __glibcxx_check_insert(__p);
+ typename _Base::iterator __res = _Base::insert(__p.base(), __c);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ void
+ insert(iterator __p, size_type __n, _CharT __c)
+ {
+ __glibcxx_check_insert(__p);
+ _Base::insert(__p.base(), __n, __c);
+ this->_M_invalidate_all();
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(iterator __p, _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__p, __first, __last);
+ _Base::insert(__p.base(), __first, __last);
+ this->_M_invalidate_all();
+ }
+
+ basic_string&
+ erase(size_type __pos = 0, size_type __n = _Base::npos)
+ {
+ _Base::erase(__pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str)
+ {
+ _Base::replace(__pos1, __n1, __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2)
+ {
+ _Base::replace(__pos1, __n1, __str, __pos2, __n2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ __glibcxx_check_string_len(__s, __n2);
+ _Base::replace(__pos, __n1, __s, __n2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::replace(__pos, __n1, __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+ {
+ _Base::replace(__pos, __n1, __n2, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const basic_string& __str)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ _Base::replace(__i1.base(), __i2.base(), __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_string_len(__s, __n);
+ _Base::replace(__i1.base(), __i2.base(), __s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_string(__s);
+ _Base::replace(__i1.base(), __i2.base(), __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ _Base::replace(__i1.base(), __i2.base(), __n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ replace(iterator __i1, iterator __i2,
+ _InputIterator __j1, _InputIterator __j2)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_valid_range(__j1, __j2);
+ _Base::replace(__i1.base(), __i2.base(), __j1, __j2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ size_type
+ copy(_CharT* __s, size_type __n, size_type __pos = 0) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::copy(__s, __n, __pos);
+ }
+
+ void
+ swap(basic_string<_CharT,_Traits,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ this->_M_invalidate_all();
+ __x._M_invalidate_all();
+ }
+
+ // 21.3.6 string operations:
+ const _CharT*
+ c_str() const
+ {
+ const _CharT* __res = _Base::c_str();
+ this->_M_invalidate_all();
+ return __res;
+ }
+
+ const _CharT*
+ data() const
+ {
+ const _CharT* __res = _Base::data();
+ this->_M_invalidate_all();
+ return __res;
+ }
+
+ using _Base::get_allocator;
+
+ size_type
+ find(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find(__str, __pos); }
+
+ size_type
+ find(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find(__s, __pos, __n);
+ }
+
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find(__s, __pos);
+ }
+
+ size_type
+ find(_CharT __c, size_type __pos = 0) const
+ { return _Base::find(__c, __pos); }
+
+ size_type
+ rfind(const basic_string& __str, size_type __pos = _Base::npos) const
+ { return _Base::rfind(__str, __pos); }
+
+ size_type
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::rfind(__s, __pos, __n);
+ }
+
+ size_type
+ rfind(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::rfind(__s, __pos);
+ }
+
+ size_type
+ rfind(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::rfind(__c, __pos); }
+
+ size_type
+ find_first_of(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find_first_of(__str, __pos); }
+
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_of(__s, __pos);
+ }
+
+ size_type
+ find_first_of(_CharT __c, size_type __pos = 0) const
+ { return _Base::find_first_of(__c, __pos); }
+
+ size_type
+ find_last_of(const basic_string& __str, size_type __pos = _Base::npos) const
+ { return _Base::find_last_of(__str, __pos); }
+
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_of(__s, __pos);
+ }
+
+ size_type
+ find_last_of(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::find_last_of(__c, __pos); }
+
+ size_type
+ find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find_first_not_of(__str, __pos); }
+
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::find_first_not_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_not_of(__s, __pos);
+ }
+
+ size_type
+ find_first_not_of(_CharT __c, size_type __pos = 0) const
+ { return _Base::find_first_not_of(__c, __pos); }
+
+ size_type
+ find_last_not_of(const basic_string& __str,
+ size_type __pos = _Base::npos) const
+ { return _Base::find_last_not_of(__str, __pos); }
+
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_not_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_not_of(__s, __pos);
+ }
+
+ size_type
+ find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::find_last_not_of(__c, __pos); }
+
+ basic_string
+ substr(size_type __pos = 0, size_type __n = _Base::npos) const
+ { return basic_string(_Base::substr(__pos, __n)); }
+
+ int
+ compare(const basic_string& __str) const
+ { return _Base::compare(__str); }
+
+ int
+ compare(size_type __pos1, size_type __n1,
+ const basic_string& __str) const
+ { return _Base::compare(__pos1, __n1, __str); }
+
+ int
+ compare(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2) const
+ { return _Base::compare(__pos1, __n1, __str, __pos2, __n2); }
+
+ int
+ compare(const _CharT* __s) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::compare(__s);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5. string::compare specification questionable
+ int
+ compare(size_type __pos1, size_type __n1, const _CharT* __s) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::compare(__pos1, __n1, __s);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5. string::compare specification questionable
+ int
+ compare(size_type __pos1, size_type __n1,const _CharT* __s,
+ size_type __n2) const
+ {
+ __glibcxx_check_string_len(__s, __n2);
+ return _Base::compare(__pos1, __n1, __s, __n2);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ using _Safe_base::_M_invalidate_all;
+ };
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(_CharT __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ _CharT __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs == __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() == __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs != __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() != __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs < __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() < __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs <= __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() <= __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs >= __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() >= __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs > __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() > __rhs;
+ }
+
+ // 21.3.7.8:
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline void
+ swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const basic_string<_CharT, _Traits, _Allocator>& __str)
+ { return __os << __str._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ operator>>(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = __is >> __str._M_base();
+ __str._M_invalidate_all();
+ return __res;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ getline(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = getline(__is,
+ __str._M_base(),
+ __delim);
+ __str._M_invalidate_all();
+ return __res;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ getline(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = getline(__is,
+ __str._M_base());
+ __str._M_invalidate_all();
+ return __res;
+ }
+} // namespace __gnu_debug
+
+#endif
diff --git a/contrib/libstdc++/include/debug/vector b/contrib/libstdc++/include/debug/vector
new file mode 100644
index 0000000..0cc2997
--- /dev/null
+++ b/contrib/libstdc++/include/debug/vector
@@ -0,0 +1,412 @@
+// Debugging vector implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _GLIBCXX_DEBUG_VECTOR
+#define _GLIBCXX_DEBUG_VECTOR 1
+
+#include <vector>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace __gnu_debug_def
+{
+ template<typename _Tp,
+ typename _Allocator = std::allocator<_Tp> >
+ class vector
+ : public _GLIBCXX_STD::vector<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<vector<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD::vector<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<vector> _Safe_base;
+
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,vector>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,vector>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.4.1 construct/copy/destroy:
+ explicit vector(const _Allocator& __a = _Allocator())
+ : _Base(__a), _M_guaranteed_capacity(0) { }
+
+ explicit vector(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
+
+ template<class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last),
+ __last, __a),
+ _M_guaranteed_capacity(0)
+ { _M_update_guaranteed_capacity(); }
+
+ vector(const vector<_Tp,_Allocator>& __x)
+ : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
+
+ /// Construction from a release-mode vector
+ vector(const _Base& __x)
+ : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
+
+ ~vector() { }
+
+ vector<_Tp,_Allocator>&
+ operator=(const vector<_Tp,_Allocator>& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __u)
+ {
+ _Base::assign(__n, __u);
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // 23.2.4.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ bool __realloc = _M_requires_reallocation(__sz);
+ if (__sz < this->size())
+ this->_M_invalidate_if(_After_nth(__sz, _M_base().begin()));
+ _Base::resize(__sz, __c);
+ if (__realloc)
+ this->_M_invalidate_all();
+ }
+
+ using _Base::capacity;
+ using _Base::empty;
+
+ void
+ reserve(size_type __n)
+ {
+ bool __realloc = _M_requires_reallocation(__n);
+ _Base::reserve(__n);
+ if (__n > _M_guaranteed_capacity)
+ _M_guaranteed_capacity = __n;
+ if (__realloc)
+ this->_M_invalidate_all();
+ }
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // 23.2.4.3 modifiers:
+ void
+ push_back(const _Tp& __x)
+ {
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ _Base::push_back(__x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end() - 1;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::insert(__position.base(),__x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ return iterator(__res, this);
+ }
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + __n);
+ difference_type __offset = __position - begin();
+ _Base::insert(__position.base(), __n, __x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+
+ /* Hard to guess if invalidation will occur, because __last
+ - __first can't be calculated in all cases, so we just
+ punt here by checking if it did occur. */
+ typename _Base::iterator __old_begin = _M_base().begin();
+ difference_type __offset = __position - begin();
+ _Base::insert(__position.base(), __first, __last);
+
+ if (_M_base().begin() != __old_begin)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ return iterator(__res, this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+
+ difference_type __offset = __first - begin();
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ return iterator(__res, this);
+ }
+
+ void
+ swap(vector<_Tp,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ std::swap(_M_guaranteed_capacity, __x._M_guaranteed_capacity);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ _M_guaranteed_capacity = 0;
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ size_type _M_guaranteed_capacity;
+
+ bool
+ _M_requires_reallocation(size_type __elements)
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ return __elements > this->capacity();
+#else
+ return __elements > _M_guaranteed_capacity;
+#endif
+ }
+
+ void
+ _M_update_guaranteed_capacity()
+ {
+ if (this->size() > _M_guaranteed_capacity)
+ _M_guaranteed_capacity = this->size();
+ }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+} // namespace __gnu_debug_def
+
+#endif
diff --git a/contrib/libstdc++/include/ext/algorithm b/contrib/libstdc++/include/ext/algorithm
index b35d36f..07ac4cb 100644
--- a/contrib/libstdc++/include/ext/algorithm
+++ b/contrib/libstdc++/include/ext/algorithm
@@ -60,9 +60,10 @@
*/
#ifndef _EXT_ALGORITHM
-#define _EXT_ALGORITHM
+#define _EXT_ALGORITHM 1
#pragma GCC system_header
+
#include <algorithm>
namespace __gnu_cxx
@@ -77,10 +78,10 @@ namespace __gnu_cxx
//--------------------------------------------------
// copy_n (not part of the C++ standard)
- template<typename _InputIter, typename _Size, typename _OutputIter>
- pair<_InputIter, _OutputIter>
- __copy_n(_InputIter __first, _Size __count,
- _OutputIter __result,
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ pair<_InputIterator, _OutputIterator>
+ __copy_n(_InputIterator __first, _Size __count,
+ _OutputIterator __result,
input_iterator_tag)
{
for ( ; __count > 0; --__count) {
@@ -88,17 +89,17 @@ namespace __gnu_cxx
++__first;
++__result;
}
- return pair<_InputIter, _OutputIter>(__first, __result);
+ return pair<_InputIterator, _OutputIterator>(__first, __result);
}
- template<typename _RAIter, typename _Size, typename _OutputIter>
- inline pair<_RAIter, _OutputIter>
- __copy_n(_RAIter __first, _Size __count,
- _OutputIter __result,
+ template<typename _RAIterator, typename _Size, typename _OutputIterator>
+ inline pair<_RAIterator, _OutputIterator>
+ __copy_n(_RAIterator __first, _Size __count,
+ _OutputIterator __result,
random_access_iterator_tag)
{
- _RAIter __last = __first + __count;
- return pair<_RAIter, _OutputIter>(__last,
+ _RAIterator __last = __first + __count;
+ return pair<_RAIterator, _OutputIterator>(__last,
std::copy(__first, __last, __result));
}
@@ -116,23 +117,23 @@ namespace __gnu_cxx
* optimizations such as unrolling).
* @ingroup SGIextensions
*/
- template<typename _InputIter, typename _Size, typename _OutputIter>
- inline pair<_InputIter, _OutputIter>
- copy_n(_InputIter __first, _Size __count, _OutputIter __result)
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ inline pair<_InputIterator, _OutputIterator>
+ copy_n(_InputIterator __first, _Size __count, _OutputIterator __result)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
return __copy_n(__first, __count, __result,
std::__iterator_category(__first));
}
- template<typename _InputIter1, typename _InputIter2>
+ template<typename _InputIterator1, typename _InputIterator2>
int
- __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2)
+ __lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2)
{
while (__first1 != __last1 && __first2 != __last2) {
if (*__first1 < *__first2)
@@ -159,11 +160,11 @@ namespace __gnu_cxx
const ptrdiff_t __len1 = __last1 - __first1;
const ptrdiff_t __len2 = __last2 - __first2;
const int __result = std::memcmp(__first1, __first2, min(__len1, __len2));
- return __result != 0 ? __result
+ return __result != 0 ? __result
: (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
}
- inline int
+ inline int
__lexicographical_compare_3way(const char* __first1, const char* __last1,
const char* __first2, const char* __last2)
{
@@ -195,18 +196,20 @@ namespace __gnu_cxx
* This is an SGI extension.
* @ingroup SGIextensions
*/
- template<typename _InputIter1, typename _InputIter2>
+ template<typename _InputIterator1, typename _InputIterator2>
int
- lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
- _InputIter2 __first2, _InputIter2 __last2)
+ lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter1>::value_type>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_InputIter2>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
}
@@ -214,32 +217,36 @@ namespace __gnu_cxx
// count and count_if: this version, whose return type is void, was present
// in the HP STL, and is retained as an extension for backward compatibility.
- template<typename _InputIter, typename _Tp, typename _Size>
+ template<typename _InputIterator, typename _Tp, typename _Size>
void
- count(_InputIter __first, _InputIter __last,
+ count(_InputIterator __first, _InputIterator __last,
const _Tp& __value,
_Size& __n)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIter>::value_type >)
- __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type >)
+ __glibcxx_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
for ( ; __first != __last; ++__first)
if (*__first == __value)
++__n;
}
- template<typename _InputIter, typename _Predicate, typename _Size>
+ template<typename _InputIterator, typename _Predicate, typename _Size>
void
- count_if(_InputIter __first, _InputIter __last,
+ count_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred,
_Size& __n)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIter>::value_type>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
for ( ; __first != __last; ++__first)
if (__pred(*__first))
++__n;
@@ -252,21 +259,22 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _ForwardIter, typename _OutputIter, typename _Distance>
- _OutputIter
- random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out, const _Distance __n)
+ template<typename _ForwardIterator, typename _OutputIterator, typename _Distance>
+ _OutputIterator
+ random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __out, const _Distance __n)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
_Distance __remaining = std::distance(__first, __last);
_Distance __m = min(__n, __remaining);
while (__m > 0) {
- if (std::__random_number(__remaining) < __m) {
+ if ((std::rand() % __remaining) < __m) {
*__out = *__first;
++__out;
--__m;
@@ -283,19 +291,20 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _ForwardIter, typename _OutputIter, typename _Distance,
+ template<typename _ForwardIterator, typename _OutputIterator, typename _Distance,
typename _RandomNumberGenerator>
- _OutputIter
- random_sample_n(_ForwardIter __first, _ForwardIter __last,
- _OutputIter __out, const _Distance __n,
+ _OutputIterator
+ random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __out, const _Distance __n,
_RandomNumberGenerator& __rand)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- typename iterator_traits<_ForwardIter>::value_type>)
- __glibcpp_function_requires(_UnaryFunctionConcept<
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryFunctionConcept<
_RandomNumberGenerator, _Distance, _Distance>)
+ __glibcxx_requires_valid_range(__first, __last);
_Distance __remaining = std::distance(__first, __last);
_Distance __m = min(__n, __remaining);
@@ -313,20 +322,20 @@ namespace __gnu_cxx
return __out;
}
- template<typename _InputIter, typename _RandomAccessIter, typename _Distance>
- _RandomAccessIter
- __random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out,
+ template<typename _InputIterator, typename _RandomAccessIterator, typename _Distance>
+ _RandomAccessIterator
+ __random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out,
const _Distance __n)
{
_Distance __m = 0;
_Distance __t = __n;
- for ( ; __first != __last && __m < __n; ++__m, ++__first)
+ for ( ; __first != __last && __m < __n; ++__m, ++__first)
__out[__m] = *__first;
while (__first != __last) {
++__t;
- _Distance __M = std::__random_number(__t);
+ _Distance __M = std::rand() % (__t);
if (__M < __n)
__out[__M] = *__first;
++__first;
@@ -335,16 +344,16 @@ namespace __gnu_cxx
return __out + __m;
}
- template<typename _InputIter, typename _RandomAccessIter,
+ template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator, typename _Distance>
- _RandomAccessIter
- __random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out,
+ _RandomAccessIterator
+ __random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out,
_RandomNumberGenerator& __rand,
const _Distance __n)
{
// concept requirements
- __glibcpp_function_requires(_UnaryFunctionConcept<
+ __glibcxx_function_requires(_UnaryFunctionConcept<
_RandomNumberGenerator, _Distance, _Distance>)
_Distance __m = 0;
@@ -368,15 +377,17 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _InputIter, typename _RandomAccessIter>
- inline _RandomAccessIter
- random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last)
+ template<typename _InputIterator, typename _RandomAccessIterator>
+ inline _RandomAccessIterator
+ random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out_first, _RandomAccessIterator __out_last)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__out_first, __out_last);
return __random_sample(__first, __last,
__out_first, __out_last - __out_first);
@@ -387,72 +398,41 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _InputIter, typename _RandomAccessIter,
+ template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator>
- inline _RandomAccessIter
- random_sample(_InputIter __first, _InputIter __last,
- _RandomAccessIter __out_first, _RandomAccessIter __out_last,
- _RandomNumberGenerator& __rand)
+ inline _RandomAccessIterator
+ random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out_first, _RandomAccessIterator __out_last,
+ _RandomNumberGenerator& __rand)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
- __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIter>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__out_first, __out_last);
return __random_sample(__first, __last,
__out_first, __rand,
__out_last - __out_first);
}
-
- // is_heap, a predicate testing whether or not a range is
- // a heap. This function is an extension, not part of the C++
- // standard.
-
- template<typename _RandomAccessIter, typename _Distance>
- bool
- __is_heap(_RandomAccessIter __first, _Distance __n)
- {
- _Distance __parent = 0;
- for (_Distance __child = 1; __child < __n; ++__child) {
- if (__first[__parent] < __first[__child])
- return false;
- if ((__child & 1) == 0)
- ++__parent;
- }
- return true;
- }
-
- template<typename _RandomAccessIter, typename _Distance,
- typename _StrictWeakOrdering>
- bool
- __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
- _Distance __n)
- {
- _Distance __parent = 0;
- for (_Distance __child = 1; __child < __n; ++__child) {
- if (__comp(__first[__parent], __first[__child]))
- return false;
- if ((__child & 1) == 0)
- ++__parent;
- }
- return true;
- }
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _RandomAccessIter>
+ template<typename _RandomAccessIterator>
inline bool
- is_heap(_RandomAccessIter __first, _RandomAccessIter __last)
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_RandomAccessIter>::value_type>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- return __is_heap(__first, __last - __first);
+ return std::__is_heap(__first, __last - __first);
}
/**
@@ -460,18 +440,19 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _RandomAccessIter, typename _StrictWeakOrdering>
+ template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
inline bool
- is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_StrictWeakOrdering __comp)
{
// concept requirements
- __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
- typename iterator_traits<_RandomAccessIter>::value_type,
- typename iterator_traits<_RandomAccessIter>::value_type>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+ typename iterator_traits<_RandomAccessIterator>::value_type,
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- return __is_heap(__first, __comp, __last - __first);
+ return std::__is_heap(__first, __comp, __last - __first);
}
// is_sorted, a predicated testing whether a range is sorted in
@@ -483,19 +464,20 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _ForwardIter>
+ template<typename _ForwardIterator>
bool
- is_sorted(_ForwardIter __first, _ForwardIter __last)
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return true;
- _ForwardIter __next = __first;
+ _ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (*__next < *__first)
return false;
@@ -509,20 +491,21 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
- template<typename _ForwardIter, typename _StrictWeakOrdering>
+ template<typename _ForwardIterator, typename _StrictWeakOrdering>
bool
- is_sorted(_ForwardIter __first, _ForwardIter __last, _StrictWeakOrdering __comp)
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last, _StrictWeakOrdering __comp)
{
// concept requirements
- __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
- typename iterator_traits<_ForwardIter>::value_type,
- typename iterator_traits<_ForwardIter>::value_type>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
if (__first == __last)
return true;
- _ForwardIter __next = __first;
+ _ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (__comp(*__next, *__first))
return false;
@@ -530,7 +513,6 @@ namespace __gnu_cxx
return true;
}
-
} // namespace __gnu_cxx
#endif /* _EXT_ALGORITHM */
diff --git a/contrib/libstdc++/include/ext/bitmap_allocator.h b/contrib/libstdc++/include/ext/bitmap_allocator.h
new file mode 100644
index 0000000..9a0d162
--- /dev/null
+++ b/contrib/libstdc++/include/ext/bitmap_allocator.h
@@ -0,0 +1,859 @@
+// Bitmapped Allocator. -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+
+
+#if !defined _BITMAP_ALLOCATOR_H
+#define _BITMAP_ALLOCATOR_H 1
+
+#include <cstddef>
+//For std::size_t, and ptrdiff_t.
+#include <utility>
+//For std::pair.
+#include <algorithm>
+//std::find_if, and std::lower_bound.
+#include <vector>
+//For the free list of exponentially growing memory blocks. At max,
+//size of the vector should be not more than the number of bits in an
+//integer or an unsigned integer.
+#include <functional>
+//For greater_equal, and less_equal.
+#include <new>
+//For operator new.
+#include <bits/gthr.h>
+//For __gthread_mutex_t, __gthread_mutex_lock and __gthread_mutex_unlock.
+#include <ext/new_allocator.h>
+//For __gnu_cxx::new_allocator for std::vector.
+
+#include <cassert>
+#define NDEBUG
+
+//#define CHECK_FOR_ERRORS
+//#define __CPU_HAS_BACKWARD_BRANCH_PREDICTION
+
+namespace __gnu_cxx
+{
+ namespace {
+#if defined __GTHREADS
+ bool const __threads_enabled = __gthread_active_p();
+#endif
+
+ }
+
+#if defined __GTHREADS
+ class _Mutex {
+ __gthread_mutex_t _M_mut;
+ //Prevent Copying and assignment.
+ _Mutex (_Mutex const&);
+ _Mutex& operator= (_Mutex const&);
+ public:
+ _Mutex ()
+ {
+ if (__threads_enabled)
+ {
+#if !defined __GTHREAD_MUTEX_INIT
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mut);
+#else
+ __gthread_mutex_t __mtemp = __GTHREAD_MUTEX_INIT;
+ _M_mut = __mtemp;
+#endif
+ }
+ }
+ ~_Mutex ()
+ {
+ //Gthreads does not define a Mutex Destruction Function.
+ }
+ __gthread_mutex_t *_M_get() { return &_M_mut; }
+ };
+
+ class _Lock {
+ _Mutex* _M_pmt;
+ bool _M_locked;
+ //Prevent Copying and assignment.
+ _Lock (_Lock const&);
+ _Lock& operator= (_Lock const&);
+ public:
+ _Lock(_Mutex* __mptr)
+ : _M_pmt(__mptr), _M_locked(false)
+ { this->_M_lock(); }
+ void _M_lock()
+ {
+ if (__threads_enabled)
+ {
+ _M_locked = true;
+ __gthread_mutex_lock(_M_pmt->_M_get());
+ }
+ }
+ void _M_unlock()
+ {
+ if (__threads_enabled)
+ {
+ if (__builtin_expect(_M_locked, true))
+ {
+ __gthread_mutex_unlock(_M_pmt->_M_get());
+ _M_locked = false;
+ }
+ }
+ }
+ ~_Lock() { this->_M_unlock(); }
+ };
+#endif
+
+
+
+ namespace __aux_balloc {
+ static const unsigned int _Bits_Per_Byte = 8;
+ static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte;
+
+ template <typename _Addr_Pair_t>
+ inline size_t __balloc_num_blocks (_Addr_Pair_t __ap)
+ {
+ return (__ap.second - __ap.first) + 1;
+ }
+
+ template <typename _Addr_Pair_t>
+ inline size_t __balloc_num_bit_maps (_Addr_Pair_t __ap)
+ {
+ return __balloc_num_blocks(__ap) / _Bits_Per_Block;
+ }
+
+ //T should be a pointer type.
+ template <typename _Tp>
+ class _Inclusive_between : public std::unary_function<typename std::pair<_Tp, _Tp>, bool> {
+ typedef _Tp pointer;
+ pointer _M_ptr_value;
+ typedef typename std::pair<_Tp, _Tp> _Block_pair;
+
+ public:
+ _Inclusive_between (pointer __ptr) : _M_ptr_value(__ptr) { }
+ bool operator () (_Block_pair __bp) const throw ()
+ {
+ if (std::less_equal<pointer> ()(_M_ptr_value, __bp.second) &&
+ std::greater_equal<pointer> ()(_M_ptr_value, __bp.first))
+ return true;
+ else
+ return false;
+ }
+ };
+
+ //Used to pass a Functor to functions by reference.
+ template <typename _Functor>
+ class _Functor_Ref :
+ public std::unary_function<typename _Functor::argument_type, typename _Functor::result_type> {
+ _Functor& _M_fref;
+
+ public:
+ typedef typename _Functor::argument_type argument_type;
+ typedef typename _Functor::result_type result_type;
+
+ _Functor_Ref (_Functor& __fref) : _M_fref(__fref) { }
+ result_type operator() (argument_type __arg) { return _M_fref (__arg); }
+ };
+
+
+ //T should be a pointer type, and A is the Allocator for the vector.
+ template <typename _Tp, typename _Alloc>
+ class _Ffit_finder
+ : public std::unary_function<typename std::pair<_Tp, _Tp>, bool> {
+ typedef typename std::vector<std::pair<_Tp, _Tp>, _Alloc> _BPVector;
+ typedef typename _BPVector::difference_type _Counter_type;
+ typedef typename std::pair<_Tp, _Tp> _Block_pair;
+
+ unsigned int *_M_pbitmap;
+ unsigned int _M_data_offset;
+
+ public:
+ _Ffit_finder ()
+ : _M_pbitmap (0), _M_data_offset (0)
+ { }
+
+ bool operator() (_Block_pair __bp) throw()
+ {
+ //Set the _rover to the last unsigned integer, which is the
+ //bitmap to the first free block. Thus, the bitmaps are in exact
+ //reverse order of the actual memory layout. So, we count down
+ //the bimaps, which is the same as moving up the memory.
+
+ //If the used count stored at the start of the Bit Map headers
+ //is equal to the number of Objects that the current Block can
+ //store, then there is definitely no space for another single
+ //object, so just return false.
+ _Counter_type __diff = __gnu_cxx::__aux_balloc::__balloc_num_bit_maps (__bp);
+
+ assert (*(reinterpret_cast<unsigned int*>(__bp.first) - (__diff + 1)) <=
+ __gnu_cxx::__aux_balloc::__balloc_num_blocks (__bp));
+
+ if (*(reinterpret_cast<unsigned int*>(__bp.first) - (__diff + 1)) ==
+ __gnu_cxx::__aux_balloc::__balloc_num_blocks (__bp))
+ return false;
+
+ unsigned int *__rover = reinterpret_cast<unsigned int*>(__bp.first) - 1;
+ for (_Counter_type __i = 0; __i < __diff; ++__i)
+ {
+ _M_data_offset = __i;
+ if (*__rover)
+ {
+ _M_pbitmap = __rover;
+ return true;
+ }
+ --__rover;
+ }
+ return false;
+ }
+
+ unsigned int *_M_get () { return _M_pbitmap; }
+ unsigned int _M_offset () { return _M_data_offset * _Bits_Per_Block; }
+ };
+
+ //T should be a pointer type.
+ template <typename _Tp, typename _Alloc>
+ class _Bit_map_counter {
+
+ typedef typename std::vector<std::pair<_Tp, _Tp>, _Alloc> _BPVector;
+ typedef typename _BPVector::size_type _Index_type;
+ typedef _Tp pointer;
+
+ _BPVector& _M_vbp;
+ unsigned int *_M_curr_bmap;
+ unsigned int *_M_last_bmap_in_block;
+ _Index_type _M_curr_index;
+
+ public:
+ //Use the 2nd parameter with care. Make sure that such an entry
+ //exists in the vector before passing that particular index to
+ //this ctor.
+ _Bit_map_counter (_BPVector& Rvbp, int __index = -1)
+ : _M_vbp(Rvbp)
+ {
+ this->_M_reset(__index);
+ }
+
+ void _M_reset (int __index = -1) throw()
+ {
+ if (__index == -1)
+ {
+ _M_curr_bmap = 0;
+ _M_curr_index = (_Index_type)-1;
+ return;
+ }
+
+ _M_curr_index = __index;
+ _M_curr_bmap = reinterpret_cast<unsigned int*>(_M_vbp[_M_curr_index].first) - 1;
+
+ assert (__index <= (int)_M_vbp.size() - 1);
+
+ _M_last_bmap_in_block = _M_curr_bmap -
+ ((_M_vbp[_M_curr_index].second - _M_vbp[_M_curr_index].first + 1) / _Bits_Per_Block - 1);
+ }
+
+ //Dangerous Function! Use with extreme care. Pass to this
+ //function ONLY those values that are known to be correct,
+ //otherwise this will mess up big time.
+ void _M_set_internal_bit_map (unsigned int *__new_internal_marker) throw()
+ {
+ _M_curr_bmap = __new_internal_marker;
+ }
+
+ bool _M_finished () const throw()
+ {
+ return (_M_curr_bmap == 0);
+ }
+
+ _Bit_map_counter& operator++ () throw()
+ {
+ if (_M_curr_bmap == _M_last_bmap_in_block)
+ {
+ if (++_M_curr_index == _M_vbp.size())
+ {
+ _M_curr_bmap = 0;
+ }
+ else
+ {
+ this->_M_reset (_M_curr_index);
+ }
+ }
+ else
+ {
+ --_M_curr_bmap;
+ }
+ return *this;
+ }
+
+ unsigned int *_M_get ()
+ {
+ return _M_curr_bmap;
+ }
+
+ pointer _M_base () { return _M_vbp[_M_curr_index].first; }
+ unsigned int _M_offset ()
+ {
+ return _Bits_Per_Block * ((reinterpret_cast<unsigned int*>(this->_M_base()) - _M_curr_bmap) - 1);
+ }
+
+ unsigned int _M_where () { return _M_curr_index; }
+ };
+ }
+
+ //Generic Version of the bsf instruction.
+ typedef unsigned int _Bit_map_type;
+ static inline unsigned int _Bit_scan_forward (register _Bit_map_type __num)
+ {
+ return static_cast<unsigned int>(__builtin_ctz(__num));
+ }
+
+ struct _OOM_handler {
+ static std::new_handler _S_old_handler;
+ static bool _S_handled_oom;
+ typedef void (*_FL_clear_proc)(void);
+ static _FL_clear_proc _S_oom_fcp;
+
+ _OOM_handler (_FL_clear_proc __fcp)
+ {
+ _S_oom_fcp = __fcp;
+ _S_old_handler = std::set_new_handler (_S_handle_oom_proc);
+ _S_handled_oom = false;
+ }
+
+ static void _S_handle_oom_proc()
+ {
+ _S_oom_fcp();
+ std::set_new_handler (_S_old_handler);
+ _S_handled_oom = true;
+ }
+
+ ~_OOM_handler ()
+ {
+ if (!_S_handled_oom)
+ std::set_new_handler (_S_old_handler);
+ }
+ };
+
+ std::new_handler _OOM_handler::_S_old_handler;
+ bool _OOM_handler::_S_handled_oom = false;
+ _OOM_handler::_FL_clear_proc _OOM_handler::_S_oom_fcp = 0;
+
+
+ class _BA_free_list_store {
+ struct _LT_pointer_compare {
+ template <typename _Tp>
+ bool operator() (_Tp* __pt, _Tp const& __crt) const throw()
+ {
+ return *__pt < __crt;
+ }
+ };
+
+#if defined __GTHREADS
+ static _Mutex _S_bfl_mutex;
+#endif
+ static std::vector<unsigned int*> _S_free_list;
+ typedef std::vector<unsigned int*>::iterator _FLIter;
+
+ static void _S_validate_free_list(unsigned int *__addr) throw()
+ {
+ const unsigned int __max_size = 64;
+ if (_S_free_list.size() >= __max_size)
+ {
+ //Ok, the threshold value has been reached.
+ //We determine which block to remove from the list of free
+ //blocks.
+ if (*__addr >= *_S_free_list.back())
+ {
+ //Ok, the new block is greater than or equal to the last
+ //block in the list of free blocks. We just free the new
+ //block.
+ operator delete((void*)__addr);
+ return;
+ }
+ else
+ {
+ //Deallocate the last block in the list of free lists, and
+ //insert the new one in it's correct position.
+ operator delete((void*)_S_free_list.back());
+ _S_free_list.pop_back();
+ }
+ }
+
+ //Just add the block to the list of free lists
+ //unconditionally.
+ _FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(),
+ *__addr, _LT_pointer_compare ());
+ //We may insert the new free list before _temp;
+ _S_free_list.insert(__temp, __addr);
+ }
+
+ static bool _S_should_i_give(unsigned int __block_size, unsigned int __required_size) throw()
+ {
+ const unsigned int __max_wastage_percentage = 36;
+ if (__block_size >= __required_size &&
+ (((__block_size - __required_size) * 100 / __block_size) < __max_wastage_percentage))
+ return true;
+ else
+ return false;
+ }
+
+ public:
+ typedef _BA_free_list_store _BFL_type;
+
+ static inline void _S_insert_free_list(unsigned int *__addr) throw()
+ {
+#if defined __GTHREADS
+ _Lock __bfl_lock(&_S_bfl_mutex);
+#endif
+ //Call _S_validate_free_list to decide what should be done with this
+ //particular free list.
+ _S_validate_free_list(--__addr);
+ }
+
+ static unsigned int *_S_get_free_list(unsigned int __sz) throw (std::bad_alloc)
+ {
+#if defined __GTHREADS
+ _Lock __bfl_lock(&_S_bfl_mutex);
+#endif
+ _FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(),
+ __sz, _LT_pointer_compare());
+ if (__temp == _S_free_list.end() || !_S_should_i_give (**__temp, __sz))
+ {
+ //We hold the lock because the OOM_Handler is a stateless
+ //entity.
+ _OOM_handler __set_handler(_BFL_type::_S_clear);
+ unsigned int *__ret_val = reinterpret_cast<unsigned int*>
+ (operator new (__sz + sizeof(unsigned int)));
+ *__ret_val = __sz;
+ return ++__ret_val;
+ }
+ else
+ {
+ unsigned int* __ret_val = *__temp;
+ _S_free_list.erase (__temp);
+ return ++__ret_val;
+ }
+ }
+
+ //This function just clears the internal Free List, and gives back
+ //all the memory to the OS.
+ static void _S_clear()
+ {
+#if defined __GTHREADS
+ _Lock __bfl_lock(&_S_bfl_mutex);
+#endif
+ _FLIter __iter = _S_free_list.begin();
+ while (__iter != _S_free_list.end())
+ {
+ operator delete((void*)*__iter);
+ ++__iter;
+ }
+ _S_free_list.clear();
+ }
+
+ };
+
+#if defined __GTHREADS
+ _Mutex _BA_free_list_store::_S_bfl_mutex;
+#endif
+ std::vector<unsigned int*> _BA_free_list_store::_S_free_list;
+
+ template <typename _Tp> class bitmap_allocator;
+ // specialize for void:
+ template <> class bitmap_allocator<void> {
+ public:
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ // reference-to-void members are impossible.
+ typedef void value_type;
+ template <typename _Tp1> struct rebind { typedef bitmap_allocator<_Tp1> other; };
+ };
+
+ template <typename _Tp> class bitmap_allocator : private _BA_free_list_store {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+ template <typename _Tp1> struct rebind { typedef bitmap_allocator<_Tp1> other; };
+
+ private:
+ static const unsigned int _Bits_Per_Byte = 8;
+ static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte;
+
+ static inline void _S_bit_allocate(unsigned int *__pbmap, unsigned int __pos) throw()
+ {
+ unsigned int __mask = 1 << __pos;
+ __mask = ~__mask;
+ *__pbmap &= __mask;
+ }
+
+ static inline void _S_bit_free(unsigned int *__pbmap, unsigned int __pos) throw()
+ {
+ unsigned int __mask = 1 << __pos;
+ *__pbmap |= __mask;
+ }
+
+ static inline void *_S_memory_get(size_t __sz) throw (std::bad_alloc)
+ {
+ return operator new(__sz);
+ }
+
+ static inline void _S_memory_put(void *__vptr) throw ()
+ {
+ operator delete(__vptr);
+ }
+
+ typedef typename std::pair<pointer, pointer> _Block_pair;
+ typedef typename __gnu_cxx::new_allocator<_Block_pair> _BPVec_allocator_type;
+ typedef typename std::vector<_Block_pair, _BPVec_allocator_type> _BPVector;
+
+
+#if defined CHECK_FOR_ERRORS
+ //Complexity: O(lg(N)). Where, N is the number of block of size
+ //sizeof(value_type).
+ static void _S_check_for_free_blocks() throw()
+ {
+ typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder<pointer, _BPVec_allocator_type> _FFF;
+ _FFF __fff;
+ typedef typename _BPVector::iterator _BPiter;
+ _BPiter __bpi = std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(),
+ __gnu_cxx::__aux_balloc::_Functor_Ref<_FFF>(__fff));
+ assert(__bpi == _S_mem_blocks.end());
+ }
+#endif
+
+
+ //Complexity: O(1), but internally depends upon the complexity of
+ //the function _BA_free_list_store::_S_get_free_list. The part
+ //where the bitmap headers are written is of worst case complexity:
+ //O(X),where X is the number of blocks of size sizeof(value_type)
+ //within the newly acquired block. Having a tight bound.
+ static void _S_refill_pool() throw (std::bad_alloc)
+ {
+#if defined CHECK_FOR_ERRORS
+ _S_check_for_free_blocks();
+#endif
+
+ const unsigned int __num_bit_maps = _S_block_size / _Bits_Per_Block;
+ const unsigned int __size_to_allocate = sizeof(unsigned int) +
+ _S_block_size * sizeof(value_type) + __num_bit_maps*sizeof(unsigned int);
+
+ unsigned int *__temp =
+ reinterpret_cast<unsigned int*>(_BA_free_list_store::_S_get_free_list(__size_to_allocate));
+ *__temp = 0;
+ ++__temp;
+
+ //The Header information goes at the Beginning of the Block.
+ _Block_pair __bp = std::make_pair(reinterpret_cast<pointer>(__temp + __num_bit_maps),
+ reinterpret_cast<pointer>(__temp + __num_bit_maps)
+ + _S_block_size - 1);
+
+ //Fill the Vector with this information.
+ _S_mem_blocks.push_back(__bp);
+
+ unsigned int __bit_mask = 0; //0 Indicates all Allocated.
+ __bit_mask = ~__bit_mask; //1 Indicates all Free.
+
+ for (unsigned int __i = 0; __i < __num_bit_maps; ++__i)
+ __temp[__i] = __bit_mask;
+
+ //On some implementations, operator new might throw bad_alloc, or
+ //malloc might fail if the size passed is too large, therefore, we
+ //limit the size passed to malloc or operator new.
+ _S_block_size *= 2;
+ }
+
+ static _BPVector _S_mem_blocks;
+ static unsigned int _S_block_size;
+ static __gnu_cxx::__aux_balloc::_Bit_map_counter<pointer, _BPVec_allocator_type> _S_last_request;
+ static typename _BPVector::size_type _S_last_dealloc_index;
+#if defined __GTHREADS
+ static _Mutex _S_mut;
+#endif
+
+ //Complexity: Worst case complexity is O(N), but that is hardly ever
+ //hit. if and when this particular case is encountered, the next few
+ //cases are guaranteed to have a worst case complexity of O(1)!
+ //That's why this function performs very well on the average. you
+ //can consider this function to be having a complexity refrred to
+ //commonly as: Amortized Constant time.
+ static pointer _S_allocate_single_object()
+ {
+#if defined __GTHREADS
+ _Lock __bit_lock(&_S_mut);
+#endif
+
+ //The algorithm is something like this: The last_requst variable
+ //points to the last accessed Bit Map. When such a condition
+ //occurs, we try to find a free block in the current bitmap, or
+ //succeeding bitmaps until the last bitmap is reached. If no free
+ //block turns up, we resort to First Fit method.
+
+ //WARNING: Do not re-order the condition in the while statement
+ //below, because it relies on C++'s short-circuit
+ //evaluation. The return from _S_last_request->_M_get() will NOT
+ //be dereferenceable if _S_last_request->_M_finished() returns
+ //true. This would inevitibly lead to a NULL pointer dereference
+ //if tinkered with.
+ while (_S_last_request._M_finished() == false && (*(_S_last_request._M_get()) == 0))
+ {
+ _S_last_request.operator++();
+ }
+
+ if (__builtin_expect(_S_last_request._M_finished() == true, false))
+ {
+ //Fall Back to First Fit algorithm.
+ typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder<pointer, _BPVec_allocator_type> _FFF;
+ _FFF __fff;
+ typedef typename _BPVector::iterator _BPiter;
+ _BPiter __bpi = std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(),
+ __gnu_cxx::__aux_balloc::_Functor_Ref<_FFF>(__fff));
+
+ if (__bpi != _S_mem_blocks.end())
+ {
+ //Search was successful. Ok, now mark the first bit from
+ //the right as 0, meaning Allocated. This bit is obtained
+ //by calling _M_get() on __fff.
+ unsigned int __nz_bit = _Bit_scan_forward(*__fff._M_get());
+ _S_bit_allocate(__fff._M_get(), __nz_bit);
+
+ _S_last_request._M_reset(__bpi - _S_mem_blocks.begin());
+
+ //Now, get the address of the bit we marked as allocated.
+ pointer __ret_val = __bpi->first + __fff._M_offset() + __nz_bit;
+ unsigned int *__puse_count = reinterpret_cast<unsigned int*>(__bpi->first) -
+ (__gnu_cxx::__aux_balloc::__balloc_num_bit_maps(*__bpi) + 1);
+ ++(*__puse_count);
+ return __ret_val;
+ }
+ else
+ {
+ //Search was unsuccessful. We Add more memory to the pool
+ //by calling _S_refill_pool().
+ _S_refill_pool();
+
+ //_M_Reset the _S_last_request structure to the first free
+ //block's bit map.
+ _S_last_request._M_reset(_S_mem_blocks.size() - 1);
+
+ //Now, mark that bit as allocated.
+ }
+ }
+ //_S_last_request holds a pointer to a valid bit map, that points
+ //to a free block in memory.
+ unsigned int __nz_bit = _Bit_scan_forward(*_S_last_request._M_get());
+ _S_bit_allocate(_S_last_request._M_get(), __nz_bit);
+
+ pointer __ret_val = _S_last_request._M_base() + _S_last_request._M_offset() + __nz_bit;
+
+ unsigned int *__puse_count = reinterpret_cast<unsigned int*>
+ (_S_mem_blocks[_S_last_request._M_where()].first) -
+ (__gnu_cxx::__aux_balloc::__balloc_num_bit_maps(_S_mem_blocks[_S_last_request._M_where()]) + 1);
+ ++(*__puse_count);
+ return __ret_val;
+ }
+
+ //Complexity: O(lg(N)), but the worst case is hit quite often! I
+ //need to do something about this. I'll be able to work on it, only
+ //when I have some solid figures from a few real apps.
+ static void _S_deallocate_single_object(pointer __p) throw()
+ {
+#if defined __GTHREADS
+ _Lock __bit_lock(&_S_mut);
+#endif
+
+ typedef typename _BPVector::iterator _Iterator;
+ typedef typename _BPVector::difference_type _Difference_type;
+
+ _Difference_type __diff;
+ int __displacement;
+
+ assert(_S_last_dealloc_index >= 0);
+
+ if (__gnu_cxx::__aux_balloc::_Inclusive_between<pointer>(__p)(_S_mem_blocks[_S_last_dealloc_index]))
+ {
+ assert(_S_last_dealloc_index <= _S_mem_blocks.size() - 1);
+
+ //Initial Assumption was correct!
+ __diff = _S_last_dealloc_index;
+ __displacement = __p - _S_mem_blocks[__diff].first;
+ }
+ else
+ {
+ _Iterator _iter = (std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(),
+ __gnu_cxx::__aux_balloc::_Inclusive_between<pointer>(__p)));
+ assert(_iter != _S_mem_blocks.end());
+
+ __diff = _iter - _S_mem_blocks.begin();
+ __displacement = __p - _S_mem_blocks[__diff].first;
+ _S_last_dealloc_index = __diff;
+ }
+
+ //Get the position of the iterator that has been found.
+ const unsigned int __rotate = __displacement % _Bits_Per_Block;
+ unsigned int *__bit_mapC = reinterpret_cast<unsigned int*>(_S_mem_blocks[__diff].first) - 1;
+ __bit_mapC -= (__displacement / _Bits_Per_Block);
+
+ _S_bit_free(__bit_mapC, __rotate);
+ unsigned int *__puse_count = reinterpret_cast<unsigned int*>
+ (_S_mem_blocks[__diff].first) -
+ (__gnu_cxx::__aux_balloc::__balloc_num_bit_maps(_S_mem_blocks[__diff]) + 1);
+
+ assert(*__puse_count != 0);
+
+ --(*__puse_count);
+
+ if (__builtin_expect(*__puse_count == 0, false))
+ {
+ _S_block_size /= 2;
+
+ //We may safely remove this block.
+ _Block_pair __bp = _S_mem_blocks[__diff];
+ _S_insert_free_list(__puse_count);
+ _S_mem_blocks.erase(_S_mem_blocks.begin() + __diff);
+
+ //We reset the _S_last_request variable to reflect the erased
+ //block. We do this to protect future requests after the last
+ //block has been removed from a particular memory Chunk,
+ //which in turn has been returned to the free list, and
+ //hence had been erased from the vector, so the size of the
+ //vector gets reduced by 1.
+ if ((_Difference_type)_S_last_request._M_where() >= __diff--)
+ {
+ _S_last_request._M_reset(__diff);
+ // assert(__diff >= 0);
+ }
+
+ //If the Index into the vector of the region of memory that
+ //might hold the next address that will be passed to
+ //deallocated may have been invalidated due to the above
+ //erase procedure being called on the vector, hence we try
+ //to restore this invariant too.
+ if (_S_last_dealloc_index >= _S_mem_blocks.size())
+ {
+ _S_last_dealloc_index =(__diff != -1 ? __diff : 0);
+ assert(_S_last_dealloc_index >= 0);
+ }
+ }
+ }
+
+ public:
+ bitmap_allocator() throw()
+ { }
+
+ bitmap_allocator(const bitmap_allocator&) { }
+
+ template <typename _Tp1> bitmap_allocator(const bitmap_allocator<_Tp1>&) throw()
+ { }
+
+ ~bitmap_allocator() throw()
+ { }
+
+ //Complexity: O(1), but internally the complexity depends upon the
+ //complexity of the function(s) _S_allocate_single_object and
+ //_S_memory_get.
+ pointer allocate(size_type __n)
+ {
+ if (__builtin_expect(__n == 1, true))
+ return _S_allocate_single_object();
+ else
+ return reinterpret_cast<pointer>(_S_memory_get(__n * sizeof(value_type)));
+ }
+
+ //Complexity: Worst case complexity is O(N) where N is the number of
+ //blocks of size sizeof(value_type) within the free lists that the
+ //allocator holds. However, this worst case is hit only when the
+ //user supplies a bogus argument to hint. If the hint argument is
+ //sensible, then the complexity drops to O(lg(N)), and in extreme
+ //cases, even drops to as low as O(1). So, if the user supplied
+ //argument is good, then this function performs very well.
+ pointer allocate(size_type __n, typename bitmap_allocator<void>::const_pointer)
+ {
+ return allocate(__n);
+ }
+
+ void deallocate(pointer __p, size_type __n) throw()
+ {
+ if (__builtin_expect(__n == 1, true))
+ _S_deallocate_single_object(__p);
+ else
+ _S_memory_put(__p);
+ }
+
+ pointer address(reference r) const { return &r; }
+ const_pointer address(const_reference r) const { return &r; }
+
+ size_type max_size(void) const throw() { return (size_type()-1)/sizeof(value_type); }
+
+ void construct (pointer p, const_reference __data)
+ {
+ ::new(p) value_type(__data);
+ }
+
+ void destroy (pointer p)
+ {
+ p->~value_type();
+ }
+
+ };
+
+ template <typename _Tp>
+ typename bitmap_allocator<_Tp>::_BPVector bitmap_allocator<_Tp>::_S_mem_blocks;
+
+ template <typename _Tp>
+ unsigned int bitmap_allocator<_Tp>::_S_block_size = bitmap_allocator<_Tp>::_Bits_Per_Block;
+
+ template <typename _Tp>
+ typename __gnu_cxx::bitmap_allocator<_Tp>::_BPVector::size_type
+ bitmap_allocator<_Tp>::_S_last_dealloc_index = 0;
+
+ template <typename _Tp>
+ __gnu_cxx::__aux_balloc::_Bit_map_counter
+ <typename bitmap_allocator<_Tp>::pointer, typename bitmap_allocator<_Tp>::_BPVec_allocator_type>
+ bitmap_allocator<_Tp>::_S_last_request(_S_mem_blocks);
+
+#if defined __GTHREADS
+ template <typename _Tp>
+ __gnu_cxx::_Mutex
+ bitmap_allocator<_Tp>::_S_mut;
+#endif
+
+ template <typename _Tp1, typename _Tp2>
+ bool operator== (const bitmap_allocator<_Tp1>&, const bitmap_allocator<_Tp2>&) throw()
+ {
+ return true;
+ }
+
+ template <typename _Tp1, typename _Tp2>
+ bool operator!= (const bitmap_allocator<_Tp1>&, const bitmap_allocator<_Tp2>&) throw()
+ {
+ return false;
+ }
+}
+
+
+#endif //_BITMAP_ALLOCATOR_H
diff --git a/contrib/libstdc++/include/ext/debug_allocator.h b/contrib/libstdc++/include/ext/debug_allocator.h
new file mode 100644
index 0000000..7ea6fb4
--- /dev/null
+++ b/contrib/libstdc++/include/ext/debug_allocator.h
@@ -0,0 +1,121 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/debug_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * You should only include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _DEBUG_ALLOCATOR_H
+#define _DEBUG_ALLOCATOR_H 1
+
+#include <cstdlib>
+
+namespace __gnu_cxx
+{
+ /**
+ * @brief A meta-allocator with debugging bits, as per [20.4].
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls operator new
+ * - all deallocation calls operator delete
+ *
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Alloc>
+ class debug_allocator
+ {
+ public:
+ typedef typename _Alloc::size_type size_type;
+ typedef typename _Alloc::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Alloc::value_type value_type;
+
+ private:
+ // _M_extra is the number of objects that correspond to the
+ // extra space where debug information is stored.
+ size_type _M_extra;
+
+ _Alloc _M_allocator;
+
+ public:
+ debug_allocator()
+ {
+ const size_t __obj_size = sizeof(value_type);
+ _M_extra = (sizeof(size_type) + __obj_size - 1) / __obj_size;
+ }
+
+ pointer
+ allocate(size_type __n)
+ {
+ pointer __res = _M_allocator.allocate(__n + _M_extra);
+ size_type* __ps = reinterpret_cast<size_type*>(__res);
+ *__ps = __n;
+ return __res + _M_extra;
+ }
+
+ pointer
+ allocate(size_type __n, const void* __hint)
+ {
+ pointer __res = _M_allocator.allocate(__n + _M_extra, __hint);
+ size_type* __ps = reinterpret_cast<size_type*>(__res);
+ *__ps = __n;
+ return __res + _M_extra;
+ }
+
+ void
+ deallocate(pointer __p, size_type __n)
+ {
+ if (!__p)
+ abort();
+ pointer __real_p = __p - _M_extra;
+ if (*reinterpret_cast<size_type*>(__real_p) != __n)
+ abort();
+ _M_allocator.deallocate(__real_p, __n + _M_extra);
+ }
+ };
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/demangle.h b/contrib/libstdc++/include/ext/demangle.h
new file mode 100644
index 0000000..5de4f04
--- /dev/null
+++ b/contrib/libstdc++/include/ext/demangle.h
@@ -0,0 +1,2789 @@
+// C++ IA64 / g++ v3 demangler -*- C++ -*-
+
+// Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+// Written by Carlo Wood <carlo@alinoe.com>
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+// This file implements demangling of "C++ ABI for Itanium"-mangled symbol
+// and type names as described in Revision 1.73 of the C++ ABI as can be found
+// at http://www.codesourcery.com/cxx-abi/abi.html#mangling
+
+#ifndef _DEMANGLER_H
+#define _DEMANGLER_H 1
+
+#include <vector>
+#include <string>
+#include <ext/new_allocator.h>
+
+#ifndef _GLIBCXX_DEMANGLER_DEBUG
+#define _GLIBCXX_DEMANGLER_CWDEBUG 0
+#define _GLIBCXX_DEMANGLER_DEBUG(x)
+#define _GLIBCXX_DEMANGLER_DOUT(cntrl, data)
+#define _GLIBCXX_DEMANGLER_DOUT_ENTERING(x)
+#define _GLIBCXX_DEMANGLER_DOUT_ENTERING2(x)
+#define _GLIBCXX_DEMANGLER_DOUT_ENTERING3(x)
+#define _GLIBCXX_DEMANGLER_RETURN return M_result
+#define _GLIBCXX_DEMANGLER_RETURN2 return M_result
+#define _GLIBCXX_DEMANGLER_RETURN3
+#define _GLIBCXX_DEMANGLER_FAILURE \
+ do { M_result = false; return false; } while(0)
+#else
+#define _GLIBCXX_DEMANGLER_CWDEBUG 1
+#endif
+
+namespace __gnu_cxx
+{
+ namespace demangler
+ {
+ enum substitution_nt
+ {
+ type,
+ template_template_param,
+ nested_name_prefix,
+ nested_name_template_prefix,
+ unscoped_template_name
+ };
+
+ struct substitution_st
+ {
+ int M_start_pos;
+ substitution_nt M_type;
+ int M_number_of_prefixes;
+
+ substitution_st(int start_pos,
+ substitution_nt type,
+ int number_of_prefixes)
+ : M_start_pos(start_pos), M_type(type),
+ M_number_of_prefixes(number_of_prefixes)
+ { }
+ };
+
+ enum simple_qualifier_nt
+ {
+ complex_or_imaginary = 'G',
+ pointer = 'P',
+ reference = 'R'
+ };
+
+ enum cv_qualifier_nt
+ {
+ cv_qualifier = 'K'
+ };
+
+ enum param_qualifier_nt
+ {
+ vendor_extension = 'U',
+ array = 'A',
+ pointer_to_member = 'M'
+ };
+
+ template<typename Tp, typename Allocator = __gnu_cxx::new_allocator<Tp> >
+ class qualifier;
+
+ template<typename Tp, typename Allocator = __gnu_cxx::new_allocator<Tp> >
+ class qualifier_list;
+
+ template<typename Tp, typename Allocator = __gnu_cxx::new_allocator<Tp> >
+ class session;
+
+ template<typename Tp, typename Allocator>
+ class qualifier
+ {
+ typedef typename Allocator::template rebind<char>::other
+ char_Allocator;
+ typedef std::basic_string<char, std::char_traits<char>, char_Allocator>
+ string_type;
+
+ private:
+ char M_qualifier1;
+ char M_qualifier2;
+ char M_qualifier3;
+ mutable unsigned char M_cnt;
+ string_type M_optional_type;
+ int M_start_pos;
+ bool M_part_of_substitution;
+
+ public:
+ qualifier(int start_pos,
+ simple_qualifier_nt simple_qualifier,
+ int inside_substitution)
+ : M_qualifier1(simple_qualifier),
+ M_start_pos(start_pos),
+ M_part_of_substitution(inside_substitution)
+ { }
+
+ qualifier(int start_pos,
+ cv_qualifier_nt,
+ char const* start,
+ int count,
+ int inside_substitution)
+ : M_qualifier1(start[0]),
+ M_qualifier2((count > 1) ? start[1] : '\0'),
+ M_qualifier3((count > 2) ? start[2] : '\0'),
+ M_start_pos(start_pos),
+ M_part_of_substitution(inside_substitution)
+ { }
+
+ qualifier(int start_pos,
+ param_qualifier_nt param_qualifier,
+ string_type optional_type,
+ int inside_substitution)
+ : M_qualifier1(param_qualifier),
+ M_optional_type(optional_type),
+ M_start_pos(start_pos),
+ M_part_of_substitution(inside_substitution)
+ { }
+
+ int
+ get_start_pos(void) const
+ { return M_start_pos; }
+
+ char
+ first_qualifier(void) const
+ { M_cnt = 1; return M_qualifier1; }
+
+ char
+ next_qualifier(void) const
+ {
+ return (++M_cnt == 2) ? M_qualifier2
+ : ((M_cnt == 3) ? M_qualifier3 : 0);
+ }
+
+ string_type const&
+ get_optional_type(void) const
+ { return M_optional_type; }
+
+ bool
+ part_of_substitution(void) const
+ { return M_part_of_substitution; }
+
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ friend std::ostream& operator<<(std::ostream& os, qualifier const& qual)
+ {
+ os << (char)qual.M_qualifier1;
+ if (qual.M_qualifier1 == vendor_extension ||
+ qual.M_qualifier1 == array ||
+ qual.M_qualifier1 == pointer_to_member)
+ os << " [" << qual.M_optional_type << ']';
+ else if (qual.M_qualifier1 == 'K' ||
+ qual.M_qualifier1 == 'V' ||
+ qual.M_qualifier1 == 'r')
+ {
+ if (qual.M_qualifier2)
+ {
+ os << (char)qual.M_qualifier2;
+ if (qual.M_qualifier3)
+ os << (char)qual.M_qualifier3;
+ }
+ }
+ return os;
+ }
+#endif
+ };
+
+ template<typename Tp, typename Allocator>
+ class qualifier_list
+ {
+ typedef typename Allocator::template rebind<char>::other
+ char_Allocator;
+ typedef std::basic_string<char, std::char_traits<char>, char_Allocator>
+ string_type;
+
+ private:
+ mutable bool M_printing_suppressed;
+ typedef qualifier<Tp, Allocator> qual;
+ typedef typename Allocator::template rebind<qual>::other qual_Allocator;
+ typedef std::vector<qual, qual_Allocator> qual_vector;
+ qual_vector M_qualifier_starts;
+ session<Tp, Allocator>& M_demangler;
+
+ void decode_KVrA(string_type& prefix, string_type& postfix, int cvq,
+ typename qual_vector::
+ const_reverse_iterator const& iter_array) const;
+
+ public:
+ qualifier_list(session<Tp, Allocator>& demangler_obj)
+ : M_printing_suppressed(false), M_demangler(demangler_obj)
+ { }
+
+ void
+ add_qualifier_start(simple_qualifier_nt simple_qualifier,
+ int start_pos,
+ int inside_substitution)
+ { M_qualifier_starts.
+ push_back(qualifier<Tp, Allocator>(start_pos,
+ simple_qualifier, inside_substitution)); }
+
+ void
+ add_qualifier_start(cv_qualifier_nt cv_qualifier,
+ int start_pos,
+ int count,
+ int inside_substitution)
+ { M_qualifier_starts.
+ push_back(qualifier<Tp, Allocator>(start_pos,
+ cv_qualifier, &M_demangler.M_str[start_pos],
+ count, inside_substitution)); }
+
+ void
+ add_qualifier_start(param_qualifier_nt param_qualifier,
+ int start_pos,
+ string_type optional_type,
+ int inside_substitution)
+ { M_qualifier_starts.
+ push_back(qualifier<Tp, Allocator>(start_pos,
+ param_qualifier, optional_type, inside_substitution)); }
+
+ void
+ decode_qualifiers(string_type& prefix,
+ string_type& postfix,
+ bool member_function_pointer_qualifiers) const;
+
+ bool
+ suppressed(void) const
+ { return M_printing_suppressed; }
+
+ void
+ printing_suppressed(void)
+ { M_printing_suppressed = true; }
+
+ size_t
+ size(void) const
+ { return M_qualifier_starts.size(); }
+
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ friend std::ostream& operator<<(std::ostream& os, qualifier_list const& list)
+ {
+ typename qual_vector::const_iterator
+ iter = list.M_qualifier_starts.begin();
+ if (iter != list.M_qualifier_starts.end())
+ {
+ os << "{ " << *iter;
+ while (++iter != list.M_qualifier_starts.end())
+ os << ", " << *iter;
+ os << " }";
+ }
+ else
+ os << "{ }";
+ return os;
+ }
+#endif
+ };
+
+ struct implementation_details
+ {
+ private:
+ unsigned int M_style;
+
+ public:
+ // The following flags change the behaviour of the demangler. The
+ // default behaviour is that none of these flags is set.
+
+ static unsigned int const style_void = 1;
+ // Default behaviour: int f()
+ // Use (void) instead of (): int f(void)
+
+ static unsigned int const style_literal = 2;
+ // Default behaviour: (long)13,
+ // (unsigned long long)19
+ // Use extensions 'u', 'l' and 'll' for integral
+ // literals (as in template arguments): 13l, 19ull
+
+ static unsigned int const style_literal_int = 4;
+ // Default behaviour: 4
+ // Use also an explicit
+ // cast for int in literals: (int)4
+
+ static unsigned int const style_compact_expr_ops = 8;
+ // Default behaviour: (i) < (3), sizeof (int)
+ // Don't output spaces around
+ // operators in expressions: (i)<(3), sizeof(int)
+
+ static unsigned int const style_sizeof_typename = 16;
+ // Default behaviour: sizeof (X::t)
+ // Put 'typename' infront of <nested-name>
+ // types inside a 'sizeof': sizeof (typename X::t)
+
+ public:
+ implementation_details(unsigned int style_flags = 0) :
+ M_style(style_flags) { }
+ virtual ~implementation_details() { }
+ bool get_style_void(void) const
+ { return (M_style & style_void); }
+ bool get_style_literal(void) const
+ { return (M_style & style_literal); }
+ bool get_style_literal_int(void) const
+ { return (M_style & style_literal_int); }
+ bool get_style_compact_expr_ops(void) const
+ { return (M_style & style_compact_expr_ops); }
+ bool get_style_sizeof_typename(void) const
+ { return (M_style & style_sizeof_typename); }
+ // This can be overridden by user implementations.
+ virtual bool decode_real(char* /* output */, unsigned long* /* input */,
+ size_t /* size_of_real */) const
+ { return false; }
+ };
+
+ template<typename Tp, typename Allocator>
+ class session
+ {
+ public:
+ friend class qualifier_list<Tp, Allocator>;
+ typedef typename Allocator::template rebind<char>::other
+ char_Allocator;
+ typedef std::basic_string<char, std::char_traits<char>, char_Allocator>
+ string_type;
+
+ private:
+ char const* M_str;
+ int M_pos;
+ int M_maxpos;
+ bool M_result;
+ int M_inside_template_args;
+ int M_inside_type;
+ int M_inside_substitution;
+ bool M_saw_destructor;
+ bool M_name_is_cdtor;
+ bool M_name_is_template;
+ bool M_name_is_conversion_operator;
+ bool M_template_args_need_space;
+ string_type M_function_name;
+ typedef typename Allocator::template rebind<int>::other
+ int_Allocator;
+ typedef typename Allocator::template rebind<substitution_st>::other
+ subst_Allocator;
+ std::vector<int, int_Allocator> M_template_arg_pos;
+ int M_template_arg_pos_offset;
+ std::vector<substitution_st, subst_Allocator> M_substitutions_pos;
+ implementation_details const& M_implementation_details;
+ typedef typename Allocator::template
+ rebind<qualifier_list<Allocator> >::other qualifier_list_Allocator;
+ qualifier_list_Allocator M_qualifier_list_alloc;
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ bool M_inside_add_substitution;
+#endif
+
+ public:
+ explicit session(char const* in, int len,
+ implementation_details const& id = implementation_details())
+ : M_str(in), M_pos(0), M_maxpos(len - 1), M_result(true),
+ M_inside_template_args(0), M_inside_type(0),
+ M_inside_substitution(0), M_saw_destructor(false),
+ M_name_is_cdtor(false), M_name_is_template(false),
+ M_name_is_conversion_operator(false),
+ M_template_args_need_space(false), M_template_arg_pos_offset(0),
+ M_implementation_details(id)
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ , M_inside_add_substitution(false)
+#endif
+ { }
+
+ static int
+ decode_encoding(string_type& output, char const* input, int len,
+ implementation_details const& id = implementation_details());
+
+ bool
+ decode_type(string_type& output,
+ qualifier_list<Tp, Allocator>* qualifiers = NULL)
+ {
+ string_type postfix;
+ bool res = decode_type_with_postfix(output, postfix, qualifiers);
+ output += postfix;
+ return res;
+ }
+
+ bool
+ remaining_input_characters(void) const
+ { return current() != 0; }
+
+ private:
+ char
+ current(void) const
+ { return (M_pos > M_maxpos) ? 0 : M_str[M_pos]; }
+
+ char
+ next_peek(void) const
+ { return (M_pos >= M_maxpos) ? 0 : M_str[M_pos + 1]; }
+
+ char
+ next(void)
+ { return (M_pos >= M_maxpos) ? 0 : M_str[++M_pos]; }
+
+ char
+ eat_current(void)
+ { return (M_pos > M_maxpos) ? 0 : M_str[M_pos++]; }
+
+ void
+ store(int& saved_pos)
+ { saved_pos = M_pos; }
+
+ void
+ restore(int saved_pos)
+ { M_pos = saved_pos; M_result = true; }
+
+ void
+ add_substitution(int start_pos,
+ substitution_nt sub_type,
+ int number_of_prefixes);
+
+ bool decode_type_with_postfix(string_type& prefix,
+ string_type& postfix, qualifier_list<Tp, Allocator>* qualifiers = NULL);
+ bool decode_bare_function_type(string_type& output);
+ bool decode_builtin_type(string_type& output);
+ bool decode_call_offset(string_type& output);
+ bool decode_class_enum_type(string_type& output);
+ bool decode_expression(string_type& output);
+ bool decode_literal(string_type& output);
+ bool decode_local_name(string_type& output);
+ bool decode_name(string_type& output,
+ string_type& nested_name_qualifiers);
+ bool decode_nested_name(string_type& output,
+ string_type& qualifiers);
+ bool decode_number(string_type& output);
+ bool decode_operator_name(string_type& output);
+ bool decode_source_name(string_type& output);
+ bool decode_substitution(string_type& output,
+ qualifier_list<Tp, Allocator>* qualifiers = NULL);
+ bool decode_template_args(string_type& output);
+ bool decode_template_param(string_type& output,
+ qualifier_list<Tp, Allocator>* qualifiers = NULL);
+ bool decode_unqualified_name(string_type& output);
+ bool decode_unscoped_name(string_type& output);
+ bool decode_non_negative_decimal_integer(string_type& output);
+ bool decode_special_name(string_type& output);
+ bool decode_real(string_type& output, size_t size_of_real);
+ };
+
+ template<typename Tp, typename Allocator>
+#if !_GLIBCXX_DEMANGLER_CWDEBUG
+ inline
+#endif
+ void
+ session<Tp, Allocator>::add_substitution(int start_pos,
+ substitution_nt sub_type,
+ int number_of_prefixes = 0)
+ {
+ if (!M_inside_substitution)
+ {
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ if (M_inside_add_substitution)
+ return;
+#endif
+ M_substitutions_pos.
+ push_back(substitution_st(start_pos,
+ sub_type, number_of_prefixes));
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ if (!DEBUGCHANNELS::dc::demangler.is_on())
+ return;
+ string_type substitution_name("S");
+ int n = M_substitutions_pos.size() - 1;
+ if (n > 0)
+ substitution_name += (n <= 10) ? (char)(n + '0' - 1)
+ : (char)(n + 'A' - 11);
+ substitution_name += '_';
+ string_type subst;
+ int saved_pos = M_pos;
+ M_pos = start_pos;
+ M_inside_add_substitution = true;
+ _GLIBCXX_DEMANGLER_DEBUG( dc::demangler.off() );
+ switch(sub_type)
+ {
+ case type:
+ decode_type(subst);
+ break;
+ case template_template_param:
+ decode_template_param(subst);
+ break;
+ case nested_name_prefix:
+ case nested_name_template_prefix:
+ for (int cnt = number_of_prefixes; cnt > 0; --cnt)
+ {
+ if (current() == 'I')
+ {
+ subst += ' ';
+ decode_template_args(subst);
+ }
+ else
+ {
+ if (cnt < number_of_prefixes)
+ subst += "::";
+ if (current() == 'S')
+ decode_substitution(subst);
+ else if (current() == 'T')
+ decode_template_param(subst);
+ else
+ decode_unqualified_name(subst);
+ }
+ }
+ break;
+ case unscoped_template_name:
+ decode_unscoped_name(subst);
+ break;
+ }
+ M_pos = saved_pos;
+ _GLIBCXX_DEMANGLER_DEBUG( dc::demangler.on() );
+ _GLIBCXX_DEMANGLER_DOUT(dc::demangler,
+ "Adding substitution " << substitution_name
+ << " : " << subst
+ << " (from " << location_ct((char*)__builtin_return_address(0)
+ + builtin_return_address_offset)
+ << " <- " << location_ct((char*)__builtin_return_address(1)
+ + builtin_return_address_offset)
+ << " <- " << location_ct((char*)__builtin_return_address(2)
+ + builtin_return_address_offset)
+ << ").");
+ M_inside_add_substitution = false;
+#endif
+ }
+ }
+
+ // We don't want to depend on locale (or include <cctype> for that matter).
+ // We also don't want to use "safe-ctype.h" because that headerfile is not
+ // available to the users.
+ inline bool isdigit(char c) { return c >= '0' && c <= '9'; }
+ inline bool islower(char c) { return c >= 'a' && c <= 'z'; }
+ inline bool isupper(char c) { return c >= 'A' && c <= 'Z'; }
+ inline char tolower(char c) { return isupper(c) ? c - 'A' + 'a' : c; }
+
+ //
+ // <non-negative decimal integer> ::= 0
+ // ::= 1|2|3|4|5|6|7|8|9 [<digit>+]
+ // <digit> ::= 0|1|2|3|4|5|6|7|8|9
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::
+ decode_non_negative_decimal_integer(string_type& output)
+ {
+ char c = current();
+ if (c == '0')
+ {
+ output += '0';
+ eat_current();
+ }
+ else if (!isdigit(c))
+ M_result = false;
+ else
+ {
+ do
+ {
+ output += c;
+ }
+ while (isdigit((c = next())));
+ }
+ return M_result;
+ }
+
+ // <number> ::= [n] <non-negative decimal integer>
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_number(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_number");
+ if (current() != 'n')
+ decode_non_negative_decimal_integer(output);
+ else
+ {
+ output += '-';
+ eat_current();
+ decode_non_negative_decimal_integer(output);
+ }
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <builtin-type> ::= v # void
+ // ::= w # wchar_t
+ // ::= b # bool
+ // ::= c # char
+ // ::= a # signed char
+ // ::= h # unsigned char
+ // ::= s # short
+ // ::= t # unsigned short
+ // ::= i # int
+ // ::= j # unsigned int
+ // ::= l # long
+ // ::= m # unsigned long
+ // ::= x # long long, __int64
+ // ::= y # unsigned long long, __int64
+ // ::= n # __int128
+ // ::= o # unsigned __int128
+ // ::= f # float
+ // ::= d # double
+ // ::= e # long double, __float80
+ // ::= g # __float128
+ // ::= z # ellipsis
+ // ::= u <source-name> # vendor extended type
+ //
+ char const* const builtin_type_c[26] =
+ {
+ "signed char", // a
+ "bool", // b
+ "char", // c
+ "double", // d
+ "long double", // e
+ "float", // f
+ "__float128", // g
+ "unsigned char", // h
+ "int", // i
+ "unsigned int", // j
+ NULL, // k
+ "long", // l
+ "unsigned long", // m
+ "__int128", // n
+ "unsigned __int128", // o
+ NULL, // p
+ NULL, // q
+ NULL, // r
+ "short", // s
+ "unsigned short", // t
+ NULL, // u
+ "void", // v
+ "wchar_t", // w
+ "long long", // x
+ "unsigned long long", // y
+ "..." // z
+ };
+
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_builtin_type(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_builtin_type");
+ char const* bt;
+ if (!islower(current()) || !(bt = builtin_type_c[current() - 'a']))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += bt;
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <class-enum-type> ::= <name>
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_class_enum_type(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_class_enum_type");
+ string_type nested_name_qualifiers;
+ if (!decode_name(output, nested_name_qualifiers))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += nested_name_qualifiers;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <substitution> ::=
+ // S <seq-id> _
+ // S_
+ // St # ::std::
+ // Sa # ::std::allocator
+ // Sb # ::std::basic_string
+ // Ss # ::std::basic_string<char, std::char_traits<char>,
+ // std::allocator<char> >
+ // Si # ::std::basic_istream<char, std::char_traits<char> >
+ // So # ::std::basic_ostream<char, std::char_traits<char> >
+ // Sd # ::std::basic_iostream<char, std::char_traits<char> >
+ //
+ // <seq-id> ::=
+ // 0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z
+ // [<seq-id>] # Base 36 number
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_substitution(string_type& output,
+ qualifier_list<Tp, Allocator>* qualifiers)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_substitution");
+ unsigned int value = 0;
+ char c = next();
+ if (c != '_')
+ {
+ switch(c)
+ {
+ case 'a':
+ {
+ output += "std::allocator";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "allocator";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ case 'b':
+ {
+ output += "std::basic_string";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "basic_string";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ case 'd':
+ output += "std::iostream";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "iostream";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'i':
+ output += "std::istream";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "istream";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'o':
+ output += "std::ostream";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "ostream";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 's':
+ output += "std::string";
+ if (!M_inside_template_args)
+ {
+ M_function_name = "string";
+ M_name_is_template = true;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ }
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 't':
+ output += "std";
+ eat_current();
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ _GLIBCXX_DEMANGLER_RETURN;
+ default:
+ for(;; c = next())
+ {
+ if (isdigit(c))
+ value = value * 36 + c - '0';
+ else if (isupper(c))
+ value = value * 36 + c - 'A' + 10;
+ else if (c == '_')
+ break;
+ else
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ ++value;
+ break;
+ }
+ }
+ eat_current();
+ if (value >= M_substitutions_pos.size() ||
+ M_inside_type > 20) // Rather than core dump.
+ _GLIBCXX_DEMANGLER_FAILURE;
+ ++M_inside_substitution;
+ int saved_pos = M_pos;
+ substitution_st& substitution(M_substitutions_pos[value]);
+ M_pos = substitution.M_start_pos;
+ switch(substitution.M_type)
+ {
+ case type:
+ decode_type(output, qualifiers);
+ break;
+ case template_template_param:
+ decode_template_param(output, qualifiers);
+ break;
+ case nested_name_prefix:
+ case nested_name_template_prefix:
+ for (int cnt = substitution.M_number_of_prefixes; cnt > 0; --cnt)
+ {
+ if (current() == 'I')
+ {
+ if (M_template_args_need_space)
+ output += ' ';
+ M_template_args_need_space = false;
+ if (!decode_template_args(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else
+ {
+ if (cnt < substitution.M_number_of_prefixes)
+ output += "::";
+ if (current() == 'S')
+ {
+ if (!decode_substitution(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (!decode_unqualified_name(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ }
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ break;
+ case unscoped_template_name:
+ decode_unscoped_name(output);
+ if (qualifiers)
+ qualifiers->printing_suppressed();
+ break;
+ }
+ M_pos = saved_pos;
+ --M_inside_substitution;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <template-param> ::= T_ # first template parameter
+ // ::= T <parameter-2 non-negative number> _
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_template_param(string_type& output,
+ qualifier_list<Tp, Allocator>* qualifiers)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_template_parameter");
+ if (current() != 'T')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ unsigned int value = 0;
+ char c;
+ if ((c = next()) != '_')
+ {
+ while(isdigit(c))
+ {
+ value = value * 10 + c - '0';
+ c = next();
+ }
+ ++value;
+ }
+ if (eat_current() != '_')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ value += M_template_arg_pos_offset;
+ if (value >= M_template_arg_pos.size())
+ _GLIBCXX_DEMANGLER_FAILURE;
+ int saved_pos = M_pos;
+ M_pos = M_template_arg_pos[value];
+ if (M_inside_type > 20) // Rather than core dump.
+ _GLIBCXX_DEMANGLER_FAILURE;
+ ++M_inside_substitution;
+ if (current() == 'X')
+ {
+ eat_current();
+ decode_expression(output);
+ }
+ else if (current() == 'L')
+ decode_literal(output);
+ else
+ decode_type(output, qualifiers);
+ --M_inside_substitution;
+ M_pos = saved_pos;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_real(string_type& output, size_t size_of_real)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_real");
+
+ unsigned long words[4]; // 32 bit per long, maximum of 128 bits.
+ unsigned long* word = &words[0];
+
+ int saved_pos;
+ store(saved_pos);
+
+ // The following assumes that leading zeroes are also included in the
+ // mangled name, I am not sure that is conforming to the C++-ABI, but
+ // it is what g++ does.
+ unsigned char nibble, c = current();
+ for(size_t word_cnt = size_of_real / 4; word_cnt > 0; --word_cnt)
+ {
+ for (int nibble_cnt = 0; nibble_cnt < 8; ++nibble_cnt)
+ {
+ // Translate character into nibble.
+ if (c < '0' || c > 'f')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (c <= '9')
+ nibble = c - '0';
+ else if (c >= 'a')
+ nibble = c - 'a' + 10;
+ else
+ _GLIBCXX_DEMANGLER_FAILURE;
+ // Write nibble into word array.
+ if (nibble_cnt == 0)
+ *word = nibble << 28;
+ else
+ *word |= (nibble << (28 - 4 * nibble_cnt));
+ c = next();
+ }
+ ++word;
+ }
+ char buf[24];
+ if (M_implementation_details.decode_real(buf, words, size_of_real))
+ {
+ output += buf;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ restore(saved_pos);
+
+ output += '[';
+ c = current();
+ for(size_t nibble_cnt = 0; nibble_cnt < 2 * size_of_real; ++nibble_cnt)
+ {
+ if (c < '0' || c > 'f' || (c > '9' && c < 'a'))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += c;
+ c = next();
+ }
+ output += ']';
+
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_literal(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_literal");
+ eat_current(); // Eat the 'L'.
+ if (current() == '_')
+ {
+ if (next() != 'Z')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ eat_current();
+ if ((M_pos += decode_encoding(output, M_str + M_pos,
+ M_maxpos - M_pos + 1, M_implementation_details)) < 0)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else
+ {
+ // Special cases
+ if (current() == 'b')
+ {
+ if (next() == '0')
+ output += "false";
+ else
+ output += "true";
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ char c = current();
+ if ((c == 'i' || c == 'j' || c == 'l' ||
+ c == 'm' || c == 'x' || c == 'y') &&
+ M_implementation_details.get_style_literal())
+ eat_current();
+ else if (c == 'i' &&
+ !M_implementation_details.get_style_literal_int())
+ eat_current();
+ else
+ {
+ output += '(';
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ')';
+ }
+ if (c >= 'd' && c <= 'g')
+ {
+ size_t size_of_real = (c == 'd') ? sizeof(double) :
+ ((c == 'f') ? sizeof(float) :
+ (c == 'e') ? sizeof(long double) : 16);
+ if (!decode_real(output, size_of_real))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (!decode_number(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (M_implementation_details.get_style_literal())
+ {
+ if (c == 'j' || c == 'm' || c == 'y')
+ output += 'u';
+ if (c == 'l' || c == 'm')
+ output += 'l';
+ if (c == 'x' || c == 'y')
+ output += "ll";
+ }
+ }
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <operator-name> ::=
+ // nw # new
+ // na # new[]
+ // dl # delete
+ // da # delete[]
+ // ps # + (unary)
+ // ng # - (unary)
+ // ad # & (unary)
+ // de # * (unary)
+ // co # ~
+ // pl # +
+ // mi # -
+ // ml # *
+ // dv # /
+ // rm # %
+ // an # &
+ // or # |
+ // eo # ^
+ // aS # =
+ // pL # +=
+ // mI # -=
+ // mL # *=
+ // dV # /=
+ // rM # %=
+ // aN # &=
+ // oR # |=
+ // eO # ^=
+ // ls # <<
+ // rs # >>
+ // lS # <<=
+ // rS # >>=
+ // eq # ==
+ // ne # !=
+ // lt # <
+ // gt # >
+ // le # <=
+ // ge # >=
+ // nt # !
+ // aa # &&
+ // oo # ||
+ // pp # ++
+ // mm # --
+ // cm # ,
+ // pm # ->*
+ // pt # ->
+ // cl # ()
+ // ix # []
+ // qu # ?
+ // st # sizeof (a type)
+ // sz # sizeof (an expression)
+ // cv <type> # (cast)
+ // v <digit> <source-name> # vendor extended operator
+ //
+ // Symbol operator codes exist of two characters, we need to find a
+ // quick hash so that their names can be looked up in a table.
+ //
+ // The puzzle :)
+ // Shift the rows so that there is at most one character per column.
+ //
+ // A perfect solution (Oh no, it's THE MATRIX!):
+ // horizontal
+ // ....................................... offset + 'a'
+ // a, a||d|||||||||n||||s|||||||||||||||||||| 0
+ // c, || |||||||lm o||| |||||||||||||||||||| 0
+ // d, || a|||e|| l|| ||||||v||||||||||||| 4
+ // e, || ||| || || |||o|q ||||||||||||| 8
+ // g, || ||| || || e|| | ||||||||t|||| 15
+ // i, || ||| || || || | |||||||| |||x 15
+ // l, |e ||| || st || | |||||||| ||| -2
+ // m, | |i| lm || | |||||||| ||| -2
+ // n, a e g t| w |||||||| ||| 1
+ // o, | ||||o||r ||| 16
+ // p, | ||lm |p st| 17
+ // q, | u| | | 6
+ // r, m s | | 9
+ // s, t z 12
+ // .......................................
+ // ^ ^__ second character
+ // |___ first character
+ //
+
+ // Putting that solution in tables:
+
+ char const offset_table_c [1 + CHAR_MAX - CHAR_MIN ] =
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+#if (CHAR_MIN < 0)
+ // Add -CHAR_MIN extra zeroes (128):
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ // a b c d e f g h i j k
+ 0, -97, 0, -97, -93, -89, 0, -82, 0, -82, 0, 0,
+ // l m n o p q r s t u v
+ -99, -99, -96, -81, -80, -91, -88, -85, 0, 0, 0,
+#else
+ // a b c d e f g h i j k
+ 0, 159, 0, 159, 163, 167, 0, 174, 0, 174, 0, 0,
+ // l m n o p q r s t u v
+ 157, 157, 160, 175, 176, 165, 168, 171, 0, 0, 0,
+#endif
+ // ... more zeros
+ };
+
+ enum xary_nt {
+ unary,
+ binary,
+ trinary
+ };
+
+ struct entry_st
+ {
+ char const* opcode;
+ char const* symbol_name;
+ xary_nt type;
+ };
+
+ entry_st const symbol_name_table_c[39] = {
+ { "aa", "operator&&", binary },
+ { "na", "operator new[]", unary },
+ { "le", "operator<=", binary },
+ { "ad", "operator&", unary },
+ { "da", "operator delete[]", unary },
+ { "ne", "operator!=", binary },
+ { "mi=", "operator-", binary },
+ { "ng", "operator-", unary },
+ { "de", "operator*", unary },
+ { "ml=", "operator*", binary },
+ { "mm", "operator--", unary },
+ { "cl", "operator()", unary },
+ { "cm", "operator,", binary },
+ { "an=", "operator&", binary },
+ { "co", "operator~", binary },
+ { "dl", "operator delete", unary },
+ { "ls=", "operator<<", binary },
+ { "lt", "operator<", binary },
+ { "as=", "operator", binary },
+ { "ge", "operator>=", binary },
+ { "nt", "operator!", unary },
+ { "rm=", "operator%", binary },
+ { "eo=", "operator^", binary },
+ { "nw", "operator new", unary },
+ { "eq", "operator==", binary },
+ { "dv=", "operator/", binary },
+ { "qu", "operator?", trinary },
+ { "rs=", "operator>>", binary },
+ { "pl=", "operator+", binary },
+ { "pm", "operator->*", binary },
+ { "oo", "operator||", binary },
+ { "st", "sizeof", unary },
+ { "pp", "operator++", unary },
+ { "or=", "operator|", binary },
+ { "gt", "operator>", binary },
+ { "ps", "operator+", unary },
+ { "pt", "operator->", binary },
+ { "sz", "sizeof", unary },
+ { "ix", "operator[]", unary }
+ };
+
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_operator_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_operator_name");
+
+ char opcode0 = current();
+ char opcode1 = tolower(next());
+
+ register char hash;
+ if ((hash = offset_table_c[opcode0 - CHAR_MIN]))
+ {
+ hash += opcode1;
+ if (
+#if (CHAR_MIN < 0)
+ hash >= 0 &&
+#endif
+ hash < 39)
+ {
+ int index = static_cast<int>(static_cast<unsigned char>(hash));
+ entry_st entry = symbol_name_table_c[index];
+ if (entry.opcode[0] == opcode0 && entry.opcode[1] == opcode1
+ && (opcode1 == current() || entry.opcode[2] == '='))
+ {
+ output += entry.symbol_name;
+ if (opcode1 != current())
+ output += '=';
+ eat_current();
+ if (hash == 16 || hash == 17)
+ M_template_args_need_space = true;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (opcode0 == 'c' && opcode1 == 'v') // casting operator
+ {
+ eat_current();
+ output += "operator ";
+ if (current() == 'T')
+ {
+ // This is a templated cast operator.
+ // It must be of the form "cvT_I...E".
+ // Let M_template_arg_pos already point
+ // to the template argument.
+ M_template_arg_pos_offset = M_template_arg_pos.size();
+ M_template_arg_pos.push_back(M_pos + 3);
+ }
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (!M_inside_template_args)
+ M_name_is_conversion_operator = true;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+ }
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+
+ //
+ // <expression> ::= <unary operator-name> <expression>
+ // ::= <binary operator-name> <expression> <expression>
+ // ::= <trinary operator-name> <expression> <expression> <expression>
+ // ::= st <type>
+ // ::= <template-param>
+ // ::= sr <type> <unqualified-name> # dependent name
+ // ::= sr <type> <unqualified-name> <template-args> # dependent template-id
+ // ::= <expr-primary>
+ //
+ // <expr-primary> ::= L <type> <value number> E # integer literal
+ // ::= L <type> <value float> E # floating literal
+ // ::= L <mangled-name> E # external name
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_expression(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_expression");
+ if (current() == 'T')
+ {
+ if (!decode_template_param(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (current() == 'L')
+ {
+ if (!decode_literal(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'E')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (current() == 's')
+ {
+ char opcode1 = next();
+ if (opcode1 == 't' || opcode1 == 'z')
+ {
+ eat_current();
+ if (M_implementation_details.get_style_compact_expr_ops())
+ output += "sizeof(";
+ else
+ output += "sizeof (";
+ if (opcode1 == 't')
+ {
+ // I cannot think of a mangled name that is valid for both cases
+ // when just replacing the 't' by a 'z' or vica versa, which
+ // indicates that there is no ambiguity that dictates the need
+ // for a seperate "st" case, except to be able catch invalid
+ // mangled names. However there CAN be ambiguity in the demangled
+ // name when there are both a type and a symbol of the same name,
+ // which then leads to different encoding (of course) with
+ // sizeof (type) or sizeof (expression) respectively, but that
+ // ambiguity is not per se related to "sizeof" except that that
+ // is the only place where both a type AND an expression are valid
+ // in as part of a (template function) type.
+ //
+ // Example:
+ //
+ // struct B { typedef int t; };
+ // struct A : public B { static int t[2]; };
+ // template<int i, int j> struct C { typedef int q; };
+ // template<int i, typename T>
+ // void f(typename C<sizeof (typename T::t),
+ // sizeof (T::t)>::q) { }
+ // void instantiate() { f<5, A>(0); }
+ //
+ // Leads to _Z1fILi5E1AEvN1CIXstN1T1tEEXszsrS2_1tEE1qE which
+ // demangles as
+ // void f<5, A>(C<sizeof (T::t), sizeof (T::t)>::q)
+ //
+ // This is ambiguity is very unlikely to happen and it is kind
+ // of fuzzy to detect when adding a 'typename' makes sense.
+ //
+ if (M_implementation_details.get_style_sizeof_typename())
+ {
+ // We can only get here inside a template parameter,
+ // so this is syntactically correct if the given type is
+ // a typedef. The only disadvantage is that it is inconsistent
+ // with all other places where the 'typename' keyword should be
+ // used and we don't.
+ // With this, the above example will demangle as
+ // void f<5, A>(C<sizeof (typename T::t), sizeof (T::t)>::q)
+ if (current() == 'N' || // <nested-name>
+ // This should be a safe bet.
+ (current() == 'S' &&
+ next_peek() == 't')) // std::something, guess that
+ // this involves a typedef.
+ output += "typename ";
+ }
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else
+ {
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ output += ')';
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (current() == 'r')
+ {
+ eat_current();
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "::";
+ if (!decode_unqualified_name(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'I' || decode_template_args(output))
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+ else
+ {
+ char opcode0 = current();
+ char opcode1 = tolower(next());
+
+ register char hash;
+ if ((hash = offset_table_c[opcode0 - CHAR_MIN]))
+ {
+ hash += opcode1;
+ if (
+#if (CHAR_MIN < 0)
+ hash >= 0 &&
+#endif
+ hash < 39)
+ {
+ int index = static_cast<int>(static_cast<unsigned char>(hash));
+ entry_st entry = symbol_name_table_c[index];
+ if (entry.opcode[0] == opcode0 && entry.opcode[1] == opcode1
+ && (opcode1 == current() || entry.opcode[2] == '='))
+ {
+ char const* op = entry.symbol_name + 8; // Skip "operator".
+ if (*op == ' ') // operator new and delete.
+ ++op;
+ if (entry.type == unary)
+ output += op;
+ bool is_eq = (opcode1 != current());
+ eat_current();
+ if (index == 34 && M_inside_template_args) // operator>
+ output += '(';
+ output += '(';
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ')';
+ if (entry.type != unary)
+ {
+ if (!M_implementation_details.get_style_compact_expr_ops())
+ output += ' ';
+ output += op;
+ if (is_eq)
+ output += '=';
+ if (!M_implementation_details.get_style_compact_expr_ops())
+ output += ' ';
+ output += '(';
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ')';
+ if (index == 34 && M_inside_template_args)
+ output += ')';
+ if (entry.type == trinary)
+ {
+ if (M_implementation_details.get_style_compact_expr_ops())
+ output += ":(";
+ else
+ output += " : (";
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ')';
+ }
+ }
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (opcode0 == 'c' &&
+ opcode1 == 'v') // casting operator.
+ {
+ eat_current();
+ output += '(';
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ")(";
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += ')';
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+ }
+ }
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+
+ //
+ // <template-args> ::= I <template-arg>+ E
+ // <template-arg> ::= <type> # type or template
+ // ::= L <type> <value number> E # integer literal
+ // ::= L <type> <value float> E # floating literal
+ // ::= L <mangled-name> E # external name
+ // ::= X <expression> E # expression
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_template_args(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_template_args");
+ if (eat_current() != 'I')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ int prev_size = M_template_arg_pos.size();
+ ++M_inside_template_args;
+ if (M_template_args_need_space)
+ {
+ output += ' ';
+ M_template_args_need_space = false;
+ }
+ output += '<';
+ for(;;)
+ {
+ if (M_inside_template_args == 1 && !M_inside_type)
+ M_template_arg_pos.push_back(M_pos);
+ if (current() == 'X')
+ {
+ eat_current();
+ if (!decode_expression(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'E')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ eat_current();
+ }
+ else if (current() == 'L')
+ {
+ if (!decode_literal(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'E')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ eat_current();
+ }
+ else if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() == 'E')
+ break;
+ output += ", ";
+ }
+ eat_current();
+ if (*(output.rbegin()) == '>')
+ output += ' ';
+ output += '>';
+ --M_inside_template_args;
+ if (!M_inside_template_args && !M_inside_type)
+ {
+ M_name_is_template = true;
+ M_template_arg_pos_offset = prev_size;
+ }
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <bare-function-type> ::=
+ // <signature type>+ # Types are parameter types.
+ //
+ // Note that the possible return type of the <bare-function-type>
+ // has already been eaten before we call this function. This makes
+ // our <bare-function-type> slightly different from the one in
+ // the C++-ABI description.
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_bare_function_type(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_bare_function_type");
+ if (M_saw_destructor)
+ {
+ if (eat_current() != 'v' || (current() != 'E' && current() != 0))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "()";
+ M_saw_destructor = false;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ if (current() == 'v' && !M_implementation_details.get_style_void())
+ {
+ eat_current();
+ if (current() != 'E' && current() != 0)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "()";
+ M_saw_destructor = false;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ output += '(';
+ M_template_args_need_space = false;
+ if (!decode_type(output)) // Must have at least one parameter.
+ _GLIBCXX_DEMANGLER_FAILURE;
+ while (current() != 'E' && current() != 0)
+ {
+ output += ", ";
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ output += ')';
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <type> ::=
+ // <builtin-type> # Starts with a lower case character != r.
+ // <function-type> # Starts with F
+ // <class-enum-type> # Starts with N, S, C, D, Z, a digit or a lower
+ // # case character. Since a lower case character
+ // # would be an operator name, that would be an
+ // # error. The S is a substitution or St
+ // # (::std::). A 'C' would be a constructor and
+ // # thus also an error.
+ // <template-param> # Starts with T
+ // <substitution> # Starts with S
+ // <template-template-param> <template-args> # Starts with T or S,
+ // # equivalent with the above.
+ //
+ // <array-type> # Starts with A
+ // <pointer-to-member-type> # Starts with M
+ // <CV-qualifiers> <type> # Starts with r, V or K
+ // P <type> # pointer-to # Starts with P
+ // R <type> # reference-to # Starts with R
+ // C <type> # complex (C 2000) # Starts with C
+ // G <type> # imaginary (C 2000)# Starts with G
+ // U <source-name> <type> # vendor extended type qualifier,
+ // # starts with U
+ //
+ // <template-template-param> ::= <template-param>
+ // ::= <substitution>
+
+ // My own analysis of how to decode qualifiers:
+ //
+ // F is a <function-type>, <T> is a <builtin-type>, <class-enum-type>,
+ // <template-param> or <template-template-param> <template-args>.
+ // <Q> represents a series of qualifiers (not G or C).
+ // <C> is an unqualified type.
+ // <R> is a qualified type.
+ // <B> is the bare-function-type without return type.
+ // <I> is the array index.
+ // Substitutions:
+ // <Q>M<C><Q2>F<R><B>E ==> R (C::*Q)B Q2 "<C>", "F<R><B>E"
+ // (<R> and <B> recursive),
+ // "M<C><Q2>F<R><B>E".
+ // <Q>F<R><B>E ==> R (Q)B "<R>", "<B>" (<B> recursive)
+ // and "F<R><B>E".
+ //
+ // Note that if <R> has postfix qualifiers (an array or function), then
+ // those are added AFTER the (member) function type. For example:
+ // <Q>FPA<R><B>E ==> R (*(Q)B) [], where the PA added the prefix
+ // "(*" and the postfix ") []".
+ //
+ // <Q>G<T> ==> imaginary T Q "<T>", "G<T>" (<T> recursive).
+ // <Q>C<T> ==> complex T Q "<T>", "C<T>" (<T> recursive).
+ // <Q><T> ==> T Q "<T>" (<T> recursive).
+ //
+ // where <Q> is any of:
+ //
+ // <Q>P ==> *Q "P..."
+ // <Q>R ==> &Q "R..."
+ // <Q>[K|V|r]+ ==> [ const| volatile| restrict]+Q "KVr..."
+ // <Q>U<S> ==> SQ "U<S>..."
+ // <Q>M<C> ==> C::*Q "M<C>..." (<C> recurs.)
+ // A<I> ==> [I] "A<I>..." (<I> recurs.)
+ // <Q>A<I> ==> (Q) [I] "A<I>..." (<I> recurs.)
+ // Note that when <Q> ends on an A<I2> then the brackets are omitted
+ // and no space is written between the two:
+ // A<I2>A<I> ==> [I2][I]
+ // If <Q> ends on [KVr]+, which can happen in combination with
+ // substitutions only, then special handling is required, see below.
+ //
+ // A <substitution> is handled with an input position switch during which
+ // new substitutions are turned off. Because recursive handling of types
+ // (and therefore the order in which substitutions must be generated) must
+ // be done left to right, but the generation of Q needs processing right to
+ // left, substitutions per <type> are generated by reading the input left
+ // to right and marking the starts of all substitutions only - implicitly
+ // finishing them at the end of the type. Then the output and real
+ // substitutions are generated.
+ //
+ // The following comment was for the demangling of g++ version 3.0.x. The
+ // mangling (and I believe even the ABI description) have been fixed now
+ // (as of g++ version 3.1).
+ //
+ // g++ 3.0.x only:
+ // The ABI specifies for pointer-to-member function types the format
+ // <Q>M<T>F<R><B>E. In other words, the qualifier <Q2> (see above) is
+ // implicitely contained in <T> instead of explicitly part of the M format.
+ // I am convinced that this is a bug in the ABI. Unfortunately, this is
+ // how we have to demangle things as it has a direct impact on the order
+ // in which substitutions are stored. This ill-formed design results in
+ // rather ill-formed demangler code too however :/
+ //
+ // <Q2> is now explicitely part of the M format.
+ // For some weird reason, g++ (3.2.1) does not add substitutions for
+ // qualified member function pointers. I think that is another bug.
+ //
+
+ // In the case of
+ // <Q>A<I>
+ // where <Q> ends on [K|V|r]+ then that part should be processed as
+ // if it was behind the A<I> instead of in front of it. This is
+ // because a constant array of ints is normally always mangled as
+ // an array of constant ints. KVr qualifiers can end up in front
+ // of an array when the array is part of a substitution or template
+ // parameter, but the demangling should still result in the same
+ // syntax; thus KA2_i (const array of ints) must result in the same
+ // demangling as A2_Ki (array of const ints). As a result we must
+ // demangle ...[...[[KVr]+A<I0>][KVr]+A<I1>]...[KVr]+A<In>[KVr]+
+ // as A<I0>A<I1>...A<In>[KVr]+ where each K, V and r in the series
+ // collapses to a single character at the right of the string.
+ // For example:
+ // VA9_KrA6_KVi --> A9_A6_KVri --> int volatile const restrict [9][6]
+ // Note that substitutions are still added as usual (the translation
+ // to A9_A6_KVri does not really happen).
+ //
+ // This decoding is achieved by delaying the decoding of any sequence
+ // of [KVrA]'s and processing them together in the order: first the
+ // short-circuited KVr part and then the arrays.
+ static int const cvq_K = 1; // Saw at least one K
+ static int const cvq_V = 2; // Saw at least one V
+ static int const cvq_r = 4; // Saw at least one r
+ static int const cvq_A = 8; // Saw at least one A
+ static int const cvq_last = 16; // No remaining qualifiers.
+ static int const cvq_A_cnt = 32; // Bit 5 and higher represent the
+ // number of A's in the series.
+ // In the function below, iter_array points to the first (right most)
+ // A in the series, if any.
+ template<typename Tp, typename Allocator>
+ void
+ qualifier_list<Tp, Allocator>::decode_KVrA(
+ string_type& prefix, string_type& postfix, int cvq,
+ typename qual_vector::const_reverse_iterator const& iter_array) const
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING3("decode_KVrA");
+ if ((cvq & cvq_K))
+ prefix += " const";
+ if ((cvq & cvq_V))
+ prefix += " volatile";
+ if ((cvq & cvq_r))
+ prefix += " restrict";
+ if ((cvq & cvq_A))
+ {
+ int n = cvq >> 5;
+ for (typename qual_vector::
+ const_reverse_iterator iter = iter_array;
+ iter != M_qualifier_starts.rend(); ++iter)
+ {
+ switch((*iter).first_qualifier())
+ {
+ case 'K':
+ case 'V':
+ case 'r':
+ break;
+ case 'A':
+ {
+ string_type index = (*iter).get_optional_type();
+ if (--n == 0 && (cvq & cvq_last))
+ postfix = " [" + index + "]" + postfix;
+ else if (n > 0)
+ postfix = "[" + index + "]" + postfix;
+ else
+ {
+ prefix += " (";
+ postfix = ") [" + index + "]" + postfix;
+ }
+ break;
+ }
+ default:
+ _GLIBCXX_DEMANGLER_RETURN3;
+ }
+ }
+ }
+ _GLIBCXX_DEMANGLER_RETURN3;
+ }
+
+ template<typename Tp, typename Allocator>
+ void
+ qualifier_list<Tp, Allocator>::decode_qualifiers(
+ string_type& prefix,
+ string_type& postfix,
+ bool member_function_pointer_qualifiers = false) const
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING3("decode_qualifiers");
+ int cvq = 0;
+ typename qual_vector::const_reverse_iterator iter_array;
+ for(typename qual_vector::
+ const_reverse_iterator iter = M_qualifier_starts.rbegin();
+ iter != M_qualifier_starts.rend(); ++iter)
+ {
+ if (!member_function_pointer_qualifiers
+ && !(*iter).part_of_substitution())
+ {
+ int saved_inside_substitution = M_demangler.M_inside_substitution;
+ M_demangler.M_inside_substitution = 0;
+ M_demangler.add_substitution((*iter).get_start_pos(), type);
+ M_demangler.M_inside_substitution = saved_inside_substitution;
+ }
+ char qualifier_char = (*iter).first_qualifier();
+ for(; qualifier_char; qualifier_char = (*iter).next_qualifier())
+ {
+ switch(qualifier_char)
+ {
+ case 'P':
+ if (cvq)
+ {
+ decode_KVrA(prefix, postfix, cvq, iter_array);
+ cvq = 0;
+ }
+ prefix += "*";
+ break;
+ case 'R':
+ if (cvq)
+ {
+ decode_KVrA(prefix, postfix, cvq, iter_array);
+ cvq = 0;
+ }
+ prefix += "&";
+ break;
+ case 'K':
+ cvq |= cvq_K;
+ continue;
+ case 'V':
+ cvq |= cvq_V;
+ continue;
+ case 'r':
+ cvq |= cvq_r;
+ continue;
+ case 'A':
+ if (!(cvq & cvq_A))
+ {
+ cvq |= cvq_A;
+ iter_array = iter;
+ }
+ cvq += cvq_A_cnt;
+ break;
+ case 'M':
+ if (cvq)
+ {
+ decode_KVrA(prefix, postfix, cvq, iter_array);
+ cvq = 0;
+ }
+ prefix += " ";
+ prefix += (*iter).get_optional_type();
+ prefix += "::*";
+ break;
+ case 'U':
+ if (cvq)
+ {
+ decode_KVrA(prefix, postfix, cvq, iter_array);
+ cvq = 0;
+ }
+ prefix += " ";
+ prefix += (*iter).get_optional_type();
+ break;
+ case 'G': // Only here so we added a substitution.
+ break;
+ }
+ break;
+ }
+ }
+ if (cvq)
+ decode_KVrA(prefix, postfix, cvq|cvq_last, iter_array);
+ M_printing_suppressed = false;
+ _GLIBCXX_DEMANGLER_RETURN3;
+ }
+
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_type_with_postfix(
+ string_type& prefix, string_type& postfix,
+ qualifier_list<Tp, Allocator>* qualifiers)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING2("decode_type");
+ ++M_inside_type;
+ bool recursive_template_param_or_substitution_call;
+ if (!(recursive_template_param_or_substitution_call = qualifiers))
+ {
+ qualifier_list<Allocator>* raw_qualifiers = M_qualifier_list_alloc.allocate(1);
+ qualifiers = new (raw_qualifiers) qualifier_list<Allocator>(*this);
+ }
+ // First eat all qualifiers.
+ bool failure = false;
+ for(;;) // So we can use 'continue' to eat the next qualifier.
+ {
+ int start_pos = M_pos;
+ switch(current())
+ {
+ case 'P':
+ qualifiers->add_qualifier_start(pointer, start_pos,
+ M_inside_substitution);
+ eat_current();
+ continue;
+ case 'R':
+ qualifiers->add_qualifier_start(reference, start_pos,
+ M_inside_substitution);
+ eat_current();
+ continue;
+ case 'K':
+ case 'V':
+ case 'r':
+ {
+ char c;
+ int count = 0;
+ do
+ {
+ ++count;
+ c = next();
+ }
+ while(c == 'K' || c == 'V' || c == 'r');
+ qualifiers->add_qualifier_start(cv_qualifier, start_pos, count,
+ M_inside_substitution);
+ continue;
+ }
+ case 'U':
+ {
+ eat_current();
+ string_type source_name;
+ if (!decode_source_name(source_name))
+ {
+ failure = true;
+ break;
+ }
+ qualifiers->add_qualifier_start(vendor_extension, start_pos,
+ source_name, M_inside_substitution);
+ continue;
+ }
+ case 'A':
+ {
+ // <array-type> ::= A <positive dimension number> _ <element type>
+ // ::= A [<dimension expression>] _ <element type>
+ //
+ string_type index;
+ int saved_pos;
+ store(saved_pos);
+ if (next() == 'n' || !decode_number(index))
+ {
+ restore(saved_pos);
+ if (next() != '_' && !decode_expression(index))
+ {
+ failure = true;
+ break;
+ }
+ }
+ if (eat_current() != '_')
+ {
+ failure = true;
+ break;
+ }
+ qualifiers->add_qualifier_start(array, start_pos, index,
+ M_inside_substitution);
+ continue;
+ }
+ case 'M':
+ {
+ // <pointer-to-member-type> ::= M <class type> <member type>
+ // <Q>M<C> or <Q>M<C><Q2>F<R><B>E
+ eat_current();
+ string_type class_type;
+ if (!decode_type(class_type)) // Substitution: "<C>".
+ {
+ failure = true;
+ break;
+ }
+ char c = current();
+ if (c == 'F' || c == 'K' || c == 'V' || c == 'r')
+ // Must be CV-qualifiers and a member function pointer.
+ {
+ // <Q>M<C><Q2>F<R><B>E ==> R (C::*Q)B Q2
+ // substitutions: "<C>", "F<R><B>E" (<R> and <B>
+ // recursive), "M<C><Q2>F<R><B>E".
+ int count = 0;
+ int Q2_start_pos = M_pos;
+ while(c == 'K' || c == 'V' || c == 'r') // Decode <Q2>.
+ {
+ ++count;
+ c = next();
+ }
+ qualifier_list<Tp, Allocator> class_type_qualifiers(*this);
+ if (count)
+ class_type_qualifiers.
+ add_qualifier_start(cv_qualifier, Q2_start_pos,
+ count, M_inside_substitution);
+ string_type member_function_qualifiers;
+ // It is unclear why g++ doesn't add a substitution for
+ // "<Q2>F<R><B>E" as it should I think.
+ string_type member_function_qualifiers_postfix;
+ class_type_qualifiers.
+ decode_qualifiers(member_function_qualifiers,
+ member_function_qualifiers_postfix, true);
+ member_function_qualifiers +=
+ member_function_qualifiers_postfix;
+ // I don't think this substitution is actually ever used.
+ int function_pos = M_pos;
+ if (eat_current() != 'F')
+ {
+ failure = true;
+ break;
+ }
+ // Return type.
+ // Constructors, destructors and conversion operators don't
+ // have a return type, but seem to never get here.
+ string_type return_type_postfix;
+ if (!decode_type_with_postfix(prefix, return_type_postfix))
+ // substitution: <R> recursive
+ {
+ failure = true;
+ break;
+ }
+ prefix += " (";
+ prefix += class_type;
+ prefix += "::*";
+ string_type bare_function_type;
+ if (!decode_bare_function_type(bare_function_type)
+ || eat_current() != 'E') // Substitution: <B> recursive.
+ {
+ failure = true;
+ break;
+ }
+ // substitution: "F<R><B>E".
+ add_substitution(function_pos, type);
+ // substitution: "M<C><Q2>F<R><B>E".
+ add_substitution(start_pos, type);
+ // substitution: all qualified types if any.
+ qualifiers->decode_qualifiers(prefix, postfix);
+ postfix += ")";
+ postfix += bare_function_type;
+ postfix += member_function_qualifiers;
+ postfix += return_type_postfix;
+ goto decode_type_exit;
+ }
+ qualifiers->add_qualifier_start(pointer_to_member, start_pos,
+ class_type, M_inside_substitution);
+ continue;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ if (!failure)
+ {
+ // <Q>G<T> ==> imaginary T Q
+ // substitutions: "<T>", "G<T>" (<T> recursive).
+ // <Q>C<T> ==> complex T Q
+ // substitutions: "<T>", "C<T>" (<T> recursive).
+ if (current() == 'C' || current() == 'G')
+ {
+ prefix += current() == 'C' ? "complex " : "imaginary ";
+ qualifiers->add_qualifier_start(complex_or_imaginary, M_pos,
+ M_inside_substitution);
+ eat_current();
+ }
+ int start_pos = M_pos;
+ switch(current())
+ {
+ case 'F':
+ {
+ // <function-type> ::= F [Y] <bare-function-type> E
+ //
+ // Note that g++ never generates the 'Y', but we try to
+ // demangle it anyway.
+ bool extern_C = (next() == 'Y');
+ if (extern_C)
+ eat_current();
+
+ // <Q>F<R><B>E ==> R (Q)B
+ // substitution: "<R>", "<B>" (<B> recursive) and "F<R><B>E".
+
+ // Return type.
+ string_type return_type_postfix;
+ if (!decode_type_with_postfix(prefix, return_type_postfix))
+ // Substitution: "<R>".
+ {
+ failure = true;
+ break;
+ }
+ // Only array and function (pointer) types have a postfix.
+ // In that case we don't want the space but expect something
+ // like prefix is "int (*" and postfix is ") [1]".
+ // We do want the space if this pointer is qualified.
+ if (return_type_postfix.size() == 0 ||
+ (prefix.size() > 0 && *prefix.rbegin() != '*'))
+ prefix += ' ';
+ prefix += '(';
+ string_type bare_function_type;
+ if (!decode_bare_function_type(bare_function_type)
+ // substitution: "<B>" (<B> recursive).
+ || eat_current() != 'E')
+ {
+ failure = true;
+ break;
+ }
+ add_substitution(start_pos, type); // Substitution: "F<R><B>E".
+ qualifiers->decode_qualifiers(prefix, postfix);
+ // substitution: all qualified types, if any.
+ postfix += ")";
+ if (extern_C)
+ postfix += " [extern \"C\"] ";
+ postfix += bare_function_type;
+ postfix += return_type_postfix;
+ break;
+ }
+ case 'T':
+ if (!decode_template_param(prefix, qualifiers))
+ {
+ failure = true;
+ break;
+ }
+ if (current() == 'I')
+ {
+ add_substitution(start_pos, template_template_param);
+ // substitution: "<template-template-param>".
+ if (!decode_template_args(prefix))
+ {
+ failure = true;
+ break;
+ }
+ }
+ if (!recursive_template_param_or_substitution_call
+ && qualifiers->suppressed())
+ {
+ add_substitution(start_pos, type);
+ // substitution: "<template-param>" or
+ // "<template-template-param> <template-args>".
+ qualifiers->decode_qualifiers(prefix, postfix);
+ // substitution: all qualified types, if any.
+ }
+ break;
+ case 'S':
+ if (M_pos >= M_maxpos)
+ {
+ failure = true;
+ break;
+ }
+ if (M_str[M_pos + 1] != 't')
+ {
+ if (!decode_substitution(prefix, qualifiers))
+ {
+ failure = true;
+ break;
+ }
+ if (current() == 'I')
+ {
+ if (!decode_template_args(prefix))
+ {
+ failure = true;
+ break;
+ }
+ if (!recursive_template_param_or_substitution_call
+ && qualifiers->suppressed())
+ add_substitution(start_pos, type);
+ // Substitution:
+ // "<template-template-param> <template-args>".
+ }
+ if (!recursive_template_param_or_substitution_call
+ && qualifiers->suppressed())
+ qualifiers->decode_qualifiers(prefix, postfix);
+ // Substitution: all qualified types, if any.
+ break;
+ }
+ /* Fall-through for St */
+ case 'N':
+ case 'Z':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ // <Q><T> ==> T Q
+ // substitutions: "<T>" (<T> recursive).
+ if (!decode_class_enum_type(prefix))
+ {
+ failure = true;
+ break;
+ }
+ if (!recursive_template_param_or_substitution_call)
+ {
+ add_substitution(start_pos, type);
+ // substitution: "<class-enum-type>".
+ qualifiers->decode_qualifiers(prefix, postfix);
+ // substitution: all qualified types, if any.
+ }
+ else
+ qualifiers->printing_suppressed();
+ break;
+ default:
+ // <Q><T> ==> T Q
+ // substitutions: "<T>" (<T> recursive).
+ if (!decode_builtin_type(prefix))
+ {
+ failure = true;
+ break;
+ }
+ // If decode_type was called from decode_template_param then we
+ // need to suppress calling qualifiers here in order to get a
+ // substitution added anyway (for the <template-param>).
+ if (!recursive_template_param_or_substitution_call)
+ qualifiers->decode_qualifiers(prefix, postfix);
+ else
+ qualifiers->printing_suppressed();
+ break;
+ }
+ }
+ decode_type_exit:
+ --M_inside_type;
+ if (!recursive_template_param_or_substitution_call)
+ {
+ qualifiers->~qualifier_list<Allocator>();
+ M_qualifier_list_alloc.deallocate(qualifiers, 1);
+ }
+ if (failure)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN2;
+ }
+
+ // <nested-name> ::= N [<CV-qualifiers>] <prefix> <unqualified-name> E
+ // ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
+ //
+ // <prefix> ::= <prefix> <unqualified-name>
+ // ::= <template-prefix> <template-args>
+ // ::= <template-param>
+ // ::= # empty
+ // ::= <substitution>
+ //
+ // <template-prefix> ::= <prefix> <template unqualified-name>
+ // ::= <template-param>
+ // ::= <substitution>
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_nested_name(string_type& output,
+ string_type& qualifiers)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_nested_name");
+
+ if (current() != 'N' || M_pos >= M_maxpos)
+ _GLIBCXX_DEMANGLER_FAILURE;
+
+ // <CV-qualifiers> ::= [r] [V] [K] # restrict (C99), volatile, const
+ char const* qualifiers_start = &M_str[M_pos + 1];
+ for (char c = next(); c == 'K' || c == 'V' || c == 'r'; c = next());
+ for (char const* qualifier_ptr = &M_str[M_pos - 1];
+ qualifier_ptr >= qualifiers_start; --qualifier_ptr)
+ switch(*qualifier_ptr)
+ {
+ case 'K':
+ qualifiers += " const";
+ break;
+ case 'V':
+ qualifiers += " volatile";
+ break;
+ case 'r':
+ qualifiers += " restrict";
+ break;
+ }
+
+ int number_of_prefixes = 0;
+ int substitution_start = M_pos;
+ for(;;)
+ {
+ ++number_of_prefixes;
+ if (current() == 'S')
+ {
+ if (!decode_substitution(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (current() == 'I')
+ {
+ if (!decode_template_args(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'E')
+ {
+ // substitution: "<template-prefix> <template-args>".
+ add_substitution(substitution_start, nested_name_prefix,
+ number_of_prefixes);
+ }
+ }
+ else
+ {
+ if (current() == 'T')
+ {
+ if (!decode_template_param(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (!decode_unqualified_name(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() != 'E')
+ {
+ // substitution: "<prefix> <unqualified-name>" or
+ // "<prefix> <template unqualified-name>".
+ add_substitution(substitution_start,
+ (current() == 'I') ? nested_name_template_prefix
+ : nested_name_prefix,
+ number_of_prefixes);
+ }
+ }
+ if (current() == 'E')
+ {
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ if (current() != 'I')
+ output += "::";
+ else if (M_template_args_need_space)
+ output += ' ';
+ M_template_args_need_space = false;
+ }
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+
+ // <local-name> := Z <function encoding> E <entity name> [<discriminator>]
+ // := Z <function encoding> E s [<discriminator>]
+ // <discriminator> := _ <non-negative number>
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_local_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_local_name");
+ if (current() != 'Z' || M_pos >= M_maxpos)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if ((M_pos += decode_encoding(output, M_str + M_pos + 1,
+ M_maxpos - M_pos, M_implementation_details) + 1) < 0 ||
+ eat_current() != 'E')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "::";
+ if (current() == 's')
+ {
+ eat_current();
+ output += "string literal";
+ }
+ else
+ {
+ string_type nested_name_qualifiers;
+ if (!decode_name(output, nested_name_qualifiers))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += nested_name_qualifiers;
+ }
+ string_type discriminator;
+ if (current() == '_' && next() != 'n' && !decode_number(discriminator))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <source-name> ::= <positive length number> <identifier>
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_source_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_source_name");
+ int length = current() - '0';
+ if (length < 1 || length > 9)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ while(isdigit(next()))
+ length = 10 * length + current() - '0';
+ char const* ptr = &M_str[M_pos];
+ if (length > 11 && !strncmp(ptr, "_GLOBAL_", 8) && ptr[9] == 'N'
+ && ptr[8] == ptr[10])
+ {
+ output += "(anonymous namespace)";
+ if ((M_pos += length) > M_maxpos + 1)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else
+ while(length--)
+ {
+ if (current() == 0)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += eat_current();
+ }
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <unqualified-name> ::= <operator-name> # Starts with lower case.
+ // ::= <ctor-dtor-name> # Starts with 'C' or 'D'.
+ // ::= <source-name> # Starts with a digit.
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_unqualified_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_unqualified_name");
+ if (M_inside_template_args)
+ {
+ if (!decode_source_name(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (isdigit(current()))
+ {
+ bool recursive_unqualified_name = (&M_function_name == &output);
+ // This can be a recursive call when we are decoding
+ // an <operator-name> that is a cast operator for a some
+ // <unqualified-name>; for example "operator Foo()".
+ // In that case this is thus not a ctor or dtor and we
+ // are not interested in updating M_function_name.
+ if (!recursive_unqualified_name)
+ M_function_name.clear();
+ M_name_is_template = false;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ if (!decode_source_name(M_function_name))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (!recursive_unqualified_name)
+ output += M_function_name;
+ }
+ else if (islower(current()))
+ {
+ M_function_name.clear();
+ M_name_is_template = false;
+ M_name_is_cdtor = false;
+ M_name_is_conversion_operator = false;
+ if (!decode_operator_name(M_function_name))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += M_function_name;
+ }
+ else if (current() == 'C' || current() == 'D')
+ {
+ // <ctor-dtor-name> ::=
+ // C1 # complete object (in-charge) constructor
+ // C2 # base object (not-in-charge) constructor
+ // C3 # complete object (in-charge) allocating constructor
+ // D0 # deleting (in-charge) destructor
+ // D1 # complete object (in-charge) destructor
+ // D2 # base object (not-in-charge) destructor
+ //
+ if (current() == 'C')
+ {
+ char c = next();
+ if (c < '1' || c > '3')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else
+ {
+ char c = next();
+ if (c < '0' || c > '2')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += '~';
+ M_saw_destructor = true;
+ }
+ M_name_is_cdtor = true;
+ eat_current();
+ output += M_function_name;
+ }
+ else
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <unscoped-name> ::=
+ // <unqualified-name> # Starts not with an 'S'
+ // St <unqualified-name> # ::std::
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_unscoped_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_unscoped_name");
+ if (current() == 'S')
+ {
+ if (next() != 't')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ eat_current();
+ output += "std::";
+ }
+ decode_unqualified_name(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <name> ::=
+ // <nested-name> # Starts with 'N'
+ // <unscoped-template-name> <template-args> # idem
+ // <local-name> # Starts with 'Z'
+ // <unscoped-name> # Starts with 'S', 'C', 'D',
+ // # a digit or a lower case
+ // # character.
+ //
+ // <unscoped-template-name> ::= <unscoped-name>
+ // ::= <substitution>
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_name(string_type& output,
+ string_type& nested_name_qualifiers)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_name");
+ int substitution_start = M_pos;
+ if (current() == 'S' && (M_pos >= M_maxpos || M_str[M_pos + 1] != 't'))
+ {
+ if (!decode_substitution(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ else if (current() == 'N')
+ {
+ decode_nested_name(output, nested_name_qualifiers);
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (current() == 'Z')
+ {
+ decode_local_name(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (!decode_unscoped_name(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (current() == 'I')
+ {
+ // Must have been an <unscoped-template-name>.
+ add_substitution(substitution_start, unscoped_template_name);
+ if (!decode_template_args(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+ M_template_args_need_space = false;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+
+ // <call-offset> ::= h <nv-offset> _
+ // ::= v <v-offset> _
+ // <nv-offset> ::= <offset number>
+ // non-virtual base override
+ //
+ // <v-offset> ::= <offset number> _ <virtual offset number>
+ // virtual base override, with vcall offset
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_call_offset(string_type&
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ output
+#endif
+ )
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_call_offset");
+ if (current() == 'h')
+ {
+ string_type dummy;
+ eat_current();
+ if (decode_number(dummy) && current() == '_')
+ {
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+ else if (current() == 'v')
+ {
+ string_type dummy;
+ eat_current();
+ if (decode_number(dummy) && current() == '_')
+ {
+ eat_current();
+ if (decode_number(dummy) && current() == '_')
+ {
+ eat_current();
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+ }
+ _GLIBCXX_DEMANGLER_FAILURE;
+ }
+
+ //
+ // <special-name> ::=
+ // TV <type> # virtual table
+ // TT <type> # VTT structure (construction
+ // vtable index).
+ // TI <type> # typeinfo structure
+ // TS <type> # typeinfo name (null-terminated
+ // byte string).
+ // GV <object name> # Guard variable for one-time
+ // initialization of static objects in
+ // a local scope.
+ // T <call-offset> <base encoding># base is the nominal target function
+ // of thunk.
+ // Tc <call-offset> <call-offset> <base encoding> # base is the nominal
+ // target function of thunk; first
+ // call-offset is 'this' adjustment;
+ // second call-offset is result
+ // adjustment
+ //
+ template<typename Tp, typename Allocator>
+ bool
+ session<Tp, Allocator>::decode_special_name(string_type& output)
+ {
+ _GLIBCXX_DEMANGLER_DOUT_ENTERING("decode_special_name");
+ if (current() == 'G')
+ {
+ if (next() != 'V')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "guard variable for ";
+ string_type nested_name_qualifiers;
+ eat_current();
+ if (!decode_name(output, nested_name_qualifiers))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += nested_name_qualifiers;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ else if (current() != 'T')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ switch(next())
+ {
+ case 'V':
+ output += "vtable for ";
+ eat_current();
+ decode_type(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'T':
+ output += "VTT for ";
+ eat_current();
+ decode_type(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'I':
+ output += "typeinfo for ";
+ eat_current();
+ decode_type(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'S':
+ output += "typeinfo name for ";
+ eat_current();
+ decode_type(output);
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'c':
+ output += "covariant return thunk to ";
+ if (!decode_call_offset(output)
+ || !decode_call_offset(output)
+ || (M_pos += decode_encoding(output, M_str + M_pos,
+ M_maxpos - M_pos + 1, M_implementation_details)) < 0)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN;
+ case 'C': // GNU extension?
+ {
+ string_type first;
+ output += "construction vtable for ";
+ eat_current();
+ if (!decode_type(first))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ while(isdigit(current()))
+ eat_current();
+ if (eat_current() != '_')
+ _GLIBCXX_DEMANGLER_FAILURE;
+ if (!decode_type(output))
+ _GLIBCXX_DEMANGLER_FAILURE;
+ output += "-in-";
+ output += first;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ default:
+ if (current() == 'v')
+ output += "virtual thunk to ";
+ else
+ output += "non-virtual thunk to ";
+ if (!decode_call_offset(output)
+ || (M_pos += decode_encoding(output, M_str + M_pos,
+ M_maxpos - M_pos + 1, M_implementation_details)) < 0)
+ _GLIBCXX_DEMANGLER_FAILURE;
+ _GLIBCXX_DEMANGLER_RETURN;
+ }
+ }
+
+ // <encoding> ::=
+ // <function name> <bare-function-type> # Starts with 'C', 'D', 'N',
+ // 'S', a digit or a lower case
+ // character.
+ // <data name> # Idem.
+ // <special-name> # Starts with 'T' or 'G'.
+ template<typename Tp, typename Allocator>
+ int
+ session<Tp, Allocator>::decode_encoding(string_type& output,
+ char const* in, int len, implementation_details const& id)
+ {
+#if _GLIBCXX_DEMANGLER_CWDEBUG
+ _GLIBCXX_DEMANGLER_DOUT(dc::demangler,
+ "Output thus far: \"" << output << '"');
+ string_type input(in, len > 0x40000000 ? strlen(in) : len);
+ _GLIBCXX_DEMANGLER_DOUT(
+ dc::demangler, "Entering decode_encoding(\"" << input << "\")");
+#endif
+ if (len <= 0)
+ return INT_MIN;
+ session<Tp, Allocator> demangler_session(in, len, id);
+ string_type nested_name_qualifiers;
+ int saved_pos;
+ demangler_session.store(saved_pos);
+ if (demangler_session.decode_special_name(output))
+ return demangler_session.M_pos;
+ demangler_session.restore(saved_pos);
+ string_type name;
+ if (!demangler_session.decode_name(name, nested_name_qualifiers))
+ return INT_MIN;
+ if (demangler_session.current() == 0
+ || demangler_session.current() == 'E')
+ {
+ output += name;
+ output += nested_name_qualifiers;
+ return demangler_session.M_pos;
+ }
+ // Must have been a <function name>.
+ string_type return_type_postfix;
+ if (demangler_session.M_name_is_template
+ && !(demangler_session.M_name_is_cdtor
+ || demangler_session.M_name_is_conversion_operator))
+ {
+ // Return type of function
+ if (!demangler_session.decode_type_with_postfix(output,
+ return_type_postfix))
+ return INT_MIN;
+ output += ' ';
+ }
+ output += name;
+ if (!demangler_session.decode_bare_function_type(output))
+ return INT_MIN;
+ output += nested_name_qualifiers;
+ output += return_type_postfix;
+ return demangler_session.M_pos;
+ }
+
+ } // namespace demangler
+
+ // Public interface
+ template<typename Tp, typename Allocator>
+ struct demangle
+ {
+ typedef typename Allocator::template rebind<char>::other char_Allocator;
+ typedef std::basic_string<char, std::char_traits<char>, char_Allocator>
+ string_type;
+ static string_type symbol(char const* in,
+ demangler::implementation_details const& id);
+ static string_type type(char const* in,
+ demangler::implementation_details const& id);
+ };
+
+ // demangle::symbol()
+ //
+ // Demangle `input' which should be a mangled function name as for
+ // instance returned by nm(1).
+ template<typename Tp, typename Allocator>
+ typename demangle<Tp, Allocator>::string_type
+ demangle<Tp, Allocator>::symbol(char const* input,
+ demangler::implementation_details const& id)
+ {
+ // <mangled-name> ::= _Z <encoding>
+ // <mangled-name> ::= _GLOBAL_ _<type>_ <disambiguation part>
+ // <type> can be I or D (GNU extension)
+ typedef demangler::session<Tp, Allocator> demangler_type;
+ string_type result;
+ bool failure = (input[0] != '_');
+
+ if (!failure)
+ {
+ if (input[1] == 'G')
+ {
+ if (!strncmp(input, "_GLOBAL__", 9)
+ && (input[9] == 'D' || input[9] == 'I')
+ && input[10] == '_')
+ {
+ if (input[9] == 'D')
+ result.assign("global destructors keyed to ", 28);
+ else
+ result.assign("global constructors keyed to ", 29);
+ // Output the disambiguation part as-is.
+ result += input + 11;
+ }
+ else
+ failure = true;
+ }
+ else if (input[1] == 'Z')
+ {
+ int cnt =
+ demangler_type::decode_encoding(result, input + 2, INT_MAX, id);
+ if (cnt < 0 || input[cnt + 2] != 0)
+ failure = true;
+ }
+ else
+ failure = true;
+ }
+
+ // Failure to demangle, return the mangled name.
+ if (failure)
+ result.assign(input, strlen(input));
+
+ return result;
+ }
+
+ // demangle::type()
+ // Demangle `input' which must be a zero terminated mangled type
+ // name as for instance returned by std::type_info::name().
+ template<typename Tp, typename Allocator>
+ typename demangle<Tp, Allocator>::string_type
+ demangle<Tp, Allocator>::type(char const* input,
+ demangler::implementation_details const& id)
+ {
+ std::basic_string<char, std::char_traits<char>, Allocator> result;
+ if (input == NULL)
+ result = "(null)";
+ else
+ {
+ demangler::session<Tp, Allocator> demangler_session(input, INT_MAX, id);
+ if (!demangler_session.decode_type(result)
+ || demangler_session.remaining_input_characters())
+ {
+ // Failure to demangle, return the mangled name.
+ result = input;
+ }
+ }
+ return result;
+ }
+} // namespace __gnu_cxx
+
+#endif // __DEMANGLE_H
diff --git a/contrib/libstdc++/include/ext/enc_filebuf.h b/contrib/libstdc++/include/ext/enc_filebuf.h
index e1152bd..39f4ef7 100644
--- a/contrib/libstdc++/include/ext/enc_filebuf.h
+++ b/contrib/libstdc++/include/ext/enc_filebuf.h
@@ -1,6 +1,6 @@
-// __enc_traits layer for filebuf -*- C++ -*-
+// filebuf with __enc_traits state type -*- C++ -*-
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,12 +32,14 @@
namespace __gnu_cxx
{
- // Custom traits type with __enc_traits for state type, all other bits
- // equivalent to the required char_traits instantiations.
+ // Custom traits type with __enc_traits for the state type, and the
+ // associated fpos<__enc_traits> for the position type, all other
+ // bits equivalent to the required char_traits instantiations.
template<typename _CharT>
struct enc_char_traits: public std::char_traits<_CharT>
{
- typedef std::__enc_traits state_type;
+ typedef std::__enc_traits state_type;
+ typedef typename std::fpos<state_type> pos_type;
};
template<typename _CharT>
@@ -45,17 +47,22 @@ namespace __gnu_cxx
: public std::basic_filebuf<_CharT, enc_char_traits<_CharT> >
{
public:
- typedef typename enc_char_traits<_CharT>::state_type state_type;
-
+ typedef enc_char_traits<_CharT> traits_type;
+ typedef typename traits_type::state_type state_type;
+ typedef typename traits_type::pos_type pos_type;
+
enc_filebuf(state_type& __state)
: std::basic_filebuf<_CharT, enc_char_traits<_CharT> >()
- {
- // Set state type to something useful.
- // Something more than copyconstructible is needed here, so
- // require copyconstructible + assignment operator.
- __glibcpp_class_requires(state_type, _SGIAssignableConcept);
- _M_state_cur = __state;
- _M_state_cur._M_init();
- };
+ {
+ this->_M_state_beg = __state;
+ this->_M_state_beg._M_init();
+ }
+
+ private:
+ // concept requirements:
+ // Set state type to something useful.
+ // Something more than copyconstructible is needed here, so
+ // require default and copy constructible + assignment operator.
+ __glibcxx_class_requires(state_type, _SGIAssignableConcept)
};
} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/include/ext/functional b/contrib/libstdc++/include/ext/functional
index c482aa1..1a37817 100644
--- a/contrib/libstdc++/include/ext/functional
+++ b/contrib/libstdc++/include/ext/functional
@@ -60,9 +60,10 @@
*/
#ifndef _EXT_FUNCTIONAL
-#define _EXT_FUNCTIONAL
+#define _EXT_FUNCTIONAL 1
#pragma GCC system_header
+
#include <functional>
namespace __gnu_cxx
@@ -99,7 +100,7 @@ template <class _Tp> inline _Tp identity_element(std::multiplies<_Tp>) {
* Calling @c operator() with a single argument @c x returns @c f(g(x)).
* The function @c compose1 takes the two functions and constructs a
* @c unary_compose variable for you.
- *
+ *
* @c binary_compose is constructed from three functors, @c f, @c g1,
* and @c g2. Its @c operator() returns @c f(g1(x),g2(x)). The function
* @compose2 takes f, g1, and g2, and constructs the @c binary_compose
@@ -123,13 +124,13 @@ template <class _Tp> inline _Tp identity_element(std::multiplies<_Tp>) {
template <class _Operation1, class _Operation2>
class unary_compose
: public unary_function<typename _Operation2::argument_type,
- typename _Operation1::result_type>
+ typename _Operation1::result_type>
{
protected:
_Operation1 _M_fn1;
_Operation2 _M_fn2;
public:
- unary_compose(const _Operation1& __x, const _Operation2& __y)
+ unary_compose(const _Operation1& __x, const _Operation2& __y)
: _M_fn1(__x), _M_fn2(__y) {}
typename _Operation1::result_type
operator()(const typename _Operation2::argument_type& __x) const {
@@ -139,7 +140,7 @@ public:
/// An \link SGIextensions SGI extension \endlink.
template <class _Operation1, class _Operation2>
-inline unary_compose<_Operation1,_Operation2>
+inline unary_compose<_Operation1,_Operation2>
compose1(const _Operation1& __fn1, const _Operation2& __fn2)
{
return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
@@ -155,8 +156,8 @@ protected:
_Operation2 _M_fn2;
_Operation3 _M_fn3;
public:
- binary_compose(const _Operation1& __x, const _Operation2& __y,
- const _Operation3& __z)
+ binary_compose(const _Operation1& __x, const _Operation2& __y,
+ const _Operation3& __z)
: _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
typename _Operation1::result_type
operator()(const typename _Operation2::argument_type& __x) const {
@@ -166,8 +167,8 @@ public:
/// An \link SGIextensions SGI extension \endlink.
template <class _Operation1, class _Operation2, class _Operation3>
-inline binary_compose<_Operation1, _Operation2, _Operation3>
-compose2(const _Operation1& __fn1, const _Operation2& __fn2,
+inline binary_compose<_Operation1, _Operation2, _Operation3>
+compose2(const _Operation1& __fn1, const _Operation2& __fn2,
const _Operation3& __fn3)
{
return binary_compose<_Operation1,_Operation2,_Operation3>
@@ -219,7 +220,7 @@ struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> {
*/
/// An \link SGIextensions SGI extension \endlink.
-template <class _Arg1, class _Arg2>
+template <class _Arg1, class _Arg2>
struct project1st : public _Project1st<_Arg1, _Arg2> {};
/// An \link SGIextensions SGI extension \endlink.
@@ -235,7 +236,7 @@ struct _Constant_void_fun {
_Constant_void_fun(const result_type& __v) : _M_val(__v) {}
const result_type& operator()() const { return _M_val; }
-};
+};
template <class _Result, class _Argument>
struct _Constant_unary_fun {
@@ -278,7 +279,7 @@ struct _Constant_binary_fun {
template <class _Result>
struct constant_void_fun : public _Constant_void_fun<_Result> {
constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {}
-};
+};
/// An \link SGIextensions SGI extension \endlink.
template <class _Result,
@@ -316,7 +317,7 @@ inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val)
/// An \link SGIextensions SGI extension \endlink.
template <class _Result>
-inline constant_binary_fun<_Result,_Result,_Result>
+inline constant_binary_fun<_Result,_Result,_Result>
constant2(const _Result& __val)
{
return constant_binary_fun<_Result,_Result,_Result>(__val);
@@ -368,7 +369,7 @@ public:
subtractive_rng() { _M_initialize(161803398u); }
};
-// Mem_fun adaptor helper functions mem_fun1 and mem_fun1_ref,
+// Mem_fun adaptor helper functions mem_fun1 and mem_fun1_ref,
// provided for backward compatibility, they are no longer part of
// the C++ standard.
@@ -388,8 +389,7 @@ template <class _Ret, class _Tp, class _Arg>
inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
-
} // namespace __gnu_cxx
-#endif /* _EXT_FUNCTIONAL */
+#endif
diff --git a/contrib/libstdc++/include/ext/hash_fun.h b/contrib/libstdc++/include/ext/hash_fun.h
new file mode 100644
index 0000000..27453a6
--- /dev/null
+++ b/contrib/libstdc++/include/ext/hash_fun.h
@@ -0,0 +1,122 @@
+// 'struct hash' from SGI -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/hash_fun.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset). You should only
+ * include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _HASH_FUN_H
+#define _HASH_FUN_H 1
+
+#include <cstddef>
+
+namespace __gnu_cxx
+{
+ using std::size_t;
+
+ template <class _Key> struct hash { };
+
+ inline size_t
+ __stl_hash_string(const char* __s)
+ {
+ unsigned long __h = 0;
+ for ( ; *__s; ++__s)
+ __h = 5*__h + *__s;
+ return size_t(__h);
+ }
+
+ template<> struct hash<char*>
+ {
+ size_t operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<> struct hash<const char*>
+ {
+ size_t operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<> struct hash<char>
+ { size_t operator()(char __x) const { return __x; } };
+
+ template<> struct hash<unsigned char>
+ { size_t operator()(unsigned char __x) const { return __x; } };
+
+ template<> struct hash<signed char>
+ { size_t operator()(unsigned char __x) const { return __x; } };
+
+ template<> struct hash<short>
+ { size_t operator()(short __x) const { return __x; } };
+
+ template<> struct hash<unsigned short>
+ { size_t operator()(unsigned short __x) const { return __x; } };
+
+ template<> struct hash<int>
+ { size_t operator()(int __x) const { return __x; } };
+
+ template<> struct hash<unsigned int>
+ { size_t operator()(unsigned int __x) const { return __x; } };
+
+ template<> struct hash<long>
+ { size_t operator()(long __x) const { return __x; } };
+
+ template<> struct hash<unsigned long>
+ { size_t operator()(unsigned long __x) const { return __x; } };
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/hash_map b/contrib/libstdc++/include/ext/hash_map
index b66758d..5032c7b 100644
--- a/contrib/libstdc++/include/ext/hash_map
+++ b/contrib/libstdc++/include/ext/hash_map
@@ -59,30 +59,28 @@
* include this header if you are using GCC 3 or later.
*/
-#ifndef __SGI_STL_INTERNAL_HASH_MAP_H
-#define __SGI_STL_INTERNAL_HASH_MAP_H
+#ifndef _HASH_MAP
+#define _HASH_MAP 1
-#include <ext/stl_hashtable.h>
+#include <ext/hashtable.h>
#include <bits/concept_check.h>
namespace __gnu_cxx
{
-using std::equal_to;
-using std::allocator;
-using std::pair;
-using std::_Select1st;
-
-// Forward declaration of equality operator; needed for friend declaration.
-
-template <class _Key, class _Tp,
- class _HashFcn = hash<_Key>,
- class _EqualKey = equal_to<_Key>,
- class _Alloc = allocator<_Tp> >
-class hash_map;
-
-template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
-inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
- const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Select1st;
+
+ // Forward declaration of equality operator; needed for friend
+ // declaration.
+ template<class _Key, class _Tp, class _HashFcn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
+ class hash_map;
+
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
+ const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
/**
* This is an SGI extension.
* @ingroup SGIextensions
@@ -104,7 +102,7 @@ public:
typedef typename _Ht::value_type value_type;
typedef typename _Ht::hasher hasher;
typedef typename _Ht::key_equal key_equal;
-
+
typedef typename _Ht::size_type size_type;
typedef typename _Ht::difference_type difference_type;
typedef typename _Ht::pointer pointer;
@@ -173,10 +171,10 @@ public:
void insert(_InputIterator __f, _InputIterator __l)
{ _M_ht.insert_unique(__f,__l); }
pair<iterator,bool> insert_noresize(const value_type& __obj)
- { return _M_ht.insert_unique_noresize(__obj); }
+ { return _M_ht.insert_unique_noresize(__obj); }
iterator find(const key_type& __key) { return _M_ht.find(__key); }
- const_iterator find(const key_type& __key) const
+ const_iterator find(const key_type& __key) const
{ return _M_ht.find(__key); }
_Tp& operator[](const key_type& __key) {
@@ -184,7 +182,7 @@ public:
}
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-
+
pair<iterator, iterator> equal_range(const key_type& __key)
{ return _M_ht.equal_range(__key); }
pair<const_iterator, const_iterator>
@@ -204,7 +202,7 @@ public:
};
template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
{
@@ -212,14 +210,14 @@ operator==(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
}
template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
-inline bool
+inline bool
operator!=(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) {
return !(__hm1 == __hm2);
}
template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
-inline void
+inline void
swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
{
@@ -235,7 +233,7 @@ template <class _Key, class _Tp,
class hash_multimap;
template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2);
@@ -248,14 +246,14 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multimap
{
// concept requirements
- __glibcpp_class_requires(_Key, _SGIAssignableConcept)
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
- __glibcpp_class_requires3(_HashFcn, size_t, _Key, _UnaryFunctionConcept);
- __glibcpp_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept);
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Key, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
private:
typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFcn,
- _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
+ _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
_Ht;
_Ht _M_ht;
@@ -329,20 +327,20 @@ public:
const_iterator end() const { return _M_ht.end(); }
public:
- iterator insert(const value_type& __obj)
+ iterator insert(const value_type& __obj)
{ return _M_ht.insert_equal(__obj); }
template <class _InputIterator>
- void insert(_InputIterator __f, _InputIterator __l)
+ void insert(_InputIterator __f, _InputIterator __l)
{ _M_ht.insert_equal(__f,__l); }
iterator insert_noresize(const value_type& __obj)
- { return _M_ht.insert_equal_noresize(__obj); }
+ { return _M_ht.insert_equal_noresize(__obj); }
iterator find(const key_type& __key) { return _M_ht.find(__key); }
- const_iterator find(const key_type& __key) const
+ const_iterator find(const key_type& __key) const
{ return _M_ht.find(__key); }
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-
+
pair<iterator, iterator> equal_range(const key_type& __key)
{ return _M_ht.equal_range(__key); }
pair<const_iterator, const_iterator>
@@ -363,7 +361,7 @@ public:
};
template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2)
{
@@ -371,14 +369,14 @@ operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
}
template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
-inline bool
+inline bool
operator!=(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2) {
return !(__hm1 == __hm2);
}
template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
-inline void
+inline void
swap(hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
{
@@ -409,7 +407,7 @@ public:
insert_iterator(_Container& __x, typename _Container::iterator)
: container(&__x) {}
insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value) {
+ operator=(const typename _Container::value_type& __value) {
container->insert(__value);
return *this;
}
@@ -436,7 +434,7 @@ public:
insert_iterator(_Container& __x, typename _Container::iterator)
: container(&__x) {}
insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value) {
+ operator=(const typename _Container::value_type& __value) {
container->insert(__value);
return *this;
}
@@ -444,11 +442,6 @@ public:
insert_iterator<_Container>& operator++() { return *this; }
insert_iterator<_Container>& operator++(int) { return *this; }
};
-
} // namespace std
-#endif /* __SGI_STL_INTERNAL_HASH_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/ext/hash_set b/contrib/libstdc++/include/ext/hash_set
index 0f420e2..fee64fc 100644
--- a/contrib/libstdc++/include/ext/hash_set
+++ b/contrib/libstdc++/include/ext/hash_set
@@ -59,31 +59,30 @@
* include this header if you are using GCC 3 or later.
*/
-#ifndef __SGI_STL_INTERNAL_HASH_SET_H
-#define __SGI_STL_INTERNAL_HASH_SET_H
+#ifndef _HASH_SET
+#define _HASH_SET 1
-#include <ext/stl_hashtable.h>
+#include <ext/hashtable.h>
#include <bits/concept_check.h>
namespace __gnu_cxx
{
-using std::equal_to;
-using std::allocator;
-using std::pair;
-using std::_Identity;
-
-// Forward declaration of equality operator; needed for friend declaration.
-
-template <class _Value,
- class _HashFcn = hash<_Value>,
- class _EqualKey = equal_to<_Value>,
- class _Alloc = allocator<_Value> >
-class hash_set;
-
-template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
-operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
- const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2);
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Identity;
+
+ // Forward declaration of equality operator; needed for friend
+ // declaration.
+ template <class _Value, class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_set;
+
+ template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
+ const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2);
/**
* This is an SGI extension.
@@ -94,12 +93,12 @@ template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_set
{
// concept requirements
- __glibcpp_class_requires(_Value, _SGIAssignableConcept)
- __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
- __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
private:
- typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
_EqualKey, _Alloc> _Ht;
_Ht _M_ht;
@@ -111,10 +110,10 @@ public:
typedef typename _Ht::size_type size_type;
typedef typename _Ht::difference_type difference_type;
- typedef typename _Ht::const_pointer pointer;
- typedef typename _Ht::const_pointer const_pointer;
- typedef typename _Ht::const_reference reference;
- typedef typename _Ht::const_reference const_reference;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
typedef typename _Ht::const_iterator iterator;
typedef typename _Ht::const_iterator const_iterator;
@@ -162,7 +161,7 @@ public:
bool empty() const { return _M_ht.empty(); }
void swap(hash_set& __hs) { _M_ht.swap(__hs._M_ht); }
- template <class _Val, class _HF, class _EqK, class _Al>
+ template <class _Val, class _HF, class _EqK, class _Al>
friend bool operator== (const hash_set<_Val, _HF, _EqK, _Al>&,
const hash_set<_Val, _HF, _EqK, _Al>&);
@@ -176,11 +175,11 @@ public:
return pair<iterator,bool>(__p.first, __p.second);
}
template <class _InputIterator>
- void insert(_InputIterator __f, _InputIterator __l)
+ void insert(_InputIterator __f, _InputIterator __l)
{ _M_ht.insert_unique(__f,__l); }
pair<iterator, bool> insert_noresize(const value_type& __obj)
{
- pair<typename _Ht::iterator, bool> __p =
+ pair<typename _Ht::iterator, bool> __p =
_M_ht.insert_unique_noresize(__obj);
return pair<iterator, bool>(__p.first, __p.second);
}
@@ -188,7 +187,7 @@ public:
iterator find(const key_type& __key) const { return _M_ht.find(__key); }
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-
+
pair<iterator, iterator> equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
@@ -206,7 +205,7 @@ public:
};
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2)
{
@@ -214,14 +213,14 @@ operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
}
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
+inline bool
operator!=(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2) {
return !(__hs1 == __hs2);
}
template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-inline void
+inline void
swap(hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2)
{
@@ -236,7 +235,7 @@ template <class _Value,
class hash_multiset;
template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2);
@@ -250,12 +249,12 @@ template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multiset
{
// concept requirements
- __glibcpp_class_requires(_Value, _SGIAssignableConcept)
- __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
- __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
private:
- typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
_EqualKey, _Alloc> _Ht;
_Ht _M_ht;
@@ -267,10 +266,10 @@ public:
typedef typename _Ht::size_type size_type;
typedef typename _Ht::difference_type difference_type;
- typedef typename _Ht::const_pointer pointer;
- typedef typename _Ht::const_pointer const_pointer;
- typedef typename _Ht::const_reference reference;
- typedef typename _Ht::const_reference const_reference;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
typedef typename _Ht::const_iterator iterator;
typedef typename _Ht::const_iterator const_iterator;
@@ -318,7 +317,7 @@ public:
bool empty() const { return _M_ht.empty(); }
void swap(hash_multiset& hs) { _M_ht.swap(hs._M_ht); }
- template <class _Val, class _HF, class _EqK, class _Al>
+ template <class _Val, class _HF, class _EqK, class _Al>
friend bool operator== (const hash_multiset<_Val, _HF, _EqK, _Al>&,
const hash_multiset<_Val, _HF, _EqK, _Al>&);
@@ -329,15 +328,15 @@ public:
iterator insert(const value_type& __obj)
{ return _M_ht.insert_equal(__obj); }
template <class _InputIterator>
- void insert(_InputIterator __f, _InputIterator __l)
+ void insert(_InputIterator __f, _InputIterator __l)
{ _M_ht.insert_equal(__f,__l); }
iterator insert_noresize(const value_type& __obj)
- { return _M_ht.insert_equal_noresize(__obj); }
+ { return _M_ht.insert_equal_noresize(__obj); }
iterator find(const key_type& __key) const { return _M_ht.find(__key); }
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-
+
pair<iterator, iterator> equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
@@ -355,7 +354,7 @@ public:
};
template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
+inline bool
operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2)
{
@@ -363,14 +362,14 @@ operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
}
template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-inline bool
+inline bool
operator!=(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) {
return !(__hs1 == __hs2);
}
template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-inline void
+inline void
swap(hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) {
__hs1.swap(__hs2);
@@ -400,7 +399,7 @@ public:
insert_iterator(_Container& __x, typename _Container::iterator)
: container(&__x) {}
insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value) {
+ operator=(const typename _Container::value_type& __value) {
container->insert(__value);
return *this;
}
@@ -427,7 +426,7 @@ public:
insert_iterator(_Container& __x, typename _Container::iterator)
: container(&__x) {}
insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value) {
+ operator=(const typename _Container::value_type& __value) {
container->insert(__value);
return *this;
}
@@ -435,11 +434,6 @@ public:
insert_iterator<_Container>& operator++() { return *this; }
insert_iterator<_Container>& operator++(int) { return *this; }
};
-
} // namespace std
-#endif /* __SGI_STL_INTERNAL_HASH_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/ext/hashtable.h b/contrib/libstdc++/include/ext/hashtable.h
new file mode 100644
index 0000000..f81a858
--- /dev/null
+++ b/contrib/libstdc++/include/ext/hashtable.h
@@ -0,0 +1,994 @@
+// Hashtable implementation used by containers -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/hashtable.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset). You should only
+ * include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
+
+#include <vector>
+#include <iterator>
+#include <bits/stl_algo.h>
+#include <bits/stl_function.h>
+#include <ext/hash_fun.h>
+
+namespace __gnu_cxx
+{
+using std::size_t;
+using std::ptrdiff_t;
+using std::forward_iterator_tag;
+using std::input_iterator_tag;
+using std::_Construct;
+using std::_Destroy;
+using std::distance;
+using std::vector;
+using std::pair;
+using std::__iterator_category;
+
+template <class _Val>
+struct _Hashtable_node
+{
+ _Hashtable_node* _M_next;
+ _Val _M_val;
+};
+
+template <class _Val, class _Key, class _HashFcn, class _ExtractKey,
+ class _EqualKey, class _Alloc = std::allocator<_Val> >
+class hashtable;
+
+template <class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+struct _Hashtable_iterator;
+
+template <class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+struct _Hashtable_const_iterator;
+
+template <class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+struct _Hashtable_iterator {
+ typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _Val& reference;
+ typedef _Val* pointer;
+
+ _Node* _M_cur;
+ _Hashtable* _M_ht;
+
+ _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) {}
+ _Hashtable_iterator() {}
+ reference operator*() const { return _M_cur->_M_val; }
+ pointer operator->() const { return &(operator*()); }
+ iterator& operator++();
+ iterator operator++(int);
+ bool operator==(const iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+ bool operator!=(const iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+};
+
+
+template <class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+struct _Hashtable_const_iterator {
+ typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
+ _ExtractKey,_EqualKey,_Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef const _Val& reference;
+ typedef const _Val* pointer;
+
+ const _Node* _M_cur;
+ const _Hashtable* _M_ht;
+
+ _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) {}
+ _Hashtable_const_iterator() {}
+ _Hashtable_const_iterator(const iterator& __it)
+ : _M_cur(__it._M_cur), _M_ht(__it._M_ht) {}
+ reference operator*() const { return _M_cur->_M_val; }
+ pointer operator->() const { return &(operator*()); }
+ const_iterator& operator++();
+ const_iterator operator++(int);
+ bool operator==(const const_iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+ bool operator!=(const const_iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+};
+
+// Note: assumes long is at least 32 bits.
+enum { _S_num_primes = 28 };
+
+static const unsigned long __stl_prime_list[_S_num_primes] =
+{
+ 53ul, 97ul, 193ul, 389ul, 769ul,
+ 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
+ 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
+ 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
+ 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
+ 1610612741ul, 3221225473ul, 4294967291ul
+};
+
+inline unsigned long __stl_next_prime(unsigned long __n)
+{
+ const unsigned long* __first = __stl_prime_list;
+ const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+ const unsigned long* pos = std::lower_bound(__first, __last, __n);
+ return pos == __last ? *(__last - 1) : *pos;
+}
+
+// Forward declaration of operator==.
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+class hashtable;
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+ const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2);
+
+
+// Hashtables handle allocators a bit differently than other
+// containers do. If we're using standard-conforming allocators, then
+// a hashtable unconditionally has a member variable to hold its
+// allocator, even if it so happens that all instances of the
+// allocator type are identical. This is because, for hashtables,
+// this extra storage is negligible. Additionally, a base class
+// wouldn't serve any other purposes; it wouldn't, for example,
+// simplify the exception-handling code.
+
+template <class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+class hashtable {
+public:
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef _HashFcn hasher;
+ typedef _EqualKey key_equal;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ hasher hash_funct() const { return _M_hash; }
+ key_equal key_eq() const { return _M_equals; }
+
+private:
+ typedef _Hashtable_node<_Val> _Node;
+
+public:
+ typedef _Alloc allocator_type;
+ allocator_type get_allocator() const { return _M_node_allocator; }
+private:
+ typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+ typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+ typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+
+ _Node_Alloc _M_node_allocator;
+ _Node* _M_get_node() { return _M_node_allocator.allocate(1); }
+ void _M_put_node(_Node* __p) { _M_node_allocator.deallocate(__p, 1); }
+
+private:
+ hasher _M_hash;
+ key_equal _M_equals;
+ _ExtractKey _M_get_key;
+ _Vector_type _M_buckets;
+ size_type _M_num_elements;
+
+public:
+ typedef _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,
+ _Alloc>
+ const_iterator;
+
+ friend struct
+ _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>;
+ friend struct
+ _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>;
+
+public:
+ hashtable(size_type __n,
+ const _HashFcn& __hf,
+ const _EqualKey& __eql,
+ const _ExtractKey& __ext,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a),
+ _M_hash(__hf),
+ _M_equals(__eql),
+ _M_get_key(__ext),
+ _M_buckets(__a),
+ _M_num_elements(0)
+ {
+ _M_initialize_buckets(__n);
+ }
+
+ hashtable(size_type __n,
+ const _HashFcn& __hf,
+ const _EqualKey& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a),
+ _M_hash(__hf),
+ _M_equals(__eql),
+ _M_get_key(_ExtractKey()),
+ _M_buckets(__a),
+ _M_num_elements(0)
+ {
+ _M_initialize_buckets(__n);
+ }
+
+ hashtable(const hashtable& __ht)
+ : _M_node_allocator(__ht.get_allocator()),
+ _M_hash(__ht._M_hash),
+ _M_equals(__ht._M_equals),
+ _M_get_key(__ht._M_get_key),
+ _M_buckets(__ht.get_allocator()),
+ _M_num_elements(0)
+ {
+ _M_copy_from(__ht);
+ }
+
+ hashtable& operator= (const hashtable& __ht)
+ {
+ if (&__ht != this) {
+ clear();
+ _M_hash = __ht._M_hash;
+ _M_equals = __ht._M_equals;
+ _M_get_key = __ht._M_get_key;
+ _M_copy_from(__ht);
+ }
+ return *this;
+ }
+
+ ~hashtable() { clear(); }
+
+ size_type size() const { return _M_num_elements; }
+ size_type max_size() const { return size_type(-1); }
+ bool empty() const { return size() == 0; }
+
+ void swap(hashtable& __ht)
+ {
+ std::swap(_M_hash, __ht._M_hash);
+ std::swap(_M_equals, __ht._M_equals);
+ std::swap(_M_get_key, __ht._M_get_key);
+ _M_buckets.swap(__ht._M_buckets);
+ std::swap(_M_num_elements, __ht._M_num_elements);
+ }
+
+ iterator begin()
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ iterator end() { return iterator(0, this); }
+
+ const_iterator begin() const
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return const_iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ const_iterator end() const { return const_iterator(0, this); }
+
+ template <class _Vl, class _Ky, class _HF, class _Ex, class _Eq, class _Al>
+ friend bool operator== (const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+ const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+public:
+
+ size_type bucket_count() const { return _M_buckets.size(); }
+
+ size_type max_bucket_count() const
+ { return __stl_prime_list[(int)_S_num_primes - 1]; }
+
+ size_type elems_in_bucket(size_type __bucket) const
+ {
+ size_type __result = 0;
+ for (_Node* __cur = _M_buckets[__bucket]; __cur; __cur = __cur->_M_next)
+ __result += 1;
+ return __result;
+ }
+
+ pair<iterator, bool> insert_unique(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_unique_noresize(__obj);
+ }
+
+ iterator insert_equal(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_equal_noresize(__obj);
+ }
+
+ pair<iterator, bool> insert_unique_noresize(const value_type& __obj);
+ iterator insert_equal_noresize(const value_type& __obj);
+
+ template <class _InputIterator>
+ void insert_unique(_InputIterator __f, _InputIterator __l)
+ {
+ insert_unique(__f, __l, __iterator_category(__f));
+ }
+
+ template <class _InputIterator>
+ void insert_equal(_InputIterator __f, _InputIterator __l)
+ {
+ insert_equal(__f, __l, __iterator_category(__f));
+ }
+
+ template <class _InputIterator>
+ void insert_unique(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_unique(*__f);
+ }
+
+ template <class _InputIterator>
+ void insert_equal(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_equal(*__f);
+ }
+
+ template <class _ForwardIterator>
+ void insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ template <class _ForwardIterator>
+ void insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+
+ reference find_or_insert(const value_type& __obj);
+
+ iterator find(const key_type& __key)
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ _Node* __first;
+ for ( __first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ {}
+ return iterator(__first, this);
+ }
+
+ const_iterator find(const key_type& __key) const
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ const _Node* __first;
+ for ( __first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ {}
+ return const_iterator(__first, this);
+ }
+
+ size_type count(const key_type& __key) const
+ {
+ const size_type __n = _M_bkt_num_key(__key);
+ size_type __result = 0;
+
+ for (const _Node* __cur = _M_buckets[__n]; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), __key))
+ ++__result;
+ return __result;
+ }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key);
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const;
+
+ size_type erase(const key_type& __key);
+ void erase(const iterator& __it);
+ void erase(iterator __first, iterator __last);
+
+ void erase(const const_iterator& __it);
+ void erase(const_iterator __first, const_iterator __last);
+
+ void resize(size_type __num_elements_hint);
+ void clear();
+
+private:
+ size_type _M_next_size(size_type __n) const
+ { return __stl_next_prime(__n); }
+
+ void _M_initialize_buckets(size_type __n)
+ {
+ const size_type __n_buckets = _M_next_size(__n);
+ _M_buckets.reserve(__n_buckets);
+ _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+ _M_num_elements = 0;
+ }
+
+ size_type _M_bkt_num_key(const key_type& __key) const
+ {
+ return _M_bkt_num_key(__key, _M_buckets.size());
+ }
+
+ size_type _M_bkt_num(const value_type& __obj) const
+ {
+ return _M_bkt_num_key(_M_get_key(__obj));
+ }
+
+ size_type _M_bkt_num_key(const key_type& __key, size_t __n) const
+ {
+ return _M_hash(__key) % __n;
+ }
+
+ size_type _M_bkt_num(const value_type& __obj, size_t __n) const
+ {
+ return _M_bkt_num_key(_M_get_key(__obj), __n);
+ }
+
+ _Node* _M_new_node(const value_type& __obj)
+ {
+ _Node* __n = _M_get_node();
+ __n->_M_next = 0;
+ try {
+ _Construct(&__n->_M_val, __obj);
+ return __n;
+ }
+ catch(...)
+ {
+ _M_put_node(__n);
+ __throw_exception_again;
+ }
+ }
+
+ void _M_delete_node(_Node* __n)
+ {
+ _Destroy(&__n->_M_val);
+ _M_put_node(__n);
+ }
+
+ void _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+ void _M_erase_bucket(const size_type __n, _Node* __last);
+
+ void _M_copy_from(const hashtable& __ht);
+
+};
+
+template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>&
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++()
+{
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur) {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+}
+
+template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+inline _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int)
+{
+ iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+}
+
+template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>&
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++()
+{
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur) {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+}
+
+template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+inline _Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int)
+{
+ const_iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+ const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2)
+{
+ typedef typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::_Node _Node;
+ if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+ return false;
+ for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n) {
+ _Node* __cur1 = __ht1._M_buckets[__n];
+ _Node* __cur2 = __ht2._M_buckets[__n];
+ // Check same length of lists
+ for ( ; __cur1 && __cur2;
+ __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+ {}
+ if (__cur1 || __cur2)
+ return false;
+ // Now check one's elements are in the other
+ for (__cur1 = __ht1._M_buckets[__n] ; __cur1; __cur1 = __cur1->_M_next)
+ {
+ bool _found__cur1 = false;
+ for (_Node* __cur2 = __ht2._M_buckets[__n];
+ __cur2; __cur2 = __cur2->_M_next)
+ {
+ if (__cur1->_M_val == __cur2->_M_val)
+ {
+ _found__cur1 = true;
+ break;
+ }
+ }
+ if (!_found__cur1)
+ return false;
+ }
+ }
+ return true;
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+inline bool operator!=(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+ const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2) {
+ return !(__ht1 == __ht2);
+}
+
+template <class _Val, class _Key, class _HF, class _Extract, class _EqKey,
+ class _All>
+inline void swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+ hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2) {
+ __ht1.swap(__ht2);
+}
+
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, bool>
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::insert_unique_noresize(const value_type& __obj)
+{
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return pair<iterator, bool>(iterator(__cur, this), false);
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return pair<iterator, bool>(iterator(__tmp, this), true);
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::insert_equal_noresize(const value_type& __obj)
+{
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) {
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __cur->_M_next;
+ __cur->_M_next = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+ }
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::reference
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::find_or_insert(const value_type& __obj)
+{
+ resize(_M_num_elements + 1);
+
+ size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return __cur->_M_val;
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return __tmp->_M_val;
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator,
+ typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator>
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key)
+{
+ typedef pair<iterator, iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (_Node* __first = _M_buckets[__n]; __first; __first = __first->_M_next)
+ if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+ for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(iterator(__first, this), iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(iterator(__first, this),
+ iterator(_M_buckets[__m], this));
+ return _Pii(iterator(__first, this), end());
+ }
+ return _Pii(end(), end());
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator,
+ typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator>
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::equal_range(const key_type& __key) const
+{
+ typedef pair<const_iterator, const_iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (const _Node* __first = _M_buckets[__n] ;
+ __first;
+ __first = __first->_M_next) {
+ if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+ for (const _Node* __cur = __first->_M_next;
+ __cur;
+ __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(const_iterator(__first, this),
+ const_iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(const_iterator(__first, this),
+ const_iterator(_M_buckets[__m], this));
+ return _Pii(const_iterator(__first, this), end());
+ }
+ }
+ return _Pii(end(), end());
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::size_type
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const key_type& __key)
+{
+ const size_type __n = _M_bkt_num_key(__key);
+ _Node* __first = _M_buckets[__n];
+ size_type __erased = 0;
+
+ if (__first) {
+ _Node* __cur = __first;
+ _Node* __next = __cur->_M_next;
+ while (__next) {
+ if (_M_equals(_M_get_key(__next->_M_val), __key)) {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ ++__erased;
+ --_M_num_elements;
+ }
+ else {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+ _M_buckets[__n] = __first->_M_next;
+ _M_delete_node(__first);
+ ++__erased;
+ --_M_num_elements;
+ }
+ }
+ return __erased;
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const iterator& __it)
+{
+ _Node* __p = __it._M_cur;
+ if (__p) {
+ const size_type __n = _M_bkt_num(__p->_M_val);
+ _Node* __cur = _M_buckets[__n];
+
+ if (__cur == __p) {
+ _M_buckets[__n] = __cur->_M_next;
+ _M_delete_node(__cur);
+ --_M_num_elements;
+ }
+ else {
+ _Node* __next = __cur->_M_next;
+ while (__next) {
+ if (__next == __p) {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ --_M_num_elements;
+ break;
+ }
+ else {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ }
+ }
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::erase(iterator __first, iterator __last)
+{
+ size_type __f_bucket = __first._M_cur ?
+ _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size();
+ size_type __l_bucket = __last._M_cur ?
+ _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size();
+
+ if (__first._M_cur == __last._M_cur)
+ return;
+ else if (__f_bucket == __l_bucket)
+ _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+ else {
+ _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+ for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+ _M_erase_bucket(__n, 0);
+ if (__l_bucket != _M_buckets.size())
+ _M_erase_bucket(__l_bucket, __last._M_cur);
+ }
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+inline void
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const_iterator __first,
+ const_iterator __last)
+{
+ erase(iterator(const_cast<_Node*>(__first._M_cur),
+ const_cast<hashtable*>(__first._M_ht)),
+ iterator(const_cast<_Node*>(__last._M_cur),
+ const_cast<hashtable*>(__last._M_ht)));
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+inline void
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const const_iterator& __it)
+{
+ erase(iterator(const_cast<_Node*>(__it._M_cur),
+ const_cast<hashtable*>(__it._M_ht)));
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::resize(size_type __num_elements_hint)
+{
+ const size_type __old_n = _M_buckets.size();
+ if (__num_elements_hint > __old_n) {
+ const size_type __n = _M_next_size(__num_elements_hint);
+ if (__n > __old_n) {
+ _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
+ try {
+ for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) {
+ _Node* __first = _M_buckets[__bucket];
+ while (__first) {
+ size_type __new_bucket = _M_bkt_num(__first->_M_val, __n);
+ _M_buckets[__bucket] = __first->_M_next;
+ __first->_M_next = __tmp[__new_bucket];
+ __tmp[__new_bucket] = __first;
+ __first = _M_buckets[__bucket];
+ }
+ }
+ _M_buckets.swap(__tmp);
+ }
+ catch(...) {
+ for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) {
+ while (__tmp[__bucket]) {
+ _Node* __next = __tmp[__bucket]->_M_next;
+ _M_delete_node(__tmp[__bucket]);
+ __tmp[__bucket] = __next;
+ }
+ }
+ __throw_exception_again;
+ }
+ }
+ }
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+{
+ _Node* __cur = _M_buckets[__n];
+ if (__cur == __first)
+ _M_erase_bucket(__n, __last);
+ else {
+ _Node* __next;
+ for (__next = __cur->_M_next;
+ __next != __first;
+ __cur = __next, __next = __cur->_M_next)
+ ;
+ while (__next != __last) {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ --_M_num_elements;
+ }
+ }
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::_M_erase_bucket(const size_type __n, _Node* __last)
+{
+ _Node* __cur = _M_buckets[__n];
+ while (__cur != __last) {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ _M_buckets[__n] = __cur;
+ --_M_num_elements;
+ }
+}
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::clear()
+{
+ for (size_type __i = 0; __i < _M_buckets.size(); ++__i) {
+ _Node* __cur = _M_buckets[__i];
+ while (__cur != 0) {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ }
+ _M_buckets[__i] = 0;
+ }
+ _M_num_elements = 0;
+}
+
+
+template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+ ::_M_copy_from(const hashtable& __ht)
+{
+ _M_buckets.clear();
+ _M_buckets.reserve(__ht._M_buckets.size());
+ _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+ try {
+ for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+ const _Node* __cur = __ht._M_buckets[__i];
+ if (__cur) {
+ _Node* __local_copy = _M_new_node(__cur->_M_val);
+ _M_buckets[__i] = __local_copy;
+
+ for (_Node* __next = __cur->_M_next;
+ __next;
+ __cur = __next, __next = __cur->_M_next) {
+ __local_copy->_M_next = _M_new_node(__next->_M_val);
+ __local_copy = __local_copy->_M_next;
+ }
+ }
+ }
+ _M_num_elements = __ht._M_num_elements;
+ }
+ catch(...)
+ {
+ clear();
+ __throw_exception_again;
+ }
+}
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/iterator b/contrib/libstdc++/include/ext/iterator
index f23212f..094313c 100644
--- a/contrib/libstdc++/include/ext/iterator
+++ b/contrib/libstdc++/include/ext/iterator
@@ -60,36 +60,37 @@
*/
#ifndef _EXT_ITERATOR
-#define _EXT_ITERATOR
+#define _EXT_ITERATOR 1
#pragma GCC system_header
+
#include <bits/concept_check.h>
#include <iterator>
namespace __gnu_cxx
{
-
- // There are two signatures for distance. In addition to the one taking
- // two iterators and returning a result, there is another taking two
- // iterators and a reference-to-result variable, and returning nothing.
- // The latter seems to be an SGI extension. -- pedwards
+ // There are two signatures for distance. In addition to the one
+ // taking two iterators and returning a result, there is another
+ // taking two iterators and a reference-to-result variable, and
+ // returning nothing. The latter seems to be an SGI extension.
+ // -- pedwards
template<typename _InputIterator, typename _Distance>
inline void
__distance(_InputIterator __first, _InputIterator __last,
_Distance& __n, std::input_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
while (__first != __last) { ++__first; ++__n; }
}
template<typename _RandomAccessIterator, typename _Distance>
inline void
- __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Distance& __n, std::random_access_iterator_tag)
{
// concept requirements
- __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__n += __last - __first;
}
@@ -106,8 +107,7 @@ namespace __gnu_cxx
// concept requirements -- taken care of in __distance
__distance(__first, __last, __n, std::__iterator_category(__first));
}
-
} // namespace __gnu_cxx
-#endif /* _EXT_ITERATOR */
+#endif
diff --git a/contrib/libstdc++/include/ext/malloc_allocator.h b/contrib/libstdc++/include/ext/malloc_allocator.h
new file mode 100644
index 0000000..938380c
--- /dev/null
+++ b/contrib/libstdc++/include/ext/malloc_allocator.h
@@ -0,0 +1,118 @@
+// Allocator that wraps "C" malloc -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _MALLOC_ALLOCATOR_H
+#define _MALLOC_ALLOCATOR_H 1
+
+#include <new>
+
+namespace __gnu_cxx
+{
+ /**
+ * @brief An allocator that uses malloc
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls malloc
+ * - all deallocation calls free
+ *
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Tp>
+ class malloc_allocator
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef malloc_allocator<_Tp1> other; };
+
+ malloc_allocator() throw() { }
+
+ malloc_allocator(const malloc_allocator&) throw() { }
+
+ template<typename _Tp1>
+ malloc_allocator(const malloc_allocator<_Tp1>&) throw() { }
+
+ ~malloc_allocator() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ // NB: __n is permitted to be 0. The C++ standard says nothing
+ // about what the return value is when __n == 0.
+ pointer
+ allocate(size_type __n, const void* = 0)
+ {
+ pointer __ret = static_cast<_Tp*>(malloc(__n * sizeof(_Tp)));
+ if (!__ret)
+ throw std::bad_alloc();
+ return __ret;
+ }
+
+ // __p is not permitted to be a null pointer.
+ void
+ deallocate(pointer __p, size_type)
+ { free(static_cast<void*>(__p)); }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new(__p) value_type(__val); }
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const malloc_allocator<_Tp>&, const malloc_allocator<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const malloc_allocator<_Tp>&, const malloc_allocator<_Tp>&)
+ { return false; }
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/memory b/contrib/libstdc++/include/ext/memory
index 5626b70..1d93f90 100644
--- a/contrib/libstdc++/include/ext/memory
+++ b/contrib/libstdc++/include/ext/memory
@@ -60,9 +60,10 @@
*/
#ifndef _EXT_MEMORY
-#define _EXT_MEMORY
+#define _EXT_MEMORY 1
#pragma GCC system_header
+
#include <memory>
#include <bits/stl_tempbuf.h>
@@ -72,24 +73,23 @@ namespace __gnu_cxx
using std::pair;
using std::__iterator_category;
using std::_Temporary_buffer;
-
template<typename _InputIter, typename _Size, typename _ForwardIter>
pair<_InputIter, _ForwardIter>
__uninitialized_copy_n(_InputIter __first, _Size __count,
- _ForwardIter __result,
- std::input_iterator_tag)
+ _ForwardIter __result, std::input_iterator_tag)
{
_ForwardIter __cur = __result;
- try {
- for ( ; __count > 0 ; --__count, ++__first, ++__cur)
- std::_Construct(&*__cur, *__first);
- return pair<_InputIter, _ForwardIter>(__first, __cur);
- }
+ try
+ {
+ for ( ; __count > 0 ; --__count, ++__first, ++__cur)
+ std::_Construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
catch(...)
{
std::_Destroy(__result, __cur);
- __throw_exception_again;
+ __throw_exception_again;
}
}
@@ -108,7 +108,8 @@ namespace __gnu_cxx
template<typename _InputIter, typename _Size, typename _ForwardIter>
inline pair<_InputIter, _ForwardIter>
__uninitialized_copy_n(_InputIter __first, _Size __count,
- _ForwardIter __result) {
+ _ForwardIter __result)
+ {
return __uninitialized_copy_n(__first, __count, __result,
__iterator_category(__first));
}
@@ -126,7 +127,8 @@ namespace __gnu_cxx
template<typename _InputIter, typename _Size, typename _ForwardIter>
inline pair<_InputIter, _ForwardIter>
uninitialized_copy_n(_InputIter __first, _Size __count,
- _ForwardIter __result) {
+ _ForwardIter __result)
+ {
return __uninitialized_copy_n(__first, __count, __result,
__iterator_category(__first));
}
@@ -152,19 +154,18 @@ namespace __gnu_cxx
*
* @ingroup SGIextensions
*/
- template <class _ForwardIterator,
- class _Tp
+ template <class _ForwardIterator, class _Tp
= typename std::iterator_traits<_ForwardIterator>::value_type >
struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
{
/// Requests storage large enough to hold a copy of [first,last).
temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
- : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
+ : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) { }
+
/// Destroys objects and frees storage.
- ~temporary_buffer() {}
+ ~temporary_buffer() { }
};
-
} // namespace __gnu_cxx
-#endif /* _EXT_MEMORY */
+#endif
diff --git a/contrib/libstdc++/include/ext/mt_allocator.h b/contrib/libstdc++/include/ext/mt_allocator.h
new file mode 100644
index 0000000..f0ee2eb
--- /dev/null
+++ b/contrib/libstdc++/include/ext/mt_allocator.h
@@ -0,0 +1,718 @@
+// MT-optimized allocator -*- C++ -*-
+
+// Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+/** @file ext/mt_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * You should only include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _MT_ALLOCATOR_H
+#define _MT_ALLOCATOR_H 1
+
+#include <new>
+#include <cstdlib>
+#include <bits/functexcept.h>
+#include <bits/gthr.h>
+#include <bits/atomicity.h>
+
+namespace __gnu_cxx
+{
+ /**
+ * This is a fixed size (power of 2) allocator which - when
+ * compiled with thread support - will maintain one freelist per
+ * size per thread plus a "global" one. Steps are taken to limit
+ * the per thread freelist sizes (by returning excess back to
+ * "global").
+ *
+ * Further details:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html
+ */
+ template<typename _Tp>
+ class __mt_alloc
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef __mt_alloc<_Tp1> other; };
+
+ __mt_alloc() throw()
+ {
+ // XXX
+ }
+
+ __mt_alloc(const __mt_alloc&) throw()
+ {
+ // XXX
+ }
+
+ template<typename _Tp1>
+ __mt_alloc(const __mt_alloc<_Tp1>& obj) throw()
+ {
+ // XXX
+ }
+
+ ~__mt_alloc() throw() { }
+
+ pointer
+ address(reference __x) const
+ { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const
+ { return &__x; }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new(__p) _Tp(__val); }
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+
+ pointer
+ allocate(size_type __n, const void* = 0);
+
+ void
+ deallocate(pointer __p, size_type __n);
+
+ // Variables used to configure the behavior of the allocator,
+ // assigned and explained in detail below.
+ struct _Tune
+ {
+ // Alignment needed.
+ // NB: In any case must be >= sizeof(_Block_record), that
+ // is 4 on 32 bit machines and 8 on 64 bit machines.
+ size_t _M_align;
+
+ // Allocation requests (after round-up to power of 2) below
+ // this value will be handled by the allocator. A raw new/
+ // call will be used for requests larger than this value.
+ size_t _M_max_bytes;
+
+ // Size in bytes of the smallest bin.
+ // NB: Must be a power of 2 and >= _M_align.
+ size_t _M_min_bin;
+
+ // In order to avoid fragmenting and minimize the number of
+ // new() calls we always request new memory using this
+ // value. Based on previous discussions on the libstdc++
+ // mailing list we have choosen the value below.
+ // See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html
+ size_t _M_chunk_size;
+
+ // The maximum number of supported threads. Our Linux 2.4.18
+ // reports 4070 in /proc/sys/kernel/threads-max
+ size_t _M_max_threads;
+
+ // Each time a deallocation occurs in a threaded application
+ // we make sure that there are no more than
+ // _M_freelist_headroom % of used memory on the freelist. If
+ // the number of additional records is more than
+ // _M_freelist_headroom % of the freelist, we move these
+ // records back to the global pool.
+ size_t _M_freelist_headroom;
+
+ // Set to true forces all allocations to use new().
+ bool _M_force_new;
+
+ explicit
+ _Tune()
+ : _M_align(8), _M_max_bytes(128), _M_min_bin(8),
+ _M_chunk_size(4096 - 4 * sizeof(void*)),
+ _M_max_threads(4096), _M_freelist_headroom(10),
+ _M_force_new(getenv("GLIBCXX_FORCE_NEW") ? true : false)
+ { }
+
+ explicit
+ _Tune(size_t __align, size_t __maxb, size_t __minbin,
+ size_t __chunk, size_t __maxthreads, size_t __headroom,
+ bool __force)
+ : _M_align(__align), _M_max_bytes(__maxb), _M_min_bin(__minbin),
+ _M_chunk_size(__chunk), _M_max_threads(__maxthreads),
+ _M_freelist_headroom(__headroom), _M_force_new(__force)
+ { }
+ };
+
+ private:
+ // We need to create the initial lists and set up some variables
+ // before we can answer to the first request for memory.
+#ifdef __GTHREADS
+ static __gthread_once_t _S_once;
+#endif
+ static bool _S_init;
+
+ static void
+ _S_initialize();
+
+ // Configuration options.
+ static _Tune _S_options;
+
+ static const _Tune
+ _S_get_options()
+ { return _S_options; }
+
+ static void
+ _S_set_options(_Tune __t)
+ {
+ if (!_S_init)
+ _S_options = __t;
+ }
+
+ // Using short int as type for the binmap implies we are never
+ // caching blocks larger than 65535 with this allocator
+ typedef unsigned short int _Binmap_type;
+ static _Binmap_type* _S_binmap;
+
+ // Each requesting thread is assigned an id ranging from 1 to
+ // _S_max_threads. Thread id 0 is used as a global memory pool.
+ // In order to get constant performance on the thread assignment
+ // routine, we keep a list of free ids. When a thread first
+ // requests memory we remove the first record in this list and
+ // stores the address in a __gthread_key. When initializing the
+ // __gthread_key we specify a destructor. When this destructor
+ // (i.e. the thread dies) is called, we return the thread id to
+ // the front of this list.
+#ifdef __GTHREADS
+ struct _Thread_record
+ {
+ // Points to next free thread id record. NULL if last record in list.
+ _Thread_record* volatile _M_next;
+
+ // Thread id ranging from 1 to _S_max_threads.
+ size_t _M_id;
+ };
+
+ static _Thread_record* volatile _S_thread_freelist_first;
+ static __gthread_mutex_t _S_thread_freelist_mutex;
+ static __gthread_key_t _S_thread_key;
+
+ static void
+ _S_destroy_thread_key(void* __freelist_pos);
+#endif
+
+ static size_t
+ _S_get_thread_id();
+
+ union _Block_record
+ {
+ // Points to the block_record of the next free block.
+ _Block_record* volatile _M_next;
+
+#ifdef __GTHREADS
+ // The thread id of the thread which has requested this block.
+ size_t _M_thread_id;
+#endif
+ };
+
+ struct _Bin_record
+ {
+ // An "array" of pointers to the first free block for each
+ // thread id. Memory to this "array" is allocated in _S_initialize()
+ // for _S_max_threads + global pool 0.
+ _Block_record** volatile _M_first;
+
+#ifdef __GTHREADS
+ // An "array" of counters used to keep track of the amount of
+ // blocks that are on the freelist/used for each thread id.
+ // Memory to these "arrays" is allocated in _S_initialize() for
+ // _S_max_threads + global pool 0.
+ size_t* volatile _M_free;
+ size_t* volatile _M_used;
+
+ // Each bin has its own mutex which is used to ensure data
+ // integrity while changing "ownership" on a block. The mutex
+ // is initialized in _S_initialize().
+ __gthread_mutex_t* _M_mutex;
+#endif
+ };
+
+ // An "array" of bin_records each of which represents a specific
+ // power of 2 size. Memory to this "array" is allocated in
+ // _S_initialize().
+ static _Bin_record* volatile _S_bin;
+
+ // Actual value calculated in _S_initialize().
+ static size_t _S_bin_size;
+ };
+
+ template<typename _Tp>
+ typename __mt_alloc<_Tp>::pointer
+ __mt_alloc<_Tp>::
+ allocate(size_type __n, const void*)
+ {
+ // Although the test in __gthread_once() would suffice, we wrap
+ // test of the once condition in our own unlocked check. This
+ // saves one function call to pthread_once() (which itself only
+ // tests for the once value unlocked anyway and immediately
+ // returns if set)
+ if (!_S_init)
+ {
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ __gthread_once(&_S_once, _S_initialize);
+#endif
+ if (!_S_init)
+ _S_initialize();
+ }
+
+ // Requests larger than _M_max_bytes are handled by new/delete
+ // directly.
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > _S_options._M_max_bytes || _S_options._M_force_new)
+ {
+ void* __ret = ::operator new(__bytes);
+ return static_cast<_Tp*>(__ret);
+ }
+
+ // Round up to power of 2 and figure out which bin to use.
+ const size_t __which = _S_binmap[__bytes];
+ const size_t __thread_id = _S_get_thread_id();
+
+ // Find out if we have blocks on our freelist. If so, go ahead
+ // and use them directly without having to lock anything.
+ const _Bin_record& __bin = _S_bin[__which];
+ _Block_record* __block = NULL;
+ if (__bin._M_first[__thread_id] == NULL)
+ {
+ // NB: For alignment reasons, we can't use the first _M_align
+ // bytes, even when sizeof(_Block_record) < _M_align.
+ const size_t __bin_size = ((_S_options._M_min_bin << __which)
+ + _S_options._M_align);
+ size_t __block_count = _S_options._M_chunk_size / __bin_size;
+
+ // Are we using threads?
+ // - Yes, check if there are free blocks on the global
+ // list. If so, grab up to __block_count blocks in one
+ // lock and change ownership. If the global list is
+ // empty, we allocate a new chunk and add those blocks
+ // directly to our own freelist (with us as owner).
+ // - No, all operations are made directly to global pool 0
+ // no need to lock or change ownership but check for free
+ // blocks on global list (and if not add new ones) and
+ // get the first one.
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ {
+ __gthread_mutex_lock(__bin._M_mutex);
+ if (__bin._M_first[0] == NULL)
+ {
+ // No need to hold the lock when we are adding a
+ // whole chunk to our own list.
+ __gthread_mutex_unlock(__bin._M_mutex);
+
+ void* __v = ::operator new(_S_options._M_chunk_size);
+ __bin._M_first[__thread_id] = static_cast<_Block_record*>(__v);
+ __bin._M_free[__thread_id] = __block_count;
+
+ --__block_count;
+ __block = __bin._M_first[__thread_id];
+ while (__block_count-- > 0)
+ {
+ char* __c = reinterpret_cast<char*>(__block) + __bin_size;
+ __block->_M_next = reinterpret_cast<_Block_record*>(__c);
+ __block = __block->_M_next;
+ }
+ __block->_M_next = NULL;
+ }
+ else
+ {
+ // Is the number of required blocks greater than or
+ // equal to the number that can be provided by the
+ // global free list?
+ __bin._M_first[__thread_id] = __bin._M_first[0];
+ if (__block_count >= __bin._M_free[0])
+ {
+ __bin._M_free[__thread_id] = __bin._M_free[0];
+ __bin._M_free[0] = 0;
+ __bin._M_first[0] = NULL;
+ }
+ else
+ {
+ __bin._M_free[__thread_id] = __block_count;
+ __bin._M_free[0] -= __block_count;
+ --__block_count;
+ __block = __bin._M_first[0];
+ while (__block_count-- > 0)
+ __block = __block->_M_next;
+ __bin._M_first[0] = __block->_M_next;
+ __block->_M_next = NULL;
+ }
+ __gthread_mutex_unlock(__bin._M_mutex);
+ }
+ }
+ else
+#endif
+ {
+ void* __v = ::operator new(_S_options._M_chunk_size);
+ __bin._M_first[0] = static_cast<_Block_record*>(__v);
+
+ --__block_count;
+ __block = __bin._M_first[0];
+ while (__block_count-- > 0)
+ {
+ char* __c = reinterpret_cast<char*>(__block) + __bin_size;
+ __block->_M_next = reinterpret_cast<_Block_record*>(__c);
+ __block = __block->_M_next;
+ }
+ __block->_M_next = NULL;
+ }
+ }
+
+ __block = __bin._M_first[__thread_id];
+ __bin._M_first[__thread_id] = __bin._M_first[__thread_id]->_M_next;
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ {
+ __block->_M_thread_id = __thread_id;
+ --__bin._M_free[__thread_id];
+ ++__bin._M_used[__thread_id];
+ }
+#endif
+
+ char* __c = reinterpret_cast<char*>(__block) + _S_options._M_align;
+ return static_cast<_Tp*>(static_cast<void*>(__c));
+ }
+
+ template<typename _Tp>
+ void
+ __mt_alloc<_Tp>::
+ deallocate(pointer __p, size_type __n)
+ {
+ // Requests larger than _M_max_bytes are handled by operators
+ // new/delete directly.
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > _S_options._M_max_bytes || _S_options._M_force_new)
+ {
+ ::operator delete(__p);
+ return;
+ }
+
+ // Round up to power of 2 and figure out which bin to use.
+ const size_t __which = _S_binmap[__bytes];
+ const _Bin_record& __bin = _S_bin[__which];
+
+ char* __c = reinterpret_cast<char*>(__p) - _S_options._M_align;
+ _Block_record* __block = reinterpret_cast<_Block_record*>(__c);
+
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ {
+ // Calculate the number of records to remove from our freelist:
+ // in order to avoid too much contention we wait until the
+ // number of records is "high enough".
+ const size_t __thread_id = _S_get_thread_id();
+
+ long __remove = ((__bin._M_free[__thread_id]
+ * _S_options._M_freelist_headroom)
+ - __bin._M_used[__thread_id]);
+ if (__remove > static_cast<long>(100 * (_S_bin_size - __which)
+ * _S_options._M_freelist_headroom)
+ && __remove > static_cast<long>(__bin._M_free[__thread_id]))
+ {
+ _Block_record* __tmp = __bin._M_first[__thread_id];
+ _Block_record* __first = __tmp;
+ __remove /= _S_options._M_freelist_headroom;
+ const long __removed = __remove;
+ --__remove;
+ while (__remove-- > 0)
+ __tmp = __tmp->_M_next;
+ __bin._M_first[__thread_id] = __tmp->_M_next;
+ __bin._M_free[__thread_id] -= __removed;
+
+ __gthread_mutex_lock(__bin._M_mutex);
+ __tmp->_M_next = __bin._M_first[0];
+ __bin._M_first[0] = __first;
+ __bin._M_free[0] += __removed;
+ __gthread_mutex_unlock(__bin._M_mutex);
+ }
+
+ // Return this block to our list and update counters and
+ // owner id as needed.
+ --__bin._M_used[__block->_M_thread_id];
+
+ __block->_M_next = __bin._M_first[__thread_id];
+ __bin._M_first[__thread_id] = __block;
+
+ ++__bin._M_free[__thread_id];
+ }
+ else
+#endif
+ {
+ // Single threaded application - return to global pool.
+ __block->_M_next = __bin._M_first[0];
+ __bin._M_first[0] = __block;
+ }
+ }
+
+ template<typename _Tp>
+ void
+ __mt_alloc<_Tp>::
+ _S_initialize()
+ {
+ // This method is called on the first allocation (when _S_init is still
+ // false) to create the bins.
+
+ // Ensure that the static initialization of _S_options has
+ // happened. This depends on (a) _M_align == 0 being an invalid
+ // value that is only present at startup, and (b) the real
+ // static initialization that happens later not actually
+ // changing anything.
+ if (_S_options._M_align == 0)
+ new (&_S_options) _Tune;
+
+ // _M_force_new must not change after the first allocate(),
+ // which in turn calls this method, so if it's false, it's false
+ // forever and we don't need to return here ever again.
+ if (_S_options._M_force_new)
+ {
+ _S_init = true;
+ return;
+ }
+
+ // Calculate the number of bins required based on _M_max_bytes.
+ // _S_bin_size is statically-initialized to one.
+ size_t __bin_size = _S_options._M_min_bin;
+ while (_S_options._M_max_bytes > __bin_size)
+ {
+ __bin_size <<= 1;
+ ++_S_bin_size;
+ }
+
+ // Setup the bin map for quick lookup of the relevant bin.
+ const size_t __j = (_S_options._M_max_bytes + 1) * sizeof(_Binmap_type);
+ _S_binmap = static_cast<_Binmap_type*>(::operator new(__j));
+
+ _Binmap_type* __bp = _S_binmap;
+ _Binmap_type __bin_max = _S_options._M_min_bin;
+ _Binmap_type __bint = 0;
+ for (_Binmap_type __ct = 0; __ct <= _S_options._M_max_bytes; ++__ct)
+ {
+ if (__ct > __bin_max)
+ {
+ __bin_max <<= 1;
+ ++__bint;
+ }
+ *__bp++ = __bint;
+ }
+
+ // Initialize _S_bin and its members.
+ void* __v = ::operator new(sizeof(_Bin_record) * _S_bin_size);
+ _S_bin = static_cast<_Bin_record*>(__v);
+
+ // If __gthread_active_p() create and initialize the list of
+ // free thread ids. Single threaded applications use thread id 0
+ // directly and have no need for this.
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ {
+ const size_t __k = sizeof(_Thread_record) * _S_options._M_max_threads;
+ __v = ::operator new(__k);
+ _S_thread_freelist_first = static_cast<_Thread_record*>(__v);
+
+ // NOTE! The first assignable thread id is 1 since the
+ // global pool uses id 0
+ size_t __i;
+ for (__i = 1; __i < _S_options._M_max_threads; ++__i)
+ {
+ _Thread_record& __tr = _S_thread_freelist_first[__i - 1];
+ __tr._M_next = &_S_thread_freelist_first[__i];
+ __tr._M_id = __i;
+ }
+
+ // Set last record.
+ _S_thread_freelist_first[__i - 1]._M_next = NULL;
+ _S_thread_freelist_first[__i - 1]._M_id = __i;
+
+ // Make sure this is initialized.
+#ifndef __GTHREAD_MUTEX_INIT
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_S_thread_freelist_mutex);
+#endif
+ // Initialize per thread key to hold pointer to
+ // _S_thread_freelist.
+ __gthread_key_create(&_S_thread_key, _S_destroy_thread_key);
+
+ const size_t __max_threads = _S_options._M_max_threads + 1;
+ for (size_t __n = 0; __n < _S_bin_size; ++__n)
+ {
+ _Bin_record& __bin = _S_bin[__n];
+ __v = ::operator new(sizeof(_Block_record*) * __max_threads);
+ __bin._M_first = static_cast<_Block_record**>(__v);
+
+ __v = ::operator new(sizeof(size_t) * __max_threads);
+ __bin._M_free = static_cast<size_t*>(__v);
+
+ __v = ::operator new(sizeof(size_t) * __max_threads);
+ __bin._M_used = static_cast<size_t*>(__v);
+
+ __v = ::operator new(sizeof(__gthread_mutex_t));
+ __bin._M_mutex = static_cast<__gthread_mutex_t*>(__v);
+
+#ifdef __GTHREAD_MUTEX_INIT
+ {
+ // Do not copy a POSIX/gthr mutex once in use.
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ *__bin._M_mutex = __tmp;
+ }
+#else
+ { __GTHREAD_MUTEX_INIT_FUNCTION(__bin._M_mutex); }
+#endif
+
+ for (size_t __threadn = 0; __threadn < __max_threads;
+ ++__threadn)
+ {
+ __bin._M_first[__threadn] = NULL;
+ __bin._M_free[__threadn] = 0;
+ __bin._M_used[__threadn] = 0;
+ }
+ }
+ }
+ else
+#endif
+ for (size_t __n = 0; __n < _S_bin_size; ++__n)
+ {
+ _Bin_record& __bin = _S_bin[__n];
+ __v = ::operator new(sizeof(_Block_record*));
+ __bin._M_first = static_cast<_Block_record**>(__v);
+ __bin._M_first[0] = NULL;
+ }
+
+ _S_init = true;
+ }
+
+ template<typename _Tp>
+ size_t
+ __mt_alloc<_Tp>::
+ _S_get_thread_id()
+ {
+#ifdef __GTHREADS
+ // If we have thread support and it's active we check the thread
+ // key value and return its id or if it's not set we take the
+ // first record from _S_thread_freelist and sets the key and
+ // returns it's id.
+ if (__gthread_active_p())
+ {
+ _Thread_record* __freelist_pos =
+ static_cast<_Thread_record*>(__gthread_getspecific(_S_thread_key));
+ if (__freelist_pos == NULL)
+ {
+ // Since _S_options._M_max_threads must be larger than
+ // the theoretical max number of threads of the OS the
+ // list can never be empty.
+ __gthread_mutex_lock(&_S_thread_freelist_mutex);
+ __freelist_pos = _S_thread_freelist_first;
+ _S_thread_freelist_first = _S_thread_freelist_first->_M_next;
+ __gthread_mutex_unlock(&_S_thread_freelist_mutex);
+
+ __gthread_setspecific(_S_thread_key,
+ static_cast<void*>(__freelist_pos));
+ }
+ return __freelist_pos->_M_id;
+ }
+#endif
+ // Otherwise (no thread support or inactive) all requests are
+ // served from the global pool 0.
+ return 0;
+ }
+
+#ifdef __GTHREADS
+ template<typename _Tp>
+ void
+ __mt_alloc<_Tp>::
+ _S_destroy_thread_key(void* __freelist_pos)
+ {
+ // Return this thread id record to front of thread_freelist.
+ __gthread_mutex_lock(&_S_thread_freelist_mutex);
+ _Thread_record* __tr = static_cast<_Thread_record*>(__freelist_pos);
+ __tr->_M_next = _S_thread_freelist_first;
+ _S_thread_freelist_first = __tr;
+ __gthread_mutex_unlock(&_S_thread_freelist_mutex);
+ }
+#endif
+
+ template<typename _Tp>
+ inline bool
+ operator==(const __mt_alloc<_Tp>&, const __mt_alloc<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const __mt_alloc<_Tp>&, const __mt_alloc<_Tp>&)
+ { return false; }
+
+ template<typename _Tp>
+ bool __mt_alloc<_Tp>::_S_init = false;
+
+ template<typename _Tp>
+ typename __mt_alloc<_Tp>::_Tune __mt_alloc<_Tp>::_S_options;
+
+ template<typename _Tp>
+ typename __mt_alloc<_Tp>::_Binmap_type* __mt_alloc<_Tp>::_S_binmap;
+
+ template<typename _Tp>
+ typename __mt_alloc<_Tp>::_Bin_record* volatile __mt_alloc<_Tp>::_S_bin;
+
+ template<typename _Tp>
+ size_t __mt_alloc<_Tp>::_S_bin_size = 1;
+
+ // Actual initialization in _S_initialize().
+#ifdef __GTHREADS
+ template<typename _Tp>
+ __gthread_once_t __mt_alloc<_Tp>::_S_once = __GTHREAD_ONCE_INIT;
+
+ template<typename _Tp>
+ typename __mt_alloc<_Tp>::_Thread_record*
+ volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL;
+
+ template<typename _Tp>
+ __gthread_key_t __mt_alloc<_Tp>::_S_thread_key;
+
+ template<typename _Tp>
+ __gthread_mutex_t
+#ifdef __GTHREAD_MUTEX_INIT
+ __mt_alloc<_Tp>::_S_thread_freelist_mutex = __GTHREAD_MUTEX_INIT;
+#else
+ __mt_alloc<_Tp>::_S_thread_freelist_mutex;
+#endif
+#endif
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/new_allocator.h b/contrib/libstdc++/include/ext/new_allocator.h
new file mode 100644
index 0000000..1b0b4f6
--- /dev/null
+++ b/contrib/libstdc++/include/ext/new_allocator.h
@@ -0,0 +1,113 @@
+// Allocator that wraps operator new -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#ifndef _NEW_ALLOCATOR_H
+#define _NEW_ALLOCATOR_H 1
+
+#include <new>
+
+namespace __gnu_cxx
+{
+ /**
+ * @brief An allocator that uses global new, as per [20.4].
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls operator new
+ * - all deallocation calls operator delete
+ *
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ template<typename _Tp>
+ class new_allocator
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef new_allocator<_Tp1> other; };
+
+ new_allocator() throw() { }
+
+ new_allocator(const new_allocator&) throw() { }
+
+ template<typename _Tp1>
+ new_allocator(const new_allocator<_Tp1>&) throw() { }
+
+ ~new_allocator() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ // NB: __n is permitted to be 0. The C++ standard says nothing
+ // about what the return value is when __n == 0.
+ pointer
+ allocate(size_type __n, const void* = 0)
+ { return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); }
+
+ // __p is not permitted to be a null pointer.
+ void
+ deallocate(pointer __p, size_type)
+ { ::operator delete(__p); }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new(__p) _Tp(__val); }
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
+ { return false; }
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/numeric b/contrib/libstdc++/include/ext/numeric
index 6770461..40edf07 100644
--- a/contrib/libstdc++/include/ext/numeric
+++ b/contrib/libstdc++/include/ext/numeric
@@ -60,9 +60,10 @@
*/
#ifndef _EXT_NUMERIC
-#define _EXT_NUMERIC
+#define _EXT_NUMERIC 1
#pragma GCC system_header
+
#include <bits/concept_check.h>
#include <numeric>
@@ -72,7 +73,6 @@ namespace __gnu_cxx
{
// Returns __x ** __n, where __n >= 0. _Note that "multiplication"
// is required to be associative, but not necessarily commutative.
-
template<typename _Tp, typename _Integer, typename _MonoidOperation>
_Tp
__power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
@@ -102,14 +102,13 @@ namespace __gnu_cxx
__power(_Tp __x, _Integer __n)
{ return __power(__x, __n, std::multiplies<_Tp>()); }
- // Alias for the internal name __power. Note that power is an extension,
- // not part of the C++ standard.
-
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
+ // Alias for the internal name __power. Note that power is an extension,
+ // not part of the C++ standard.
template<typename _Tp, typename _Integer, typename _MonoidOperation>
inline _Tp
power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
@@ -125,27 +124,25 @@ namespace __gnu_cxx
power(_Tp __x, _Integer __n)
{ return __power(__x, __n); }
- // iota is not part of the C++ standard. It is an extension.
-
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
+ // iota is not part of the C++ standard. It is an extension.
template<typename _ForwardIter, typename _Tp>
- void
+ void
iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
{
// concept requirements
- __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
- __glibcpp_function_requires(_ConvertibleConcept<_Tp,
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
typename std::iterator_traits<_ForwardIter>::value_type>)
while (__first != __last)
*__first++ = __value++;
}
-
} // namespace __gnu_cxx
-#endif /* _EXT_NUMERIC */
+#endif
diff --git a/contrib/libstdc++/include/ext/pod_char_traits.h b/contrib/libstdc++/include/ext/pod_char_traits.h
new file mode 100644
index 0000000..c69025e
--- /dev/null
+++ b/contrib/libstdc++/include/ext/pod_char_traits.h
@@ -0,0 +1,158 @@
+// POD character, std::char_traits specialization -*- C++ -*-
+
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+// Gabriel Dos Reis <gdr@integrable-solutions.net>
+// Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _POD_CHAR_TRAITS_H
+#define _POD_CHAR_TRAITS_H 1
+
+#include <string>
+
+namespace __gnu_cxx
+{
+ template<typename V, typename I, typename S = mbstate_t>
+ struct character
+ {
+ typedef V value_type;
+ typedef I int_type;
+ typedef S state_type;
+ value_type value;
+ };
+
+ template<typename V, typename I>
+ inline bool
+ operator==(const character<V, I>& lhs, const character<V, I>& rhs)
+ { return lhs.value == rhs.value; }
+
+ template<typename V, typename I>
+ inline bool
+ operator<(const character<V, I>& lhs, const character<V, I>& rhs)
+ { return lhs.value < rhs.value; }
+} // namespace __gnu_cxx
+
+namespace std
+{
+ // Provide std::char_traits specialization.
+ template<typename V, typename I, typename S>
+ struct char_traits<__gnu_cxx::character<V, I, S> >
+ {
+ typedef __gnu_cxx::character<V, I, S> char_type;
+
+ // NB: This type should be bigger than char_type, so as to
+ // properly hold EOF values in addition to the full range of
+ // char_type values.
+ // Also, assumes
+ // int_type(value_type) is valid.
+ // int_type(-1) is possible.
+ typedef typename char_type::int_type int_type;
+ typedef typename char_type::state_type state_type;
+ typedef fpos<state_type> pos_type;
+ typedef streamoff off_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (!eq(__s1[__i], __s2[__i]))
+ return lt(__s1[__i], __s2[__i]) ? -1 : 1;
+ return 0;
+ }
+
+ static size_t
+ length(const char_type* __s)
+ {
+ const char_type* __p = __s;
+ while (__p->value)
+ ++__p;
+ return (__p - __s);
+ }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ {
+ for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
+ if (*__p == __a)
+ return __p;
+ return 0;
+ }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ {
+ for (char_type* __p = __s; __p < __s + __n; ++__p)
+ assign(*__p, __a);
+ return __s;
+ }
+
+ static char_type
+ to_char_type(const int_type& __c)
+ {
+ char_type __r = { __c };
+ return __r;
+ }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return int_type(__c.value); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof() { return static_cast<int_type>(-1); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? int_type(0) : __c; }
+ };
+}
+
+#endif
diff --git a/contrib/libstdc++/include/ext/pool_allocator.h b/contrib/libstdc++/include/ext/pool_allocator.h
new file mode 100644
index 0000000..eec79e7
--- /dev/null
+++ b/contrib/libstdc++/include/ext/pool_allocator.h
@@ -0,0 +1,254 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/pool_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * You should only include this header if you are using GCC 3 or later.
+ */
+#ifndef _POOL_ALLOCATOR_H
+#define _POOL_ALLOCATOR_H 1
+
+#include <bits/c++config.h>
+#include <new>
+#include <bits/functexcept.h>
+#include <bits/atomicity.h>
+#include <bits/concurrence.h>
+
+namespace __gnu_cxx
+{
+ /**
+ * @if maint
+ * Uses various allocators to fulfill underlying requests (and makes as
+ * few requests as possible when in default high-speed pool mode).
+ *
+ * Important implementation properties:
+ * 0. If globally mandated, then allocate objects from new
+ * 1. If the clients request an object of size > _S_max_bytes, the resulting
+ * object will be obtained directly from new
+ * 2. In all other cases, we allocate an object of size exactly
+ * _S_round_up(requested_size). Thus the client has enough size
+ * information that we can return the object to the proper free list
+ * without permanently losing part of the object.
+ *
+ * @endif
+ * (See @link Allocators allocators info @endlink for more.)
+ */
+ class __pool_base
+ {
+ protected:
+
+ enum { _S_align = 8 };
+ enum { _S_max_bytes = 128 };
+ enum { _S_free_list_size = _S_max_bytes / _S_align };
+
+ union _Obj
+ {
+ union _Obj* _M_free_list_link;
+ char _M_client_data[1]; // The client sees this.
+ };
+
+ static _Obj* volatile _S_free_list[_S_free_list_size];
+
+ // Chunk allocation state.
+ static char* _S_start_free;
+ static char* _S_end_free;
+ static size_t _S_heap_size;
+
+ size_t
+ _M_round_up(size_t __bytes)
+ { return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); }
+
+ _Obj* volatile*
+ _M_get_free_list(size_t __bytes);
+
+ mutex_type&
+ _M_get_mutex();
+
+ // Returns an object of size __n, and optionally adds to size __n
+ // free list.
+ void*
+ _M_refill(size_t __n);
+
+ // Allocates a chunk for nobjs of size size. nobjs may be reduced
+ // if it is inconvenient to allocate the requested number.
+ char*
+ _M_allocate_chunk(size_t __n, int& __nobjs);
+ };
+
+
+ template<typename _Tp>
+ class __pool_alloc : private __pool_base
+ {
+ private:
+ static _Atomic_word _S_force_new;
+
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef __pool_alloc<_Tp1> other; };
+
+ __pool_alloc() throw() { }
+
+ __pool_alloc(const __pool_alloc&) throw() { }
+
+ template<typename _Tp1>
+ __pool_alloc(const __pool_alloc<_Tp1>&) throw() { }
+
+ ~__pool_alloc() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new(__p) _Tp(__val); }
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+
+ pointer
+ allocate(size_type __n, const void* = 0);
+
+ void
+ deallocate(pointer __p, size_type __n);
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
+ { return false; }
+
+ template<typename _Tp>
+ _Atomic_word
+ __pool_alloc<_Tp>::_S_force_new;
+
+ template<typename _Tp>
+ _Tp*
+ __pool_alloc<_Tp>::allocate(size_type __n, const void*)
+ {
+ pointer __ret = 0;
+ if (__n)
+ {
+ if (__n <= max_size())
+ {
+ // If there is a race through here, assume answer from getenv
+ // will resolve in same direction. Inspired by techniques
+ // to efficiently support threading found in basic_string.h.
+ if (_S_force_new == 0)
+ {
+ if (getenv("GLIBCXX_FORCE_NEW"))
+ __atomic_add(&_S_force_new, 1);
+ else
+ __atomic_add(&_S_force_new, -1);
+ }
+
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > size_t(_S_max_bytes) || _S_force_new == 1)
+ __ret = static_cast<_Tp*>(::operator new(__bytes));
+ else
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__bytes);
+
+ lock sentry(_M_get_mutex());
+ _Obj* __restrict__ __result = *__free_list;
+ if (__builtin_expect(__result == 0, 0))
+ __ret = static_cast<_Tp*>(_M_refill(_M_round_up(__bytes)));
+ else
+ {
+ *__free_list = __result->_M_free_list_link;
+ __ret = reinterpret_cast<_Tp*>(__result);
+ }
+ if (__builtin_expect(__ret == 0, 0))
+ std::__throw_bad_alloc();
+ }
+ }
+ else
+ std::__throw_bad_alloc();
+ }
+ return __ret;
+ }
+
+ template<typename _Tp>
+ void
+ __pool_alloc<_Tp>::deallocate(pointer __p, size_type __n)
+ {
+ if (__n)
+ {
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > static_cast<size_t>(_S_max_bytes) || _S_force_new == 1)
+ ::operator delete(__p);
+ else
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__bytes);
+ _Obj* __q = reinterpret_cast<_Obj*>(__p);
+
+ lock sentry(_M_get_mutex());
+ __q ->_M_free_list_link = *__free_list;
+ *__free_list = __q;
+ }
+ }
+ }
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/ext/rb_tree b/contrib/libstdc++/include/ext/rb_tree
index 3941243..2c38b39 100644
--- a/contrib/libstdc++/include/ext/rb_tree
+++ b/contrib/libstdc++/include/ext/rb_tree
@@ -59,39 +59,39 @@
* include this header if you are using GCC 3 or later.
*/
-#ifndef _EXT_RB_TREE
-#define _EXT_RB_TREE
+#ifndef _RB_TREE
+#define _RB_TREE 1
#pragma GCC system_header
+
#include <bits/stl_tree.h>
namespace __gnu_cxx
{
-using std::_Rb_tree;
-using std::allocator;
+ using std::_Rb_tree;
+ using std::allocator;
-// Class rb_tree is not part of the C++ standard. It is provided for
-// compatibility with the HP STL.
+ // Class rb_tree is not part of the C++ standard. It is provided for
+ // compatibility with the HP STL.
-/**
- * This is an SGI extension.
- * @ingroup SGIextensions
- * @doctodo
-*/
-template <class _Key, class _Value, class _KeyOfValue, class _Compare,
- class _Alloc = allocator<_Value> >
-struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
-{
- typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
- typedef typename _Base::allocator_type allocator_type;
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template <class _Key, class _Value, class _KeyOfValue, class _Compare,
+ class _Alloc = allocator<_Value> >
+ struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
+ {
+ typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
+ typedef typename _Base::allocator_type allocator_type;
- rb_tree(const _Compare& __comp = _Compare(),
- const allocator_type& __a = allocator_type())
- : _Base(__comp, __a) {}
-
- ~rb_tree() {}
-};
+ rb_tree(const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__comp, __a) { }
+ ~rb_tree() { }
+ };
} // namespace __gnu_cxx
-#endif /* _EXT_RB_TREE */
+#endif
diff --git a/contrib/libstdc++/include/ext/rope b/contrib/libstdc++/include/ext/rope
index 1441df1..95afd82 100644
--- a/contrib/libstdc++/include/ext/rope
+++ b/contrib/libstdc++/include/ext/rope
@@ -1,6 +1,6 @@
// SGI's rope class -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -46,21 +46,2449 @@
* include this header if you are using GCC 3 or later.
*/
-#ifndef __SGI_STL_ROPE
-#define __SGI_STL_ROPE
+#ifndef _ROPE
+#define _ROPE 1
#include <bits/stl_algobase.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
#include <bits/stl_algo.h>
#include <bits/stl_function.h>
#include <bits/stl_numeric.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <ext/stl_hash_fun.h>
-#include <ext/stl_rope.h>
+#include <bits/allocator.h>
+#include <ext/hash_fun.h>
+
+# ifdef __GC
+# define __GC_CONST const
+# else
+# include <bits/gthr.h>
+# define __GC_CONST // constant except for deallocation
+# endif
+
+#include <ext/memory> // For uninitialized_copy_n
+
+namespace __gnu_cxx
+{
+using std::size_t;
+using std::ptrdiff_t;
+using std::allocator;
+using std::iterator;
+using std::reverse_iterator;
+using std::_Destroy;
+
+// The _S_eos function is used for those functions that
+// convert to/from C-like strings to detect the end of the string.
+
+// The end-of-C-string character.
+// This is what the draft standard says it should be.
+template <class _CharT>
+inline _CharT _S_eos(_CharT*) { return _CharT(); }
+
+// Test for basic character types.
+// For basic character types leaves having a trailing eos.
+template <class _CharT>
+inline bool _S_is_basic_char_type(_CharT*) { return false; }
+template <class _CharT>
+inline bool _S_is_one_byte_char_type(_CharT*) { return false; }
+
+inline bool _S_is_basic_char_type(char*) { return true; }
+inline bool _S_is_one_byte_char_type(char*) { return true; }
+inline bool _S_is_basic_char_type(wchar_t*) { return true; }
+
+// Store an eos iff _CharT is a basic character type.
+// Do not reference _S_eos if it isn't.
+template <class _CharT>
+inline void _S_cond_store_eos(_CharT&) {}
+
+inline void _S_cond_store_eos(char& __c) { __c = 0; }
+inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; }
+
+// char_producers are logically functions that generate a section of
+// a string. These can be convereted to ropes. The resulting rope
+// invokes the char_producer on demand. This allows, for example,
+// files to be viewed as ropes without reading the entire file.
+template <class _CharT>
+class char_producer {
+ public:
+ virtual ~char_producer() {};
+ virtual void operator()(size_t __start_pos, size_t __len,
+ _CharT* __buffer) = 0;
+ // Buffer should really be an arbitrary output iterator.
+ // That way we could flatten directly into an ostream, etc.
+ // This is thoroughly impossible, since iterator types don't
+ // have runtime descriptions.
+};
+
+// Sequence buffers:
+//
+// Sequence must provide an append operation that appends an
+// array to the sequence. Sequence buffers are useful only if
+// appending an entire array is cheaper than appending element by element.
+// This is true for many string representations.
+// This should perhaps inherit from ostream<sequence::value_type>
+// and be implemented correspondingly, so that they can be used
+// for formatted. For the sake of portability, we don't do this yet.
+//
+// For now, sequence buffers behave as output iterators. But they also
+// behave a little like basic_ostringstream<sequence::value_type> and a
+// little like containers.
+
+template<class _Sequence, size_t _Buf_sz = 100>
+class sequence_buffer : public iterator<std::output_iterator_tag,void,void,void,void>
+{
+ public:
+ typedef typename _Sequence::value_type value_type;
+ protected:
+ _Sequence* _M_prefix;
+ value_type _M_buffer[_Buf_sz];
+ size_t _M_buf_count;
+ public:
+ void flush() {
+ _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count);
+ _M_buf_count = 0;
+ }
+ ~sequence_buffer() { flush(); }
+ sequence_buffer() : _M_prefix(0), _M_buf_count(0) {}
+ sequence_buffer(const sequence_buffer& __x) {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ }
+ sequence_buffer(sequence_buffer& __x) {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ }
+ sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {}
+ sequence_buffer& operator= (sequence_buffer& __x) {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ return *this;
+ }
+ sequence_buffer& operator= (const sequence_buffer& __x) {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ return *this;
+ }
+ void push_back(value_type __x)
+ {
+ if (_M_buf_count < _Buf_sz) {
+ _M_buffer[_M_buf_count] = __x;
+ ++_M_buf_count;
+ } else {
+ flush();
+ _M_buffer[0] = __x;
+ _M_buf_count = 1;
+ }
+ }
+ void append(value_type* __s, size_t __len)
+ {
+ if (__len + _M_buf_count <= _Buf_sz) {
+ size_t __i = _M_buf_count;
+ for (size_t __j = 0; __j < __len; __i++, __j++) {
+ _M_buffer[__i] = __s[__j];
+ }
+ _M_buf_count += __len;
+ } else if (0 == _M_buf_count) {
+ _M_prefix->append(__s, __s + __len);
+ } else {
+ flush();
+ append(__s, __len);
+ }
+ }
+ sequence_buffer& write(value_type* __s, size_t __len)
+ {
+ append(__s, __len);
+ return *this;
+ }
+ sequence_buffer& put(value_type __x)
+ {
+ push_back(__x);
+ return *this;
+ }
+ sequence_buffer& operator=(const value_type& __rhs)
+ {
+ push_back(__rhs);
+ return *this;
+ }
+ sequence_buffer& operator*() { return *this; }
+ sequence_buffer& operator++() { return *this; }
+ sequence_buffer operator++(int) { return *this; }
+};
+
+// The following should be treated as private, at least for now.
+template<class _CharT>
+class _Rope_char_consumer {
+ public:
+ // If we had member templates, these should not be virtual.
+ // For now we need to use run-time parametrization where
+ // compile-time would do. Hence this should all be private
+ // for now.
+ // The symmetry with char_producer is accidental and temporary.
+ virtual ~_Rope_char_consumer() {};
+ virtual bool operator()(const _CharT* __buffer, size_t __len) = 0;
+};
+
+// First a lot of forward declarations. The standard seems to require
+// much stricter "declaration before use" than many of the implementations
+// that preceded it.
+template<class _CharT, class _Alloc = allocator<_CharT> > class rope;
+template<class _CharT, class _Alloc> struct _Rope_RopeConcatenation;
+template<class _CharT, class _Alloc> struct _Rope_RopeLeaf;
+template<class _CharT, class _Alloc> struct _Rope_RopeFunction;
+template<class _CharT, class _Alloc> struct _Rope_RopeSubstring;
+template<class _CharT, class _Alloc> class _Rope_iterator;
+template<class _CharT, class _Alloc> class _Rope_const_iterator;
+template<class _CharT, class _Alloc> class _Rope_char_ref_proxy;
+template<class _CharT, class _Alloc> class _Rope_char_ptr_proxy;
+
+template<class _CharT, class _Alloc>
+bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+_Rope_const_iterator<_CharT,_Alloc> operator-
+ (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n);
+
+template<class _CharT, class _Alloc>
+_Rope_const_iterator<_CharT,_Alloc> operator+
+ (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n);
+
+template<class _CharT, class _Alloc>
+_Rope_const_iterator<_CharT,_Alloc> operator+
+ (ptrdiff_t __n,
+ const _Rope_const_iterator<_CharT,_Alloc>& __x);
+
+template<class _CharT, class _Alloc>
+bool operator==
+ (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+bool operator<
+ (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+ptrdiff_t operator-
+ (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+_Rope_iterator<_CharT,_Alloc> operator-
+ (const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n);
+
+template<class _CharT, class _Alloc>
+_Rope_iterator<_CharT,_Alloc> operator+
+ (const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n);
+
+template<class _CharT, class _Alloc>
+_Rope_iterator<_CharT,_Alloc> operator+
+ (ptrdiff_t __n,
+ const _Rope_iterator<_CharT,_Alloc>& __x);
+
+template<class _CharT, class _Alloc>
+bool operator==
+ (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+bool operator<
+ (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+ptrdiff_t operator-
+ (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template<class _CharT, class _Alloc>
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right);
+
+template<class _CharT, class _Alloc>
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+ const _CharT* __right);
+
+template<class _CharT, class _Alloc>
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+ _CharT __right);
+
+// Some helpers, so we can use power on ropes.
+// See below for why this isn't local to the implementation.
+
+// This uses a nonstandard refcount convention.
+// The result has refcount 0.
+template<class _CharT, class _Alloc>
+struct _Rope_Concat_fn
+ : public std::binary_function<rope<_CharT,_Alloc>, rope<_CharT,_Alloc>,
+ rope<_CharT,_Alloc> > {
+ rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x,
+ const rope<_CharT,_Alloc>& __y) {
+ return __x + __y;
+ }
+};
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>
+identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
+{
+ return rope<_CharT,_Alloc>();
+}
+
+
+ // Class _Refcount_Base provides a type, _RC_t, a data member,
+ // _M_ref_count, and member functions _M_incr and _M_decr, which perform
+ // atomic preincrement/predecrement. The constructor initializes
+ // _M_ref_count.
+ struct _Refcount_Base
+ {
+ // The type _RC_t
+ typedef size_t _RC_t;
+
+ // The data member _M_ref_count
+ volatile _RC_t _M_ref_count;
+
+ // Constructor
+ __gthread_mutex_t _M_ref_count_lock;
+
+ _Refcount_Base(_RC_t __n) : _M_ref_count(__n), _M_ref_count_lock()
+ {
+#ifdef __GTHREAD_MUTEX_INIT
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ _M_ref_count_lock = __tmp;
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+ __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
+#else
+#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org.
+#endif
+ }
+
+ void
+ _M_incr()
+ {
+ __gthread_mutex_lock(&_M_ref_count_lock);
+ ++_M_ref_count;
+ __gthread_mutex_unlock(&_M_ref_count_lock);
+ }
+
+ _RC_t
+ _M_decr()
+ {
+ __gthread_mutex_lock(&_M_ref_count_lock);
+ volatile _RC_t __tmp = --_M_ref_count;
+ __gthread_mutex_unlock(&_M_ref_count_lock);
+ return __tmp;
+ }
+ };
+
+//
+// What follows should really be local to rope. Unfortunately,
+// that doesn't work, since it makes it impossible to define generic
+// equality on rope iterators. According to the draft standard, the
+// template parameters for such an equality operator cannot be inferred
+// from the occurrence of a member class as a parameter.
+// (SGI compilers in fact allow this, but the __result wouldn't be
+// portable.)
+// Similarly, some of the static member functions are member functions
+// only to avoid polluting the global namespace, and to circumvent
+// restrictions on type inference for template functions.
+//
+
+//
+// The internal data structure for representing a rope. This is
+// private to the implementation. A rope is really just a pointer
+// to one of these.
+//
+// A few basic functions for manipulating this data structure
+// are members of _RopeRep. Most of the more complex algorithms
+// are implemented as rope members.
+//
+// Some of the static member functions of _RopeRep have identically
+// named functions in rope that simply invoke the _RopeRep versions.
+
+#define __ROPE_DEFINE_ALLOCS(__a) \
+ __ROPE_DEFINE_ALLOC(_CharT,_Data) /* character data */ \
+ typedef _Rope_RopeConcatenation<_CharT,__a> __C; \
+ __ROPE_DEFINE_ALLOC(__C,_C) \
+ typedef _Rope_RopeLeaf<_CharT,__a> __L; \
+ __ROPE_DEFINE_ALLOC(__L,_L) \
+ typedef _Rope_RopeFunction<_CharT,__a> __F; \
+ __ROPE_DEFINE_ALLOC(__F,_F) \
+ typedef _Rope_RopeSubstring<_CharT,__a> __S; \
+ __ROPE_DEFINE_ALLOC(__S,_S)
+
+// Internal rope nodes potentially store a copy of the allocator
+// instance used to allocate them. This is mostly redundant.
+// But the alternative would be to pass allocator instances around
+// in some form to nearly all internal functions, since any pointer
+// assignment may result in a zero reference count and thus require
+// deallocation.
+
+#define __STATIC_IF_SGI_ALLOC /* not static */
+
+template <class _CharT, class _Alloc>
+struct _Rope_rep_base
+: public _Alloc
+{
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const { return *static_cast<const _Alloc*>(this); }
+
+ _Rope_rep_base(size_t __size, const allocator_type&)
+ : _M_size(__size) {}
+
+ size_t _M_size;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+ typedef typename \
+ _Alloc::template rebind<_Tp>::other __name##Alloc; \
+ static _Tp* __name##_allocate(size_t __n) \
+ { return __name##Alloc().allocate(__n); } \
+ static void __name##_deallocate(_Tp *__p, size_t __n) \
+ { __name##Alloc().deallocate(__p, __n); }
+ __ROPE_DEFINE_ALLOCS(_Alloc)
+# undef __ROPE_DEFINE_ALLOC
+};
+
+namespace _Rope_constants
+{
+ enum { _S_max_rope_depth = 45 };
+ enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
+}
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeRep : public _Rope_rep_base<_CharT,_Alloc>
+# ifndef __GC
+ , _Refcount_Base
+# endif
+{
+ public:
+ _Rope_constants::_Tag _M_tag:8;
+ bool _M_is_balanced:8;
+ unsigned char _M_depth;
+ __GC_CONST _CharT* _M_c_string;
+ __gthread_mutex_t _M_c_string_lock;
+ /* Flattened version of string, if needed. */
+ /* typically 0. */
+ /* If it's not 0, then the memory is owned */
+ /* by this node. */
+ /* In the case of a leaf, this may point to */
+ /* the same memory as the data field. */
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+ using _Rope_rep_base<_CharT,_Alloc>::get_allocator;
+ _Rope_RopeRep(_Rope_constants::_Tag __t, int __d, bool __b, size_t __size,
+ allocator_type __a)
+ : _Rope_rep_base<_CharT,_Alloc>(__size, __a),
+# ifndef __GC
+ _Refcount_Base(1),
+# endif
+ _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0)
+#ifdef __GTHREAD_MUTEX_INIT
+ {
+ // Do not copy a POSIX/gthr mutex once in use. However, bits are bits.
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ _M_c_string_lock = __tmp;
+ }
+#else
+ { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); }
+#endif
+# ifdef __GC
+ void _M_incr () {}
+# endif
+ static void _S_free_string(__GC_CONST _CharT*, size_t __len,
+ allocator_type __a);
+# define __STL_FREE_STRING(__s, __l, __a) _S_free_string(__s, __l, __a);
+ // Deallocate data section of a leaf.
+ // This shouldn't be a member function.
+ // But its hard to do anything else at the
+ // moment, because it's templatized w.r.t.
+ // an allocator.
+ // Does nothing if __GC is defined.
+# ifndef __GC
+ void _M_free_c_string();
+ void _M_free_tree();
+ // Deallocate t. Assumes t is not 0.
+ void _M_unref_nonnil()
+ {
+ if (0 == _M_decr()) _M_free_tree();
+ }
+ void _M_ref_nonnil()
+ {
+ _M_incr();
+ }
+ static void _S_unref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t) {
+ __t->_M_unref_nonnil();
+ }
+ }
+ static void _S_ref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t) __t->_M_incr();
+ }
+ static void _S_free_if_unref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree();
+ }
+# else /* __GC */
+ void _M_unref_nonnil() {}
+ void _M_ref_nonnil() {}
+ static void _S_unref(_Rope_RopeRep*) {}
+ static void _S_ref(_Rope_RopeRep*) {}
+ static void _S_free_if_unref(_Rope_RopeRep*) {}
+# endif
+protected:
+ _Rope_RopeRep&
+ operator=(const _Rope_RopeRep&);
+
+ _Rope_RopeRep(const _Rope_RopeRep&);
+};
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> {
+ public:
+ // Apparently needed by VC++
+ // The data fields of leaves are allocated with some
+ // extra space, to accommodate future growth and for basic
+ // character types, to hold a trailing eos character.
+ enum { _S_alloc_granularity = 8 };
+ static size_t _S_rounded_up_size(size_t __n) {
+ size_t __size_with_eos;
+
+ if (_S_is_basic_char_type((_CharT*)0)) {
+ __size_with_eos = __n + 1;
+ } else {
+ __size_with_eos = __n;
+ }
+# ifdef __GC
+ return __size_with_eos;
+# else
+ // Allow slop for in-place expansion.
+ return (__size_with_eos + _S_alloc_granularity-1)
+ &~ (_S_alloc_granularity-1);
+# endif
+ }
+ __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */
+ /* The allocated size is */
+ /* _S_rounded_up_size(size), except */
+ /* in the GC case, in which it */
+ /* doesn't matter. */
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+ _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a)
+ : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_leaf, 0, true, __size, __a), _M_data(__d)
+ {
+ if (_S_is_basic_char_type((_CharT *)0)) {
+ // already eos terminated.
+ this->_M_c_string = __d;
+ }
+ }
+ // The constructor assumes that d has been allocated with
+ // the proper allocator and the properly padded size.
+ // In contrast, the destructor deallocates the data:
+# ifndef __GC
+ ~_Rope_RopeLeaf() throw() {
+ if (_M_data != this->_M_c_string) {
+ this->_M_free_c_string();
+ }
+ __STL_FREE_STRING(_M_data, this->_M_size, this->get_allocator());
+ }
+# endif
+protected:
+ _Rope_RopeLeaf&
+ operator=(const _Rope_RopeLeaf&);
+
+ _Rope_RopeLeaf(const _Rope_RopeLeaf&);
+};
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> {
+ public:
+ _Rope_RopeRep<_CharT,_Alloc>* _M_left;
+ _Rope_RopeRep<_CharT,_Alloc>* _M_right;
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+ _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l,
+ _Rope_RopeRep<_CharT,_Alloc>* __r,
+ allocator_type __a)
+
+ : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_concat,
+ std::max(__l->_M_depth, __r->_M_depth) + 1,
+ false,
+ __l->_M_size + __r->_M_size, __a),
+ _M_left(__l), _M_right(__r)
+ {}
+# ifndef __GC
+ ~_Rope_RopeConcatenation() throw() {
+ this->_M_free_c_string();
+ _M_left->_M_unref_nonnil();
+ _M_right->_M_unref_nonnil();
+ }
+# endif
+protected:
+ _Rope_RopeConcatenation&
+ operator=(const _Rope_RopeConcatenation&);
+
+ _Rope_RopeConcatenation(const _Rope_RopeConcatenation&);
+};
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> {
+ public:
+ char_producer<_CharT>* _M_fn;
+# ifndef __GC
+ bool _M_delete_when_done; // Char_producer is owned by the
+ // rope and should be explicitly
+ // deleted when the rope becomes
+ // inaccessible.
+# else
+ // In the GC case, we either register the rope for
+ // finalization, or not. Thus the field is unnecessary;
+ // the information is stored in the collector data structures.
+ // We do need a finalization procedure to be invoked by the
+ // collector.
+ static void _S_fn_finalization_proc(void * __tree, void *) {
+ delete ((_Rope_RopeFunction *)__tree) -> _M_fn;
+ }
+# endif
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+ _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size,
+ bool __d, allocator_type __a)
+ : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_function,
+ 0, true, __size, __a)
+ , _M_fn(__f)
+# ifndef __GC
+ , _M_delete_when_done(__d)
+# endif
+ {
+# ifdef __GC
+ if (__d) {
+ GC_REGISTER_FINALIZER(
+ this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0);
+ }
+# endif
+ }
+# ifndef __GC
+ ~_Rope_RopeFunction() throw() {
+ this->_M_free_c_string();
+ if (_M_delete_when_done) {
+ delete _M_fn;
+ }
+ }
+# endif
+protected:
+ _Rope_RopeFunction&
+ operator=(const _Rope_RopeFunction&);
+
+ _Rope_RopeFunction(const _Rope_RopeFunction&);
+};
+// Substring results are usually represented using just
+// concatenation nodes. But in the case of very long flat ropes
+// or ropes with a functional representation that isn't practical.
+// In that case, we represent the __result as a special case of
+// RopeFunction, whose char_producer points back to the rope itself.
+// In all cases except repeated substring operations and
+// deallocation, we treat the __result as a RopeFunction.
+template<class _CharT, class _Alloc>
+struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>,
+ public char_producer<_CharT> {
+ public:
+ // XXX this whole class should be rewritten.
+ _Rope_RopeRep<_CharT,_Alloc>* _M_base; // not 0
+ size_t _M_start;
+ virtual void operator()(size_t __start_pos, size_t __req_len,
+ _CharT* __buffer) {
+ switch(_M_base->_M_tag) {
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
+ {
+ char_producer<_CharT>* __fn =
+ ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn;
+ (*__fn)(__start_pos + _M_start, __req_len, __buffer);
+ }
+ break;
+ case _Rope_constants::_S_leaf:
+ {
+ __GC_CONST _CharT* __s =
+ ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data;
+ uninitialized_copy_n(__s + __start_pos + _M_start, __req_len,
+ __buffer);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+ _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+ size_t __l, allocator_type __a)
+ : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a),
+ char_producer<_CharT>(),
+ _M_base(__b),
+ _M_start(__s)
+ {
+# ifndef __GC
+ _M_base->_M_ref_nonnil();
+# endif
+ this->_M_tag = _Rope_constants::_S_substringfn;
+ }
+ virtual ~_Rope_RopeSubstring() throw()
+ {
+# ifndef __GC
+ _M_base->_M_unref_nonnil();
+ // _M_free_c_string(); -- done by parent class
+# endif
+ }
+};
+
+
+// Self-destructing pointers to Rope_rep.
+// These are not conventional smart pointers. Their
+// only purpose in life is to ensure that unref is called
+// on the pointer either at normal exit or if an exception
+// is raised. It is the caller's responsibility to
+// adjust reference counts when these pointers are initialized
+// or assigned to. (This convention significantly reduces
+// the number of potentially expensive reference count
+// updates.)
+#ifndef __GC
+ template<class _CharT, class _Alloc>
+ struct _Rope_self_destruct_ptr {
+ _Rope_RopeRep<_CharT,_Alloc>* _M_ptr;
+ ~_Rope_self_destruct_ptr()
+ { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); }
+#ifdef __EXCEPTIONS
+ _Rope_self_destruct_ptr() : _M_ptr(0) {};
+#else
+ _Rope_self_destruct_ptr() {};
+#endif
+ _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {}
+ _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; }
+ _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; }
+ operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; }
+ _Rope_self_destruct_ptr& operator= (_Rope_RopeRep<_CharT,_Alloc>* __x)
+ { _M_ptr = __x; return *this; }
+ };
+#endif
+
+// Dereferencing a nonconst iterator has to return something
+// that behaves almost like a reference. It's not possible to
+// return an actual reference since assignment requires extra
+// work. And we would get into the same problems as with the
+// CD2 version of basic_string.
+template<class _CharT, class _Alloc>
+class _Rope_char_ref_proxy {
+ friend class rope<_CharT,_Alloc>;
+ friend class _Rope_iterator<_CharT,_Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+# ifdef __GC
+ typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
+# else
+ typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+# endif
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ typedef rope<_CharT,_Alloc> _My_rope;
+ size_t _M_pos;
+ _CharT _M_current;
+ bool _M_current_valid;
+ _My_rope* _M_root; // The whole rope.
+ public:
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p)
+ : _M_pos(__p), _M_current(), _M_current_valid(false), _M_root(__r) {}
+
+ _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x)
+ : _M_pos(__x._M_pos), _M_current(__x._M_current), _M_current_valid(false),
+ _M_root(__x._M_root) {}
+
+ // Don't preserve cache if the reference can outlive the
+ // expression. We claim that's not possible without calling
+ // a copy constructor or generating reference to a proxy
+ // reference. We declare the latter to have undefined semantics.
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c)
+ : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {}
+ inline operator _CharT () const;
+ _Rope_char_ref_proxy& operator= (_CharT __c);
+ _Rope_char_ptr_proxy<_CharT,_Alloc> operator& () const;
+ _Rope_char_ref_proxy& operator= (const _Rope_char_ref_proxy& __c) {
+ return operator=((_CharT)__c);
+ }
+};
+
+template<class _CharT, class __Alloc>
+inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a,
+ _Rope_char_ref_proxy <_CharT, __Alloc > __b) {
+ _CharT __tmp = __a;
+ __a = __b;
+ __b = __tmp;
+}
+
+template<class _CharT, class _Alloc>
+class _Rope_char_ptr_proxy {
+ // XXX this class should be rewritten.
+ friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+ size_t _M_pos;
+ rope<_CharT,_Alloc>* _M_root; // The whole rope.
+ public:
+ _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+ _Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+ _Rope_char_ptr_proxy() {}
+ _Rope_char_ptr_proxy(_CharT* __x) : _M_root(0), _M_pos(0) {
+ }
+ _Rope_char_ptr_proxy&
+ operator= (const _Rope_char_ptr_proxy& __x) {
+ _M_pos = __x._M_pos;
+ _M_root = __x._M_root;
+ return *this;
+ }
+ template<class _CharT2, class _Alloc2>
+ friend bool operator== (const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __x,
+ const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __y);
+ _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const {
+ return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos);
+ }
+};
+
+
+// Rope iterators:
+// Unlike in the C version, we cache only part of the stack
+// for rope iterators, since they must be efficiently copyable.
+// When we run out of cache, we have to reconstruct the iterator
+// value.
+// Pointers from iterators are not included in reference counts.
+// Iterators are assumed to be thread private. Ropes can
+// be shared.
+
+template<class _CharT, class _Alloc>
+class _Rope_iterator_base
+ : public iterator<std::random_access_iterator_tag, _CharT>
+{
+ friend class rope<_CharT,_Alloc>;
+ public:
+ typedef _Alloc _allocator_type; // used in _Rope_rotate, VC++ workaround
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ // Borland doesn't want this to be protected.
+ protected:
+ enum { _S_path_cache_len = 4 }; // Must be <= 9.
+ enum { _S_iterator_buf_len = 15 };
+ size_t _M_current_pos;
+ _RopeRep* _M_root; // The whole rope.
+ size_t _M_leaf_pos; // Starting position for current leaf
+ __GC_CONST _CharT* _M_buf_start;
+ // Buffer possibly
+ // containing current char.
+ __GC_CONST _CharT* _M_buf_ptr;
+ // Pointer to current char in buffer.
+ // != 0 ==> buffer valid.
+ __GC_CONST _CharT* _M_buf_end;
+ // One past __last valid char in buffer.
+ // What follows is the path cache. We go out of our
+ // way to make this compact.
+ // Path_end contains the bottom section of the path from
+ // the root to the current leaf.
+ const _RopeRep* _M_path_end[_S_path_cache_len];
+ int _M_leaf_index; // Last valid __pos in path_end;
+ // _M_path_end[0] ... _M_path_end[leaf_index-1]
+ // point to concatenation nodes.
+ unsigned char _M_path_directions;
+ // (path_directions >> __i) & 1 is 1
+ // iff we got from _M_path_end[leaf_index - __i - 1]
+ // to _M_path_end[leaf_index - __i] by going to the
+ // __right. Assumes path_cache_len <= 9.
+ _CharT _M_tmp_buf[_S_iterator_buf_len];
+ // Short buffer for surrounding chars.
+ // This is useful primarily for
+ // RopeFunctions. We put the buffer
+ // here to avoid locking in the
+ // multithreaded case.
+ // The cached path is generally assumed to be valid
+ // only if the buffer is valid.
+ static void _S_setbuf(_Rope_iterator_base& __x);
+ // Set buffer contents given
+ // path cache.
+ static void _S_setcache(_Rope_iterator_base& __x);
+ // Set buffer contents and
+ // path cache.
+ static void _S_setcache_for_incr(_Rope_iterator_base& __x);
+ // As above, but assumes path
+ // cache is valid for previous posn.
+ _Rope_iterator_base() {}
+ _Rope_iterator_base(_RopeRep* __root, size_t __pos)
+ : _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) {}
+ void _M_incr(size_t __n);
+ void _M_decr(size_t __n);
+ public:
+ size_t index() const { return _M_current_pos; }
+ _Rope_iterator_base(const _Rope_iterator_base& __x) {
+ if (0 != __x._M_buf_ptr) {
+ *this = __x;
+ } else {
+ _M_current_pos = __x._M_current_pos;
+ _M_root = __x._M_root;
+ _M_buf_ptr = 0;
+ }
+ }
+};
+
+template<class _CharT, class _Alloc> class _Rope_iterator;
+
+template<class _CharT, class _Alloc>
+class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+ friend class rope<_CharT,_Alloc>;
+ protected:
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ // The one from the base class may not be directly visible.
+ _Rope_const_iterator(const _RopeRep* __root, size_t __pos):
+ _Rope_iterator_base<_CharT,_Alloc>(
+ const_cast<_RopeRep*>(__root), __pos)
+ // Only nonconst iterators modify root ref count
+ {}
+ public:
+ typedef _CharT reference; // Really a value. Returning a reference
+ // Would be a mess, since it would have
+ // to be included in refcount.
+ typedef const _CharT* pointer;
+
+ public:
+ _Rope_const_iterator() {};
+ _Rope_const_iterator(const _Rope_const_iterator& __x) :
+ _Rope_iterator_base<_CharT,_Alloc>(__x) { }
+ _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x);
+ _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) :
+ _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos) {}
+ _Rope_const_iterator& operator= (const _Rope_const_iterator& __x) {
+ if (0 != __x._M_buf_ptr) {
+ *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x;
+ } else {
+ this->_M_current_pos = __x._M_current_pos;
+ this->_M_root = __x._M_root;
+ this->_M_buf_ptr = 0;
+ }
+ return(*this);
+ }
+ reference operator*() {
+ if (0 == this->_M_buf_ptr) _S_setcache(*this);
+ return *this->_M_buf_ptr;
+ }
+ _Rope_const_iterator& operator++() {
+ __GC_CONST _CharT* __next;
+ if (0 != this->_M_buf_ptr
+ && (__next = this->_M_buf_ptr + 1) < this->_M_buf_end) {
+ this->_M_buf_ptr = __next;
+ ++this->_M_current_pos;
+ } else {
+ this->_M_incr(1);
+ }
+ return *this;
+ }
+ _Rope_const_iterator& operator+=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_incr(__n);
+ } else {
+ this->_M_decr(-__n);
+ }
+ return *this;
+ }
+ _Rope_const_iterator& operator--() {
+ this->_M_decr(1);
+ return *this;
+ }
+ _Rope_const_iterator& operator-=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_decr(__n);
+ } else {
+ this->_M_incr(-__n);
+ }
+ return *this;
+ }
+ _Rope_const_iterator operator++(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ // This makes a subsequent dereference expensive.
+ // Perhaps we should instead copy the iterator
+ // if it has a valid cache?
+ }
+ _Rope_const_iterator operator--(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ }
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2,_Alloc2> operator-
+ (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+ ptrdiff_t __n);
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2,_Alloc2> operator+
+ (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+ ptrdiff_t __n);
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2,_Alloc2> operator+
+ (ptrdiff_t __n,
+ const _Rope_const_iterator<_CharT2,_Alloc2>& __x);
+ reference operator[](size_t __n) {
+ return rope<_CharT,_Alloc>::_S_fetch(this->_M_root,
+ this->_M_current_pos + __n);
+ }
+
+ template<class _CharT2, class _Alloc2>
+ friend bool operator==
+ (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+ template<class _CharT2, class _Alloc2>
+ friend bool operator<
+ (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+ template<class _CharT2, class _Alloc2>
+ friend ptrdiff_t operator-
+ (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+};
+
+template<class _CharT, class _Alloc>
+class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+ friend class rope<_CharT,_Alloc>;
+ protected:
+ typedef typename _Rope_iterator_base<_CharT,_Alloc>::_RopeRep _RopeRep;
+ rope<_CharT,_Alloc>* _M_root_rope;
+ // root is treated as a cached version of this,
+ // and is used to detect changes to the underlying
+ // rope.
+ // Root is included in the reference count.
+ // This is necessary so that we can detect changes reliably.
+ // Unfortunately, it requires careful bookkeeping for the
+ // nonGC case.
+ _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos)
+ : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr, __pos),
+ _M_root_rope(__r)
+ { _RopeRep::_S_ref(this->_M_root);
+ if (!(__r -> empty()))_S_setcache(*this); }
+
+ void _M_check();
+ public:
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer;
+
+ public:
+ rope<_CharT,_Alloc>& container() { return *_M_root_rope; }
+ _Rope_iterator() {
+ this->_M_root = 0; // Needed for reference counting.
+ };
+ _Rope_iterator(const _Rope_iterator& __x) :
+ _Rope_iterator_base<_CharT,_Alloc>(__x) {
+ _M_root_rope = __x._M_root_rope;
+ _RopeRep::_S_ref(this->_M_root);
+ }
+ _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos);
+ ~_Rope_iterator() {
+ _RopeRep::_S_unref(this->_M_root);
+ }
+ _Rope_iterator& operator= (const _Rope_iterator& __x) {
+ _RopeRep* __old = this->_M_root;
+
+ _RopeRep::_S_ref(__x._M_root);
+ if (0 != __x._M_buf_ptr) {
+ _M_root_rope = __x._M_root_rope;
+ *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x;
+ } else {
+ this->_M_current_pos = __x._M_current_pos;
+ this->_M_root = __x._M_root;
+ _M_root_rope = __x._M_root_rope;
+ this->_M_buf_ptr = 0;
+ }
+ _RopeRep::_S_unref(__old);
+ return(*this);
+ }
+ reference operator*() {
+ _M_check();
+ if (0 == this->_M_buf_ptr) {
+ return _Rope_char_ref_proxy<_CharT,_Alloc>(
+ _M_root_rope, this->_M_current_pos);
+ } else {
+ return _Rope_char_ref_proxy<_CharT,_Alloc>(
+ _M_root_rope, this->_M_current_pos, *this->_M_buf_ptr);
+ }
+ }
+ _Rope_iterator& operator++() {
+ this->_M_incr(1);
+ return *this;
+ }
+ _Rope_iterator& operator+=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_incr(__n);
+ } else {
+ this->_M_decr(-__n);
+ }
+ return *this;
+ }
+ _Rope_iterator& operator--() {
+ this->_M_decr(1);
+ return *this;
+ }
+ _Rope_iterator& operator-=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_decr(__n);
+ } else {
+ this->_M_incr(-__n);
+ }
+ return *this;
+ }
+ _Rope_iterator operator++(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+ }
+ _Rope_iterator operator--(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+ }
+ reference operator[](ptrdiff_t __n) {
+ return _Rope_char_ref_proxy<_CharT,_Alloc>(
+ _M_root_rope, this->_M_current_pos + __n);
+ }
+
+ template<class _CharT2, class _Alloc2>
+ friend bool operator==
+ (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_iterator<_CharT2,_Alloc2>& __y);
+ template<class _CharT2, class _Alloc2>
+ friend bool operator<
+ (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_iterator<_CharT2,_Alloc2>& __y);
+ template<class _CharT2, class _Alloc2>
+ friend ptrdiff_t operator-
+ (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+ const _Rope_iterator<_CharT2,_Alloc2>& __y);
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2,_Alloc2> operator-
+ (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+ ptrdiff_t __n);
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2,_Alloc2> operator+
+ (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+ ptrdiff_t __n);
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2,_Alloc2> operator+
+ (ptrdiff_t __n,
+ const _Rope_iterator<_CharT2,_Alloc2>& __x);
+};
+
+
+template <class _CharT, class _Alloc>
+struct _Rope_base
+: public _Alloc
+{
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const { return *static_cast<const _Alloc*>(this); }
+
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ // The one in _Base may not be visible due to template rules.
+
+ _Rope_base(_RopeRep* __t, const allocator_type&)
+ : _M_tree_ptr(__t) {}
+ _Rope_base(const allocator_type&) {}
+
+ // The only data member of a rope:
+ _RopeRep *_M_tree_ptr;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+ typedef typename \
+ _Alloc::template rebind<_Tp>::other __name##Alloc; \
+ static _Tp* __name##_allocate(size_t __n) \
+ { return __name##Alloc().allocate(__n); } \
+ static void __name##_deallocate(_Tp *__p, size_t __n) \
+ { __name##Alloc().deallocate(__p, __n); }
+ __ROPE_DEFINE_ALLOCS(_Alloc)
+# undef __ROPE_DEFINE_ALLOC
+
+protected:
+ _Rope_base&
+ operator=(const _Rope_base&);
+
+ _Rope_base(const _Rope_base&);
+};
+
+
+/**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+*/
+template <class _CharT, class _Alloc>
+class rope : public _Rope_base<_CharT,_Alloc> {
+ public:
+ typedef _CharT value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _CharT const_reference;
+ typedef const _CharT* const_pointer;
+ typedef _Rope_iterator<_CharT,_Alloc> iterator;
+ typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator;
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
+ typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer;
+
+ friend class _Rope_iterator<_CharT,_Alloc>;
+ friend class _Rope_const_iterator<_CharT,_Alloc>;
+ friend struct _Rope_RopeRep<_CharT,_Alloc>;
+ friend class _Rope_iterator_base<_CharT,_Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+ friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+ friend struct _Rope_RopeSubstring<_CharT,_Alloc>;
+
+ protected:
+ typedef _Rope_base<_CharT,_Alloc> _Base;
+ typedef typename _Base::allocator_type allocator_type;
+ using _Base::_M_tree_ptr;
+ using _Base::get_allocator;
+ typedef __GC_CONST _CharT* _Cstrptr;
+
+ static _CharT _S_empty_c_str[1];
+
+ static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); }
+ enum { _S_copy_max = 23 };
+ // For strings shorter than _S_copy_max, we copy to
+ // concatenate.
+
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
+ typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
+ typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
+ typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring;
+
+ // Retrieve a character at the indicated position.
+ static _CharT _S_fetch(_RopeRep* __r, size_type __pos);
+
+# ifndef __GC
+ // Obtain a pointer to the character at the indicated position.
+ // The pointer can be used to change the character.
+ // If such a pointer cannot be produced, as is frequently the
+ // case, 0 is returned instead.
+ // (Returns nonzero only if all nodes in the path have a refcount
+ // of 1.)
+ static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
+# endif
+
+ static bool _S_apply_to_pieces(
+ // should be template parameter
+ _Rope_char_consumer<_CharT>& __c,
+ const _RopeRep* __r,
+ size_t __begin, size_t __end);
+ // begin and end are assumed to be in range.
+
+# ifndef __GC
+ static void _S_unref(_RopeRep* __t)
+ {
+ _RopeRep::_S_unref(__t);
+ }
+ static void _S_ref(_RopeRep* __t)
+ {
+ _RopeRep::_S_ref(__t);
+ }
+# else /* __GC */
+ static void _S_unref(_RopeRep*) {}
+ static void _S_ref(_RopeRep*) {}
+# endif
+
+
+# ifdef __GC
+ typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
+# else
+ typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+# endif
+
+ // _Result is counted in refcount.
+ static _RopeRep* _S_substring(_RopeRep* __base,
+ size_t __start, size_t __endp1);
+
+ static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate rope and char ptr, copying __s.
+ // Should really take an arbitrary iterator.
+ // Result is counted in refcount.
+ static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter, size_t __slen)
+ // As above, but one reference to __r is about to be
+ // destroyed. Thus the pieces may be recycled if all
+ // relevant reference counts are 1.
+# ifdef __GC
+ // We can't really do anything since refcounts are unavailable.
+ { return _S_concat_char_iter(__r, __iter, __slen); }
+# else
+ ;
+# endif
+
+ static _RopeRep* _S_concat(_RopeRep* __left, _RopeRep* __right);
+ // General concatenation on _RopeRep. _Result
+ // has refcount of 1. Adjusts argument refcounts.
+
+ public:
+ void apply_to_pieces( size_t __begin, size_t __end,
+ _Rope_char_consumer<_CharT>& __c) const {
+ _S_apply_to_pieces(__c, this->_M_tree_ptr, __begin, __end);
+ }
+
+
+ protected:
+
+ static size_t _S_rounded_up_size(size_t __n) {
+ return _RopeLeaf::_S_rounded_up_size(__n);
+ }
+
+ static size_t _S_allocated_capacity(size_t __n) {
+ if (_S_is_basic_char_type((_CharT*)0)) {
+ return _S_rounded_up_size(__n) - 1;
+ } else {
+ return _S_rounded_up_size(__n);
+ }
+ }
+
+ // Allocate and construct a RopeLeaf using the supplied allocator
+ // Takes ownership of s instead of copying.
+ static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s,
+ size_t __size, allocator_type __a)
+ {
+ _RopeLeaf* __space = typename _Base::_LAlloc(__a).allocate(1);
+ return new(__space) _RopeLeaf(__s, __size, __a);
+ }
+
+ static _RopeConcatenation* _S_new_RopeConcatenation(
+ _RopeRep* __left, _RopeRep* __right,
+ allocator_type __a)
+ {
+ _RopeConcatenation* __space = typename _Base::_CAlloc(__a).allocate(1);
+ return new(__space) _RopeConcatenation(__left, __right, __a);
+ }
+
+ static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f,
+ size_t __size, bool __d, allocator_type __a)
+ {
+ _RopeFunction* __space = typename _Base::_FAlloc(__a).allocate(1);
+ return new(__space) _RopeFunction(__f, __size, __d, __a);
+ }
+
+ static _RopeSubstring* _S_new_RopeSubstring(
+ _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+ size_t __l, allocator_type __a)
+ {
+ _RopeSubstring* __space = typename _Base::_SAlloc(__a).allocate(1);
+ return new(__space) _RopeSubstring(__b, __s, __l, __a);
+ }
+
+ static
+ _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
+ size_t __size, allocator_type __a)
+# define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \
+ _S_RopeLeaf_from_unowned_char_ptr(__s, __size, __a)
+ {
+ if (0 == __size) return 0;
+ _CharT* __buf = __a.allocate(_S_rounded_up_size(__size));
+
+ uninitialized_copy_n(__s, __size, __buf);
+ _S_cond_store_eos(__buf[__size]);
+ try {
+ return _S_new_RopeLeaf(__buf, __size, __a);
+ }
+ catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
+ __throw_exception_again;
+ }
+ }
+
+
+ // Concatenation of nonempty strings.
+ // Always builds a concatenation node.
+ // Rebalances if the result is too deep.
+ // Result has refcount 1.
+ // Does not increment left and right ref counts even though
+ // they are referenced.
+ static _RopeRep*
+ _S_tree_concat(_RopeRep* __left, _RopeRep* __right);
+
+ // Concatenation helper functions
+ static _RopeLeaf*
+ _S_leaf_concat_char_iter(_RopeLeaf* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate by copying leaf.
+ // should take an arbitrary iterator
+ // result has refcount 1.
+# ifndef __GC
+ static _RopeLeaf* _S_destr_leaf_concat_char_iter
+ (_RopeLeaf* __r, const _CharT* __iter, size_t __slen);
+ // A version that potentially clobbers __r if __r->_M_ref_count == 1.
+# endif
+
+ private:
+
+ static size_t _S_char_ptr_len(const _CharT* __s);
+ // slightly generalized strlen
+
+ rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
+ : _Base(__t,__a) { }
+
+
+ // Copy __r to the _CharT buffer.
+ // Returns __buffer + __r->_M_size.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);
+
+ // Again, with explicit starting position and length.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r,
+ size_t __start, size_t __len,
+ _CharT* __buffer);
+
+ static const unsigned long
+ _S_min_len[_Rope_constants::_S_max_rope_depth + 1];
+
+ static bool _S_is_balanced(_RopeRep* __r)
+ { return (__r->_M_size >= _S_min_len[__r->_M_depth]); }
+
+ static bool _S_is_almost_balanced(_RopeRep* __r)
+ { return (__r->_M_depth == 0 ||
+ __r->_M_size >= _S_min_len[__r->_M_depth - 1]); }
+
+ static bool _S_is_roughly_balanced(_RopeRep* __r)
+ { return (__r->_M_depth <= 1 ||
+ __r->_M_size >= _S_min_len[__r->_M_depth - 2]); }
+
+ // Assumes the result is not empty.
+ static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left,
+ _RopeRep* __right)
+ {
+ _RopeRep* __result = _S_concat(__left, __right);
+ if (_S_is_balanced(__result)) __result->_M_is_balanced = true;
+ return __result;
+ }
+
+ // The basic rebalancing operation. Logically copies the
+ // rope. The result has refcount of 1. The client will
+ // usually decrement the reference count of __r.
+ // The result is within height 2 of balanced by the above
+ // definition.
+ static _RopeRep* _S_balance(_RopeRep* __r);
+
+ // Add all unbalanced subtrees to the forest of balanceed trees.
+ // Used only by balance.
+ static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
+
+ // Add __r to forest, assuming __r is already balanced.
+ static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);
+
+ // Print to stdout, exposing structure
+ static void _S_dump(_RopeRep* __r, int __indent = 0);
+
+ // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
+ static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);
+
+ public:
+ bool empty() const { return 0 == this->_M_tree_ptr; }
+
+ // Comparison member function. This is public only for those
+ // clients that need a ternary comparison. Others
+ // should use the comparison operators below.
+ int compare(const rope& __y) const {
+ return _S_compare(this->_M_tree_ptr, __y._M_tree_ptr);
+ }
+
+ rope(const _CharT* __s, const allocator_type& __a = allocator_type())
+ : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),
+ __a),__a)
+ { }
+
+ rope(const _CharT* __s, size_t __len,
+ const allocator_type& __a = allocator_type())
+ : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a), __a)
+ { }
+
+ // Should perhaps be templatized with respect to the iterator type
+ // and use Sequence_buffer. (It should perhaps use sequence_buffer
+ // even now.)
+ rope(const _CharT *__s, const _CharT *__e,
+ const allocator_type& __a = allocator_type())
+ : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a), __a)
+ { }
+
+ rope(const const_iterator& __s, const const_iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos), __a)
+ { }
+
+ rope(const iterator& __s, const iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos), __a)
+ { }
+
+ rope(_CharT __c, const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1));
+
+ std::_Construct(__buf, __c);
+ try {
+ this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1, __a);
+ }
+ catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__buf, 1, __a);
+ __throw_exception_again;
+ }
+ }
+
+ rope(size_t __n, _CharT __c,
+ const allocator_type& __a = allocator_type());
+
+ rope(const allocator_type& __a = allocator_type())
+ : _Base(0, __a) {}
+
+ // Construct a rope from a function that can compute its members
+ rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ this->_M_tree_ptr = (0 == __len) ?
+ 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
+ }
+
+ rope(const rope& __x, const allocator_type& __a = allocator_type())
+ : _Base(__x._M_tree_ptr, __a)
+ {
+ _S_ref(this->_M_tree_ptr);
+ }
+
+ ~rope() throw()
+ { _S_unref(this->_M_tree_ptr); }
+
+ rope& operator=(const rope& __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr = __x._M_tree_ptr;
+ _S_ref(this->_M_tree_ptr);
+ _S_unref(__old);
+ return *this;
+ }
+
+ void clear()
+ {
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = 0;
+ }
+
+ void push_back(_CharT __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr
+ = _S_destr_concat_char_iter(this->_M_tree_ptr, &__x, 1);
+ _S_unref(__old);
+ }
+
+ void pop_back()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr =
+ _S_substring(this->_M_tree_ptr,
+ 0,
+ this->_M_tree_ptr->_M_size - 1);
+ _S_unref(__old);
+ }
+
+ _CharT back() const
+ {
+ return _S_fetch(this->_M_tree_ptr, this->_M_tree_ptr->_M_size - 1);
+ }
+
+ void push_front(_CharT __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ _RopeRep* __left =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, this->get_allocator());
+ try {
+ this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr);
+ _S_unref(__old);
+ _S_unref(__left);
+ }
+ catch(...)
+ {
+ _S_unref(__left);
+ __throw_exception_again;
+ }
+ }
+
+ void pop_front()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr
+ = _S_substring(this->_M_tree_ptr, 1, this->_M_tree_ptr->_M_size);
+ _S_unref(__old);
+ }
+
+ _CharT front() const
+ {
+ return _S_fetch(this->_M_tree_ptr, 0);
+ }
+
+ void balance()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr = _S_balance(this->_M_tree_ptr);
+ _S_unref(__old);
+ }
+
+ void copy(_CharT* __buffer) const {
+ _Destroy(__buffer, __buffer + size());
+ _S_flatten(this->_M_tree_ptr, __buffer);
+ }
+
+ // This is the copy function from the standard, but
+ // with the arguments reordered to make it consistent with the
+ // rest of the interface.
+ // Note that this guaranteed not to compile if the draft standard
+ // order is assumed.
+ size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const
+ {
+ size_t __size = size();
+ size_t __len = (__pos + __n > __size? __size - __pos : __n);
+
+ _Destroy(__buffer, __buffer + __len);
+ _S_flatten(this->_M_tree_ptr, __pos, __len, __buffer);
+ return __len;
+ }
+
+ // Print to stdout, exposing structure. May be useful for
+ // performance debugging.
+ void dump() {
+ _S_dump(this->_M_tree_ptr);
+ }
+
+ // Convert to 0 terminated string in new allocated memory.
+ // Embedded 0s in the input do not terminate the copy.
+ const _CharT* c_str() const;
+
+ // As above, but lso use the flattened representation as the
+ // the new rope representation.
+ const _CharT* replace_with_c_str();
+
+ // Reclaim memory for the c_str generated flattened string.
+ // Intentionally undocumented, since it's hard to say when this
+ // is safe for multiple threads.
+ void delete_c_str () {
+ if (0 == this->_M_tree_ptr) return;
+ if (_Rope_constants::_S_leaf == this->_M_tree_ptr->_M_tag &&
+ ((_RopeLeaf*)this->_M_tree_ptr)->_M_data ==
+ this->_M_tree_ptr->_M_c_string) {
+ // Representation shared
+ return;
+ }
+# ifndef __GC
+ this->_M_tree_ptr->_M_free_c_string();
+# endif
+ this->_M_tree_ptr->_M_c_string = 0;
+ }
+
+ _CharT operator[] (size_type __pos) const {
+ return _S_fetch(this->_M_tree_ptr, __pos);
+ }
+
+ _CharT at(size_type __pos) const {
+ // if (__pos >= size()) throw out_of_range; // XXX
+ return (*this)[__pos];
+ }
+
+ const_iterator begin() const {
+ return(const_iterator(this->_M_tree_ptr, 0));
+ }
+
+ // An easy way to get a const iterator from a non-const container.
+ const_iterator const_begin() const {
+ return(const_iterator(this->_M_tree_ptr, 0));
+ }
+
+ const_iterator end() const {
+ return(const_iterator(this->_M_tree_ptr, size()));
+ }
+
+ const_iterator const_end() const {
+ return(const_iterator(this->_M_tree_ptr, size()));
+ }
+
+ size_type size() const {
+ return(0 == this->_M_tree_ptr? 0 : this->_M_tree_ptr->_M_size);
+ }
+
+ size_type length() const {
+ return size();
+ }
+
+ size_type max_size() const {
+ return _S_min_len[_Rope_constants::_S_max_rope_depth - 1] - 1;
+ // Guarantees that the result can be sufficirntly
+ // balanced. Longer ropes will probably still work,
+ // but it's harder to make guarantees.
+ }
+
+ typedef reverse_iterator<const_iterator> const_reverse_iterator;
+
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ const_reverse_iterator const_rbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ const_reverse_iterator const_rend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2,_Alloc2>
+ operator+ (const rope<_CharT2,_Alloc2>& __left,
+ const rope<_CharT2,_Alloc2>& __right);
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2,_Alloc2>
+ operator+ (const rope<_CharT2,_Alloc2>& __left,
+ const _CharT2* __right);
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2,_Alloc2>
+ operator+ (const rope<_CharT2,_Alloc2>& __left, _CharT2 __right);
+ // The symmetric cases are intentionally omitted, since they're presumed
+ // to be less common, and we don't handle them as well.
+
+ // The following should really be templatized.
+ // The first argument should be an input iterator or
+ // forward iterator with value_type _CharT.
+ rope& append(const _CharT* __iter, size_t __n) {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, __iter, __n);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope& append(const _CharT* __c_string) {
+ size_t __len = _S_char_ptr_len(__c_string);
+ append(__c_string, __len);
+ return(*this);
+ }
+
+ rope& append(const _CharT* __s, const _CharT* __e) {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, __s, __e - __s);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope& append(const_iterator __s, const_iterator __e) {
+ _Self_destruct_ptr __appendee(_S_substring(
+ __s._M_root, __s._M_current_pos, __e._M_current_pos));
+ _RopeRep* __result =
+ _S_concat(this->_M_tree_ptr, (_RopeRep*)__appendee);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope& append(_CharT __c) {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, &__c, 1);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope& append() { return append(_CharT()); } // XXX why?
+
+ rope& append(const rope& __y) {
+ _RopeRep* __result = _S_concat(this->_M_tree_ptr, __y._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope& append(size_t __n, _CharT __c) {
+ rope<_CharT,_Alloc> __last(__n, __c);
+ return append(__last);
+ }
+
+ void swap(rope& __b) {
+ _RopeRep* __tmp = this->_M_tree_ptr;
+ this->_M_tree_ptr = __b._M_tree_ptr;
+ __b._M_tree_ptr = __tmp;
+ }
+
+
+ protected:
+ // Result is included in refcount.
+ static _RopeRep* replace(_RopeRep* __old, size_t __pos1,
+ size_t __pos2, _RopeRep* __r) {
+ if (0 == __old) { _S_ref(__r); return __r; }
+ _Self_destruct_ptr __left(
+ _S_substring(__old, 0, __pos1));
+ _Self_destruct_ptr __right(
+ _S_substring(__old, __pos2, __old->_M_size));
+ _RopeRep* __result;
+
+ if (0 == __r) {
+ __result = _S_concat(__left, __right);
+ } else {
+ _Self_destruct_ptr __left_result(_S_concat(__left, __r));
+ __result = _S_concat(__left_result, __right);
+ }
+ return __result;
+ }
+
+ public:
+ void insert(size_t __p, const rope& __r) {
+ _RopeRep* __result =
+ replace(this->_M_tree_ptr, __p, __p, __r._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void insert(size_t __p, size_t __n, _CharT __c) {
+ rope<_CharT,_Alloc> __r(__n,__c);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const _CharT* __i, size_t __n) {
+ _Self_destruct_ptr __left(_S_substring(this->_M_tree_ptr, 0, __p));
+ _Self_destruct_ptr __right(_S_substring(this->_M_tree_ptr,
+ __p, size()));
+ _Self_destruct_ptr __left_result(
+ _S_concat_char_iter(__left, __i, __n));
+ // _S_ destr_concat_char_iter should be safe here.
+ // But as it stands it's probably not a win, since __left
+ // is likely to have additional references.
+ _RopeRep* __result = _S_concat(__left_result, __right);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void insert(size_t __p, const _CharT* __c_string) {
+ insert(__p, __c_string, _S_char_ptr_len(__c_string));
+ }
+
+ void insert(size_t __p, _CharT __c) {
+ insert(__p, &__c, 1);
+ }
+
+ void insert(size_t __p) {
+ _CharT __c = _CharT();
+ insert(__p, &__c, 1);
+ }
+
+ void insert(size_t __p, const _CharT* __i, const _CharT* __j) {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const const_iterator& __i,
+ const const_iterator& __j) {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const iterator& __i,
+ const iterator& __j) {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ // (position, length) versions of replace operations:
+
+ void replace(size_t __p, size_t __n, const rope& __r) {
+ _RopeRep* __result =
+ replace(this->_M_tree_ptr, __p, __p + __n, __r._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void replace(size_t __p, size_t __n,
+ const _CharT* __i, size_t __i_len) {
+ rope __r(__i, __i_len);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n, _CharT __c) {
+ rope __r(__c);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n, const _CharT* __c_string) {
+ rope __r(__c_string);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const _CharT* __i, const _CharT* __j) {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const const_iterator& __i, const const_iterator& __j) {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const iterator& __i, const iterator& __j) {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ // Single character variants:
+ void replace(size_t __p, _CharT __c) {
+ iterator __i(this, __p);
+ *__i = __c;
+ }
+
+ void replace(size_t __p, const rope& __r) {
+ replace(__p, 1, __r);
+ }
+
+ void replace(size_t __p, const _CharT* __i, size_t __i_len) {
+ replace(__p, 1, __i, __i_len);
+ }
+
+ void replace(size_t __p, const _CharT* __c_string) {
+ replace(__p, 1, __c_string);
+ }
+
+ void replace(size_t __p, const _CharT* __i, const _CharT* __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ void replace(size_t __p, const const_iterator& __i,
+ const const_iterator& __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ void replace(size_t __p, const iterator& __i,
+ const iterator& __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ // Erase, (position, size) variant.
+ void erase(size_t __p, size_t __n) {
+ _RopeRep* __result = replace(this->_M_tree_ptr, __p, __p + __n, 0);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ // Erase, single character
+ void erase(size_t __p) {
+ erase(__p, __p + 1);
+ }
+
+ // Insert, iterator variants.
+ iterator insert(const iterator& __p, const rope& __r)
+ { insert(__p.index(), __r); return __p; }
+ iterator insert(const iterator& __p, size_t __n, _CharT __c)
+ { insert(__p.index(), __n, __c); return __p; }
+ iterator insert(const iterator& __p, _CharT __c)
+ { insert(__p.index(), __c); return __p; }
+ iterator insert(const iterator& __p )
+ { insert(__p.index()); return __p; }
+ iterator insert(const iterator& __p, const _CharT* c_string)
+ { insert(__p.index(), c_string); return __p; }
+ iterator insert(const iterator& __p, const _CharT* __i, size_t __n)
+ { insert(__p.index(), __i, __n); return __p; }
+ iterator insert(const iterator& __p, const _CharT* __i,
+ const _CharT* __j)
+ { insert(__p.index(), __i, __j); return __p; }
+ iterator insert(const iterator& __p,
+ const const_iterator& __i, const const_iterator& __j)
+ { insert(__p.index(), __i, __j); return __p; }
+ iterator insert(const iterator& __p,
+ const iterator& __i, const iterator& __j)
+ { insert(__p.index(), __i, __j); return __p; }
+
+ // Replace, range variants.
+ void replace(const iterator& __p, const iterator& __q,
+ const rope& __r)
+ { replace(__p.index(), __q.index() - __p.index(), __r); }
+ void replace(const iterator& __p, const iterator& __q, _CharT __c)
+ { replace(__p.index(), __q.index() - __p.index(), __c); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __c_string)
+ { replace(__p.index(), __q.index() - __p.index(), __c_string); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, size_t __n)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __n); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+ void replace(const iterator& __p, const iterator& __q,
+ const const_iterator& __i, const const_iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+ void replace(const iterator& __p, const iterator& __q,
+ const iterator& __i, const iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+ // Replace, iterator variants.
+ void replace(const iterator& __p, const rope& __r)
+ { replace(__p.index(), __r); }
+ void replace(const iterator& __p, _CharT __c)
+ { replace(__p.index(), __c); }
+ void replace(const iterator& __p, const _CharT* __c_string)
+ { replace(__p.index(), __c_string); }
+ void replace(const iterator& __p, const _CharT* __i, size_t __n)
+ { replace(__p.index(), __i, __n); }
+ void replace(const iterator& __p, const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __i, __j); }
+ void replace(const iterator& __p, const_iterator __i,
+ const_iterator __j)
+ { replace(__p.index(), __i, __j); }
+ void replace(const iterator& __p, iterator __i, iterator __j)
+ { replace(__p.index(), __i, __j); }
+
+ // Iterator and range variants of erase
+ iterator erase(const iterator& __p, const iterator& __q) {
+ size_t __p_index = __p.index();
+ erase(__p_index, __q.index() - __p_index);
+ return iterator(this, __p_index);
+ }
+ iterator erase(const iterator& __p) {
+ size_t __p_index = __p.index();
+ erase(__p_index, 1);
+ return iterator(this, __p_index);
+ }
+
+ rope substr(size_t __start, size_t __len = 1) const {
+ return rope<_CharT,_Alloc>(
+ _S_substring(this->_M_tree_ptr,
+ __start,
+ __start + __len));
+ }
+
+ rope substr(iterator __start, iterator __end) const {
+ return rope<_CharT,_Alloc>(
+ _S_substring(this->_M_tree_ptr,
+ __start.index(),
+ __end.index()));
+ }
+
+ rope substr(iterator __start) const {
+ size_t __pos = __start.index();
+ return rope<_CharT,_Alloc>(
+ _S_substring(this->_M_tree_ptr, __pos, __pos + 1));
+ }
+
+ rope substr(const_iterator __start, const_iterator __end) const {
+ // This might eventually take advantage of the cache in the
+ // iterator.
+ return rope<_CharT,_Alloc>(
+ _S_substring(this->_M_tree_ptr, __start.index(), __end.index()));
+ }
+
+ rope<_CharT,_Alloc> substr(const_iterator __start) {
+ size_t __pos = __start.index();
+ return rope<_CharT,_Alloc>(
+ _S_substring(this->_M_tree_ptr, __pos, __pos + 1));
+ }
+
+ static const size_type npos;
+
+ size_type find(_CharT __c, size_type __pos = 0) const;
+ size_type find(const _CharT* __s, size_type __pos = 0) const {
+ size_type __result_pos;
+ const_iterator __result =
+ std::search(const_begin() + __pos, const_end(),
+ __s, __s + _S_char_ptr_len(__s));
+ __result_pos = __result.index();
+# ifndef __STL_OLD_ROPE_SEMANTICS
+ if (__result_pos == size()) __result_pos = npos;
+# endif
+ return __result_pos;
+ }
+
+ iterator mutable_begin() {
+ return(iterator(this, 0));
+ }
+
+ iterator mutable_end() {
+ return(iterator(this, size()));
+ }
+
+ typedef reverse_iterator<iterator> reverse_iterator;
+
+ reverse_iterator mutable_rbegin() {
+ return reverse_iterator(mutable_end());
+ }
+
+ reverse_iterator mutable_rend() {
+ return reverse_iterator(mutable_begin());
+ }
+
+ reference mutable_reference_at(size_type __pos) {
+ return reference(this, __pos);
+ }
+
+# ifdef __STD_STUFF
+ reference operator[] (size_type __pos) {
+ return _char_ref_proxy(this, __pos);
+ }
+
+ reference at(size_type __pos) {
+ // if (__pos >= size()) throw out_of_range; // XXX
+ return (*this)[__pos];
+ }
+
+ void resize(size_type __n, _CharT __c) {}
+ void resize(size_type __n) {}
+ void reserve(size_type __res_arg = 0) {}
+ size_type capacity() const {
+ return max_size();
+ }
+
+ // Stuff below this line is dangerous because it's error prone.
+ // I would really like to get rid of it.
+ // copy function with funny arg ordering.
+ size_type copy(_CharT* __buffer, size_type __n,
+ size_type __pos = 0) const {
+ return copy(__pos, __n, __buffer);
+ }
+
+ iterator end() { return mutable_end(); }
+
+ iterator begin() { return mutable_begin(); }
+
+ reverse_iterator rend() { return mutable_rend(); }
+
+ reverse_iterator rbegin() { return mutable_rbegin(); }
+
+# else
+
+ const_iterator end() { return const_end(); }
+
+ const_iterator begin() { return const_begin(); }
+
+ const_reverse_iterator rend() { return const_rend(); }
+
+ const_reverse_iterator rbegin() { return const_rbegin(); }
+
+# endif
+
+};
+
+template <class _CharT, class _Alloc>
+const typename rope<_CharT, _Alloc>::size_type rope<_CharT, _Alloc>::npos =
+ (size_type)(-1);
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos == __y._M_current_pos &&
+ __x._M_root == __y._M_root);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos < __y._M_current_pos);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return __y < __x;
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return !(__y < __x);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return !(__x < __y);
+}
+
+template <class _CharT, class _Alloc>
+inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
+ return _Rope_const_iterator<_CharT,_Alloc>(
+ __x._M_root, __x._M_current_pos - __n);
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
+ return _Rope_const_iterator<_CharT,_Alloc>(
+ __x._M_root, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) {
+ return _Rope_const_iterator<_CharT,_Alloc>(
+ __x._M_root, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos == __y._M_current_pos &&
+ __x._M_root_rope == __y._M_root_rope);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos < __y._M_current_pos);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return __y < __x;
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return !(__y < __x);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return !(__x < __y);
+}
+
+template <class _CharT, class _Alloc>
+inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n) {
+ return _Rope_iterator<_CharT,_Alloc>(
+ __x._M_root_rope, __x._M_current_pos - __n);
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n) {
+ return _Rope_iterator<_CharT,_Alloc>(
+ __x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) {
+ return _Rope_iterator<_CharT,_Alloc>(
+ __x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right)
+{
+ return rope<_CharT,_Alloc>(
+ rope<_CharT,_Alloc>::_S_concat(__left._M_tree_ptr, __right._M_tree_ptr));
+ // Inlining this should make it possible to keep __left and
+ // __right in registers.
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right)
+{
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+ const _CharT* __right) {
+ size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right);
+ return rope<_CharT,_Alloc>(
+ rope<_CharT,_Alloc>::_S_concat_char_iter(
+ __left._M_tree_ptr, __right, __rlen));
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left,
+ const _CharT* __right) {
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left, _CharT __right) {
+ return rope<_CharT,_Alloc>(
+ rope<_CharT,_Alloc>::_S_concat_char_iter(
+ __left._M_tree_ptr, &__right, 1));
+}
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left, _CharT __right) {
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+bool
+operator< (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ return __left.compare(__right) < 0;
+}
+
+template <class _CharT, class _Alloc>
+bool
+operator== (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ return __left.compare(__right) == 0;
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+ return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root);
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return __y < __x;
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__y < __x);
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__x < __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+template<class _CharT, class _Traits, class _Alloc>
+std::basic_ostream<_CharT, _Traits>& operator<<
+ (std::basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r);
+
+typedef rope<char> crope;
+typedef rope<wchar_t> wrope;
+
+inline crope::reference __mutable_reference_at(crope& __c, size_t __i)
+{
+ return __c.mutable_reference_at(__i);
+}
+
+inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i)
+{
+ return __c.mutable_reference_at(__i);
+}
+
+template <class _CharT, class _Alloc>
+inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) {
+ __x.swap(__y);
+}
+
+// Hash functions should probably be revisited later:
+template<> struct hash<crope>
+{
+ size_t operator()(const crope& __str) const
+ {
+ size_t __size = __str.size();
+
+ if (0 == __size) return 0;
+ return 13*__str[0] + 5*__str[__size - 1] + __size;
+ }
+};
+
+
+template<> struct hash<wrope>
+{
+ size_t operator()(const wrope& __str) const
+ {
+ size_t __size = __str.size();
+
+ if (0 == __size) return 0;
+ return 13*__str[0] + 5*__str[__size - 1] + __size;
+ }
+};
+
+} // namespace __gnu_cxx
-#endif /* __SGI_STL_ROPE */
+# include <ext/ropeimpl.h>
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/ext/ropeimpl.h b/contrib/libstdc++/include/ext/ropeimpl.h
index f3f09f5..5eba107 100644
--- a/contrib/libstdc++/include/ext/ropeimpl.h
+++ b/contrib/libstdc++/include/ext/ropeimpl.h
@@ -1,6 +1,6 @@
// SGI's rope class implementation -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,8 +45,8 @@
* You should not attempt to use it directly.
*/
-#include <cstdio>
-#include <iostream>
+#include <cstdio>
+#include <ostream>
#include <bits/functexcept.h>
#include <ext/algorithm> // For copy_n and lexicographical_compare_3way
@@ -55,20 +55,19 @@
namespace __gnu_cxx
{
-using std::size_t;
-using std::printf;
-using std::basic_ostream;
-using std::__throw_length_error;
-using std::__alloc;
-using std::_Destroy;
-using std::uninitialized_fill_n;
+ using std::size_t;
+ using std::printf;
+ using std::basic_ostream;
+ using std::__throw_length_error;
+ using std::_Destroy;
+ using std::uninitialized_fill_n;
// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct.
// Results in a valid buf_ptr if the iterator can be legitimately
// dereferenced.
template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf(
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf(
_Rope_iterator_base<_CharT,_Alloc>& __x)
{
const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index];
@@ -76,14 +75,14 @@ void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf(
size_t __pos = __x._M_current_pos;
switch(__leaf->_M_tag) {
- case _RopeRep::_S_leaf:
- __x._M_buf_start =
+ case _Rope_constants::_S_leaf:
+ __x._M_buf_start =
((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data;
__x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
__x._M_buf_end = __x._M_buf_start + __leaf->_M_size;
break;
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
{
size_t __len = _S_iterator_buf_len;
size_t __buf_start_pos = __leaf_pos;
@@ -111,13 +110,13 @@ void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf(
}
}
-// Set path and buffer inside a rope iterator. We assume that
+// Set path and buffer inside a rope iterator. We assume that
// pos and root are already set.
template <class _CharT, class _Alloc>
void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache
(_Rope_iterator_base<_CharT,_Alloc>& __x)
{
- const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1];
+ const _RopeRep* __path[_Rope_constants::_S_max_rope_depth + 1];
const _RopeRep* __curr_rope;
int __curr_depth = -1; /* index into path */
size_t __curr_start_pos = 0;
@@ -143,18 +142,18 @@ void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache
++__curr_depth;
__path[__curr_depth] = __curr_rope;
switch(__curr_rope->_M_tag) {
- case _RopeRep::_S_leaf:
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_leaf:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
__x._M_leaf_pos = __curr_start_pos;
goto done;
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_Rope_RopeConcatenation<_CharT,_Alloc>* __c =
(_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope;
_RopeRep* __left = __c->_M_left;
size_t __left_len = __left->_M_size;
-
+
__dirns <<= 1;
if (__pos >= __curr_start_pos + __left_len) {
__dirns |= 1;
@@ -203,7 +202,7 @@ void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr
}
// node_start_pos is starting position of last_node.
while (--__current_index >= 0) {
- if (!(__dirns & 1) /* Path turned left */)
+ if (!(__dirns & 1) /* Path turned left */)
break;
__current_node = __x._M_path_end[__current_index];
__c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node;
@@ -226,7 +225,7 @@ void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr
__current_node = __c->_M_right;
__x._M_path_end[++__current_index] = __current_node;
__dirns |= 1;
- while (_RopeRep::_S_concat == __current_node->_M_tag) {
+ while (_Rope_constants::_S_concat == __current_node->_M_tag) {
++__current_index;
if (_S_path_cache_len == __current_index) {
int __i;
@@ -278,33 +277,33 @@ void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) {
template <class _CharT, class _Alloc>
void _Rope_iterator<_CharT,_Alloc>::_M_check() {
- if (_M_root_rope->_M_tree_ptr != _M_root) {
+ if (_M_root_rope->_M_tree_ptr != this->_M_root) {
// _Rope was modified. Get things fixed up.
- _RopeRep::_S_unref(_M_root);
- _M_root = _M_root_rope->_M_tree_ptr;
- _RopeRep::_S_ref(_M_root);
- _M_buf_ptr = 0;
+ _RopeRep::_S_unref(this->_M_root);
+ this->_M_root = _M_root_rope->_M_tree_ptr;
+ _RopeRep::_S_ref(this->_M_root);
+ this->_M_buf_ptr = 0;
}
}
template <class _CharT, class _Alloc>
-inline
+inline
_Rope_const_iterator<_CharT, _Alloc>::_Rope_const_iterator(
const _Rope_iterator<_CharT,_Alloc>& __x)
-: _Rope_iterator_base<_CharT,_Alloc>(__x)
+: _Rope_iterator_base<_CharT,_Alloc>(__x)
{ }
template <class _CharT, class _Alloc>
inline _Rope_iterator<_CharT,_Alloc>::_Rope_iterator(
rope<_CharT,_Alloc>& __r, size_t __pos)
-: _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos),
+: _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos),
_M_root_rope(&__r)
{
- _RopeRep::_S_ref(_M_root);
+ _RopeRep::_S_ref(this->_M_root);
}
template <class _CharT, class _Alloc>
-inline size_t
+inline size_t
rope<_CharT,_Alloc>::_S_char_ptr_len(const _CharT* __s)
{
const _CharT* __p = __s;
@@ -321,9 +320,9 @@ inline void _Rope_RopeRep<_CharT,_Alloc>::_M_free_c_string()
{
_CharT* __cstr = _M_c_string;
if (0 != __cstr) {
- size_t __size = _M_size + 1;
+ size_t __size = this->_M_size + 1;
_Destroy(__cstr, __cstr + __size);
- _Data_deallocate(__cstr, __size);
+ this->_Data_deallocate(__cstr, __size);
}
}
@@ -352,7 +351,7 @@ template <class _CharT, class _Alloc>
void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
{
switch(_M_tag) {
- case _S_leaf:
+ case _Rope_constants::_S_leaf:
{
_Rope_RopeLeaf<_CharT,_Alloc>* __l
= (_Rope_RopeLeaf<_CharT,_Alloc>*)this;
@@ -360,7 +359,7 @@ void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
_L_deallocate(__l, 1);
break;
}
- case _S_concat:
+ case _Rope_constants::_S_concat:
{
_Rope_RopeConcatenation<_CharT,_Alloc>* __c
= (_Rope_RopeConcatenation<_CharT,_Alloc>*)this;
@@ -369,7 +368,7 @@ void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
_C_deallocate(__c, 1);
break;
}
- case _S_function:
+ case _Rope_constants::_S_function:
{
_Rope_RopeFunction<_CharT,_Alloc>* __f
= (_Rope_RopeFunction<_CharT,_Alloc>*)this;
@@ -377,7 +376,7 @@ void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
_F_deallocate(__f, 1);
break;
}
- case _S_substringfn:
+ case _Rope_constants::_S_substringfn:
{
_Rope_RopeSubstring<_CharT,_Alloc>* __ss =
(_Rope_RopeSubstring<_CharT,_Alloc>*)this;
@@ -407,9 +406,9 @@ rope<_CharT,_Alloc>::_S_leaf_concat_char_iter
{
size_t __old_len = __r->_M_size;
_CharT* __new_data = (_CharT*)
- _Data_allocate(_S_rounded_up_size(__old_len + __len));
+ _Data_allocate(_S_rounded_up_size(__old_len + __len));
_RopeLeaf* __result;
-
+
uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
uninitialized_copy_n(__iter, __len, __new_data + __old_len);
_S_cond_store_eos(__new_data[__old_len + __len]);
@@ -463,22 +462,22 @@ template <class _CharT, class _Alloc>
typename rope<_CharT,_Alloc>::_RopeRep*
rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right)
{
- _RopeConcatenation* __result = _S_new_RopeConcatenation(__left, __right,
+ _RopeConcatenation* __result = _S_new_RopeConcatenation(__left, __right,
__left->get_allocator());
size_t __depth = __result->_M_depth;
-
+
if (__depth > 20 && (__result->_M_size < 1000 ||
- __depth > _RopeRep::_S_max_rope_depth))
+ __depth > _Rope_constants::_S_max_rope_depth))
{
_RopeRep* __balanced;
-
- try
+
+ try
{
__balanced = _S_balance(__result);
__result->_M_unref_nonnil();
}
catch(...)
- {
+ {
_C_deallocate(__result,1);
__throw_exception_again;
}
@@ -487,8 +486,8 @@ rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right)
// still owns its children. Thus unref is
// inappropriate.
return __balanced;
- }
- else
+ }
+ else
return __result;
}
@@ -505,18 +504,18 @@ rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter
if (0 == __r)
return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
__r->get_allocator());
- if (_RopeRep::_S_leaf == __r->_M_tag &&
+ if (_Rope_constants::_S_leaf == __r->_M_tag &&
__r->_M_size + __slen <= _S_copy_max) {
__result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
return __result;
}
- if (_RopeRep::_S_concat == __r->_M_tag
- && _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) {
- _RopeLeaf* __right =
+ if (_Rope_constants::_S_concat == __r->_M_tag
+ && _Rope_constants::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) {
+ _RopeLeaf* __right =
(_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
if (__right->_M_size + __slen <= _S_copy_max) {
_RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
- _RopeRep* __nright =
+ _RopeRep* __nright =
_S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
__left->_M_ref_nonnil();
try {
@@ -524,7 +523,7 @@ rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter
}
catch(...)
{
- _S_unref(__left);
+ _S_unref(__left);
_S_unref(__nright);
__throw_exception_again;
}
@@ -539,7 +538,7 @@ rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter
}
catch(...)
{
- _S_unref(__r);
+ _S_unref(__r);
_S_unref(__nright);
__throw_exception_again;
}
@@ -548,7 +547,7 @@ rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter
#ifndef __GC
template <class _CharT, class _Alloc>
-typename rope<_CharT,_Alloc>::_RopeRep*
+typename rope<_CharT,_Alloc>::_RopeRep*
rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
_RopeRep* __r, const _CharT* __s, size_t __slen)
{
@@ -563,20 +562,20 @@ rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
__r->_M_ref_count = 2; // One more than before
return __r;
}
- if (__orig_size + __slen <= _S_copy_max &&
- _RopeRep::_S_leaf == __r->_M_tag) {
+ if (__orig_size + __slen <= _S_copy_max &&
+ _Rope_constants::_S_leaf == __r->_M_tag) {
__result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
return __result;
}
- if (_RopeRep::_S_concat == __r->_M_tag) {
+ if (_Rope_constants::_S_concat == __r->_M_tag) {
_RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right);
- if (_RopeRep::_S_leaf == __right->_M_tag
+ if (_Rope_constants::_S_leaf == __right->_M_tag
&& __right->_M_size + __slen <= _S_copy_max) {
- _RopeRep* __new_right =
+ _RopeRep* __new_right =
_S_destr_leaf_concat_char_iter(__right, __s, __slen);
- if (__right == __new_right)
+ if (__right == __new_right)
__new_right->_M_ref_count = 1;
- else
+ else
__right->_M_unref_nonnil();
__r->_M_ref_count = 2; // One more than before.
((_RopeConcatenation*)__r)->_M_right = __new_right;
@@ -596,7 +595,7 @@ rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
}
catch(...)
{
- _S_unref(__r);
+ _S_unref(__r);
_S_unref(__right);
__throw_exception_again;
}
@@ -616,18 +615,18 @@ rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right)
__left->_M_ref_nonnil();
return __left;
}
- if (_RopeRep::_S_leaf == __right->_M_tag) {
- if (_RopeRep::_S_leaf == __left->_M_tag) {
+ if (_Rope_constants::_S_leaf == __right->_M_tag) {
+ if (_Rope_constants::_S_leaf == __left->_M_tag) {
if (__right->_M_size + __left->_M_size <= _S_copy_max) {
return _S_leaf_concat_char_iter((_RopeLeaf*)__left,
((_RopeLeaf*)__right)->_M_data,
__right->_M_size);
}
- } else if (_RopeRep::_S_concat == __left->_M_tag
- && _RopeRep::_S_leaf ==
+ } else if (_Rope_constants::_S_concat == __left->_M_tag
+ && _Rope_constants::_S_leaf ==
((_RopeConcatenation*)__left)->_M_right->_M_tag) {
_RopeLeaf* __leftright =
- (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right);
+ (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right);
if (__leftright->_M_size + __right->_M_size <= _S_copy_max) {
_RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left;
_RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
@@ -639,7 +638,7 @@ rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right)
}
catch(...)
{
- _S_unref(__leftleft);
+ _S_unref(__leftleft);
_S_unref(__rest);
__throw_exception_again;
}
@@ -653,7 +652,7 @@ rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right)
}
catch(...)
{
- _S_unref(__left);
+ _S_unref(__left);
_S_unref(__right);
__throw_exception_again;
}
@@ -661,14 +660,14 @@ rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right)
template <class _CharT, class _Alloc>
typename rope<_CharT,_Alloc>::_RopeRep*
-rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
+rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
size_t __start, size_t __endp1)
{
if (0 == __base) return 0;
size_t __len = __base->_M_size;
size_t __adj_endp1;
const size_t __lazy_threshold = 128;
-
+
if (__endp1 >= __len) {
if (0 == __start) {
__base->_M_ref_nonnil();
@@ -680,7 +679,7 @@ rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
__adj_endp1 = __endp1;
}
switch(__base->_M_tag) {
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_RopeConcatenation* __c = (_RopeConcatenation*)__base;
_RopeRep* __left = __c->_M_left;
@@ -701,7 +700,7 @@ rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
__result = _S_concat(__left_result, __right_result);
return __result;
}
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
{
_RopeLeaf* __l = (_RopeLeaf*)__base;
_RopeLeaf* __result;
@@ -722,7 +721,7 @@ rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
# endif
return __result;
}
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_substringfn:
// Avoid introducing multiple layers of substring nodes.
{
_RopeSubstring* __old = (_RopeSubstring*)__base;
@@ -739,7 +738,7 @@ rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
} // *** else fall through: ***
}
- case _RopeRep::_S_function:
+ case _Rope_constants::_S_function:
{
_RopeFunction* __f = (_RopeFunction*)__base;
_CharT* __section;
@@ -749,7 +748,7 @@ rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
if (__result_len > __lazy_threshold) goto lazy;
__section = (_CharT*)
- _Data_allocate(_S_rounded_up_size(__result_len));
+ _Data_allocate(_S_rounded_up_size(__result_len));
try {
(*(__f->_M_fn))(__start, __result_len, __section);
}
@@ -788,14 +787,14 @@ class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> {
return true;
}
};
-
+
template<class _CharT>
class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> {
private:
_CharT _M_pattern;
public:
size_t _M_count; // Number of nonmatching characters
- _Rope_find_char_char_consumer(_CharT __p)
+ _Rope_find_char_char_consumer(_CharT __p)
: _M_pattern(__p), _M_count(0) {}
~_Rope_find_char_char_consumer() {}
bool operator() (const _CharT* __leaf, size_t __n) {
@@ -808,7 +807,7 @@ class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> {
_M_count += __n; return true;
}
};
-
+
template<class _CharT, class _Traits>
// Here _CharT is both the stream and rope character type.
class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> {
@@ -816,14 +815,14 @@ class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> {
typedef basic_ostream<_CharT,_Traits> _Insert_ostream;
_Insert_ostream& _M_o;
public:
- _Rope_insert_char_consumer(_Insert_ostream& __writer)
+ _Rope_insert_char_consumer(_Insert_ostream& __writer)
: _M_o(__writer) {};
~_Rope_insert_char_consumer() { };
// Caller is presumed to own the ostream
bool operator() (const _CharT* __leaf, size_t __n);
// Returns true to continue traversal.
};
-
+
template<class _CharT, class _Traits>
bool _Rope_insert_char_consumer<_CharT, _Traits>::operator()
(const _CharT* __leaf, size_t __n)
@@ -842,7 +841,7 @@ bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
{
if (0 == __r) return true;
switch(__r->_M_tag) {
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_RopeConcatenation* __conc = (_RopeConcatenation*)__r;
_RopeRep* __left = __conc->_M_left;
@@ -863,27 +862,27 @@ bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
}
}
return true;
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
{
_RopeLeaf* __l = (_RopeLeaf*)__r;
return __c(__l->_M_data + __begin, __end - __begin);
}
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
{
_RopeFunction* __f = (_RopeFunction*)__r;
size_t __len = __end - __begin;
bool __result;
_CharT* __buffer =
- (_CharT*)__alloc::allocate(__len * sizeof(_CharT));
+ (_CharT*)_Alloc().allocate(__len * sizeof(_CharT));
try {
(*(__f->_M_fn))(__begin, __len, __buffer);
__result = __c(__buffer, __len);
- __alloc::deallocate(__buffer, __len * sizeof(_CharT));
+ _Alloc().deallocate(__buffer, __len * sizeof(_CharT));
}
catch(...)
{
- __alloc::deallocate(__buffer, __len * sizeof(_CharT));
+ _Alloc().deallocate(__buffer, __len * sizeof(_CharT));
__throw_exception_again;
}
return __result;
@@ -901,7 +900,7 @@ bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
for (__i = 0; __i < __n; __i++) __o.put(__f);
}
-
+
template <class _CharT> inline bool _Rope_is_simple(_CharT*) { return false; }
inline bool _Rope_is_simple(char*) { return true; }
@@ -917,7 +916,7 @@ basic_ostream<_CharT, _Traits>& operator<< (basic_ostream<_CharT, _Traits>& __o,
size_t __rope_len = __r.size();
_Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
bool __is_simple = _Rope_is_simple((_CharT*)0);
-
+
if (__rope_len < __w) {
__pad_len = __w - __rope_len;
} else {
@@ -937,7 +936,7 @@ basic_ostream<_CharT, _Traits>& operator<< (basic_ostream<_CharT, _Traits>& __o,
}
catch(...)
{
- if (!__is_simple)
+ if (!__is_simple)
__o.width(__w);
__throw_exception_again;
}
@@ -960,7 +959,7 @@ size_t
rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const
{
_Rope_find_char_char_consumer<_CharT> __c(__pattern);
- _S_apply_to_pieces(__c, _M_tree_ptr, __start, size());
+ _S_apply_to_pieces(__c, this->_M_tree_ptr, __start, size());
size_type __result_pos = __start + __c._M_count;
# ifndef __STL_OLD_ROPE_SEMANTICS
if (__result_pos == size()) __result_pos = npos;
@@ -974,7 +973,7 @@ rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, _CharT* __buffer)
{
if (0 == __r) return __buffer;
switch(__r->_M_tag) {
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left;
@@ -982,13 +981,13 @@ rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, _CharT* __buffer)
_CharT* __rest = _S_flatten(__left, __buffer);
return _S_flatten(__right, __rest);
}
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
{
_RopeLeaf* __l = (_RopeLeaf*)__r;
return copy_n(__l->_M_data, __l->_M_size, __buffer).second;
}
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
// We don't yet do anything with substring nodes.
// This needs to be fixed before ropefiles will work well.
{
@@ -1011,7 +1010,7 @@ rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
if (0 == __r) {
printf("NULL\n"); return;
}
- if (_RopeRep::_S_concat == __r->_M_tag) {
+ if (_Rope_constants::_S_concat == __r->_M_tag) {
_RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left;
_RopeRep* __right = __c->_M_right;
@@ -1032,13 +1031,13 @@ rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
char* __kind;
switch (__r->_M_tag) {
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
__kind = "Leaf";
break;
- case _RopeRep::_S_function:
+ case _Rope_constants::_S_function:
__kind = "Function";
break;
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_substringfn:
__kind = "Function representing substring";
break;
default:
@@ -1058,8 +1057,8 @@ rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
bool __too_big = __r->_M_size > __prefix->_M_size;
_S_flatten(__prefix, __buffer);
- __buffer[__prefix->_M_size] = _S_eos((_CharT*)0);
- printf("%s%s\n",
+ __buffer[__prefix->_M_size] = _S_eos((_CharT*)0);
+ printf("%s%s\n",
(char*)__buffer, __too_big? "...\n" : "\n");
} else {
printf("\n");
@@ -1069,8 +1068,7 @@ rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
template <class _CharT, class _Alloc>
const unsigned long
-rope<_CharT,_Alloc>::_S_min_len[
- _Rope_RopeRep<_CharT,_Alloc>::_S_max_rope_depth + 1] = {
+rope<_CharT,_Alloc>::_S_min_len[_Rope_constants::_S_max_rope_depth + 1] = {
/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21,
/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377,
/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181,
@@ -1088,7 +1086,7 @@ template <class _CharT, class _Alloc>
typename rope<_CharT,_Alloc>::_RopeRep*
rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r)
{
- _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1];
+ _RopeRep* __forest[_Rope_constants::_S_max_rope_depth + 1];
_RopeRep* __result = 0;
int __i;
// Invariant:
@@ -1097,11 +1095,11 @@ rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r)
// __forest[__i]._M_depth = __i
// References from forest are included in refcount.
- for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
+ for (__i = 0; __i <= _Rope_constants::_S_max_rope_depth; ++__i)
__forest[__i] = 0;
try {
_S_add_to_forest(__r, __forest);
- for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
+ for (__i = 0; __i <= _Rope_constants::_S_max_rope_depth; ++__i)
if (0 != __forest[__i]) {
# ifndef __GC
_Self_destruct_ptr __old(__result);
@@ -1115,13 +1113,13 @@ rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r)
}
catch(...)
{
- for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++)
+ for(__i = 0; __i <= _Rope_constants::_S_max_rope_depth; __i++)
_S_unref(__forest[__i]);
__throw_exception_again;
}
- if (__result->_M_depth > _RopeRep::_S_max_rope_depth)
- __throw_length_error("rope too long");
+ if (__result->_M_depth > _Rope_constants::_S_max_rope_depth)
+ __throw_length_error(__N("rope::_S_balance"));
return(__result);
}
@@ -1148,9 +1146,9 @@ template <class _CharT, class _Alloc>
void
rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
{
- _RopeRep* __insertee; // included in refcount
- _RopeRep* __too_tiny = 0; // included in refcount
- int __i; // forest[0..__i-1] is empty
+ _RopeRep* __insertee; // included in refcount
+ _RopeRep* __too_tiny = 0; // included in refcount
+ int __i; // forest[0..__i-1] is empty
size_t __s = __r->_M_size;
for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) {
@@ -1180,7 +1178,7 @@ rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
__forest[__i]->_M_unref_nonnil();
__forest[__i] = 0;
}
- if (__i == _RopeRep::_S_max_rope_depth ||
+ if (__i == _Rope_constants::_S_max_rope_depth ||
__insertee->_M_size < _S_min_len[__i+1]) {
__forest[__i] = __insertee;
// refcount is OK since __insertee is now dead.
@@ -1195,10 +1193,10 @@ rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i)
{
__GC_CONST _CharT* __cstr = __r->_M_c_string;
- if (0 != __cstr) return __cstr[__i];
+ if (0 != __cstr) return __cstr[__i];
for(;;) {
switch(__r->_M_tag) {
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left;
@@ -1212,13 +1210,13 @@ rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i)
}
}
break;
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
{
_RopeLeaf* __l = (_RopeLeaf*)__r;
return __l->_M_data[__i];
}
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
{
_RopeFunction* __f = (_RopeFunction*)__r;
_CharT __result;
@@ -1237,13 +1235,13 @@ template <class _CharT, class _Alloc>
_CharT*
rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
{
- _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth];
+ _RopeRep* __clrstack[_Rope_constants::_S_max_rope_depth];
size_t __csptr = 0;
for(;;) {
if (__r->_M_ref_count > 1) return 0;
switch(__r->_M_tag) {
- case _RopeRep::_S_concat:
+ case _Rope_constants::_S_concat:
{
_RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left;
@@ -1258,7 +1256,7 @@ rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
}
}
break;
- case _RopeRep::_S_leaf:
+ case _Rope_constants::_S_leaf:
{
_RopeLeaf* __l = (_RopeLeaf*)__r;
if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
@@ -1271,8 +1269,8 @@ rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
}
return __l->_M_data + __i;
}
- case _RopeRep::_S_function:
- case _RopeRep::_S_substringfn:
+ case _Rope_constants::_S_function:
+ case _Rope_constants::_S_substringfn:
return 0;
}
}
@@ -1285,7 +1283,7 @@ rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
// flat strings.
template <class _CharT, class _Alloc>
int
-rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left,
+rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left,
const _RopeRep* __right)
{
size_t __left_len;
@@ -1295,7 +1293,7 @@ rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left,
if (0 == __left) return -1;
__left_len = __left->_M_size;
__right_len = __right->_M_size;
- if (_RopeRep::_S_leaf == __left->_M_tag) {
+ if (_Rope_constants::_S_leaf == __left->_M_tag) {
_RopeLeaf* __l = (_RopeLeaf*) __left;
if (_RopeRep::_S_leaf == __right->_M_tag) {
_RopeLeaf* __r = (_RopeLeaf*) __right;
@@ -1312,7 +1310,7 @@ rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left,
} else {
const_iterator __lstart(__left, 0);
const_iterator __lend(__left, __left_len);
- if (_RopeRep::_S_leaf == __right->_M_tag) {
+ if (_Rope_constants::_S_leaf == __right->_M_tag) {
_RopeLeaf* __r = (_RopeLeaf*) __right;
return lexicographical_compare_3way(
__lstart, __lend,
@@ -1387,13 +1385,13 @@ rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,
if (0 == __n)
return;
-
+
__exponent = __n / __exponentiate_threshold;
__rest = __n % __exponentiate_threshold;
if (0 == __rest) {
__remainder = 0;
} else {
- __rest_buffer = _Data_allocate(_S_rounded_up_size(__rest));
+ __rest_buffer = this->_Data_allocate(_S_rounded_up_size(__rest));
uninitialized_fill_n(__rest_buffer, __rest, __c);
_S_cond_store_eos(__rest_buffer[__rest]);
try {
@@ -1408,7 +1406,7 @@ rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,
__remainder_rope._M_tree_ptr = __remainder;
if (__exponent != 0) {
_CharT* __base_buffer =
- _Data_allocate(_S_rounded_up_size(__exponentiate_threshold));
+ this->_Data_allocate(_S_rounded_up_size(__exponentiate_threshold));
_RopeLeaf* __base_leaf;
rope __base_rope;
uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c);
@@ -1419,12 +1417,12 @@ rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,
}
catch(...)
{
- _RopeRep::__STL_FREE_STRING(__base_buffer,
+ _RopeRep::__STL_FREE_STRING(__base_buffer,
__exponentiate_threshold, __a);
__throw_exception_again;
}
__base_rope._M_tree_ptr = __base_leaf;
- if (1 == __exponent) {
+ if (1 == __exponent) {
__result = __base_rope;
} else {
__result = power(__base_rope, __exponent,
@@ -1436,8 +1434,8 @@ rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,
} else {
__result = __remainder_rope;
}
- _M_tree_ptr = __result._M_tree_ptr;
- _M_tree_ptr->_M_ref_nonnil();
+ this->_M_tree_ptr = __result._M_tree_ptr;
+ this->_M_tree_ptr->_M_ref_nonnil();
}
template<class _CharT, class _Alloc>
@@ -1445,49 +1443,42 @@ template<class _CharT, class _Alloc>
template<class _CharT, class _Alloc>
const _CharT* rope<_CharT,_Alloc>::c_str() const {
- if (0 == _M_tree_ptr) {
+ if (0 == this->_M_tree_ptr) {
_S_empty_c_str[0] = _S_eos((_CharT*)0); // Possibly redundant,
// but probably fast.
return _S_empty_c_str;
}
- __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string;
- if (0 != __old_c_string) return(__old_c_string);
- size_t __s = size();
- _CharT* __result = _Data_allocate(__s + 1);
- _S_flatten(_M_tree_ptr, __result);
- __result[__s] = _S_eos((_CharT*)0);
-# ifdef __GC
- _M_tree_ptr->_M_c_string = __result;
-# else
- if ((__old_c_string = (__GC_CONST _CharT*)
- std::_Atomic_swap((unsigned long *)(&(_M_tree_ptr->_M_c_string)),
- (unsigned long)__result)) != 0) {
- // It must have been added in the interim. Hence it had to have been
- // separately allocated. Deallocate the old copy, since we just
- // replaced it.
- _Destroy(__old_c_string, __old_c_string + __s + 1);
- _Data_deallocate(__old_c_string, __s + 1);
+ __gthread_mutex_lock (&this->_M_tree_ptr->_M_c_string_lock);
+ __GC_CONST _CharT* __result = this->_M_tree_ptr->_M_c_string;
+ if (0 == __result)
+ {
+ size_t __s = size();
+ __result = this->_Data_allocate(__s + 1);
+ _S_flatten(this->_M_tree_ptr, __result);
+ __result[__s] = _S_eos((_CharT*)0);
+ this->_M_tree_ptr->_M_c_string = __result;
}
-# endif
+ __gthread_mutex_unlock (&this->_M_tree_ptr->_M_c_string_lock);
return(__result);
}
template<class _CharT, class _Alloc>
const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() {
- if (0 == _M_tree_ptr) {
+ if (0 == this->_M_tree_ptr) {
_S_empty_c_str[0] = _S_eos((_CharT*)0);
return _S_empty_c_str;
}
- __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string;
- if (_RopeRep::_S_leaf == _M_tree_ptr->_M_tag && 0 != __old_c_string) {
+ __GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string;
+ if (_Rope_constants::_S_leaf == this->_M_tree_ptr->_M_tag
+ && 0 != __old_c_string) {
return(__old_c_string);
}
size_t __s = size();
- _CharT* __result = _Data_allocate(_S_rounded_up_size(__s));
- _S_flatten(_M_tree_ptr, __result);
+ _CharT* __result = this->_Data_allocate(_S_rounded_up_size(__s));
+ _S_flatten(this->_M_tree_ptr, __result);
__result[__s] = _S_eos((_CharT*)0);
- _M_tree_ptr->_M_unref_nonnil();
- _M_tree_ptr = _S_new_RopeLeaf(__result, __s, get_allocator());
+ this->_M_tree_ptr->_M_unref_nonnil();
+ this->_M_tree_ptr = _S_new_RopeLeaf(__result, __s, this->get_allocator());
return(__result);
}
@@ -1501,14 +1492,14 @@ _Rope_rotate(_Rope_iterator __first,
{
typedef typename _Rope_iterator::value_type _CharT;
typedef typename _Rope_iterator::_allocator_type _Alloc;
-
+
rope<_CharT,_Alloc>& __r(__first.container());
rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index());
- rope<_CharT,_Alloc> __suffix =
+ rope<_CharT,_Alloc> __suffix =
__r.substr(__last.index(), __r.size() - __last.index());
- rope<_CharT,_Alloc> __part1 =
+ rope<_CharT,_Alloc> __part1 =
__r.substr(__middle.index(), __last.index() - __middle.index());
- rope<_CharT,_Alloc> __part2 =
+ rope<_CharT,_Alloc> __part2 =
__r.substr(__first.index(), __middle.index() - __first.index());
__r = __prefix;
__r += __part1;
diff --git a/contrib/libstdc++/include/ext/slist b/contrib/libstdc++/include/ext/slist
index 35e089a..4b58520 100644
--- a/contrib/libstdc++/include/ext/slist
+++ b/contrib/libstdc++/include/ext/slist
@@ -47,20 +47,19 @@
* include this header if you are using GCC 3 or later.
*/
-#ifndef __SGI_STL_INTERNAL_SLIST_H
-#define __SGI_STL_INTERNAL_SLIST_H
+#ifndef _SLIST
+#define _SLIST 1
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/concept_check.h>
namespace __gnu_cxx
-{
+{
using std::size_t;
using std::ptrdiff_t;
-using std::_Alloc_traits;
using std::_Construct;
using std::_Destroy;
using std::allocator;
@@ -79,7 +78,7 @@ __slist_make_link(_Slist_node_base* __prev_node,
return __new_node;
}
-inline _Slist_node_base*
+inline _Slist_node_base*
__slist_previous(_Slist_node_base* __head,
const _Slist_node_base* __node)
{
@@ -88,7 +87,7 @@ __slist_previous(_Slist_node_base* __head,
return __head;
}
-inline const _Slist_node_base*
+inline const _Slist_node_base*
__slist_previous(const _Slist_node_base* __head,
const _Slist_node_base* __node)
{
@@ -201,73 +200,27 @@ struct _Slist_iterator : public _Slist_iterator_base
}
};
-
-// Base class that encapsulates details of allocators. Three cases:
-// an ordinary standard-conforming allocator, a standard-conforming
-// allocator with no non-static data, and an SGI-style allocator.
-// This complexity is necessary only because we're worrying about backward
-// compatibility and because we want to avoid wasting storage on an
-// allocator instance if it isn't necessary.
-
-// Base for general standard-conforming allocators.
-template <class _Tp, class _Allocator, bool _IsStatic>
-class _Slist_alloc_base {
-public:
- typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type
- allocator_type;
- allocator_type get_allocator() const { return _M_node_allocator; }
-
- _Slist_alloc_base(const allocator_type& __a) : _M_node_allocator(__a) {}
-
-protected:
- _Slist_node<_Tp>* _M_get_node()
- { return _M_node_allocator.allocate(1); }
- void _M_put_node(_Slist_node<_Tp>* __p)
- { _M_node_allocator.deallocate(__p, 1); }
-
-protected:
- typename _Alloc_traits<_Slist_node<_Tp>,_Allocator>::allocator_type
- _M_node_allocator;
- _Slist_node_base _M_head;
-};
-
-// Specialization for instanceless allocators.
-template <class _Tp, class _Allocator>
-class _Slist_alloc_base<_Tp,_Allocator, true> {
-public:
- typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type
- allocator_type;
- allocator_type get_allocator() const { return allocator_type(); }
-
- _Slist_alloc_base(const allocator_type&) {}
-
-protected:
- typedef typename _Alloc_traits<_Slist_node<_Tp>, _Allocator>::_Alloc_type
- _Alloc_type;
- _Slist_node<_Tp>* _M_get_node() { return _Alloc_type::allocate(1); }
- void _M_put_node(_Slist_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); }
-
-protected:
- _Slist_node_base _M_head;
-};
-
-
template <class _Tp, class _Alloc>
struct _Slist_base
- : public _Slist_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+ : public _Alloc::template rebind<_Slist_node<_Tp> >::other
{
- typedef _Slist_alloc_base<_Tp, _Alloc,
- _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
- _Base;
- typedef typename _Base::allocator_type allocator_type;
+ typedef typename _Alloc::template rebind<_Slist_node<_Tp> >::other _Node_alloc;
+ typedef _Alloc allocator_type;
+ allocator_type get_allocator() const {
+ return *static_cast<const _Node_alloc*>(this);
+ }
_Slist_base(const allocator_type& __a)
- : _Base(__a) { this->_M_head._M_next = 0; }
+ : _Node_alloc(__a) { this->_M_head._M_next = 0; }
~_Slist_base() { _M_erase_after(&this->_M_head, 0); }
protected:
+ _Slist_node_base _M_head;
+
+ _Slist_node<_Tp>* _M_get_node() { return _Node_alloc::allocate(1); }
+ void _M_put_node(_Slist_node<_Tp>* __p) { _Node_alloc::deallocate(__p, 1); }
+protected:
_Slist_node_base* _M_erase_after(_Slist_node_base* __pos)
{
_Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next);
@@ -280,7 +233,7 @@ protected:
_Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
};
-template <class _Tp, class _Alloc>
+template <class _Tp, class _Alloc>
_Slist_node_base*
_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
_Slist_node_base* __last_node) {
@@ -304,7 +257,7 @@ template <class _Tp, class _Alloc = allocator<_Tp> >
class slist : private _Slist_base<_Tp,_Alloc>
{
// concept requirements
- __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
private:
typedef _Slist_base<_Tp,_Alloc> _Base;
@@ -341,7 +294,7 @@ private:
}
return __node;
}
-
+
_Node* _M_create_node() {
_Node* __node = this->_M_get_node();
try {
@@ -408,7 +361,7 @@ public:
public:
iterator begin() { return iterator((_Node*)this->_M_head._M_next); }
- const_iterator begin() const
+ const_iterator begin() const
{ return const_iterator((_Node*)this->_M_head._M_next);}
iterator end() { return iterator(0); }
@@ -417,8 +370,8 @@ public:
// Experimental new feature: before_begin() returns a
// non-dereferenceable iterator that, when incremented, yields
// begin(). This iterator may be used as the argument to
- // insert_after, erase_after, etc. Note that even for an empty
- // slist, before_begin() is not the same iterator as end(). It
+ // insert_after, erase_after, etc. Note that even for an empty
+ // slist, before_begin() is not the same iterator as end(). It
// is always necessary to increment before_begin() at least once to
// obtain end().
iterator before_begin() { return iterator((_Node*) &this->_M_head); }
@@ -426,7 +379,7 @@ public:
{ return const_iterator((_Node*) &this->_M_head); }
size_type size() const { return __slist_size(this->_M_head._M_next); }
-
+
size_type max_size() const { return size_type(-1); }
bool empty() const { return this->_M_head._M_next == 0; }
@@ -437,7 +390,7 @@ public:
public:
reference front() { return ((_Node*) this->_M_head._M_next)->_M_data; }
- const_reference front() const
+ const_reference front() const
{ return ((_Node*) this->_M_head._M_next)->_M_data; }
void push_front(const value_type& __x) {
__slist_make_link(&this->_M_head, _M_create_node(__x));
@@ -474,10 +427,10 @@ private:
}
// Check whether it's an integral type. If so, it's not an iterator.
- template <class _InIter>
- void _M_insert_after_range(_Node_base* __pos,
- _InIter __first, _InIter __last) {
- typedef typename _Is_integer<_InIter>::_Integral _Integral;
+ template <class _InIterator>
+ void _M_insert_after_range(_Node_base* __pos,
+ _InIterator __first, _InIterator __last) {
+ typedef typename _Is_integer<_InIterator>::_Integral _Integral;
_M_insert_after_range(__pos, __first, __last, _Integral());
}
@@ -487,9 +440,9 @@ private:
_M_insert_after_fill(__pos, __n, __x);
}
- template <class _InIter>
+ template <class _InIterator>
void _M_insert_after_range(_Node_base* __pos,
- _InIter __first, _InIter __last,
+ _InIterator __first, _InIterator __last,
__false_type) {
while (__first != __last) {
__pos = __slist_make_link(__pos, _M_create_node(*__first));
@@ -513,8 +466,8 @@ public:
// We don't need any dispatching tricks here, because _M_insert_after_range
// already does them.
- template <class _InIter>
- void insert_after(iterator __pos, _InIter __first, _InIter __last) {
+ template <class _InIterator>
+ void insert_after(iterator __pos, _InIterator __first, _InIterator __last) {
_M_insert_after_range(__pos._M_node, __first, __last);
}
@@ -533,13 +486,13 @@ public:
void insert(iterator __pos, size_type __n, const value_type& __x) {
_M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node),
__n, __x);
- }
-
+ }
+
// We don't need any dispatching tricks here, because _M_insert_after_range
// already does them.
- template <class _InIter>
- void insert(iterator __pos, _InIter __first, _InIter __last) {
- _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
+ template <class _InIterator>
+ void insert(iterator __pos, _InIterator __first, _InIterator __last) {
+ _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
__first, __last);
}
@@ -548,12 +501,12 @@ public:
return iterator((_Node*) this->_M_erase_after(__pos._M_node));
}
iterator erase_after(iterator __before_first, iterator __last) {
- return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
+ return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
__last._M_node));
- }
+ }
iterator erase(iterator __pos) {
- return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head,
+ return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head,
__pos._M_node));
}
iterator erase(iterator __first, iterator __last) {
@@ -568,11 +521,11 @@ public:
public:
// Moves the range [__before_first + 1, __before_last + 1) to *this,
// inserting it immediately after __pos. This is constant time.
- void splice_after(iterator __pos,
+ void splice_after(iterator __pos,
iterator __before_first, iterator __before_last)
{
- if (__before_first != __before_last)
- __slist_splice_after(__pos._M_node, __before_first._M_node,
+ if (__before_first != __before_last)
+ __slist_splice_after(__pos._M_node, __before_first._M_node,
__before_last._M_node);
}
@@ -618,27 +571,27 @@ public:
}
public:
- void reverse() {
+ void reverse() {
if (this->_M_head._M_next)
this->_M_head._M_next = __slist_reverse(this->_M_head._M_next);
}
- void remove(const _Tp& __val);
- void unique();
+ void remove(const _Tp& __val);
+ void unique();
void merge(slist& __x);
- void sort();
+ void sort();
- template <class _Predicate>
+ template <class _Predicate>
void remove_if(_Predicate __pred);
- template <class _BinaryPredicate>
- void unique(_BinaryPredicate __pred);
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __pred);
- template <class _StrictWeakOrdering>
+ template <class _StrictWeakOrdering>
void merge(slist&, _StrictWeakOrdering);
- template <class _StrictWeakOrdering>
- void sort(_StrictWeakOrdering __comp);
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp);
};
template <class _Tp, class _Alloc>
@@ -657,7 +610,7 @@ slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x)
if (__n2 == 0)
this->_M_erase_after(__p1, 0);
else
- _M_insert_after_range(__p1, const_iterator((_Node*)__n2),
+ _M_insert_after_range(__p1, const_iterator((_Node*)__n2),
const_iterator(0));
}
return *this;
@@ -678,9 +631,9 @@ void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
this->_M_erase_after(__prev, 0);
}
-template <class _Tp, class _Alloc> template <class _InputIter>
+template <class _Tp, class _Alloc> template <class _InputIterator>
void
-slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last,
+slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
_Node_base* __prev = &this->_M_head;
@@ -698,7 +651,7 @@ slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last,
}
template <class _Tp, class _Alloc>
-inline bool
+inline bool
operator==(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2)
{
typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
@@ -719,30 +672,30 @@ template <class _Tp, class _Alloc>
inline bool
operator<(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2)
{
- return std::lexicographical_compare(_SL1.begin(), _SL1.end(),
+ return std::lexicographical_compare(_SL1.begin(), _SL1.end(),
_SL2.begin(), _SL2.end());
}
template <class _Tp, class _Alloc>
-inline bool
+inline bool
operator!=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
return !(_SL1 == _SL2);
}
template <class _Tp, class _Alloc>
-inline bool
+inline bool
operator>(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
return _SL2 < _SL1;
}
template <class _Tp, class _Alloc>
-inline bool
+inline bool
operator<=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
return !(_SL2 < _SL1);
}
template <class _Tp, class _Alloc>
-inline bool
+inline bool
operator>=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
return !(_SL1 < _SL2);
}
@@ -761,7 +714,7 @@ void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x)
--__len;
__cur = __cur->_M_next;
}
- if (__cur->_M_next)
+ if (__cur->_M_next)
this->_M_erase_after(__cur, 0);
else
_M_insert_after_fill(__cur, __len, __x);
@@ -779,13 +732,13 @@ void slist<_Tp,_Alloc>::remove(const _Tp& __val)
}
}
-template <class _Tp, class _Alloc>
+template <class _Tp, class _Alloc>
void slist<_Tp,_Alloc>::unique()
{
_Node_base* __cur = this->_M_head._M_next;
if (__cur) {
while (__cur->_M_next) {
- if (((_Node*)__cur)->_M_data ==
+ if (((_Node*)__cur)->_M_data ==
((_Node*)(__cur->_M_next))->_M_data)
this->_M_erase_after(__cur);
else
@@ -799,8 +752,8 @@ void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x)
{
_Node_base* __n1 = &this->_M_head;
while (__n1->_M_next && __x._M_head._M_next) {
- if (((_Node*) __x._M_head._M_next)->_M_data <
- ((_Node*) __n1->_M_next)->_M_data)
+ if (((_Node*) __x._M_head._M_next)->_M_data <
+ ((_Node*) __n1->_M_next)->_M_data)
__slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
__n1 = __n1->_M_next;
}
@@ -837,7 +790,7 @@ void slist<_Tp,_Alloc>::sort()
}
}
-template <class _Tp, class _Alloc>
+template <class _Tp, class _Alloc>
template <class _Predicate>
void slist<_Tp,_Alloc>::remove_if(_Predicate __pred)
{
@@ -850,13 +803,13 @@ void slist<_Tp,_Alloc>::remove_if(_Predicate __pred)
}
}
-template <class _Tp, class _Alloc> template <class _BinaryPredicate>
+template <class _Tp, class _Alloc> template <class _BinaryPredicate>
void slist<_Tp,_Alloc>::unique(_BinaryPredicate __pred)
{
_Node* __cur = (_Node*) this->_M_head._M_next;
if (__cur) {
while (__cur->_M_next) {
- if (__pred(((_Node*)__cur)->_M_data,
+ if (__pred(((_Node*)__cur)->_M_data,
((_Node*)(__cur->_M_next))->_M_data))
this->_M_erase_after(__cur);
else
@@ -882,7 +835,7 @@ void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x,
}
}
-template <class _Tp, class _Alloc> template <class _StrictWeakOrdering>
+template <class _Tp, class _Alloc> template <class _StrictWeakOrdering>
void slist<_Tp,_Alloc>::sort(_StrictWeakOrdering __comp)
{
if (this->_M_head._M_next && this->_M_head._M_next->_M_next) {
@@ -930,7 +883,7 @@ public:
typedef void pointer;
typedef void reference;
- insert_iterator(_Container& __x, typename _Container::iterator __i)
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x) {
if (__i == __x.begin())
iter = __x.before_begin();
@@ -939,7 +892,7 @@ public:
}
insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value) {
+ operator=(const typename _Container::value_type& __value) {
iter = container->insert_after(iter, __value);
return *this;
}
@@ -950,8 +903,4 @@ public:
} // namespace std
-#endif /* __SGI_STL_INTERNAL_SLIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif
diff --git a/contrib/libstdc++/include/ext/stdio_filebuf.h b/contrib/libstdc++/include/ext/stdio_filebuf.h
index 4c6bf90..cc22972 100644
--- a/contrib/libstdc++/include/ext/stdio_filebuf.h
+++ b/contrib/libstdc++/include/ext/stdio_filebuf.h
@@ -1,6 +1,6 @@
// File descriptor layer for filebuf -*- C++ -*-
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,10 +31,11 @@
* This file is a GNU extension to the Standard C++ Library.
*/
-#ifndef _EXT_STDIO_FILEBUF
-#define _EXT_STDIO_FILEBUF
+#ifndef _STDIO_FILEBUF_H
+#define _STDIO_FILEBUF_H 1
#pragma GCC system_header
+
#include <fstream>
namespace __gnu_cxx
@@ -53,47 +54,47 @@ namespace __gnu_cxx
{
public:
// Types:
- typedef _CharT char_type;
- typedef _Traits traits_type;
- typedef typename traits_type::int_type int_type;
- typedef typename traits_type::pos_type pos_type;
- typedef typename traits_type::off_type off_type;
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
typedef std::size_t size_t;
-
- protected:
- // Stack-based buffer for unbuffered input.
- char_type _M_unbuf[4];
-
+
public:
/**
+ * deferred initialization
+ */
+ stdio_filebuf() : std::basic_filebuf<_CharT, _Traits>() {}
+
+ /**
* @param fd An open file descriptor.
* @param mode Same meaning as in a standard filebuf.
- * @param del Whether to close the file on destruction.
- * @param size Optimal or preferred size of internal buffer, in bytes.
+ * @param size Optimal or preferred size of internal buffer, in chars.
*
* This constructor associates a file stream buffer with an open
- * POSIX file descriptor. Iff @a del is true, then the associated
- * file will be closed when the stdio_filebuf is closed/destroyed.
+ * POSIX file descriptor. The file descriptor will be automatically
+ * closed when the stdio_filebuf is closed/destroyed.
*/
- stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del,
- size_t __size);
+ stdio_filebuf(int __fd, std::ios_base::openmode __mode,
+ size_t __size = static_cast<size_t>(BUFSIZ));
/**
* @param f An open @c FILE*.
* @param mode Same meaning as in a standard filebuf.
- * @param size Optimal or preferred size of internal buffer, in bytes.
+ * @param size Optimal or preferred size of internal buffer, in chars.
* Defaults to system's @c BUFSIZ.
*
* This constructor associates a file stream buffer with an open
* C @c FILE*. The @c FILE* will not be automatically closed when the
* stdio_filebuf is closed/destroyed.
*/
- stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
+ stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
size_t __size = static_cast<size_t>(BUFSIZ));
/**
- * Possibly closes the external data stream, in the case of the file
- * descriptor constructor and @c del @c == @c true.
+ * Closes the external data stream if the file descriptor constructor
+ * was used.
*/
virtual
~stdio_filebuf();
@@ -107,8 +108,17 @@ namespace __gnu_cxx
* descriptor, so be careful.
*/
int
- fd()
- { return _M_file.fd(); }
+ fd() { return this->_M_file.fd(); }
+
+ /**
+ * @return The underlying FILE*.
+ *
+ * This function can be used to access the underlying "C" file pointer.
+ * Note that there is no way for the library to track what you do
+ * with the file, so be careful.
+ */
+ std::__c_file*
+ file() { return this->_M_file.file(); }
};
template<typename _CharT, typename _Traits>
@@ -117,53 +127,36 @@ namespace __gnu_cxx
template<typename _CharT, typename _Traits>
stdio_filebuf<_CharT, _Traits>::
- stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del,
- size_t __size)
+ stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size)
{
- _M_file.sys_open(__fd, __mode, __del);
+ this->_M_file.sys_open(__fd, __mode);
if (this->is_open())
{
- _M_mode = __mode;
- if (__size > 0 && __size < 4)
- {
- // Specify not to use an allocated buffer.
- _M_buf = _M_unbuf;
- _M_buf_size = __size;
- _M_buf_size_opt = 0;
- }
- else
- {
- _M_buf_size_opt = __size;
- _M_allocate_internal_buffer();
- }
- _M_set_indeterminate();
+ this->_M_mode = __mode;
+ this->_M_buf_size = __size;
+ this->_M_allocate_internal_buffer();
+ this->_M_reading = false;
+ this->_M_writing = false;
+ this->_M_set_buffer(-1);
}
}
template<typename _CharT, typename _Traits>
stdio_filebuf<_CharT, _Traits>::
- stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
+ stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
size_t __size)
{
- _M_file.sys_open(__f, __mode);
+ this->_M_file.sys_open(__f, __mode);
if (this->is_open())
{
- _M_mode = __mode;
- if (__size > 0 && __size < 4)
- {
- // Specify not to use an allocated buffer.
- _M_buf = _M_unbuf;
- _M_buf_size = __size;
- _M_buf_size_opt = 0;
- }
- else
- {
- _M_buf_size_opt = __size;
- _M_allocate_internal_buffer();
- }
- _M_set_indeterminate();
+ this->_M_mode = __mode;
+ this->_M_buf_size = __size;
+ this->_M_allocate_internal_buffer();
+ this->_M_reading = false;
+ this->_M_writing = false;
+ this->_M_set_buffer(-1);
}
}
} // namespace __gnu_cxx
-#endif /* _EXT_STDIO_FILEBUF */
+#endif
diff --git a/contrib/libstdc++/include/ext/stdio_sync_filebuf.h b/contrib/libstdc++/include/ext/stdio_sync_filebuf.h
new file mode 100644
index 0000000..367d310
--- /dev/null
+++ b/contrib/libstdc++/include/ext/stdio_sync_filebuf.h
@@ -0,0 +1,281 @@
+// Iostreams wrapper for stdio FILE* -*- C++ -*-
+
+// Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+/** @file ext/stdiostream.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _STDIO_SYNC_FILEBUF_H
+#define _STDIO_SYNC_FILEBUF_H 1
+
+#pragma GCC system_header
+
+#include <streambuf>
+#include <unistd.h>
+#include <cstdio>
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+#include <cwchar>
+#endif
+
+namespace __gnu_cxx
+{
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT> >
+ class stdio_sync_filebuf : public std::basic_streambuf<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ private:
+ // Underlying stdio FILE
+ std::__c_file* const _M_file;
+
+ // Last character gotten. This is used when pbackfail is
+ // called from basic_streambuf::sungetc()
+ int_type _M_unget_buf;
+
+ public:
+ explicit
+ stdio_sync_filebuf(std::__c_file* __f)
+ : _M_file(__f), _M_unget_buf(traits_type::eof())
+ { }
+
+ /**
+ * @return The underlying FILE*.
+ *
+ * This function can be used to access the underlying "C" file pointer.
+ * Note that there is no way for the library to track what you do
+ * with the file, so be careful.
+ */
+ std::__c_file* const
+ file() { return this->_M_file; }
+
+ protected:
+ int_type
+ syncgetc();
+
+ int_type
+ syncungetc(int_type __c);
+
+ int_type
+ syncputc(int_type __c);
+
+ virtual int_type
+ underflow()
+ {
+ int_type __c = this->syncgetc();
+ return this->syncungetc(__c);
+ }
+
+ virtual int_type
+ uflow()
+ {
+ // Store the gotten character in case we need to unget it.
+ _M_unget_buf = this->syncgetc();
+ return _M_unget_buf;
+ }
+
+ virtual int_type
+ pbackfail(int_type __c = traits_type::eof())
+ {
+ int_type __ret;
+ const int_type __eof = traits_type::eof();
+
+ // Check if the unget or putback was requested
+ if (traits_type::eq_int_type(__c, __eof)) // unget
+ {
+ if (!traits_type::eq_int_type(_M_unget_buf, __eof))
+ __ret = this->syncungetc(_M_unget_buf);
+ else // buffer invalid, fail.
+ __ret = __eof;
+ }
+ else // putback
+ __ret = this->syncungetc(__c);
+
+ // The buffered character is no longer valid, discard it.
+ _M_unget_buf = __eof;
+ return __ret;
+ }
+
+ virtual std::streamsize
+ xsgetn(char_type* __s, std::streamsize __n);
+
+ virtual int_type
+ overflow(int_type __c = traits_type::eof())
+ {
+ int_type __ret;
+ if (traits_type::eq_int_type(__c, traits_type::eof()))
+ {
+ if (std::fflush(_M_file))
+ __ret = traits_type::eof();
+ else
+ __ret = traits_type::not_eof(__c);
+ }
+ else
+ __ret = this->syncputc(__c);
+ return __ret;
+ }
+
+ virtual std::streamsize
+ xsputn(const char_type* __s, std::streamsize __n);
+
+ virtual int
+ sync()
+ { return std::fflush(_M_file); }
+
+ virtual std::streampos
+ seekoff(std::streamoff __off, std::ios_base::seekdir __dir,
+ std::ios_base::openmode = std::ios_base::in | std::ios_base::out)
+ {
+ std::streampos __ret(std::streamoff(-1));
+ int __whence;
+ if (__dir == std::ios_base::beg)
+ __whence = SEEK_SET;
+ else if (__dir == std::ios_base::cur)
+ __whence = SEEK_CUR;
+ else
+ __whence = SEEK_END;
+#ifdef _GLIBCXX_USE_LFS
+ if (!fseeko64(_M_file, __off, __whence))
+ __ret = std::streampos(ftello64(_M_file));
+#else
+ if (!fseek(_M_file, __off, __whence))
+ __ret = std::streampos(std::ftell(_M_file));
+#endif
+ return __ret;
+ }
+
+ virtual std::streampos
+ seekpos(std::streampos __pos,
+ std::ios_base::openmode __mode =
+ std::ios_base::in | std::ios_base::out)
+ { return seekoff(std::streamoff(__pos), std::ios_base::beg, __mode); }
+ };
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncgetc()
+ { return std::getc(_M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncungetc(int_type __c)
+ { return std::ungetc(__c, _M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncputc(int_type __c)
+ { return std::putc(__c, _M_file); }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<char>::xsgetn(char* __s, std::streamsize __n)
+ {
+ std::streamsize __ret = std::fread(__s, 1, __n, _M_file);
+ if (__ret > 0)
+ _M_unget_buf = traits_type::to_int_type(__s[__ret - 1]);
+ else
+ _M_unget_buf = traits_type::eof();
+ return __ret;
+ }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<char>::xsputn(const char* __s, std::streamsize __n)
+ { return std::fwrite(__s, 1, __n, _M_file); }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncgetc()
+ { return std::getwc(_M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncungetc(int_type __c)
+ { return std::ungetwc(__c, _M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncputc(int_type __c)
+ { return std::putwc(__c, _M_file); }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<wchar_t>::xsgetn(wchar_t* __s, std::streamsize __n)
+ {
+ std::streamsize __ret = 0;
+ const int_type __eof = traits_type::eof();
+ while (__n--)
+ {
+ int_type __c = this->syncgetc();
+ if (traits_type::eq_int_type(__c, __eof))
+ break;
+ __s[__ret] = traits_type::to_char_type(__c);
+ ++__ret;
+ }
+
+ if (__ret > 0)
+ _M_unget_buf = traits_type::to_int_type(__s[__ret - 1]);
+ else
+ _M_unget_buf = traits_type::eof();
+ return __ret;
+ }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<wchar_t>::xsputn(const wchar_t* __s,
+ std::streamsize __n)
+ {
+ std::streamsize __ret = 0;
+ const int_type __eof = traits_type::eof();
+ while (__n--)
+ {
+ if (traits_type::eq_int_type(this->syncputc(*__s++), __eof))
+ break;
+ ++__ret;
+ }
+ return __ret;
+ }
+#endif
+
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class stdio_sync_filebuf<char>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class stdio_sync_filebuf<wchar_t>;
+#endif
+#endif
+} // namespace __gnu_cxx
+
+#endif
diff --git a/contrib/libstdc++/include/std/std_algorithm.h b/contrib/libstdc++/include/std/std_algorithm.h
index bcc0c8a..40e6246 100644
--- a/contrib/libstdc++/include/std/std_algorithm.h
+++ b/contrib/libstdc++/include/std/std_algorithm.h
@@ -58,8 +58,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_ALGORITHM
-#define _CPP_ALGORITHM 1
+#ifndef _GLIBCXX_ALGORITHM
+#define _GLIBCXX_ALGORITHM 1
#pragma GCC system_header
@@ -68,8 +68,4 @@
#include <bits/stl_uninitialized.h>
#include <bits/stl_algo.h>
-#endif /* _CPP_ALGORITHM */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_ALGORITHM */
diff --git a/contrib/libstdc++/include/std/std_bitset.h b/contrib/libstdc++/include/std/std_bitset.h
index ebe1650..01e3f90 100644
--- a/contrib/libstdc++/include/std/std_bitset.h
+++ b/contrib/libstdc++/include/std/std_bitset.h
@@ -1,6 +1,6 @@
// <bitset> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,29 +45,26 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _GLIBCPP_BITSET_H
-#define _GLIBCPP_BITSET_H
+#ifndef _GLIBCXX_BITSET
+#define _GLIBCXX_BITSET 1
#pragma GCC system_header
-#include <cstddef> // for size_t
-#include <cstring> // for memset
+#include <cstddef> // For size_t
+#include <cstring> // For memset
+#include <limits> // For numeric_limits
#include <string>
-#include <bits/functexcept.h> // for invalid_argument, out_of_range,
+#include <bits/functexcept.h> // For invalid_argument, out_of_range,
// overflow_error
-#include <ostream> // for ostream (operator<<)
-#include <istream> // for istream (operator>>)
+#include <ostream> // For ostream (operator<<)
+#include <istream> // For istream (operator>>)
+#define _GLIBCXX_BITSET_BITS_PER_WORD numeric_limits<unsigned long>::digits
+#define _GLIBCXX_BITSET_WORDS(__n) \
+ ((__n) < 1 ? 0 : ((__n) + _GLIBCXX_BITSET_BITS_PER_WORD - 1)/_GLIBCXX_BITSET_BITS_PER_WORD)
-#define _GLIBCPP_BITSET_BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
-#define _GLIBCPP_BITSET_WORDS(__n) \
- ((__n) < 1 ? 0 : ((__n) + _GLIBCPP_BITSET_BITS_PER_WORD - 1)/_GLIBCPP_BITSET_BITS_PER_WORD)
-
-namespace std
+namespace _GLIBCXX_STD
{
- extern unsigned char _S_bit_count[256];
- extern unsigned char _S_first_one[256];
-
/**
* @if maint
* Base class, general case. It is a class inveriant that _Nw will be
@@ -93,15 +90,15 @@ namespace std
static size_t
_S_whichword(size_t __pos )
- { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static size_t
_S_whichbyte(size_t __pos )
- { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static size_t
_S_whichbit(size_t __pos )
- { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _WordT
_S_maskbit(size_t __pos )
@@ -191,14 +188,8 @@ namespace std
_M_do_count() const
{
size_t __result = 0;
- const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
- const unsigned char* __end_ptr = (const unsigned char*)(_M_w + _Nw);
-
- while ( __byte_ptr < __end_ptr )
- {
- __result += _S_bit_count[*__byte_ptr];
- __byte_ptr++;
- }
+ for (size_t __i = 0; __i < _Nw; __i++)
+ __result += __builtin_popcountl(_M_w[__i]);
return __result;
}
@@ -221,22 +212,22 @@ namespace std
{
if (__builtin_expect(__shift != 0, 1))
{
- const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
- const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+ const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
+ const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
if (__offset == 0)
for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
_M_w[__n] = _M_w[__n - __wshift];
else
{
- const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+ const size_t __sub_offset = _GLIBCXX_BITSET_BITS_PER_WORD - __offset;
for (size_t __n = _Nw - 1; __n > __wshift; --__n)
_M_w[__n] = (_M_w[__n - __wshift] << __offset) |
(_M_w[__n - __wshift - 1] >> __sub_offset);
_M_w[__wshift] = _M_w[0] << __offset;
}
- fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
+ std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
}
}
@@ -246,8 +237,8 @@ namespace std
{
if (__builtin_expect(__shift != 0, 1))
{
- const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
- const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+ const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
+ const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
const size_t __limit = _Nw - __wshift - 1;
if (__offset == 0)
@@ -255,14 +246,14 @@ namespace std
_M_w[__n] = _M_w[__n + __wshift];
else
{
- const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+ const size_t __sub_offset = _GLIBCXX_BITSET_BITS_PER_WORD - __offset;
for (size_t __n = 0; __n < __limit; ++__n)
_M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
(_M_w[__n + __wshift + 1] << __sub_offset);
_M_w[__limit] = _M_w[_Nw-1] >> __offset;
}
-
- fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
+
+ std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
}
}
@@ -272,7 +263,7 @@ namespace std
{
for (size_t __i = 1; __i < _Nw; ++__i)
if (_M_w[__i])
- __throw_overflow_error("bitset -- too large to fit in unsigned long");
+ __throw_overflow_error(__N("_Base_bitset::_M_do_to_ulong"));
return _M_w[0];
}
@@ -280,23 +271,12 @@ namespace std
size_t
_Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
{
- for (size_t __i = 0; __i < _Nw; __i++ )
+ for (size_t __i = 0; __i < _Nw; __i++)
{
_WordT __thisword = _M_w[__i];
- if ( __thisword != static_cast<_WordT>(0) )
- {
- // find byte within word
- for (size_t __j = 0; __j < sizeof(_WordT); __j++ )
- {
- unsigned char __this_byte
- = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
- if (__this_byte)
- return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
- _S_first_one[__this_byte];
-
- __thisword >>= CHAR_BIT;
- }
- }
+ if (__thisword != static_cast<_WordT>(0))
+ return __i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword);
}
// not found, so return an indication of failure.
return __not_found;
@@ -310,7 +290,7 @@ namespace std
++__prev;
// check out of bounds
- if ( __prev >= _Nw * _GLIBCPP_BITSET_BITS_PER_WORD )
+ if (__prev >= _Nw * _GLIBCXX_BITSET_BITS_PER_WORD)
return __not_found;
// search first word
@@ -320,42 +300,18 @@ namespace std
// mask off bits below bound
__thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
- if ( __thisword != static_cast<_WordT>(0) )
- {
- // find byte within word
- // get first byte into place
- __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
- for (size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++)
- {
- unsigned char __this_byte
- = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
- if ( __this_byte )
- return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
- _S_first_one[__this_byte];
-
- __thisword >>= CHAR_BIT;
- }
- }
+ if (__thisword != static_cast<_WordT>(0))
+ return __i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword);
// check subsequent words
__i++;
for ( ; __i < _Nw; __i++ )
{
__thisword = _M_w[__i];
- if ( __thisword != static_cast<_WordT>(0) )
- {
- // find byte within word
- for (size_t __j = 0; __j < sizeof(_WordT); __j++ )
- {
- unsigned char __this_byte
- = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
- if ( __this_byte )
- return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
- _S_first_one[__this_byte];
-
- __thisword >>= CHAR_BIT;
- }
- }
+ if (__thisword != static_cast<_WordT>(0))
+ return __i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword);
}
// not found, so return an indication of failure.
return __not_found;
@@ -380,15 +336,15 @@ namespace std
static size_t
_S_whichword(size_t __pos )
- { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static size_t
_S_whichbyte(size_t __pos )
- { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static size_t
_S_whichbit(size_t __pos )
- { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _WordT
_S_maskbit(size_t __pos )
@@ -438,29 +394,34 @@ namespace std
_M_is_any() const { return _M_w != 0; }
size_t
- _M_do_count() const
- {
- size_t __result = 0;
- const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
- const unsigned char* __end_ptr
- = ((const unsigned char*)&_M_w)+sizeof(_M_w);
- while ( __byte_ptr < __end_ptr )
- {
- __result += _S_bit_count[*__byte_ptr];
- __byte_ptr++;
- }
- return __result;
- }
+ _M_do_count() const { return __builtin_popcountl(_M_w); }
unsigned long
_M_do_to_ulong() const { return _M_w; }
size_t
- _M_do_find_first(size_t __not_found) const;
+ _M_do_find_first(size_t __not_found) const
+ {
+ if (_M_w != 0)
+ return __builtin_ctzl(_M_w);
+ else
+ return __not_found;
+ }
// find the next "on" bit that follows "prev"
size_t
- _M_do_find_next(size_t __prev, size_t __not_found) const;
+ _M_do_find_next(size_t __prev, size_t __not_found) const
+ {
+ ++__prev;
+ if (__prev >= ((size_t) _GLIBCXX_BITSET_BITS_PER_WORD))
+ return __not_found;
+
+ _WordT __x = _M_w >> __prev;
+ if (__x != 0)
+ return __builtin_ctzl(__x) + __prev;
+ else
+ return __not_found;
+ }
};
@@ -481,15 +442,15 @@ namespace std
static size_t
_S_whichword(size_t __pos )
- { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
static size_t
_S_whichbyte(size_t __pos )
- { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
static size_t
_S_whichbit(size_t __pos )
- { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
static _WordT
_S_maskbit(size_t __pos )
@@ -504,7 +465,10 @@ namespace std
// localized to this single should-never-get-this-far function.
_WordT&
_M_getword(size_t) const
- { __throw_out_of_range("bitset -- zero-length"); return *new _WordT; }
+ {
+ __throw_out_of_range(__N("_Base_bitset::_M_getword"));
+ return *new _WordT;
+ }
_WordT
_M_hiword() const { return 0; }
@@ -636,16 +600,16 @@ namespace std
* @endif
*/
template<size_t _Nb>
- class bitset : private _Base_bitset<_GLIBCPP_BITSET_WORDS(_Nb)>
+ class bitset : private _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)>
{
private:
- typedef _Base_bitset<_GLIBCPP_BITSET_WORDS(_Nb)> _Base;
+ typedef _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)> _Base;
typedef unsigned long _WordT;
void
_M_do_sanitize()
{
- _Sanitize<_Nb%_GLIBCPP_BITSET_BITS_PER_WORD>::
+ _Sanitize<_Nb%_GLIBCXX_BITSET_BITS_PER_WORD>::
_S_do_sanitize(this->_M_hiword());
}
@@ -681,7 +645,7 @@ namespace std
~reference() { }
- // for b[i] = __x;
+ // For b[i] = __x;
reference&
operator=(bool __x)
{
@@ -692,7 +656,7 @@ namespace std
return *this;
}
- // for b[i] = b[__j];
+ // For b[i] = b[__j];
reference&
operator=(const reference& __j)
{
@@ -703,16 +667,16 @@ namespace std
return *this;
}
- // flips the bit
+ // Flips the bit
bool
operator~() const
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
- // for __x = b[i];
+ // For __x = b[i];
operator bool() const
{ return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
- // for b[i].flip();
+ // For b[i].flip();
reference&
flip()
{
@@ -733,7 +697,7 @@ namespace std
/**
* @brief Use a subset of a string.
* @param s A string of '0' and '1' characters.
- * @param pos Index of the first character in @a s to use; defaults
+ * @param position Index of the first character in @a s to use; defaults
* to zero.
* @throw std::out_of_range If @a pos is bigger the size of @a s.
* @throw std::invalid_argument If a character appears in the string
@@ -741,19 +705,19 @@ namespace std
*/
template<class _CharT, class _Traits, class _Alloc>
explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
- size_t __pos = 0) : _Base()
+ size_t __position = 0) : _Base()
{
- if (__pos > __s.size())
- __throw_out_of_range("bitset -- initial position is larger than "
- "the string itself");
- _M_copy_from_string(__s, __pos,
+ if (__position > __s.size())
+ __throw_out_of_range(__N("bitset::bitset initial position "
+ "not valid"));
+ _M_copy_from_string(__s, __position,
basic_string<_CharT, _Traits, _Alloc>::npos);
}
/**
* @brief Use a subset of a string.
* @param s A string of '0' and '1' characters.
- * @param pos Index of the first character in @a s to use.
+ * @param position Index of the first character in @a s to use.
* @param n The number of characters to copy.
* @throw std::out_of_range If @a pos is bigger the size of @a s.
* @throw std::invalid_argument If a character appears in the string
@@ -761,12 +725,12 @@ namespace std
*/
template<class _CharT, class _Traits, class _Alloc>
bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
- size_t __pos, size_t __n) : _Base()
+ size_t __position, size_t __n) : _Base()
{
- if (__pos > __s.size())
- __throw_out_of_range("bitset -- initial position is larger than "
- "the string itself");
- _M_copy_from_string(__s, __pos, __n);
+ if (__position > __s.size())
+ __throw_out_of_range(__N("bitset::bitset initial position "
+ "not valid"));
+ _M_copy_from_string(__s, __position, __n);
}
// 23.3.5.2 bitset operations:
@@ -802,16 +766,16 @@ namespace std
//@{
/**
* @brief Operations on bitsets.
- * @param pos The number of places to shift.
+ * @param position The number of places to shift.
*
* These should be self-explanatory.
*/
bitset<_Nb>&
- operator<<=(size_t __pos)
+ operator<<=(size_t __position)
{
- if (__builtin_expect(__pos < _Nb, 1))
+ if (__builtin_expect(__position < _Nb, 1))
{
- this->_M_do_left_shift(__pos);
+ this->_M_do_left_shift(__position);
this->_M_do_sanitize();
}
else
@@ -820,11 +784,11 @@ namespace std
}
bitset<_Nb>&
- operator>>=(size_t __pos)
+ operator>>=(size_t __position)
{
- if (__builtin_expect(__pos < _Nb, 1))
+ if (__builtin_expect(__position < _Nb, 1))
{
- this->_M_do_right_shift(__pos);
+ this->_M_do_right_shift(__position);
this->_M_do_sanitize();
}
else
@@ -892,16 +856,16 @@ namespace std
/**
* @brief Sets a given bit to a particular value.
- * @param pos The index of the bit.
+ * @param position The index of the bit.
* @param val Either true or false, defaults to true.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bitset<_Nb>&
- set(size_t __pos, bool __val = true)
+ set(size_t __position, bool __val = true)
{
- if (__pos >= _Nb)
- __throw_out_of_range("bitset -- set() argument too large");
- return _Unchecked_set(__pos, __val);
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::set"));
+ return _Unchecked_set(__position, __val);
}
/**
@@ -916,17 +880,17 @@ namespace std
/**
* @brief Sets a given bit to false.
- * @param pos The index of the bit.
+ * @param position The index of the bit.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*
* Same as writing @c set(pos,false).
*/
bitset<_Nb>&
- reset(size_t __pos)
+ reset(size_t __position)
{
- if (__pos >= _Nb)
- __throw_out_of_range("bitset -- reset() argument too large");
- return _Unchecked_reset(__pos);
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::reset"));
+ return _Unchecked_reset(__position);
}
/**
@@ -942,15 +906,15 @@ namespace std
/**
* @brief Toggles a given bit to its opposite value.
- * @param pos The index of the bit.
+ * @param position The index of the bit.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bitset<_Nb>&
- flip(size_t __pos)
+ flip(size_t __position)
{
- if (__pos >= _Nb)
- __throw_out_of_range("bitset -- flip() argument too large");
- return _Unchecked_flip(__pos);
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::flip"));
+ return _Unchecked_flip(__position);
}
/// See the no-argument flip().
@@ -960,14 +924,14 @@ namespace std
//@{
/**
* @brief Array-indexing support.
- * @param pos Index into the %bitset.
+ * @param position Index into the %bitset.
* @return A bool for a 'const %bitset'. For non-const bitsets, an
* instance of the reference proxy class.
* @note These operators do no range checking and throw no exceptions,
* as required by DR 11 to the standard.
*
* @if maint
- * _GLIBCPP_RESOLVE_LIB_DEFECTS Note that this implementation already
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already
* resolves DR 11 (items 1 and 2), but does not do the range-checking
* required by that DR's resolution. -pme
* The DR has since been changed: range-checking is a precondition
@@ -975,10 +939,10 @@ namespace std
* @endif
*/
reference
- operator[](size_t __pos) { return reference(*this,__pos); }
+ operator[](size_t __position) { return reference(*this,__position); }
bool
- operator[](size_t __pos) const { return _Unchecked_test(__pos); }
+ operator[](size_t __position) const { return _Unchecked_test(__position); }
//@}
/**
@@ -1044,16 +1008,16 @@ namespace std
/**
* @brief Tests the value of a bit.
- * @param pos The index of a bit.
+ * @param position The index of a bit.
* @return The value at @a pos.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bool
- test(size_t __pos) const
+ test(size_t __position) const
{
- if (__pos >= _Nb)
- __throw_out_of_range("bitset -- test() argument too large");
- return _Unchecked_test(__pos);
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::test"));
+ return _Unchecked_test(__position);
}
/**
@@ -1073,12 +1037,12 @@ namespace std
//@{
/// Self-explanatory.
bitset<_Nb>
- operator<<(size_t __pos) const
- { return bitset<_Nb>(*this) <<= __pos; }
+ operator<<(size_t __position) const
+ { return bitset<_Nb>(*this) <<= __position; }
bitset<_Nb>
- operator>>(size_t __pos) const
- { return bitset<_Nb>(*this) >>= __pos; }
+ operator>>(size_t __position) const
+ { return bitset<_Nb>(*this) >>= __position; }
//@}
/**
@@ -1107,10 +1071,11 @@ namespace std
template<size_t _Nb>
template<class _CharT, class _Traits, class _Alloc>
void
- bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, size_t __pos, size_t __n)
+ bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT, _Traits,
+ _Alloc>& __s, size_t __pos, size_t __n)
{
reset();
- const size_t __nbits = min(_Nb, min(__n, __s.size() - __pos));
+ const size_t __nbits = std::min(_Nb, std::min(__n, __s.size() - __pos));
for (size_t __i = 0; __i < __nbits; ++__i)
{
switch(__s[__pos + __nbits - __i - 1])
@@ -1121,8 +1086,7 @@ namespace std
set(__i);
break;
default:
- __throw_invalid_argument("bitset -- string contains characters "
- "which are neither 0 nor 1");
+ __throw_invalid_argument(__N("bitset::_M_copy_from_string"));
}
}
}
@@ -1130,7 +1094,8 @@ namespace std
template<size_t _Nb>
template<class _CharT, class _Traits, class _Alloc>
void
- bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
+ bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits,
+ _Alloc>& __s) const
{
__s.assign(_Nb, '0');
for (size_t __i = 0; __i < _Nb; ++__i)
@@ -1193,46 +1158,53 @@ namespace std
basic_string<_CharT, _Traits> __tmp;
__tmp.reserve(_Nb);
- // Skip whitespace
+ ios_base::iostate __state = ios_base::goodbit;
typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
if (__sentry)
{
- ios_base::iostate __state = ios_base::goodbit;
- basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
- for (size_t __i = 0; __i < _Nb; ++__i)
+ try
{
- static typename _Traits::int_type __eof = _Traits::eof();
-
- typename _Traits::int_type __c1 = __buf->sbumpc();
- if (_Traits::eq_int_type(__c1, __eof))
- {
- __state |= ios_base::eofbit;
- break;
- }
- else
+ basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 303. Bitset input operator underspecified
+ const char_type __zero = __is.widen('0');
+ const char_type __one = __is.widen('1');
+ for (size_t __i = 0; __i < _Nb; ++__i)
{
- char_type __c2 = _Traits::to_char_type(__c1);
- char_type __c = __is.narrow(__c2, '*');
-
- if (__c == '0' || __c == '1')
- __tmp.push_back(__c);
- else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof))
+ static typename _Traits::int_type __eof = _Traits::eof();
+
+ typename _Traits::int_type __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof))
{
- __state |= ios_base::failbit;
+ __state |= ios_base::eofbit;
break;
}
+ else
+ {
+ char_type __c2 = _Traits::to_char_type(__c1);
+ if (__c2 == __zero)
+ __tmp.push_back('0');
+ else if (__c2 == __one)
+ __tmp.push_back('1');
+ else if (_Traits::eq_int_type(__buf->sputbackc(__c2),
+ __eof))
+ {
+ __state |= ios_base::failbit;
+ break;
+ }
+ }
}
}
-
- if (__tmp.empty() && !_Nb)
- __state |= ios_base::failbit;
- else
- __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
-
- if (__state != ios_base::goodbit)
- __is.setstate(__state); // may throw an exception
+ catch(...)
+ { __is._M_setstate(ios_base::badbit); }
}
+ if (__tmp.empty() && _Nb)
+ __state |= ios_base::failbit;
+ else
+ __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
+ if (__state)
+ __is.setstate(__state);
return __is;
}
@@ -1247,6 +1219,11 @@ namespace std
//@}
} // namespace std
-#undef _GLIBCPP_BITSET_WORDS
+#undef _GLIBCXX_BITSET_WORDS
+#undef _GLIBCXX_BITSET_BITS_PER_WORD
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/bitset>
+#endif
-#endif /* _GLIBCPP_BITSET_H */
+#endif /* _GLIBCXX_BITSET */
diff --git a/contrib/libstdc++/include/std/std_complex.h b/contrib/libstdc++/include/std/std_complex.h
index 252070b..e1027f6 100644
--- a/contrib/libstdc++/include/std/std_complex.h
+++ b/contrib/libstdc++/include/std/std_complex.h
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- complex number classes.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -40,8 +40,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_COMPLEX
-#define _CPP_COMPLEX 1
+#ifndef _GLIBCXX_COMPLEX
+#define _GLIBCXX_COMPLEX 1
#pragma GCC system_header
@@ -58,78 +58,135 @@ namespace std
template<> class complex<double>;
template<> class complex<long double>;
+ /// Return magnitude of @a z.
template<typename _Tp> _Tp abs(const complex<_Tp>&);
+ /// Return phase angle of @a z.
template<typename _Tp> _Tp arg(const complex<_Tp>&);
+ /// Return @a z magnitude squared.
template<typename _Tp> _Tp norm(const complex<_Tp>&);
+ /// Return complex conjugate of @a z.
template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
+ /// Return complex with magnitude @a rho and angle @a theta.
template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
// Transcendentals:
+ /// Return complex cosine of @a z.
template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
+ /// Return complex hyperbolic cosine of @a z.
template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
+ /// Return complex base e exponential of @a z.
template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
+ /// Return complex natural logarithm of @a z.
template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
+ /// Return complex base 10 logarithm of @a z.
template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
+ /// Return complex cosine of @a z.
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
+ /// Return @a x to the @a y'th power.
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
+ /// Return @a x to the @a y'th power.
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&,
const complex<_Tp>&);
+ /// Return @a x to the @a y'th power.
template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
+ /// Return complex sine of @a z.
template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
+ /// Return complex hyperbolic sine of @a z.
template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
+ /// Return complex square root of @a z.
template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
+ /// Return complex tangent of @a z.
template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
+ /// Return complex hyperbolic tangent of @a z.
template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
+ //@}
// 26.2.2 Primary template class complex
+ /**
+ * Template to represent complex numbers.
+ *
+ * Specializations for float, double, and long double are part of the
+ * library. Results with any other type are not guaranteed.
+ *
+ * @param Tp Type of real and imaginary values.
+ */
template<typename _Tp>
class complex
{
public:
+ /// Value typedef.
typedef _Tp value_type;
+ /// Default constructor. First parameter is x, second parameter is y.
+ /// Unspecified parameters default to 0.
complex(const _Tp& = _Tp(), const _Tp & = _Tp());
- // Let's the compiler synthetize the copy constructor
+ // Lets the compiler synthesize the copy constructor
// complex (const complex<_Tp>&);
+ /// Copy constructor.
template<typename _Up>
complex(const complex<_Up>&);
-
- _Tp real() const;
- _Tp imag() const;
+ /// Return real part of complex number.
+ _Tp& real();
+ /// Return real part of complex number.
+ const _Tp& real() const;
+ /// Return imaginary part of complex number.
+ _Tp& imag();
+ /// Return imaginary part of complex number.
+ const _Tp& imag() const;
+
+ /// Assign this complex number to scalar @a t.
complex<_Tp>& operator=(const _Tp&);
+ /// Add @a t to this complex number.
complex<_Tp>& operator+=(const _Tp&);
+ /// Subtract @a t from this complex number.
complex<_Tp>& operator-=(const _Tp&);
+ /// Multiply this complex number by @a t.
complex<_Tp>& operator*=(const _Tp&);
+ /// Divide this complex number by @a t.
complex<_Tp>& operator/=(const _Tp&);
- // Let's the compiler synthetize the
+ // Lets the compiler synthesize the
// copy and assignment operator
// complex<_Tp>& operator= (const complex<_Tp>&);
+ /// Assign this complex number to complex @a z.
template<typename _Up>
complex<_Tp>& operator=(const complex<_Up>&);
+ /// Add @a z to this complex number.
template<typename _Up>
complex<_Tp>& operator+=(const complex<_Up>&);
+ /// Subtract @a z from this complex number.
template<typename _Up>
complex<_Tp>& operator-=(const complex<_Up>&);
+ /// Multiply this complex number by @a z.
template<typename _Up>
complex<_Tp>& operator*=(const complex<_Up>&);
+ /// Divide this complex number by @a z.
template<typename _Up>
complex<_Tp>& operator/=(const complex<_Up>&);
private:
- _Tp _M_real, _M_imag;
+ _Tp _M_real;
+ _Tp _M_imag;
};
template<typename _Tp>
- inline _Tp
+ inline _Tp&
+ complex<_Tp>::real() { return _M_real; }
+
+ template<typename _Tp>
+ inline const _Tp&
complex<_Tp>::real() const { return _M_real; }
template<typename _Tp>
- inline _Tp
+ inline _Tp&
+ complex<_Tp>::imag() { return _M_imag; }
+
+ template<typename _Tp>
+ inline const _Tp&
complex<_Tp>::imag() const { return _M_imag; }
template<typename _Tp>
@@ -243,83 +300,147 @@ namespace std
complex<_Tp>::operator/=(const complex<_Up>& __z)
{
const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
- const _Tp __n = norm(__z);
+ const _Tp __n = std::norm(__z);
_M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
_M_real = __r / __n;
return *this;
}
// Operators:
+ //@{
+ /// Return new complex value @a x plus @a y.
template<typename _Tp>
inline complex<_Tp>
operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) += __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r += __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator+(const complex<_Tp>& __x, const _Tp& __y)
- { return complex<_Tp> (__x) += __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r.real() += __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator+(const _Tp& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__y) += __x; }
+ {
+ complex<_Tp> __r = __y;
+ __r.real() += __x;
+ return __r;
+ }
+ //@}
+ //@{
+ /// Return new complex value @a x minus @a y.
template<typename _Tp>
inline complex<_Tp>
operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) -= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r -= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator-(const complex<_Tp>& __x, const _Tp& __y)
- { return complex<_Tp> (__x) -= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r.real() -= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator-(const _Tp& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) -= __y; }
+ {
+ complex<_Tp> __r(__x, -__y.imag());
+ __r.real() -= __y.real();
+ return __r;
+ }
+ //@}
+ //@{
+ /// Return new complex value @a x times @a y.
template<typename _Tp>
inline complex<_Tp>
operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) *= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator*(const complex<_Tp>& __x, const _Tp& __y)
- { return complex<_Tp> (__x) *= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator*(const _Tp& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__y) *= __x; }
+ {
+ complex<_Tp> __r = __y;
+ __r *= __x;
+ return __r;
+ }
+ //@}
+ //@{
+ /// Return new complex value @a x divided by @a y.
template<typename _Tp>
inline complex<_Tp>
operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) /= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator/(const complex<_Tp>& __x, const _Tp& __y)
- { return complex<_Tp> (__x) /= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
template<typename _Tp>
inline complex<_Tp>
operator/(const _Tp& __x, const complex<_Tp>& __y)
- { return complex<_Tp> (__x) /= __y; }
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+ //@}
+ /// Return @a x.
template<typename _Tp>
inline complex<_Tp>
operator+(const complex<_Tp>& __x)
{ return __x; }
+ /// Return complex negation of @a x.
template<typename _Tp>
inline complex<_Tp>
operator-(const complex<_Tp>& __x)
{ return complex<_Tp>(-__x.real(), -__x.imag()); }
+ //@{
+ /// Return true if @a x is equal to @a y.
template<typename _Tp>
inline bool
operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
@@ -334,7 +455,10 @@ namespace std
inline bool
operator==(const _Tp& __x, const complex<_Tp>& __y)
{ return __x == __y.real() && _Tp() == __y.imag(); }
+ //@}
+ //@{
+ /// Return false if @a x is equal to @a y.
template<typename _Tp>
inline bool
operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
@@ -349,7 +473,9 @@ namespace std
inline bool
operator!=(const _Tp& __x, const complex<_Tp>& __y)
{ return __x != __y.real() || _Tp() != __y.imag(); }
+ //@}
+ /// Extraction operator for complex values.
template<typename _Tp, typename _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
@@ -369,7 +495,7 @@ namespace std
__is.setstate(ios_base::failbit);
}
else if (__ch == ')')
- __x = complex<_Tp>(__re_x, _Tp(0));
+ __x = __re_x;
else
__is.setstate(ios_base::failbit);
}
@@ -377,11 +503,12 @@ namespace std
{
__is.putback(__ch);
__is >> __re_x;
- __x = complex<_Tp>(__re_x, _Tp(0));
+ __x = __re_x;
}
return __is;
}
+ /// Insertion operator for complex values.
template<typename _Tp, typename _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
@@ -396,12 +523,22 @@ namespace std
// Values
template<typename _Tp>
- inline _Tp
+ inline _Tp&
+ real(complex<_Tp>& __z)
+ { return __z.real(); }
+
+ template<typename _Tp>
+ inline const _Tp&
real(const complex<_Tp>& __z)
{ return __z.real(); }
template<typename _Tp>
- inline _Tp
+ inline _Tp&
+ imag(complex<_Tp>& __z)
+ { return __z.imag(); }
+
+ template<typename _Tp>
+ inline const _Tp&
imag(const complex<_Tp>& __z)
{ return __z.imag(); }
@@ -411,7 +548,7 @@ namespace std
{
_Tp __x = __z.real();
_Tp __y = __z.imag();
- const _Tp __s = max(abs(__x), abs(__y));
+ const _Tp __s = std::max(abs(__x), abs(__y));
if (__s == _Tp()) // well ...
return __s;
__x /= __s;
@@ -447,7 +584,7 @@ namespace std
template<typename _Tp>
static inline _Tp _S_do_it(const complex<_Tp>& __z)
{
- _Tp __res = abs(__z);
+ _Tp __res = std::abs(__z);
return __res * __res;
}
};
@@ -456,7 +593,7 @@ namespace std
inline _Tp
norm(const complex<_Tp>& __z)
{
- return _Norm_helper<__is_floating<_Tp>::_M_type && !_GLIBCPP_FAST_MATH>::_S_do_it(__z);
+ return _Norm_helper<__is_floating<_Tp>::_M_type && !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
}
template<typename _Tp>
@@ -491,17 +628,17 @@ namespace std
template<typename _Tp>
inline complex<_Tp>
exp(const complex<_Tp>& __z)
- { return polar(exp(__z.real()), __z.imag()); }
+ { return std::polar(exp(__z.real()), __z.imag()); }
template<typename _Tp>
inline complex<_Tp>
log(const complex<_Tp>& __z)
- { return complex<_Tp>(log(abs(__z)), arg(__z)); }
+ { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); }
template<typename _Tp>
inline complex<_Tp>
log10(const complex<_Tp>& __z)
- { return log(__z) / log(_Tp(10.0)); }
+ { return std::log(__z) / log(_Tp(10.0)); }
template<typename _Tp>
inline complex<_Tp>
@@ -535,7 +672,7 @@ namespace std
}
else
{
- _Tp __t = sqrt(2 * (abs(__z) + abs(__x)));
+ _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x)));
_Tp __u = __t / 2;
return __x > _Tp()
? complex<_Tp>(__u, __y / __t)
@@ -547,48 +684,48 @@ namespace std
inline complex<_Tp>
tan(const complex<_Tp>& __z)
{
- return sin(__z) / cos(__z);
+ return std::sin(__z) / std::cos(__z);
}
template<typename _Tp>
inline complex<_Tp>
tanh(const complex<_Tp>& __z)
{
- return sinh(__z) / cosh(__z);
+ return std::sinh(__z) / std::cosh(__z);
}
template<typename _Tp>
inline complex<_Tp>
pow(const complex<_Tp>& __z, int __n)
{
- return __pow_helper(__z, __n);
+ return std::__pow_helper(__z, __n);
}
template<typename _Tp>
complex<_Tp>
pow(const complex<_Tp>& __x, const _Tp& __y)
{
- if (__x.imag() == _Tp())
+ if (__x.imag() == _Tp() && __x.real() > _Tp())
return pow(__x.real(), __y);
- complex<_Tp> __t = log(__x);
- return polar(exp(__y * __t.real()), __y * __t.imag());
+ complex<_Tp> __t = std::log(__x);
+ return std::polar(exp(__y * __t.real()), __y * __t.imag());
}
template<typename _Tp>
inline complex<_Tp>
pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
{
- return __x == _Tp() ? _Tp() : exp(__y * log(__x));
+ return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x));
}
template<typename _Tp>
inline complex<_Tp>
pow(const _Tp& __x, const complex<_Tp>& __y)
{
- return __x == _Tp()
- ? _Tp()
- : polar(pow(__x, __y.real()), __y.imag() * log(__x));
+ return __x > _Tp() ? std::polar(pow(__x, __y.real()),
+ __y.imag() * log(__x))
+ : std::pow(complex<_Tp>(__x, _Tp()), __y);
}
// 26.2.3 complex specializations
@@ -599,14 +736,16 @@ namespace std
typedef float value_type;
complex(float = 0.0f, float = 0.0f);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
+#ifdef _GLIBCXX_BUGGY_COMPLEX
complex(const complex& __z) : _M_value(__z._M_value) { }
#endif
explicit complex(const complex<double>&);
explicit complex(const complex<long double>&);
- float real() const;
- float imag() const;
+ float& real();
+ const float& real() const;
+ float& imag();
+ const float& imag() const;
complex<float>& operator=(float);
complex<float>& operator+=(float);
@@ -638,11 +777,19 @@ namespace std
friend class complex<long double>;
};
- inline float
+ inline float&
+ complex<float>::real()
+ { return __real__ _M_value; }
+
+ inline const float&
complex<float>::real() const
{ return __real__ _M_value; }
- inline float
+ inline float&
+ complex<float>::imag()
+ { return __imag__ _M_value; }
+
+ inline const float&
complex<float>::imag() const
{ return __imag__ _M_value; }
@@ -746,14 +893,16 @@ namespace std
typedef double value_type;
complex(double =0.0, double =0.0);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
+#ifdef _GLIBCXX_BUGGY_COMPLEX
complex(const complex& __z) : _M_value(__z._M_value) { }
#endif
complex(const complex<float>&);
explicit complex(const complex<long double>&);
-
- double real() const;
- double imag() const;
+
+ double& real();
+ const double& real() const;
+ double& imag();
+ const double& imag() const;
complex<double>& operator=(double);
complex<double>& operator+=(double);
@@ -784,11 +933,19 @@ namespace std
friend class complex<long double>;
};
- inline double
+ inline double&
+ complex<double>::real()
+ { return __real__ _M_value; }
+
+ inline const double&
complex<double>::real() const
{ return __real__ _M_value; }
- inline double
+ inline double&
+ complex<double>::imag()
+ { return __imag__ _M_value; }
+
+ inline const double&
complex<double>::imag() const
{ return __imag__ _M_value; }
@@ -892,14 +1049,16 @@ namespace std
typedef long double value_type;
complex(long double = 0.0L, long double = 0.0L);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
+#ifdef _GLIBCXX_BUGGY_COMPLEX
complex(const complex& __z) : _M_value(__z._M_value) { }
#endif
complex(const complex<float>&);
complex(const complex<double>&);
- long double real() const;
- long double imag() const;
+ long double& real();
+ const long double& real() const;
+ long double& imag();
+ const long double& imag() const;
complex<long double>& operator= (long double);
complex<long double>& operator+= (long double);
@@ -937,11 +1096,19 @@ namespace std
__imag__ _M_value = __i;
}
- inline long double
+ inline long double&
+ complex<long double>::real()
+ { return __real__ _M_value; }
+
+ inline const long double&
complex<long double>::real() const
{ return __real__ _M_value; }
- inline long double
+ inline long double&
+ complex<long double>::imag()
+ { return __imag__ _M_value; }
+
+ inline const long double&
complex<long double>::imag() const
{ return __imag__ _M_value; }
@@ -1062,4 +1229,4 @@ namespace std
: _M_value(_ComplexT(__z._M_value)) { }
} // namespace std
-#endif /* _CPP_COMPLEX */
+#endif /* _GLIBCXX_COMPLEX */
diff --git a/contrib/libstdc++/include/std/std_deque.h b/contrib/libstdc++/include/std/std_deque.h
index 921c25f..80817f6 100644
--- a/contrib/libstdc++/include/std/std_deque.h
+++ b/contrib/libstdc++/include/std/std_deque.h
@@ -1,6 +1,6 @@
// <deque> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,21 +58,24 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_DEQUE
-#define _CPP_DEQUE 1
+#ifndef _GLIBCXX_DEQUE
+#define _GLIBCXX_DEQUE 1
#pragma GCC system_header
#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_deque.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <bits/deque.tcc>
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/deque.tcc>
#endif
-#endif /* _CPP_DEQUE */
+#ifdef _GLIBCXX_DEBUG
+# include <debug/deque>
+#endif
+#endif /* _GLIBCXX_DEQUE */
diff --git a/contrib/libstdc++/include/std/std_fstream.h b/contrib/libstdc++/include/std/std_fstream.h
index bcbbb97..040f579 100644
--- a/contrib/libstdc++/include/std/std_fstream.h
+++ b/contrib/libstdc++/include/std/std_fstream.h
@@ -37,14 +37,15 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_FSTREAM
-#define _CPP_FSTREAM 1
+#ifndef _GLIBCXX_FSTREAM
+#define _GLIBCXX_FSTREAM 1
#pragma GCC system_header
#include <istream>
#include <ostream>
#include <locale> // For codecvt
+#include <cstdio> // For SEEK_SET, SEEK_CUR, SEEK_END, BUFSIZ
#include <bits/basic_file.h>
#include <bits/gthr.h>
@@ -59,6 +60,11 @@ namespace std
* sequences. Many of its sematics are described in terms of similar
* behavior in the Standard C Library's @c FILE streams.
*/
+ // Requirements on traits_type, specific to this class:
+ // traits_type::pos_type must be fpos<traits_type::state_type>
+ // traits_type::off_type must be streamoff
+ // traits_type::state_type must be Assignable and DefaultConstructable,
+ // and traits_type::state_type() must be the initial state for codecvt.
template<typename _CharT, typename _Traits>
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
{
@@ -81,7 +87,6 @@ namespace std
typedef __basic_file<char> __file_type;
typedef typename traits_type::state_type __state_type;
typedef codecvt<char_type, char, __state_type> __codecvt_type;
- typedef ctype<char_type> __ctype_type;
//@}
friend class ios_base; // For sync_with_stdio.
@@ -104,15 +109,56 @@ namespace std
*/
__file_type _M_file;
- // Current and beginning state type for codecvt.
+ /**
+ * @if maint
+ * Place to stash in || out || in | out settings for current filebuf.
+ * @endif
+ */
+ ios_base::openmode _M_mode;
+
+ // Beginning state type for codecvt.
/**
* @if maint
* @doctodo
* @endif
*/
- __state_type _M_state_cur;
__state_type _M_state_beg;
+ // During output, the state that corresponds to pptr(),
+ // during input, the state that corresponds to egptr() and
+ // _M_ext_next.
+ /**
+ * @if maint
+ * @doctodo
+ * @endif
+ */
+ __state_type _M_state_cur;
+
+ // Not used for output. During input, the state that corresponds
+ // to eback() and _M_ext_buf.
+ /**
+ * @if maint
+ * @doctodo
+ * @endif
+ */
+ __state_type _M_state_last;
+
+ /**
+ * @if maint
+ * Pointer to the beginning of internal buffer.
+ * @endif
+ */
+ char_type* _M_buf;
+
+ /**
+ * @if maint
+ * Actual size of internal buffer. This number is equal to the size
+ * of the put area + 1 position, reserved for the overflow char of
+ * a full area.
+ * @endif
+ */
+ size_t _M_buf_size;
+
// Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.
/**
* @if maint
@@ -120,18 +166,99 @@ namespace std
* @endif
*/
bool _M_buf_allocated;
-
- // XXX Needed?
- bool _M_last_overflowed;
- // The position in the buffer corresponding to the external file
- // pointer.
/**
* @if maint
- * @doctodo
+ * _M_reading == false && _M_writing == false for 'uncommitted' mode;
+ * _M_reading == true for 'read' mode;
+ * _M_writing == true for 'write' mode;
+ *
+ * NB: _M_reading == true && _M_writing == true is unused.
+ * @endif
+ */
+ bool _M_reading;
+ bool _M_writing;
+
+ //@{
+ /**
+ * @if maint
+ * Necessary bits for putback buffer management.
+ *
+ * @note pbacks of over one character are not currently supported.
* @endif
*/
- char_type* _M_filepos;
+ char_type _M_pback;
+ char_type* _M_pback_cur_save;
+ char_type* _M_pback_end_save;
+ bool _M_pback_init;
+ //@}
+
+ // Cached codecvt facet.
+ const __codecvt_type* _M_codecvt;
+
+ /**
+ * @if maint
+ * Buffer for external characters. Used for input when
+ * codecvt::always_noconv() == false. When valid, this corresponds
+ * to eback().
+ * @endif
+ */
+ char* _M_ext_buf;
+
+ /**
+ * @if maint
+ * Size of buffer held by _M_ext_buf.
+ * @endif
+ */
+ streamsize _M_ext_buf_size;
+
+ /**
+ * @if maint
+ * Pointers into the buffer held by _M_ext_buf that delimit a
+ * subsequence of bytes that have been read but not yet converted.
+ * When valid, _M_ext_next corresponds to egptr().
+ * @endif
+ */
+ const char* _M_ext_next;
+ char* _M_ext_end;
+
+ /**
+ * @if maint
+ * Initializes pback buffers, and moves normal buffers to safety.
+ * Assumptions:
+ * _M_in_cur has already been moved back
+ * @endif
+ */
+ void
+ _M_create_pback()
+ {
+ if (!_M_pback_init)
+ {
+ _M_pback_cur_save = this->gptr();
+ _M_pback_end_save = this->egptr();
+ this->setg(&_M_pback, &_M_pback, &_M_pback + 1);
+ _M_pback_init = true;
+ }
+ }
+
+ /**
+ * @if maint
+ * Deactivates pback buffer contents, and restores normal buffer.
+ * Assumptions:
+ * The pback buffer has only moved forward.
+ * @endif
+ */
+ void
+ _M_destroy_pback() throw()
+ {
+ if (_M_pback_init)
+ {
+ // Length _M_in_cur moved in the pback buffer.
+ _M_pback_cur_save += this->gptr() != this->eback();
+ this->setg(this->_M_buf, _M_pback_cur_save, _M_pback_end_save);
+ _M_pback_init = false;
+ }
+ }
public:
// Constructors/destructor:
@@ -148,10 +275,7 @@ namespace std
*/
virtual
~basic_filebuf()
- {
- this->close();
- _M_last_overflowed = false;
- }
+ { this->close(); }
// Members:
/**
@@ -217,45 +341,14 @@ namespace std
// charater from the real input source when the buffer is empty.
// Buffered input uses underflow()
- // The only difference between underflow() and uflow() is that the
- // latter bumps _M_in_cur after the read. In the sync_with_stdio
- // case, this is important, as we need to unget the read character in
- // the underflow() case in order to maintain synchronization. So
- // instead of calling underflow() from uflow(), we create a common
- // subroutine to do the real work.
- /**
- * @if maint
- * @doctodo
- * @endif
- */
- int_type
- _M_underflow_common(bool __bump);
-
// [documentation is inherited]
virtual int_type
underflow();
// [documentation is inherited]
virtual int_type
- uflow();
-
- // [documentation is inherited]
- virtual int_type
pbackfail(int_type __c = _Traits::eof());
- // NB: For what the standard expects of the overflow function,
- // see _M_really_overflow(), below. Because basic_streambuf's
- // sputc/sputn call overflow directly, and the complications of
- // this implementation's setting of the initial pointers all
- // equal to _M_buf when initializing, it seems essential to have
- // this in actuality be a helper function that checks for the
- // eccentricities of this implementation, and then call
- // overflow() if indeed the buffer is full.
-
- // [documentation is inherited]
- virtual int_type
- overflow(int_type __c = _Traits::eof());
-
// Stroustrup, 1998, p 648
// The overflow() function is called to transfer characters to the
// real output destination when the buffer is full. A call to
@@ -268,8 +361,8 @@ namespace std
* @doctodo
* @endif
*/
- int_type
- _M_really_overflow(int_type __c = _Traits::eof());
+ virtual int_type
+ overflow(int_type __c = _Traits::eof());
// Convert internal byte sequence to external, char-based
// sequence via codecvt.
@@ -278,8 +371,8 @@ namespace std
* @doctodo
* @endif
*/
- void
- _M_convert_to_external(char_type*, streamsize, streamsize&, streamsize&);
+ bool
+ _M_convert_to_external(char_type*, streamsize);
/**
* @brief Manipulates the buffer.
@@ -306,33 +399,18 @@ namespace std
seekpos(pos_type __pos,
ios_base::openmode __mode = ios_base::in | ios_base::out);
+ // Common code for seekoff and seekpos
+ /**
+ * @if maint
+ * @doctodo
+ * @endif
+ */
+ pos_type
+ _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state);
+
// [documentation is inherited]
virtual int
- sync()
- {
- int __ret = 0;
- bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
-
- // Make sure that the internal buffer resyncs its idea of
- // the file position with the external file.
- if (__testput)
- {
- // Need to restore current position after the write.
- off_type __off = _M_out_cur - _M_out_end;
-
- // _M_file.sync() will be called within
- if (traits_type::eq_int_type(_M_really_overflow(),
- traits_type::eof()))
- __ret = -1;
- else if (__off)
- _M_file.seekoff(__off, ios_base::cur);
- }
- else
- _M_file.sync();
-
- _M_last_overflowed = false;
- return __ret;
- }
+ sync();
// [documentation is inherited]
virtual void
@@ -342,18 +420,17 @@ namespace std
virtual streamsize
xsgetn(char_type* __s, streamsize __n)
{
- streamsize __ret = 0;
// Clear out pback buffer before going on to the real deal...
- if (_M_pback_init)
+ streamsize __ret = 0;
+ if (this->_M_pback_init)
{
- while (__ret < __n && _M_in_cur < _M_in_end)
+ if (__n && this->gptr() == this->eback())
{
- *__s = *_M_in_cur;
- ++__ret;
- ++__s;
- ++_M_in_cur;
+ *__s++ = *this->gptr();
+ this->gbump(1);
+ __ret = 1;
}
- _M_pback_destroy();
+ _M_destroy_pback();
}
if (__ret < __n)
__ret += __streambuf_type::xsgetn(__s, __n - __ret);
@@ -362,103 +439,49 @@ namespace std
// [documentation is inherited]
virtual streamsize
- xsputn(const char_type* __s, streamsize __n)
- {
- _M_pback_destroy();
- return __streambuf_type::xsputn(__s, __n);
- }
+ xsputn(const char_type* __s, streamsize __n);
+ // Flushes output buffer, then writes unshift sequence.
/**
* @if maint
* @doctodo
* @endif
*/
- void
- _M_output_unshift();
-
- // These three functions are used to clarify internal buffer
- // maintenance. After an overflow, or after a seekoff call that
- // started at beg or end, or possibly when the stream becomes
- // unbuffered, and a myrid other obscure corner cases, the
- // internal buffer does not truly reflect the contents of the
- // external buffer. At this point, for whatever reason, it is in
- // an indeterminate state.
- /**
- * @if maint
- * @doctodo
- * @endif
- */
- void
- _M_set_indeterminate(void)
- {
- if (_M_mode & ios_base::in)
- this->setg(_M_buf, _M_buf, _M_buf);
- if (_M_mode & ios_base::out)
- this->setp(_M_buf, _M_buf);
- _M_filepos = _M_buf;
- }
+ bool
+ _M_terminate_output();
/**
- * @if maint
- * @doctodo
+ * @if maint
+ * This function sets the pointers of the internal buffer, both get
+ * and put areas. Typically:
+ *
+ * __off == egptr() - eback() upon underflow/uflow ('read' mode);
+ * __off == 0 upon overflow ('write' mode);
+ * __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode).
+ *
+ * NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size
+ * reflects the actual allocated memory and the last cell is reserved
+ * for the overflow char of a full put area.
* @endif
*/
void
- _M_set_determinate(off_type __off)
+ _M_set_buffer(streamsize __off)
{
- bool __testin = _M_mode & ios_base::in;
- bool __testout = _M_mode & ios_base::out;
- if (__testin)
- this->setg(_M_buf, _M_buf, _M_buf + __off);
- if (__testout)
- this->setp(_M_buf, _M_buf + __off);
- _M_filepos = _M_buf + __off;
- }
+ const bool __testin = this->_M_mode & ios_base::in;
+ const bool __testout = this->_M_mode & ios_base::out;
+
+ if (__testin && __off > 0)
+ this->setg(this->_M_buf, this->_M_buf, this->_M_buf + __off);
+ else
+ this->setg(this->_M_buf, this->_M_buf, this->_M_buf);
- /**
- * @if maint
- * @doctodo
- * @endif
- */
- bool
- _M_is_indeterminate(void)
- {
- bool __ret = false;
- // Don't return true if unbuffered.
- if (_M_buf)
- {
- if (_M_mode & ios_base::in)
- __ret = _M_in_beg == _M_in_cur && _M_in_cur == _M_in_end;
- if (_M_mode & ios_base::out)
- __ret = _M_out_beg == _M_out_cur && _M_out_cur == _M_out_end;
- }
- return __ret;
+ if (__testout && __off == 0 && this->_M_buf_size > 1 )
+ this->setp(this->_M_buf, this->_M_buf + this->_M_buf_size - 1);
+ else
+ this->setp(NULL, NULL);
}
};
- // Explicit specialization declarations, defined in src/fstream.cc.
- template<>
- basic_filebuf<char>::int_type
- basic_filebuf<char>::_M_underflow_common(bool __bump);
-
- #ifdef _GLIBCPP_USE_WCHAR_T
- template<>
- basic_filebuf<wchar_t>::int_type
- basic_filebuf<wchar_t>::_M_underflow_common(bool __bump);
- #endif
-
- // Generic definitions.
- template <typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::int_type
- basic_filebuf<_CharT, _Traits>::underflow()
- { return _M_underflow_common(false); }
-
- template <typename _CharT, typename _Traits>
- typename basic_filebuf<_CharT, _Traits>::int_type
- basic_filebuf<_CharT, _Traits>::uflow()
- { return _M_underflow_common(true); }
-
-
// [27.8.1.5] Template class basic_ifstream
/**
* @brief Controlling input for files.
@@ -500,8 +523,7 @@ namespace std
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
*/
- basic_ifstream()
- : __istream_type(NULL), _M_filebuf()
+ basic_ifstream() : __istream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
/**
@@ -516,7 +538,7 @@ namespace std
*/
explicit
basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
- : __istream_type(NULL), _M_filebuf()
+ : __istream_type(), _M_filebuf()
{
this->init(&_M_filebuf);
this->open(__s, __mode);
@@ -623,8 +645,7 @@ namespace std
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
*/
- basic_ofstream()
- : __ostream_type(NULL), _M_filebuf()
+ basic_ofstream(): __ostream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
/**
@@ -641,7 +662,7 @@ namespace std
explicit
basic_ofstream(const char* __s,
ios_base::openmode __mode = ios_base::out|ios_base::trunc)
- : __ostream_type(NULL), _M_filebuf()
+ : __ostream_type(), _M_filebuf()
{
this->init(&_M_filebuf);
this->open(__s, __mode);
@@ -751,7 +772,7 @@ namespace std
* (you haven't given it a filename to open).
*/
basic_fstream()
- : __iostream_type(NULL), _M_filebuf()
+ : __iostream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
/**
@@ -814,7 +835,7 @@ namespace std
ios_base::openmode __mode = ios_base::in | ios_base::out)
{
if (!_M_filebuf.open(__s, __mode))
- setstate(ios_base::failbit);
+ this->setstate(ios_base::failbit);
}
/**
@@ -827,16 +848,13 @@ namespace std
close()
{
if (!_M_filebuf.close())
- setstate(ios_base::failbit);
+ this->setstate(ios_base::failbit);
}
};
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#endif
-#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/fstream.tcc>
#endif
-#endif
+#endif /* _GLIBCXX_FSTREAM */
diff --git a/contrib/libstdc++/include/std/std_functional.h b/contrib/libstdc++/include/std/std_functional.h
index 40080d9..6819f20 100644
--- a/contrib/libstdc++/include/std/std_functional.h
+++ b/contrib/libstdc++/include/std/std_functional.h
@@ -46,17 +46,13 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_FUNCTIONAL
-#define _CPP_FUNCTIONAL 1
+#ifndef _GLIBCXX_FUNCTIONAL
+#define _GLIBCXX_FUNCTIONAL 1
#pragma GCC system_header
+
#include <bits/c++config.h>
#include <cstddef>
#include <bits/stl_function.h>
-#endif /* _CPP_FUNCTIONAL */
-
-// Local Variables:
-// mode:C++
-// End:
-
+#endif /* _GLIBCXX_FUNCTIONAL */
diff --git a/contrib/libstdc++/include/std/std_iomanip.h b/contrib/libstdc++/include/std/std_iomanip.h
index 490d5ac..0d965c2 100644
--- a/contrib/libstdc++/include/std/std_iomanip.h
+++ b/contrib/libstdc++/include/std/std_iomanip.h
@@ -37,8 +37,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_IOMANIP
-#define _CPP_IOMANIP 1
+#ifndef _GLIBCXX_IOMANIP
+#define _GLIBCXX_IOMANIP 1
#pragma GCC system_header
@@ -266,7 +266,7 @@ namespace std
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCPP_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE
extern template ostream& operator<<(ostream&, _Setfill<char>);
extern template ostream& operator<<(ostream&, _Setiosflags);
extern template ostream& operator<<(ostream&, _Resetiosflags);
@@ -280,7 +280,7 @@ namespace std
extern template istream& operator>>(istream&, _Setprecision);
extern template istream& operator>>(istream&, _Setw);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
extern template wostream& operator<<(wostream&, _Setiosflags);
extern template wostream& operator<<(wostream&, _Resetiosflags);
@@ -297,4 +297,4 @@ namespace std
#endif
} // namespace std
-#endif
+#endif /* _GLIBCXX_IOMANIP */
diff --git a/contrib/libstdc++/include/std/std_ios.h b/contrib/libstdc++/include/std/std_ios.h
index a7764c8..596458f 100644
--- a/contrib/libstdc++/include/std/std_ios.h
+++ b/contrib/libstdc++/include/std/std_ios.h
@@ -36,8 +36,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_IOS
-#define _CPP_IOS 1
+#ifndef _GLIBCXX_IOS
+#define _GLIBCXX_IOS 1
#pragma GCC system_header
@@ -50,5 +50,4 @@
#include <streambuf>
#include <bits/basic_ios.h>
-#endif /* _CPP_IOS */
-
+#endif /* _GLIBCXX_IOS */
diff --git a/contrib/libstdc++/include/std/std_iosfwd.h b/contrib/libstdc++/include/std/std_iosfwd.h
index 55b0e0b..050b9e8 100644
--- a/contrib/libstdc++/include/std/std_iosfwd.h
+++ b/contrib/libstdc++/include/std/std_iosfwd.h
@@ -37,16 +37,17 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_IOSFWD
-#define _CPP_IOSFWD 1
+#ifndef _GLIBCXX_IOSFWD
+#define _GLIBCXX_IOSFWD 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <bits/c++locale.h>
+#include <bits/c++io.h>
#include <cctype> // For isspace, etc.
#include <bits/stringfwd.h> // For string forward declarations.
-#include <bits/fpos.h>
+#include <bits/postypes.h>
#include <bits/functexcept.h>
namespace std
@@ -100,10 +101,9 @@ namespace std
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// Not included. (??? Apparently no LWG number?)
class ios_base;
-#endif
/**
* @defgroup s27_2_iosfwd I/O Forward Declarations
@@ -147,7 +147,7 @@ namespace std
typedef basic_ofstream<char> ofstream; ///< @isiosfwd
typedef basic_fstream<char> fstream; ///< @isiosfwd
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
typedef basic_ios<wchar_t> wios; ///< @isiosfwd
typedef basic_streambuf<wchar_t> wstreambuf; ///< @isiosfwd
typedef basic_istream<wchar_t> wistream; ///< @isiosfwd
@@ -165,4 +165,4 @@ namespace std
/** @} */
} // namespace std
-#endif
+#endif /* _GLIBCXX_IOSFWD */
diff --git a/contrib/libstdc++/include/std/std_iostream.h b/contrib/libstdc++/include/std/std_iostream.h
index d709493..f5049db 100644
--- a/contrib/libstdc++/include/std/std_iostream.h
+++ b/contrib/libstdc++/include/std/std_iostream.h
@@ -36,8 +36,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_IOSTREAM
-#define _CPP_IOSTREAM 1
+#ifndef _GLIBCXX_IOSTREAM
+#define _GLIBCXX_IOSTREAM 1
#pragma GCC system_header
@@ -65,7 +65,7 @@ namespace std
extern ostream cerr; ///< Linked to standard error (unbuffered)
extern ostream clog; ///< Linked to standard error (buffered)
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
extern wistream wcin; ///< Linked to standard input
extern wostream wcout; ///< Linked to standard output
extern wostream wcerr; ///< Linked to standard error (unbuffered)
@@ -77,4 +77,4 @@ namespace std
static ios_base::Init __ioinit;
} // namespace std
-#endif
+#endif /* _GLIBCXX_IOSTREAM */
diff --git a/contrib/libstdc++/include/std/std_istream.h b/contrib/libstdc++/include/std/std_istream.h
index da9c7db..a3a53ba 100644
--- a/contrib/libstdc++/include/std/std_istream.h
+++ b/contrib/libstdc++/include/std/std_istream.h
@@ -1,6 +1,7 @@
// Input streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,8 +37,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_ISTREAM
-#define _CPP_ISTREAM 1
+#ifndef _GLIBCXX_ISTREAM
+#define _GLIBCXX_ISTREAM 1
#pragma GCC system_header
@@ -69,8 +70,8 @@ namespace std
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
- typedef istreambuf_iterator<_CharT, _Traits> __istreambuf_iter;
- typedef num_get<_CharT, __istreambuf_iter> __numget_type;
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+ __num_get_type;
typedef ctype<_CharT> __ctype_type;
template<typename _CharT2, typename _Traits2>
@@ -101,11 +102,8 @@ namespace std
* their own stream buffer.
*/
explicit
- basic_istream(__streambuf_type* __sb)
- {
- this->init(__sb);
- _M_gcount = streamsize(0);
- }
+ basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0))
+ { this->init(__sb); }
/**
* @brief Base destructor.
@@ -130,13 +128,13 @@ namespace std
* functions in constructs like "std::cin >> std::ws". For more
* information, see the iomanip header.
*/
- __istream_type&
+ inline __istream_type&
operator>>(__istream_type& (*__pf)(__istream_type&));
- __istream_type&
+ inline __istream_type&
operator>>(__ios_type& (*__pf)(__ios_type&));
- __istream_type&
+ inline __istream_type&
operator>>(ios_base& (*__pf)(ios_base&));
//@}
@@ -189,7 +187,7 @@ namespace std
__istream_type&
operator>>(unsigned long& __n);
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
__istream_type&
operator>>(long long& __n);
@@ -214,7 +212,7 @@ namespace std
* @param sb A pointer to a streambuf
*
* This function behaves like one of the basic arithmetic extractors,
- * in that it also constructs a sentry onject and has the same error
+ * in that it also constructs a sentry object and has the same error
* handling behavior.
*
* If @a sb is NULL, the stream will set failbit in its error state.
@@ -560,6 +558,10 @@ namespace std
__istream_type&
seekg(off_type, ios_base::seekdir);
//@}
+
+ protected:
+ explicit
+ basic_istream(): _M_gcount(streamsize(0)) { }
};
/**
@@ -615,7 +617,7 @@ namespace std
* For ease of use, sentries may be converted to booleans. The
* return value is that of the sentry state (true == okay).
*/
- operator bool() { return _M_ok; }
+ operator bool() const { return _M_ok; }
private:
bool _M_ok;
@@ -703,15 +705,14 @@ namespace std
public basic_ostream<_CharT, _Traits>
{
public:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 271. basic_iostream missing typedefs
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 271. basic_iostream missing typedefs
// Types (inherited):
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
-#endif
// Non-standard Types:
typedef basic_istream<_CharT, _Traits> __istream_type;
@@ -725,14 +726,19 @@ namespace std
*/
explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
- : __istream_type(__sb), __ostream_type(__sb)
- { }
+ : __istream_type(), __ostream_type()
+ { this->init(__sb); }
/**
* @brief Destructor does nothing.
*/
virtual
~basic_iostream() { }
+
+ protected:
+ explicit
+ basic_iostream() : __istream_type(), __ostream_type()
+ { }
};
// [27.6.1.4] standard basic_istream manipulators
@@ -761,11 +767,8 @@ namespace std
ws(basic_istream<_CharT, _Traits>& __is);
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#endif
-#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/istream.tcc>
#endif
-#endif /* _CPP_ISTREAM */
+#endif /* _GLIBCXX_ISTREAM */
diff --git a/contrib/libstdc++/include/std/std_iterator.h b/contrib/libstdc++/include/std/std_iterator.h
index 7b17094..6e3840b 100644
--- a/contrib/libstdc++/include/std/std_iterator.h
+++ b/contrib/libstdc++/include/std/std_iterator.h
@@ -58,10 +58,11 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_ITERATOR
-#define _CPP_ITERATOR 1
+#ifndef _GLIBCXX_ITERATOR
+#define _GLIBCXX_ITERATOR 1
#pragma GCC system_header
+
#include <bits/c++config.h>
#include <cstddef>
#include <bits/stl_iterator_base_types.h>
@@ -72,8 +73,4 @@
#include <bits/stream_iterator.h>
#include <bits/streambuf_iterator.h>
-#endif /* _CPP_ITERATOR */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_ITERATOR */
diff --git a/contrib/libstdc++/include/std/std_limits.h b/contrib/libstdc++/include/std/std_limits.h
index 9be6947..7f96647 100644
--- a/contrib/libstdc++/include/std/std_limits.h
+++ b/contrib/libstdc++/include/std/std_limits.h
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- numeric_limits classes.
-// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,8 +40,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_NUMERIC_LIMITS
-#define _CPP_NUMERIC_LIMITS 1
+#ifndef _GLIBCXX_NUMERIC_LIMITS
+#define _GLIBCXX_NUMERIC_LIMITS 1
#pragma GCC system_header
@@ -82,8 +82,8 @@
// GCC only intrinsicly supports modulo integral types. The only remaining
// integral exceptional values is division by zero. Only targets that do not
// signal division by zero in some "hard to ignore" way should use false.
-#ifndef __glibcpp_integral_traps
-# define __glibcpp_integral_traps true
+#ifndef __glibcxx_integral_traps
+# define __glibcxx_integral_traps true
#endif
// float
@@ -91,124 +91,220 @@
// Default values. Should be overriden in configuration files if necessary.
-#ifndef __glibcpp_float_has_denorm_loss
-# define __glibcpp_float_has_denorm_loss false
+#ifndef __glibcxx_float_has_denorm_loss
+# define __glibcxx_float_has_denorm_loss false
#endif
-#ifndef __glibcpp_float_traps
-# define __glibcpp_float_traps false
+#ifndef __glibcxx_float_traps
+# define __glibcxx_float_traps false
#endif
-#ifndef __glibcpp_float_tinyness_before
-# define __glibcpp_float_tinyness_before false
+#ifndef __glibcxx_float_tinyness_before
+# define __glibcxx_float_tinyness_before false
#endif
// double
// Default values. Should be overriden in configuration files if necessary.
-#ifndef __glibcpp_double_has_denorm_loss
-# define __glibcpp_double_has_denorm_loss false
+#ifndef __glibcxx_double_has_denorm_loss
+# define __glibcxx_double_has_denorm_loss false
#endif
-#ifndef __glibcpp_double_traps
-# define __glibcpp_double_traps false
+#ifndef __glibcxx_double_traps
+# define __glibcxx_double_traps false
#endif
-#ifndef __glibcpp_double_tinyness_before
-# define __glibcpp_double_tinyness_before false
+#ifndef __glibcxx_double_tinyness_before
+# define __glibcxx_double_tinyness_before false
#endif
// long double
// Default values. Should be overriden in configuration files if necessary.
-#ifndef __glibcpp_long_double_has_denorm_loss
-# define __glibcpp_long_double_has_denorm_loss false
+#ifndef __glibcxx_long_double_has_denorm_loss
+# define __glibcxx_long_double_has_denorm_loss false
#endif
-#ifndef __glibcpp_long_double_traps
-# define __glibcpp_long_double_traps false
+#ifndef __glibcxx_long_double_traps
+# define __glibcxx_long_double_traps false
#endif
-#ifndef __glibcpp_long_double_tinyness_before
-# define __glibcpp_long_double_tinyness_before false
+#ifndef __glibcxx_long_double_tinyness_before
+# define __glibcxx_long_double_tinyness_before false
#endif
// You should not need to define any macros below this point.
-#define __glibcpp_signed(T) ((T)(-1) < 0)
+#define __glibcxx_signed(T) ((T)(-1) < 0)
-#define __glibcpp_min(T) \
- (__glibcpp_signed (T) ? (T)1 << __glibcpp_digits (T) : (T)0)
+#define __glibcxx_min(T) \
+ (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
-#define __glibcpp_max(T) \
- (__glibcpp_signed (T) ? ((T)1 << __glibcpp_digits (T)) - 1 : ~(T)0)
+#define __glibcxx_max(T) \
+ (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0)
-#define __glibcpp_digits(T) \
- (sizeof(T) * __CHAR_BIT__ - __glibcpp_signed (T))
+#define __glibcxx_digits(T) \
+ (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
// The fraction 643/2136 approximates log10(2) to 7 significant digits.
-#define __glibcpp_digits10(T) \
- (__glibcpp_digits (T) * 643 / 2136)
+#define __glibcxx_digits10(T) \
+ (__glibcxx_digits (T) * 643 / 2136)
namespace std
{
+ /**
+ * @brief Describes the rounding style for floating-point types.
+ *
+ * This is used in the std::numeric_limits class.
+ */
enum float_round_style
{
- round_indeterminate = -1,
- round_toward_zero = 0,
- round_to_nearest = 1,
- round_toward_infinity = 2,
- round_toward_neg_infinity = 3
+ round_indeterminate = -1, ///< Self-explanatory.
+ round_toward_zero = 0, ///< Self-explanatory.
+ round_to_nearest = 1, ///< To the nearest representable value.
+ round_toward_infinity = 2, ///< Self-explanatory.
+ round_toward_neg_infinity = 3 ///< Self-explanatory.
};
+ /**
+ * @brief Describes the denormalization for floating-point types.
+ *
+ * These values represent the presence or absence of a variable number
+ * of exponent bits. This type is used in the std::numeric_limits class.
+ */
enum float_denorm_style
{
+ /// Indeterminate at compile time whether denormalized values are allowed.
denorm_indeterminate = -1,
+ /// The type does not allow denormalized values.
denorm_absent = 0,
+ /// The type allows denormalized values.
denorm_present = 1
};
- //
- // The primary class traits
- //
+ /**
+ * @brief Part of std::numeric_limits.
+ *
+ * The @c static @c const members are usable as integral constant
+ * expressions.
+ *
+ * @note This is a seperate class for purposes of efficiency; you
+ * should only access these members as part of an instantiation
+ * of the std::numeric_limits class.
+ */
struct __numeric_limits_base
{
+ /** This will be true for all fundamental types (which have
+ specializations), and false for everything else. */
static const bool is_specialized = false;
+ /** The number of @c radix digits that be represented without change: for
+ integer types, the number of non-sign bits in the mantissa; for
+ floating types, the number of @c radix digits in the mantissa. */
static const int digits = 0;
+ /** The number of base 10 digits that can be represented without change. */
static const int digits10 = 0;
+ /** True if the type is signed. */
static const bool is_signed = false;
+ /** True if the type is integer.
+ * @if maint
+ * Is this supposed to be "if the type is integral"?
+ * @endif
+ */
static const bool is_integer = false;
+ /** True if the type uses an exact representation. "All integer types are
+ exact, but not all exact types are integer. For example, rational and
+ fixed-exponent representations are exact but not integer."
+ [18.2.1.2]/15 */
static const bool is_exact = false;
+ /** For integer types, specifies the base of the representation. For
+ floating types, specifies the base of the exponent representation. */
static const int radix = 0;
+ /** The minimum negative integer such that @c radix raised to the power of
+ (one less than that integer) is a normalized floating point number. */
static const int min_exponent = 0;
+ /** The minimum negative integer such that 10 raised to that power is in
+ the range of normalized floating point numbers. */
static const int min_exponent10 = 0;
+ /** The maximum positive integer such that @c radix raised to the power of
+ (one less than that integer) is a representable finite floating point
+ number. */
static const int max_exponent = 0;
+ /** The maximum positive integer such that 10 raised to that power is in
+ the range of representable finite floating point numbers. */
static const int max_exponent10 = 0;
+ /** True if the type has a representation for positive infinity. */
static const bool has_infinity = false;
+ /** True if the type has a representation for a quiet (non-signaling)
+ "Not a Number." */
static const bool has_quiet_NaN = false;
+ /** True if the type has a representation for a signaling
+ "Not a Number." */
static const bool has_signaling_NaN = false;
+ /** See std::float_denorm_style for more information. */
static const float_denorm_style has_denorm = denorm_absent;
+ /** "True if loss of accuracy is detected as a denormalization loss,
+ rather than as an inexact result." [18.2.1.2]/42 */
static const bool has_denorm_loss = false;
+ /** True if-and-only-if the type adheres to the IEC 559 standard, also
+ known as IEEE 754. (Only makes sense for floating point types.) */
static const bool is_iec559 = false;
+ /** "True if the set of values representable by the type is finite. All
+ built-in types are bounded, this member would be false for arbitrary
+ precision types." [18.2.1.2]/54 */
static const bool is_bounded = false;
+ /** True if the type is @e modulo, that is, if it is possible to add two
+ positive numbers and have a result that wraps around to a third number
+ that is less. Typically false for floating types, true for unsigned
+ integers, and true for signed integers. */
static const bool is_modulo = false;
+ /** True if trapping is implemented for this type. */
static const bool traps = false;
+ /** True if tinyness is detected before rounding. (see IEC 559) */
static const bool tinyness_before = false;
+ /** See std::float_round_style for more information. This is only
+ meaningful for floating types; integer types will all be
+ round_toward_zero. */
static const float_round_style round_style = round_toward_zero;
};
+ /**
+ * @brief Properties of fundamental types.
+ *
+ * This class allows a program to obtain information about the
+ * representation of a fundamental type on a given platform. For
+ * non-fundamental types, the functions will return 0 and the data
+ * members will all be @c false.
+ *
+ * @if maint
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
+ * noted, but not incorporated in this documented (yet).
+ * @endif
+ */
template<typename _Tp>
struct numeric_limits : public __numeric_limits_base
{
+ /** The minimum finite value, or for floating types with
+ denormalization, the minimum positive normalized value. */
static _Tp min() throw() { return static_cast<_Tp>(0); }
+ /** The maximum finite value. */
static _Tp max() throw() { return static_cast<_Tp>(0); }
+ /** The @e machine @e epsilon: the difference between 1 and the least
+ value greater than 1 that is representable. */
static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
+ /** The maximum rounding error measurement (see LIA-1). */
static _Tp round_error() throw() { return static_cast<_Tp>(0); }
+ /** The representation of positive infinity, if @c has_infinity. */
static _Tp infinity() throw() { return static_cast<_Tp>(0); }
+ /** The representation of a quiet "Not a Number," if @c has_quiet_NaN. */
static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
+ /** The representation of a signaling "Not a Number," if
+ @c has_signaling_NaN. */
static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
+ /** The minimum positive denormalized value. For types where
+ @c has_denorm is false, this is the minimum positive normalized
+ value. */
static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
};
@@ -262,7 +358,7 @@ namespace std
// It is not clear what it means for a boolean type to trap.
// This is a DR on the LWG issue list. Here, I use integer
// promotion semantics.
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -273,13 +369,13 @@ namespace std
static const bool is_specialized = true;
static char min() throw()
- { return __glibcpp_min(char); }
+ { return __glibcxx_min(char); }
static char max() throw()
- { return __glibcpp_max(char); }
+ { return __glibcxx_max(char); }
- static const int digits = __glibcpp_digits (char);
- static const int digits10 = __glibcpp_digits10 (char);
- static const bool is_signed = __glibcpp_signed (char);
+ static const int digits = __glibcxx_digits (char);
+ static const int digits10 = __glibcxx_digits10 (char);
+ static const bool is_signed = __glibcxx_signed (char);
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
@@ -312,7 +408,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -327,8 +423,8 @@ namespace std
static signed char max() throw()
{ return __SCHAR_MAX__; }
- static const int digits = __glibcpp_digits (signed char);
- static const int digits10 = __glibcpp_digits10 (signed char);
+ static const int digits = __glibcxx_digits (signed char);
+ static const int digits10 = __glibcxx_digits10 (signed char);
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -362,7 +458,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -377,8 +473,8 @@ namespace std
static unsigned char max() throw()
{ return __SCHAR_MAX__ * 2U + 1; }
- static const int digits = __glibcpp_digits (unsigned char);
- static const int digits10 = __glibcpp_digits10 (unsigned char);
+ static const int digits = __glibcxx_digits (unsigned char);
+ static const int digits10 = __glibcxx_digits10 (unsigned char);
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -412,7 +508,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -423,13 +519,13 @@ namespace std
static const bool is_specialized = true;
static wchar_t min() throw()
- { return __glibcpp_min (wchar_t); }
+ { return __glibcxx_min (wchar_t); }
static wchar_t max() throw()
- { return __glibcpp_max (wchar_t); }
+ { return __glibcxx_max (wchar_t); }
- static const int digits = __glibcpp_digits (wchar_t);
- static const int digits10 = __glibcpp_digits10 (wchar_t);
- static const bool is_signed = __glibcpp_signed (wchar_t);
+ static const int digits = __glibcxx_digits (wchar_t);
+ static const int digits10 = __glibcxx_digits10 (wchar_t);
+ static const bool is_signed = __glibcxx_signed (wchar_t);
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
@@ -462,7 +558,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -477,8 +573,8 @@ namespace std
static short max() throw()
{ return __SHRT_MAX__; }
- static const int digits = __glibcpp_digits (short);
- static const int digits10 = __glibcpp_digits10 (short);
+ static const int digits = __glibcxx_digits (short);
+ static const int digits10 = __glibcxx_digits10 (short);
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -512,7 +608,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -527,8 +623,8 @@ namespace std
static unsigned short max() throw()
{ return __SHRT_MAX__ * 2U + 1; }
- static const int digits = __glibcpp_digits (unsigned short);
- static const int digits10 = __glibcpp_digits10 (unsigned short);
+ static const int digits = __glibcxx_digits (unsigned short);
+ static const int digits10 = __glibcxx_digits10 (unsigned short);
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -562,7 +658,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -577,8 +673,8 @@ namespace std
static int max() throw()
{ return __INT_MAX__; }
- static const int digits = __glibcpp_digits (int);
- static const int digits10 = __glibcpp_digits10 (int);
+ static const int digits = __glibcxx_digits (int);
+ static const int digits10 = __glibcxx_digits10 (int);
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -612,7 +708,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -627,8 +723,8 @@ namespace std
static unsigned int max() throw()
{ return __INT_MAX__ * 2U + 1; }
- static const int digits = __glibcpp_digits (unsigned int);
- static const int digits10 = __glibcpp_digits10 (unsigned int);
+ static const int digits = __glibcxx_digits (unsigned int);
+ static const int digits10 = __glibcxx_digits10 (unsigned int);
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -662,7 +758,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -677,8 +773,8 @@ namespace std
static long max() throw()
{ return __LONG_MAX__; }
- static const int digits = __glibcpp_digits (long);
- static const int digits10 = __glibcpp_digits10 (long);
+ static const int digits = __glibcxx_digits (long);
+ static const int digits10 = __glibcxx_digits10 (long);
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -712,7 +808,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -727,8 +823,8 @@ namespace std
static unsigned long max() throw()
{ return __LONG_MAX__ * 2UL + 1; }
- static const int digits = __glibcpp_digits (unsigned long);
- static const int digits10 = __glibcpp_digits10 (unsigned long);
+ static const int digits = __glibcxx_digits (unsigned long);
+ static const int digits10 = __glibcxx_digits10 (unsigned long);
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -762,7 +858,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -777,8 +873,8 @@ namespace std
static long long max() throw()
{ return __LONG_LONG_MAX__; }
- static const int digits = __glibcpp_digits (long long);
- static const int digits10 = __glibcpp_digits10 (long long);
+ static const int digits = __glibcxx_digits (long long);
+ static const int digits10 = __glibcxx_digits10 (long long);
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -812,7 +908,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -827,8 +923,8 @@ namespace std
static unsigned long long max() throw()
{ return __LONG_LONG_MAX__ * 2ULL + 1; }
- static const int digits = __glibcpp_digits (unsigned long long);
- static const int digits10 = __glibcpp_digits10 (unsigned long long);
+ static const int digits = __glibcxx_digits (unsigned long long);
+ static const int digits10 = __glibcxx_digits10 (unsigned long long);
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
@@ -862,7 +958,7 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = true;
- static const bool traps = __glibcpp_integral_traps;
+ static const bool traps = __glibcxx_integral_traps;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
@@ -893,14 +989,12 @@ namespace std
static const int max_exponent = __FLT_MAX_EXP__;
static const int max_exponent10 = __FLT_MAX_10_EXP__;
- static const bool has_infinity
- = __builtin_huge_valf () / 2 == __builtin_huge_valf ();
- static const bool has_quiet_NaN
- = __builtin_nanf ("") != __builtin_nanf ("");
+ static const bool has_infinity = __FLT_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= __FLT_DENORM_MIN__ ? denorm_present : denorm_absent;
- static const bool has_denorm_loss = __glibcpp_float_has_denorm_loss;
+ static const bool has_denorm_loss = __glibcxx_float_has_denorm_loss;
static float infinity() throw()
{ return __builtin_huge_valf (); }
@@ -916,14 +1010,14 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = false;
- static const bool traps = __glibcpp_float_traps;
- static const bool tinyness_before = __glibcpp_float_tinyness_before;
+ static const bool traps = __glibcxx_float_traps;
+ static const bool tinyness_before = __glibcxx_float_tinyness_before;
static const float_round_style round_style = round_to_nearest;
};
-#undef __glibcpp_float_has_denorm_loss
-#undef __glibcpp_float_traps
-#undef __glibcpp_float_tinyness_before
+#undef __glibcxx_float_has_denorm_loss
+#undef __glibcxx_float_traps
+#undef __glibcxx_float_tinyness_before
template<>
struct numeric_limits<double>
@@ -951,14 +1045,12 @@ namespace std
static const int max_exponent = __DBL_MAX_EXP__;
static const int max_exponent10 = __DBL_MAX_10_EXP__;
- static const bool has_infinity
- = __builtin_huge_val () / 2 == __builtin_huge_val ();
- static const bool has_quiet_NaN
- = __builtin_nan ("") != __builtin_nan ("");
+ static const bool has_infinity = __DBL_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= __DBL_DENORM_MIN__ ? denorm_present : denorm_absent;
- static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss;
+ static const bool has_denorm_loss = __glibcxx_double_has_denorm_loss;
static double infinity() throw()
{ return __builtin_huge_val(); }
@@ -974,14 +1066,14 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = false;
- static const bool traps = __glibcpp_double_traps;
- static const bool tinyness_before = __glibcpp_double_tinyness_before;
+ static const bool traps = __glibcxx_double_traps;
+ static const bool tinyness_before = __glibcxx_double_tinyness_before;
static const float_round_style round_style = round_to_nearest;
};
-#undef __glibcpp_double_has_denorm_loss
-#undef __glibcpp_double_traps
-#undef __glibcpp_double_tinyness_before
+#undef __glibcxx_double_has_denorm_loss
+#undef __glibcxx_double_traps
+#undef __glibcxx_double_tinyness_before
template<>
struct numeric_limits<long double>
@@ -1009,15 +1101,13 @@ namespace std
static const int max_exponent = __LDBL_MAX_EXP__;
static const int max_exponent10 = __LDBL_MAX_10_EXP__;
- static const bool has_infinity
- = __builtin_huge_vall () / 2 == __builtin_huge_vall ();
- static const bool has_quiet_NaN
- = __builtin_nanl ("") != __builtin_nanl ("");
+ static const bool has_infinity = __LDBL_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= __LDBL_DENORM_MIN__ ? denorm_present : denorm_absent;
static const bool has_denorm_loss
- = __glibcpp_long_double_has_denorm_loss;
+ = __glibcxx_long_double_has_denorm_loss;
static long double infinity() throw()
{ return __builtin_huge_vall (); }
@@ -1033,21 +1123,21 @@ namespace std
static const bool is_bounded = true;
static const bool is_modulo = false;
- static const bool traps = __glibcpp_long_double_traps;
- static const bool tinyness_before = __glibcpp_long_double_tinyness_before;
+ static const bool traps = __glibcxx_long_double_traps;
+ static const bool tinyness_before = __glibcxx_long_double_tinyness_before;
static const float_round_style round_style = round_to_nearest;
};
-#undef __glibcpp_long_double_has_denorm_loss
-#undef __glibcpp_long_double_traps
-#undef __glibcpp_long_double_tinyness_before
+#undef __glibcxx_long_double_has_denorm_loss
+#undef __glibcxx_long_double_traps
+#undef __glibcxx_long_double_tinyness_before
} // namespace std
-#undef __glibcpp_signed
-#undef __glibcpp_min
-#undef __glibcpp_max
-#undef __glibcpp_digits
-#undef __glibcpp_digits10
+#undef __glibcxx_signed
+#undef __glibcxx_min
+#undef __glibcxx_max
+#undef __glibcxx_digits
+#undef __glibcxx_digits10
-#endif // _CPP_NUMERIC_LIMITS
+#endif // _GLIBCXX_NUMERIC_LIMITS
diff --git a/contrib/libstdc++/include/std/std_list.h b/contrib/libstdc++/include/std/std_list.h
index 84523ad..285a29d 100644
--- a/contrib/libstdc++/include/std/std_list.h
+++ b/contrib/libstdc++/include/std/std_list.h
@@ -1,6 +1,6 @@
// <list> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,21 +58,25 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_LIST
-#define _CPP_LIST 1
+#ifndef _GLIBCXX_LIST
+#define _GLIBCXX_LIST 1
#pragma GCC system_header
#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_list.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <bits/list.tcc>
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/list.tcc>
#endif
-#endif /* _CPP_LIST */
+#ifdef _GLIBCXX_DEBUG
+# include <debug/list>
+#endif
+
+#endif /* _GLIBCXX_LIST */
diff --git a/contrib/libstdc++/include/std/std_locale.h b/contrib/libstdc++/include/std/std_locale.h
index 2960256..43417fb 100644
--- a/contrib/libstdc++/include/std/std_locale.h
+++ b/contrib/libstdc++/include/std/std_locale.h
@@ -36,8 +36,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_LOCALE
-#define _CPP_LOCALE 1
+#ifndef _GLIBCXX_LOCALE
+#define _GLIBCXX_LOCALE 1
#pragma GCC system_header
@@ -46,4 +46,4 @@
#include <bits/locale_facets.h>
#include <bits/locale_facets.tcc>
-#endif
+#endif /* _GLIBCXX_LOCALE */
diff --git a/contrib/libstdc++/include/std/std_map.h b/contrib/libstdc++/include/std/std_map.h
index c04cbd5..4a88ae2 100644
--- a/contrib/libstdc++/include/std/std_map.h
+++ b/contrib/libstdc++/include/std/std_map.h
@@ -58,8 +58,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_MAP
-#define _CPP_MAP 1
+#ifndef _GLIBCXX_MAP
+#define _GLIBCXX_MAP 1
#pragma GCC system_header
@@ -67,8 +67,8 @@
#include <bits/stl_map.h>
#include <bits/stl_multimap.h>
-#endif /* _CPP_MAP */
+#ifdef _GLIBCXX_DEBUG
+# include <debug/map>
+#endif
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_MAP */
diff --git a/contrib/libstdc++/include/std/std_memory.h b/contrib/libstdc++/include/std/std_memory.h
index 47c3ede..4e6641e 100644
--- a/contrib/libstdc++/include/std/std_memory.h
+++ b/contrib/libstdc++/include/std/std_memory.h
@@ -1,6 +1,6 @@
// <memory> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -46,17 +46,18 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_MEMORY
-#define _CPP_MEMORY 1
+#ifndef _GLIBCXX_MEMORY
+#define _GLIBCXX_MEMORY 1
#pragma GCC system_header
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_iterator_base_types.h> //for iterator_traits
#include <bits/stl_uninitialized.h>
#include <bits/stl_raw_storage_iter.h>
+#include <debug/debug.h>
namespace std
{
@@ -77,33 +78,36 @@ namespace std
while (__len > 0)
{
- _Tp* __tmp = (_Tp*) std::malloc((std::size_t)__len * sizeof(_Tp));
+ _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
+ nothrow));
if (__tmp != 0)
return pair<_Tp*, ptrdiff_t>(__tmp, __len);
__len /= 2;
}
- return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
+ return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
}
/**
- * @brief This is a mostly-useless wrapper around malloc().
+ * @brief Allocates a temporary buffer.
* @param len The number of objects of type Tp.
- * @return See full description.
+ * @return See full description.
*
* Reinventing the wheel, but this time with prettier spokes!
*
- * This function tries to obtain storage for @c len adjacent Tp objects.
- * The objects themselves are not constructed, of course. A pair<> is
- * returned containing "the buffer s address and capacity (in the units of
- * sizeof(Tp)), or a pair of 0 values if no storage can be obtained."
- * Note that the capacity obtained may be less than that requested if the
- * memory is unavailable; you should compare len with the .second return
- * value.
+ * This function tries to obtain storage for @c len adjacent Tp
+ * objects. The objects themselves are not constructed, of course.
+ * A pair<> is returned containing "the buffer s address and
+ * capacity (in the units of sizeof(Tp)), or a pair of 0 values if
+ * no storage can be obtained." Note that the capacity obtained
+ * may be less than that requested if the memory is unavailable;
+ * you should compare len with the .second return value.
+ *
+ * Provides the nothrow exception guarantee.
*/
template<typename _Tp>
inline pair<_Tp*,ptrdiff_t>
get_temporary_buffer(ptrdiff_t __len)
- { return __get_temporary_buffer(__len, (_Tp*) 0); }
+ { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); }
/**
* @brief The companion to get_temporary_buffer().
@@ -115,12 +119,12 @@ namespace std
template<typename _Tp>
void
return_temporary_buffer(_Tp* __p)
- { std::free(__p); }
+ { ::operator delete(__p, nothrow); }
/**
- * A wrapper class to provide auto_ptr with reference semantics. For
- * example, an auto_ptr can be assigned (or constructed from) the result of
- * a function which returns an auto_ptr by value.
+ * A wrapper class to provide auto_ptr with reference semantics.
+ * For example, an auto_ptr can be assigned (or constructed from)
+ * the result of a function which returns an auto_ptr by value.
*
* All the auto_ptr_ref stuff should happen behind the scenes.
*/
@@ -139,26 +143,28 @@ namespace std
*
* The Standard says:
* <pre>
- * An @c auto_ptr owns the object it holds a pointer to. Copying an
- * @c auto_ptr copies the pointer and transfers ownership to the destination.
- * If more than one @c auto_ptr owns the same object at the same time the
- * behavior of the program is undefined.
+ * An @c auto_ptr owns the object it holds a pointer to. Copying
+ * an @c auto_ptr copies the pointer and transfers ownership to the
+ * destination. If more than one @c auto_ptr owns the same object
+ * at the same time the behavior of the program is undefined.
*
- * The uses of @c auto_ptr include providing temporary exception-safety for
- * dynamically allocated memory, passing ownership of dynamically allocated
- * memory to a function, and returning dynamically allocated memory from a
- * function. @c auto_ptr does not meet the CopyConstructible and Assignable
- * requirements for Standard Library <a href="tables.html#65">container</a>
- * elements and thus instantiating a Standard Library container with an
- * @c auto_ptr results in undefined behavior.
+ * The uses of @c auto_ptr include providing temporary
+ * exception-safety for dynamically allocated memory, passing
+ * ownership of dynamically allocated memory to a function, and
+ * returning dynamically allocated memory from a function. @c
+ * auto_ptr does not meet the CopyConstructible and Assignable
+ * requirements for Standard Library <a
+ * href="tables.html#65">container</a> elements and thus
+ * instantiating a Standard Library container with an @c auto_ptr
+ * results in undefined behavior.
* </pre>
* Quoted from [20.4.5]/3.
*
- * Good examples of what can and cannot be done with auto_ptr can be found
- * in the libstdc++ testsuite.
+ * Good examples of what can and cannot be done with auto_ptr can
+ * be found in the libstdc++ testsuite.
*
* @if maint
- * _GLIBCPP_RESOLVE_LIB_DEFECTS
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
* 127. auto_ptr<> conversion issues
* These resolutions have all been incorporated.
* @endif
@@ -195,7 +201,8 @@ namespace std
* @brief An %auto_ptr can be constructed from another %auto_ptr.
* @param a Another %auto_ptr of a different but related type.
*
- * A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.
+ * A pointer-to-Tp1 must be convertible to a
+ * pointer-to-Tp/element_type.
*
* This object now @e owns the object previously owned by @a a,
* which has given up ownsership.
@@ -237,9 +244,9 @@ namespace std
}
/**
- * When the %auto_ptr goes out of scope, the object it owns is deleted.
- * If it no longer owns anything (i.e., @c get() is @c NULL), then this
- * has no effect.
+ * When the %auto_ptr goes out of scope, the object it owns is
+ * deleted. If it no longer owns anything (i.e., @c get() is
+ * @c NULL), then this has no effect.
*
* @if maint
* The C++ standard says there is supposed to be an empty throw
@@ -259,7 +266,11 @@ namespace std
* what happens when you dereference one of those...)
*/
element_type&
- operator*() const throw() { return *_M_ptr; }
+ operator*() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
/**
* @brief Smart pointer dereferencing.
@@ -268,15 +279,19 @@ namespace std
* automatically cause to be dereferenced.
*/
element_type*
- operator->() const throw() { return _M_ptr; }
+ operator->() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
/**
* @brief Bypassing the smart pointer.
* @return The raw pointer being managed.
*
* You can get a copy of the pointer that this object owns, for
- * situations such as passing to a function which only accepts a raw
- * pointer.
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
*
* @note This %auto_ptr still owns the memory.
*/
@@ -288,8 +303,8 @@ namespace std
* @return The raw pointer being managed.
*
* You can get a copy of the pointer that this object owns, for
- * situations such as passing to a function which only accepts a raw
- * pointer.
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
*
* @note This %auto_ptr no longer owns the memory. When this object
* goes out of scope, nothing will happen.
@@ -306,8 +321,8 @@ namespace std
* @brief Forcibly deletes the managed object.
* @param p A pointer (defaults to NULL).
*
- * This object now @e owns the object pointed to by @a p. The previous
- * object has been deleted.
+ * This object now @e owns the object pointed to by @a p. The
+ * previous object has been deleted.
*/
void
reset(element_type* __p = 0) throw()
@@ -355,4 +370,4 @@ namespace std
};
} // namespace std
-#endif
+#endif /* _GLIBCXX_MEMORY */
diff --git a/contrib/libstdc++/include/std/std_numeric.h b/contrib/libstdc++/include/std/std_numeric.h
index 936eaa7..88661e9 100644
--- a/contrib/libstdc++/include/std/std_numeric.h
+++ b/contrib/libstdc++/include/std/std_numeric.h
@@ -58,18 +58,15 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_NUMERIC
-#define _CPP_NUMERIC 1
+#ifndef _GLIBCXX_NUMERIC
+#define _GLIBCXX_NUMERIC 1
#pragma GCC system_header
+
#include <bits/c++config.h>
#include <cstddef>
#include <iterator>
#include <bits/stl_function.h>
#include <bits/stl_numeric.h>
-#endif /* _CPP_NUMERIC */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_NUMERIC */
diff --git a/contrib/libstdc++/include/std/std_ostream.h b/contrib/libstdc++/include/std/std_ostream.h
index 82f8a28..e3590f2 100644
--- a/contrib/libstdc++/include/std/std_ostream.h
+++ b/contrib/libstdc++/include/std/std_ostream.h
@@ -1,6 +1,6 @@
// Output streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,8 +37,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_OSTREAM
-#define _CPP_OSTREAM 1
+#ifndef _GLIBCXX_OSTREAM
+#define _GLIBCXX_OSTREAM 1
#pragma GCC system_header
@@ -69,8 +69,8 @@ namespace std
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type;
- typedef ostreambuf_iterator<_CharT, _Traits> __ostreambuf_iter;
- typedef num_put<_CharT, __ostreambuf_iter> __numput_type;
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+ __num_put_type;
typedef ctype<_CharT> __ctype_type;
template<typename _CharT2, typename _Traits2>
@@ -127,13 +127,13 @@ namespace std
* functions in constructs like "std::cout << std::endl". For more
* information, see the iomanip header.
*/
- __ostream_type&
+ inline __ostream_type&
operator<<(__ostream_type& (*__pf)(__ostream_type&));
- __ostream_type&
+ inline __ostream_type&
operator<<(__ios_type& (*__pf)(__ios_type&));
- __ostream_type&
+ inline __ostream_type&
operator<<(ios_base& (*__pf) (ios_base&));
//@}
@@ -203,7 +203,7 @@ namespace std
operator<<(unsigned int __n)
{ return this->operator<<(static_cast<unsigned long>(__n)); }
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
__ostream_type&
operator<<(long long __n);
@@ -229,7 +229,7 @@ namespace std
* @param sb A pointer to a streambuf
*
* This function behaves like one of the basic arithmetic extractors,
- * in that it also constructs a sentry onject and has the same error
+ * in that it also constructs a sentry object and has the same error
* handling behavior.
*
* If @a sb is NULL, the stream will set failbit in its error state.
@@ -281,6 +281,15 @@ namespace std
__ostream_type&
put(char_type __c);
+ // Core write functionality, without sentry.
+ void
+ _M_write(const char_type* __s, streamsize __n)
+ {
+ streamsize __put = this->rdbuf()->sputn(__s, __n);
+ if (__put != __n)
+ this->setstate(ios_base::badbit);
+ }
+
/**
* @brief Character string insertion.
* @param s The array to insert.
@@ -346,6 +355,10 @@ namespace std
*/
__ostream_type&
seekp(off_type, ios_base::seekdir);
+
+ protected:
+ explicit
+ basic_ostream() { }
};
/**
@@ -405,7 +418,7 @@ namespace std
* For ease of use, sentries may be converted to booleans. The
* return value is that of the sentry state (true == okay).
*/
- operator bool()
+ operator bool() const
{ return _M_ok; }
};
@@ -528,11 +541,8 @@ namespace std
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#endif
-#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/ostream.tcc>
#endif
-#endif /* _CPP_OSTREAM */
+#endif /* _GLIBCXX_OSTREAM */
diff --git a/contrib/libstdc++/include/std/std_queue.h b/contrib/libstdc++/include/std/std_queue.h
index 60636e6..9a6523b 100644
--- a/contrib/libstdc++/include/std/std_queue.h
+++ b/contrib/libstdc++/include/std/std_queue.h
@@ -1,6 +1,6 @@
// <queue> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,25 +58,21 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_QUEUE
-#define _CPP_QUEUE 1
+#ifndef _GLIBCXX_QUEUE
+#define _GLIBCXX_QUEUE 1
#pragma GCC system_header
+
#include <bits/c++config.h>
#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
-#include <bits/stl_vector.h>
#include <bits/stl_heap.h>
-#include <bits/stl_deque.h>
#include <bits/stl_function.h>
+#include <deque>
+#include <vector>
#include <bits/stl_queue.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <bits/deque.tcc>
-# include <bits/vector.tcc>
-#endif
-
-#endif /* _CPP_QUEUE */
+#endif /* _GLIBCXX_QUEUE */
diff --git a/contrib/libstdc++/include/std/std_set.h b/contrib/libstdc++/include/std/std_set.h
index 249f396..7ef8c9f 100644
--- a/contrib/libstdc++/include/std/std_set.h
+++ b/contrib/libstdc++/include/std/std_set.h
@@ -58,8 +58,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_SET
-#define _CPP_SET 1
+#ifndef _GLIBCXX_SET
+#define _GLIBCXX_SET 1
#pragma GCC system_header
@@ -67,8 +67,8 @@
#include <bits/stl_set.h>
#include <bits/stl_multiset.h>
-#endif /* _CPP_SET */
+#ifdef _GLIBCXX_DEBUG
+# include <debug/set>
+#endif
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_SET */
diff --git a/contrib/libstdc++/include/std/std_sstream.h b/contrib/libstdc++/include/std/std_sstream.h
index 0940e60..6b5728b 100644
--- a/contrib/libstdc++/include/std/std_sstream.h
+++ b/contrib/libstdc++/include/std/std_sstream.h
@@ -1,6 +1,7 @@
// String based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,8 +37,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_SSTREAM
-#define _CPP_SSTREAM 1
+#ifndef _GLIBCXX_SSTREAM
+#define _GLIBCXX_SSTREAM 1
#pragma GCC system_header
@@ -65,10 +66,9 @@ namespace std
// Types:
typedef _CharT char_type;
typedef _Traits traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type;
-#endif
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
@@ -85,6 +85,13 @@ namespace std
//@}
protected:
+ /**
+ * @if maint
+ * Place to stash in || out || in | out settings for current stringbuf.
+ * @endif
+ */
+ ios_base::openmode _M_mode;
+
// Data Members:
/**
* @if maint
@@ -104,7 +111,7 @@ namespace std
*/
explicit
basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
- : __streambuf_type(), _M_string()
+ : __streambuf_type(), _M_mode(), _M_string()
{ _M_stringbuf_init(__mode); }
/**
@@ -118,7 +125,7 @@ namespace std
explicit
basic_stringbuf(const __string_type& __str,
ios_base::openmode __mode = ios_base::in | ios_base::out)
- : __streambuf_type(), _M_string(__str.data(), __str.size())
+ : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size())
{ _M_stringbuf_init(__mode); }
// Get and set:
@@ -133,16 +140,14 @@ namespace std
__string_type
str() const
{
- if (_M_mode & ios_base::out)
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__testout)
{
- // This is the deal: _M_string.size() is a value that
- // represents the size of the initial string that makes
- // _M_string, and may not be the correct size of the
- // current stringbuf internal buffer.
- __size_type __len = _M_string.size();
- if (_M_out_end > _M_out_beg)
- __len = max(__size_type(_M_out_end - _M_out_beg), __len);
- return __string_type(_M_out_beg, _M_out_beg + __len);
+ // The current egptr() may not be the actual string end.
+ if (this->pptr() > this->egptr())
+ return __string_type(this->pbase(), this->pptr());
+ else
+ return __string_type(this->pbase(), this->egptr());
}
else
return _M_string;
@@ -160,7 +165,7 @@ namespace std
{
// Cannot use _M_string = __s, since v3 strings are COW.
_M_string.assign(__s.data(), __s.size());
- _M_stringbuf_init(_M_mode);
+ _M_stringbuf_init(this->_M_mode);
}
protected:
@@ -173,35 +178,17 @@ namespace std
void
_M_stringbuf_init(ios_base::openmode __mode)
{
- // _M_buf_size is a convenient alias for "what the streambuf
- // thinks the allocated size of the string really is." This is
- // necessary as ostringstreams are implemented with the
- // streambufs having control of the allocation and
- // re-allocation of the internal string object, _M_string.
- _M_buf_size = _M_string.size();
-
- // NB: Start ostringstream buffers at 512 bytes. This is an
- // experimental value (pronounced "arbitrary" in some of the
- // hipper english-speaking countries), and can be changed to
- // suit particular needs.
- _M_buf_size_opt = 512;
- _M_mode = __mode;
- if (_M_mode & (ios_base::ate | ios_base::app))
- _M_really_sync(0, _M_buf_size);
- else
- _M_really_sync(0, 0);
+ this->_M_mode = __mode;
+
+ __size_type __len = 0;
+ if (this->_M_mode & (ios_base::ate | ios_base::app))
+ __len = _M_string.size();
+ _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
}
- // Overridden virtual functions:
// [documentation is inherited]
virtual int_type
- underflow()
- {
- if (_M_in_cur && _M_in_cur < _M_in_end)
- return traits_type::to_int_type(*gptr());
- else
- return traits_type::eof();
- }
+ underflow();
// [documentation is inherited]
virtual int_type
@@ -225,10 +212,18 @@ namespace std
virtual __streambuf_type*
setbuf(char_type* __s, streamsize __n)
{
- if (__s && __n)
+ if (__s && __n >= 0)
{
+ // This is implementation-defined behavior, and assumes
+ // that an external char_type array of length __n exists
+ // and has been pre-allocated. If this is not the case,
+ // things will quickly blow up.
+
+ // Step 1: Destroy the current internal array.
_M_string = __string_type(__s, __n);
- _M_really_sync(0, 0);
+
+ // Step 2: Use the external array.
+ _M_sync(__s, 0, 0);
}
return this;
}
@@ -254,23 +249,41 @@ namespace std
* @doctodo
* @endif
*/
- virtual int
- _M_really_sync(__size_type __i, __size_type __o)
+ void
+ _M_sync(char_type* __base, __size_type __i, __size_type __o)
{
- char_type* __base = const_cast<char_type*>(_M_string.data());
- bool __testin = _M_mode & ios_base::in;
- bool __testout = _M_mode & ios_base::out;
- __size_type __len = _M_string.size();
+ const bool __testin = this->_M_mode & ios_base::in;
+ const bool __testout = this->_M_mode & ios_base::out;
+ const __size_type __len = _M_string.size();
- _M_buf = __base;
if (__testin)
- this->setg(__base, __base + __i, __base + __len);
+ this->setg(__base, __base + __i, __base + __len);
if (__testout)
{
- this->setp(__base, __base + __len);
- _M_out_cur += __o;
+ this->setp(__base, __base + _M_string.capacity());
+ this->pbump(__o);
+ // We need a pointer to the string end anyway, even when
+ // !__testin: in that case, however, for the correct
+ // functioning of the streambuf inlines all the get area
+ // pointers must be identical.
+ if (!__testin)
+ this->setg(__base + __len, __base + __len, __base + __len);
}
- return 0;
+ }
+
+ // Internal function for correctly updating egptr() to the actual
+ // string end.
+ void
+ _M_update_egptr()
+ {
+ const bool __testin = this->_M_mode & ios_base::in;
+ const bool __testout = this->_M_mode & ios_base::out;
+
+ if (__testout && this->pptr() > this->egptr())
+ if (__testin)
+ this->setg(this->eback(), this->gptr(), this->pptr());
+ else
+ this->setg(this->pptr(), this->pptr(), this->pptr());
}
};
@@ -291,10 +304,9 @@ namespace std
// Types:
typedef _CharT char_type;
typedef _Traits traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type;
-#endif
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
@@ -330,7 +342,7 @@ namespace std
*/
explicit
basic_istringstream(ios_base::openmode __mode = ios_base::in)
- : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in)
+ : __istream_type(), _M_stringbuf(__mode | ios_base::in)
{ this->init(&_M_stringbuf); }
/**
@@ -351,7 +363,7 @@ namespace std
explicit
basic_istringstream(const __string_type& __str,
ios_base::openmode __mode = ios_base::in)
- : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in)
+ : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in)
{ this->init(&_M_stringbuf); }
/**
@@ -410,10 +422,9 @@ namespace std
// Types:
typedef _CharT char_type;
typedef _Traits traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type;
-#endif
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
@@ -449,7 +460,7 @@ namespace std
*/
explicit
basic_ostringstream(ios_base::openmode __mode = ios_base::out)
- : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out)
+ : __ostream_type(), _M_stringbuf(__mode | ios_base::out)
{ this->init(&_M_stringbuf); }
/**
@@ -470,7 +481,7 @@ namespace std
explicit
basic_ostringstream(const __string_type& __str,
ios_base::openmode __mode = ios_base::out)
- : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out)
+ : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out)
{ this->init(&_M_stringbuf); }
/**
@@ -529,10 +540,9 @@ namespace std
// Types:
typedef _CharT char_type;
typedef _Traits traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type;
-#endif
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
@@ -566,7 +576,7 @@ namespace std
*/
explicit
basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
- : __iostream_type(NULL), _M_stringbuf(__m)
+ : __iostream_type(), _M_stringbuf(__m)
{ this->init(&_M_stringbuf); }
/**
@@ -585,7 +595,7 @@ namespace std
explicit
basic_stringstream(const __string_type& __str,
ios_base::openmode __m = ios_base::out | ios_base::in)
- : __iostream_type(NULL), _M_stringbuf(__str, __m)
+ : __iostream_type(), _M_stringbuf(__str, __m)
{ this->init(&_M_stringbuf); }
/**
@@ -628,11 +638,8 @@ namespace std
};
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#endif
-#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/sstream.tcc>
#endif
-#endif
+#endif /* _GLIBCXX_SSTREAM */
diff --git a/contrib/libstdc++/include/std/std_stack.h b/contrib/libstdc++/include/std/std_stack.h
index ddae7e7..70f0456 100644
--- a/contrib/libstdc++/include/std/std_stack.h
+++ b/contrib/libstdc++/include/std/std_stack.h
@@ -1,6 +1,6 @@
// <stack> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,20 +58,16 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_STACK
-#define _CPP_STACK 1
+#ifndef _GLIBCXX_STACK
+#define _GLIBCXX_STACK 1
#pragma GCC system_header
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
-#include <bits/stl_deque.h>
+#include <deque>
#include <bits/stl_stack.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <bits/deque.tcc>
-#endif
-
-#endif /* _CPP_STACK */
+#endif /* _GLIBCXX_STACK */
diff --git a/contrib/libstdc++/include/std/std_stdexcept.h b/contrib/libstdc++/include/std/std_stdexcept.h
index 07a15e4..ebd97f5 100644
--- a/contrib/libstdc++/include/std/std_stdexcept.h
+++ b/contrib/libstdc++/include/std/std_stdexcept.h
@@ -36,8 +36,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_STDEXCEPT
-#define _CPP_STDEXCEPT 1
+#ifndef _GLIBCXX_STDEXCEPT
+#define _GLIBCXX_STDEXCEPT 1
#pragma GCC system_header
@@ -145,4 +145,4 @@ namespace std
};
} // namespace std
-#endif // _CPP_STDEXCEPT
+#endif /* _GLIBCXX_STDEXCEPT */
diff --git a/contrib/libstdc++/include/std/std_streambuf.h b/contrib/libstdc++/include/std/std_streambuf.h
index a1958c1..42b3d78 100644
--- a/contrib/libstdc++/include/std/std_streambuf.h
+++ b/contrib/libstdc++/include/std/std_streambuf.h
@@ -1,6 +1,6 @@
// Stream buffer classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,14 +37,13 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_STREAMBUF
-#define _CPP_STREAMBUF 1
+#ifndef _CLIBXX_STREAMBUF
+#define _CLIBXX_STREAMBUF 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <iosfwd>
-#include <cstdio> // For SEEK_SET, SEEK_CUR, SEEK_END
#include <bits/localefwd.h>
#include <bits/ios_base.h>
@@ -57,8 +56,7 @@ namespace std
*/
template<typename _CharT, typename _Traits>
streamsize
- __copy_streambufs(basic_ios<_CharT, _Traits>& _ios,
- basic_streambuf<_CharT, _Traits>* __sbin,
+ __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
basic_streambuf<_CharT, _Traits>* __sbout);
/**
@@ -141,12 +139,10 @@ namespace std
//@{
/**
* @if maint
- * These are non-standard types.
+ * This is a non-standard type.
* @endif
*/
- typedef ctype<char_type> __ctype_type;
typedef basic_streambuf<char_type, traits_type> __streambuf_type;
- typedef typename traits_type::state_type __state_type;
//@}
friend class basic_ios<char_type, traits_type>;
@@ -156,42 +152,10 @@ namespace std
friend class ostreambuf_iterator<char_type, traits_type>;
friend streamsize
- __copy_streambufs<>(basic_ios<char_type, traits_type>& __ios,
- __streambuf_type* __sbin,__streambuf_type* __sbout);
+ __copy_streambufs<>(__streambuf_type* __sbin,
+ __streambuf_type* __sbout);
protected:
- /**
- * @if maint
- * Pointer to the beginning of internally-allocated space. Filebuf
- * manually allocates/deallocates this, whereas stringstreams attempt
- * to use the built-in intelligence of the string class. If you are
- * managing memory, set this. If not, leave it NULL.
- * @endif
- */
- char_type* _M_buf;
-
- /**
- * @if maint
- * Actual size of allocated internal buffer, in bytes.
- * @endif
- */
- size_t _M_buf_size;
-
- /**
- * @if maint
- * Optimal or preferred size of internal buffer, in bytes.
- * @endif
- */
- size_t _M_buf_size_opt;
-
- /**
- * @if maint
- * True iff _M_in_* and _M_out_* buffers should always point to
- * the same place. True for fstreams, false for sstreams.
- * @endif
- */
- bool _M_buf_unified;
-
//@{
/**
* @if maint
@@ -202,20 +166,12 @@ namespace std
* - put == output == write
* @endif
*/
- char_type* _M_in_beg; // Start of get area.
- char_type* _M_in_cur; // Current read area.
- char_type* _M_in_end; // End of get area.
- char_type* _M_out_beg; // Start of put area.
- char_type* _M_out_cur; // Current put area.
- char_type* _M_out_end; // End of put area.
- //@}
-
- /**
- * @if maint
- * Place to stash in || out || in | out settings for current streambuf.
- * @endif
- */
- ios_base::openmode _M_mode;
+ char_type* _M_in_beg; // Start of get area.
+ char_type* _M_in_cur; // Current read area.
+ char_type* _M_in_end; // End of get area.
+ char_type* _M_out_beg; // Start of put area.
+ char_type* _M_out_cur; // Current put area.
+ char_type* _M_out_end; // End of put area.
/**
* @if maint
@@ -224,147 +180,11 @@ namespace std
*/
locale _M_buf_locale;
- /**
- * @if maint
- * True iff locale is initialized.
- * @endif
- */
- bool _M_buf_locale_init;
-
- //@{
- /**
- * @if maint
- * Necessary bits for putback buffer management. Only used in
- * the basic_filebuf class, as necessary for the standard
- * requirements. The only basic_streambuf member function that
- * needs access to these data members is in_avail...
- *
- * @note pbacks of over one character are not currently supported.
- * @endif
- */
- static const size_t _S_pback_size = 1;
- char_type _M_pback[_S_pback_size];
- char_type* _M_pback_cur_save;
- char_type* _M_pback_end_save;
- bool _M_pback_init;
- //@}
-
- /**
- * @if maint
- * Yet unused.
- * @endif
- */
- fpos<__state_type> _M_pos;
-
- // Initializes pback buffers, and moves normal buffers to safety.
- // Assumptions:
- // _M_in_cur has already been moved back
- void
- _M_pback_create()
- {
- if (!_M_pback_init)
- {
- size_t __dist = _M_in_end - _M_in_cur;
- size_t __len = min(_S_pback_size, __dist);
- traits_type::copy(_M_pback, _M_in_cur, __len);
- _M_pback_cur_save = _M_in_cur;
- _M_pback_end_save = _M_in_end;
- this->setg(_M_pback, _M_pback, _M_pback + __len);
- _M_pback_init = true;
- }
- }
-
- // Deactivates pback buffer contents, and restores normal buffer.
- // Assumptions:
- // The pback buffer has only moved forward.
- void
- _M_pback_destroy() throw()
- {
- if (_M_pback_init)
- {
- // Length _M_in_cur moved in the pback buffer.
- size_t __off_cur = _M_in_cur - _M_pback;
-
- // For in | out buffers, the end can be pushed back...
- size_t __off_end = 0;
- size_t __pback_len = _M_in_end - _M_pback;
- size_t __save_len = _M_pback_end_save - _M_buf;
- if (__pback_len > __save_len)
- __off_end = __pback_len - __save_len;
-
- this->setg(_M_buf, _M_pback_cur_save + __off_cur,
- _M_pback_end_save + __off_end);
- _M_pback_cur_save = NULL;
- _M_pback_end_save = NULL;
- _M_pback_init = false;
- }
- }
-
- // Correctly sets the _M_in_cur pointer, and bumps the
- // _M_out_cur pointer as well if necessary.
- void
- _M_in_cur_move(off_type __n) // argument needs to be +-
- {
- bool __testout = _M_out_cur;
- _M_in_cur += __n;
- if (__testout && _M_buf_unified)
- _M_out_cur += __n;
- }
-
- // Correctly sets the _M_out_cur pointer, and bumps the
- // appropriate _M_*_end pointers as well. Necessary for the
- // un-tied stringbufs, in in|out mode.
- // Invariant:
- // __n + _M_out_[cur, end] <= _M_buf + _M_buf_size
- // Assuming all _M_*_[beg, cur, end] pointers are operating on
- // the same range:
- // _M_buf <= _M_*_ <= _M_buf + _M_buf_size
- void
- _M_out_cur_move(off_type __n) // argument needs to be +-
- {
- bool __testin = _M_in_cur;
-
- _M_out_cur += __n;
- if (__testin && _M_buf_unified)
- _M_in_cur += __n;
- if (_M_out_cur > _M_out_end)
- {
- _M_out_end = _M_out_cur;
- // NB: in | out buffers drag the _M_in_end pointer along...
- if (__testin)
- _M_in_end += __n;
- }
- }
-
- // Return the size of the output buffer. This depends on the
- // buffer in use: allocated buffers have a stored size in
- // _M_buf_size and setbuf() buffers don't.
- off_type
- _M_out_buf_size()
- {
- off_type __ret = 0;
- if (_M_out_cur)
- {
- // Using allocated buffer.
- if (_M_out_beg == _M_buf)
- __ret = _M_out_beg + _M_buf_size - _M_out_cur;
- // Using non-allocated buffer.
- else
- __ret = _M_out_end - _M_out_cur;
- }
- return __ret;
- }
-
public:
/// Destructor deallocates no buffer space.
virtual
~basic_streambuf()
- {
- _M_buf_unified = false;
- _M_buf_size = 0;
- _M_buf_size_opt = 0;
- _M_mode = ios_base::openmode(0);
- }
+ { }
// [27.5.2.2.1] locales
/**
@@ -379,6 +199,7 @@ namespace std
{
locale __tmp(this->getloc());
this->imbue(__loc);
+ _M_buf_locale = __loc;
return __tmp;
}
@@ -433,21 +254,8 @@ namespace std
streamsize
in_avail()
{
- streamsize __ret;
- if (_M_in_cur && _M_in_cur < _M_in_end)
- {
- if (_M_pback_init)
- {
- size_t __save_len = _M_pback_end_save - _M_pback_cur_save;
- size_t __pback_len = _M_in_cur - _M_pback;
- __ret = __save_len - __pback_len;
- }
- else
- __ret = this->egptr() - this->gptr();
- }
- else
- __ret = this->showmanyc();
- return __ret;
+ const streamsize __ret = this->egptr() - this->gptr();
+ return __ret ? __ret : this->showmanyc();
}
/**
@@ -460,9 +268,11 @@ namespace std
int_type
snextc()
{
- int_type __eof = traits_type::eof();
- return (traits_type::eq_int_type(this->sbumpc(), __eof)
- ? __eof : this->sgetc());
+ int_type __ret = traits_type::eof();
+ if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(),
+ __ret), true))
+ __ret = this->sgetc();
+ return __ret;
}
/**
@@ -474,7 +284,18 @@ namespace std
* @c uflow().
*/
int_type
- sbumpc();
+ sbumpc()
+ {
+ int_type __ret;
+ if (__builtin_expect(this->gptr() < this->egptr(), true))
+ {
+ __ret = traits_type::to_int_type(*this->gptr());
+ this->gbump(1);
+ }
+ else
+ __ret = this->uflow();
+ return __ret;
+ }
/**
* @brief Getting the next character.
@@ -488,8 +309,8 @@ namespace std
sgetc()
{
int_type __ret;
- if (_M_in_cur && _M_in_cur < _M_in_end)
- __ret = traits_type::to_int_type(*(this->gptr()));
+ if (__builtin_expect(this->gptr() < this->egptr(), true))
+ __ret = traits_type::to_int_type(*this->gptr());
else
__ret = this->underflow();
return __ret;
@@ -518,7 +339,20 @@ namespace std
* fetched from the input stream will be @a c.
*/
int_type
- sputbackc(char_type __c);
+ sputbackc(char_type __c)
+ {
+ int_type __ret;
+ const bool __testpos = this->eback() < this->gptr();
+ if (__builtin_expect(!__testpos ||
+ !traits_type::eq(__c, this->gptr()[-1]), false))
+ __ret = this->pbackfail(traits_type::to_int_type(__c));
+ else
+ {
+ this->gbump(-1);
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ return __ret;
+ }
/**
* @brief Moving backwards in the input stream.
@@ -530,7 +364,18 @@ namespace std
* "gotten".
*/
int_type
- sungetc();
+ sungetc()
+ {
+ int_type __ret;
+ if (__builtin_expect(this->eback() < this->gptr(), true))
+ {
+ this->gbump(-1);
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ else
+ __ret = this->pbackfail();
+ return __ret;
+ }
// [27.5.2.2.5] put area
/**
@@ -546,7 +391,19 @@ namespace std
* position is not available, returns @c overflow(c).
*/
int_type
- sputc(char_type __c);
+ sputc(char_type __c)
+ {
+ int_type __ret;
+ if (__builtin_expect(this->pptr() < this->epptr(), true))
+ {
+ *this->pptr() = __c;
+ this->pbump(1);
+ __ret = traits_type::to_int_type(__c);
+ }
+ else
+ __ret = this->overflow(traits_type::to_int_type(__c));
+ return __ret;
+ }
/**
* @brief Entry point for all single-character output functions.
@@ -574,12 +431,9 @@ namespace std
* - this is not an error
*/
basic_streambuf()
- : _M_buf(NULL), _M_buf_size(0), _M_buf_size_opt(BUFSIZ),
- _M_buf_unified(false), _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
- _M_out_beg(0), _M_out_cur(0), _M_out_end(0),
- _M_mode(ios_base::openmode(0)), _M_buf_locale(locale()),
- _M_pback_cur_save(0), _M_pback_end_save(0),
- _M_pback_init(false)
+ : _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
+ _M_out_beg(0), _M_out_cur(0), _M_out_end(0),
+ _M_buf_locale(locale())
{ }
// [27.5.2.3.1] get area access
@@ -627,8 +481,6 @@ namespace std
_M_in_beg = __gbeg;
_M_in_cur = __gnext;
_M_in_end = __gend;
- if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend)
- _M_mode = _M_mode | ios_base::in;
}
// [27.5.2.3.2] put area access
@@ -673,9 +525,7 @@ namespace std
setp(char_type* __pbeg, char_type* __pend)
{
_M_out_beg = _M_out_cur = __pbeg;
- _M_out_end = __pend;
- if (!(_M_mode & ios_base::out) && __pbeg && __pend)
- _M_mode = _M_mode | ios_base::out;
+ _M_out_end = __pend;
}
// [27.5.2.4] virtual functions
@@ -688,15 +538,13 @@ namespace std
* are changed by this call. The standard adds, "Between invocations
* of this function a class derived from streambuf can safely cache
* results of calls to locale functions and to members of facets
- * so obtained." This function simply stores the new locale for use
- * by derived classes.
+ * so obtained."
+ *
+ * @note Base class version does nothing.
*/
virtual void
- imbue(const locale& __loc)
- {
- if (_M_buf_locale != __loc)
- _M_buf_locale = __loc;
- }
+ imbue(const locale&)
+ { }
// [27.5.2.4.2] buffer management and positioning
/**
@@ -822,14 +670,12 @@ namespace std
uflow()
{
int_type __ret = traits_type::eof();
- bool __testeof = traits_type::eq_int_type(this->underflow(), __ret);
- bool __testpending = _M_in_cur && _M_in_cur < _M_in_end;
- if (!__testeof && __testpending)
+ const bool __testeof = traits_type::eq_int_type(this->underflow(),
+ __ret);
+ if (!__testeof)
{
- __ret = traits_type::to_int_type(*_M_in_cur);
- ++_M_in_cur;
- if (_M_buf_unified && _M_mode & ios_base::out)
- ++_M_out_cur;
+ __ret = traits_type::to_int_type(*this->gptr());
+ this->gbump(1);
}
return __ret;
}
@@ -891,7 +737,7 @@ namespace std
overflow(int_type /* __c */ = traits_type::eof())
{ return traits_type::eof(); }
-#ifdef _GLIBCPP_DEPRECATED
+#ifdef _GLIBCXX_DEPRECATED
// Annex D.6
public:
/**
@@ -903,35 +749,36 @@ namespace std
* See http://gcc.gnu.org/ml/libstdc++/2002-05/msg00168.html
*
* @note This function has been deprecated by the standard. You
- * must define @c _GLIBCPP_DEPRECATED to make this visible; see
+ * must define @c _GLIBCXX_DEPRECATED to make this visible; see
* c++config.h.
*/
void
stossc()
{
- if (_M_in_cur < _M_in_end)
- ++_M_in_cur;
+ if (this->gptr() < this->egptr())
+ this->gbump(1);
else
this->uflow();
}
#endif
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- // Side effect of DR 50.
private:
- basic_streambuf(const __streambuf_type&) { };
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // Side effect of DR 50.
+ basic_streambuf(const __streambuf_type& __sb)
+ : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
+ _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
+ _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
+ _M_buf_locale(__sb._M_buf_locale)
+ { }
__streambuf_type&
operator=(const __streambuf_type&) { return *this; };
-#endif
};
} // namespace std
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#endif
-#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
-#include <bits/streambuf.tcc>
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/streambuf.tcc>
#endif
-#endif
+#endif /* _GLIBCXX_STREAMBUF */
diff --git a/contrib/libstdc++/include/std/std_string.h b/contrib/libstdc++/include/std/std_string.h
index 6b82f8e..2b15658 100644
--- a/contrib/libstdc++/include/std/std_string.h
+++ b/contrib/libstdc++/include/std/std_string.h
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,8 +37,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_STRING
-#define _CPP_STRING 1
+#ifndef _GLIBCXX_STRING
+#define _GLIBCXX_STRING 1
#pragma GCC system_header
@@ -52,10 +52,9 @@
#include <bits/stl_function.h> // For less
#include <bits/basic_string.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <algorithm> // for find_if
# include <bits/basic_string.tcc>
#endif
-#endif /* _CPP_STRING */
-
+#endif /* _GLIBCXX_STRING */
diff --git a/contrib/libstdc++/include/std/std_utility.h b/contrib/libstdc++/include/std/std_utility.h
index b9c6c09..fe93090 100644
--- a/contrib/libstdc++/include/std/std_utility.h
+++ b/contrib/libstdc++/include/std/std_utility.h
@@ -58,16 +58,13 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_UTILITY
-#define _CPP_UTILITY 1
+#ifndef _GLIBCXX_UTILITY
+#define _GLIBCXX_UTILITY 1
#pragma GCC system_header
+
#include <bits/c++config.h>
#include <bits/stl_relops.h>
#include <bits/stl_pair.h>
-#endif /* _CPP_UTILITY */
-
-// Local Variables:
-// mode:C++
-// End:
+#endif /* _GLIBCXX_UTILITY */
diff --git a/contrib/libstdc++/include/std/std_valarray.h b/contrib/libstdc++/include/std/std_valarray.h
index b4de5df..b893b33 100644
--- a/contrib/libstdc++/include/std/std_valarray.h
+++ b/contrib/libstdc++/include/std/std_valarray.h
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- valarray class.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,8 +35,8 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_VALARRAY
-#define _CPP_VALARRAY 1
+#ifndef _GLIBCXX_VALARRAY
+#define _GLIBCXX_VALARRAY 1
#pragma GCC system_header
@@ -46,6 +46,7 @@
#include <cstdlib>
#include <numeric>
#include <algorithm>
+#include <debug/debug.h>
namespace std
{
@@ -90,10 +91,21 @@ namespace std
} // namespace std
#include <bits/valarray_array.h>
-#include <bits/valarray_meta.h>
+#include <bits/valarray_before.h>
namespace std
{
+ /**
+ * @brief Smart array designed to support numeric processing.
+ *
+ * A valarray is an array that provides constraints intended to allow for
+ * effective optimization of numeric array processing by reducing the
+ * aliasing that can result from pointer representations. It represents a
+ * one-dimensional array from which different multidimensional subsets can
+ * be accessed and modified.
+ *
+ * @param Tp Type of object in the array.
+ */
template<class _Tp>
class valarray
{
@@ -107,71 +119,289 @@ namespace std
typedef _Tp value_type;
// _lib.valarray.cons_ construct/destroy:
+ /// Construct an empty array.
valarray();
+
+ /// Construct an array with @a n elements.
explicit valarray(size_t);
+
+ /// Construct an array with @a n elements initialized to @a t.
valarray(const _Tp&, size_t);
+
+ /// Construct an array initialized to the first @a n elements of @a t.
valarray(const _Tp* __restrict__, size_t);
+
+ /// Copy constructor.
valarray(const valarray&);
+
+ /// Construct an array with the same size and values in @a sa.
valarray(const slice_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ga.
valarray(const gslice_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ma.
valarray(const mask_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ia.
valarray(const indirect_array<_Tp>&);
+
template<class _Dom>
valarray(const _Expr<_Dom,_Tp>& __e);
~valarray();
// _lib.valarray.assign_ assignment:
+ /**
+ * @brief Assign elements to an array.
+ *
+ * Assign elements of array to values in @a v. Results are undefined
+ * if @a v is not the same size as this array.
+ *
+ * @param v Valarray to get values from.
+ */
valarray<_Tp>& operator=(const valarray<_Tp>&);
+
+ /**
+ * @brief Assign elements to a value.
+ *
+ * Assign all elements of array to @a t.
+ *
+ * @param t Value for elements.
+ */
valarray<_Tp>& operator=(const _Tp&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a sa. Results are undefined
+ * if @a sa is not the same size as this array.
+ *
+ * @param sa Array slice to get values from.
+ */
valarray<_Tp>& operator=(const slice_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ga. Results are undefined
+ * if @a ga is not the same size as this array.
+ *
+ * @param ga Array slice to get values from.
+ */
valarray<_Tp>& operator=(const gslice_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ma. Results are undefined
+ * if @a ma is not the same size as this array.
+ *
+ * @param ma Array slice to get values from.
+ */
valarray<_Tp>& operator=(const mask_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ia. Results are undefined
+ * if @a ia is not the same size as this array.
+ *
+ * @param ia Array slice to get values from.
+ */
valarray<_Tp>& operator=(const indirect_array<_Tp>&);
template<class _Dom> valarray<_Tp>&
operator= (const _Expr<_Dom,_Tp>&);
// _lib.valarray.access_ element access:
- // XXX: LWG to be resolved.
- const _Tp& operator[](size_t) const;
- _Tp& operator[](size_t);
+ /**
+ * Return a reference to the i'th array element.
+ *
+ * @param i Index of element to return.
+ * @return Reference to the i'th element.
+ */
+ _Tp& operator[](size_t);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 389. Const overload of valarray::operator[] returns by value.
+ const _Tp& operator[](size_t) const;
+
// _lib.valarray.sub_ subset operations:
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the slice argument. The new valarray is the size of
+ * the input slice. @see slice.
+ *
+ * @param s The source slice.
+ * @return New valarray containing elements in @a s.
+ */
_Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the slice argument. The new valarray is the size of
+ * the input slice. @see slice.
+ *
+ * @param s The source slice.
+ * @return New valarray containing elements in @a s.
+ */
slice_array<_Tp> operator[](slice);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a slice_array referencing the elements of the array
+ * indicated by the slice argument. @see gslice.
+ *
+ * @param s The source slice.
+ * @return Slice_array referencing elements indicated by @a s.
+ */
_Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the gslice argument. The new valarray is
+ * the size of the input gslice. @see gslice.
+ *
+ * @param s The source gslice.
+ * @return New valarray containing elements in @a s.
+ */
gslice_array<_Tp> operator[](const gslice&);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the argument. The input is a valarray of bool which
+ * represents a bitmask indicating which elements should be copied into
+ * the new valarray. Each element of the array is added to the return
+ * valarray if the corresponding element of the argument is true.
+ *
+ * @param m The valarray bitmask.
+ * @return New valarray containing elements indicated by @a m.
+ */
valarray<_Tp> operator[](const valarray<bool>&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new mask_array referencing the elements of the array
+ * indicated by the argument. The input is a valarray of bool which
+ * represents a bitmask indicating which elements are part of the
+ * subset. Elements of the array are part of the subset if the
+ * corresponding element of the argument is true.
+ *
+ * @param m The valarray bitmask.
+ * @return New valarray containing elements indicated by @a m.
+ */
mask_array<_Tp> operator[](const valarray<bool>&);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the argument. The elements in the argument are
+ * interpreted as the indices of elements of this valarray to copy to
+ * the return valarray.
+ *
+ * @param i The valarray element index list.
+ * @return New valarray containing elements in @a s.
+ */
_Expr<_IClos<_ValArray, _Tp>, _Tp>
operator[](const valarray<size_t>&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns an indirect_array referencing the elements of the array
+ * indicated by the argument. The elements in the argument are
+ * interpreted as the indices of elements of this valarray to include
+ * in the subset. The returned indirect_array refers to these
+ * elements.
+ *
+ * @param i The valarray element index list.
+ * @return Indirect_array referencing elements in @a i.
+ */
indirect_array<_Tp> operator[](const valarray<size_t>&);
// _lib.valarray.unary_ unary operators:
+ /// Return a new valarray by applying unary + to each element.
typename _UnaryOp<__unary_plus>::_Rt operator+() const;
+
+ /// Return a new valarray by applying unary - to each element.
typename _UnaryOp<__negate>::_Rt operator-() const;
+
+ /// Return a new valarray by applying unary ~ to each element.
typename _UnaryOp<__bitwise_not>::_Rt operator~() const;
+
+ /// Return a new valarray by applying unary ! to each element.
typename _UnaryOp<__logical_not>::_Rt operator!() const;
// _lib.valarray.cassign_ computed assignment:
+ /// Multiply each element of array by @a t.
valarray<_Tp>& operator*=(const _Tp&);
+
+ /// Divide each element of array by @a t.
valarray<_Tp>& operator/=(const _Tp&);
+
+ /// Set each element e of array to e % @a t.
valarray<_Tp>& operator%=(const _Tp&);
+
+ /// Add @a t to each element of array.
valarray<_Tp>& operator+=(const _Tp&);
+
+ /// Subtract @a t to each element of array.
valarray<_Tp>& operator-=(const _Tp&);
+
+ /// Set each element e of array to e ^ @a t.
valarray<_Tp>& operator^=(const _Tp&);
+
+ /// Set each element e of array to e & @a t.
valarray<_Tp>& operator&=(const _Tp&);
+
+ /// Set each element e of array to e | @a t.
valarray<_Tp>& operator|=(const _Tp&);
+
+ /// Left shift each element e of array by @a t bits.
valarray<_Tp>& operator<<=(const _Tp&);
+
+ /// Right shift each element e of array by @a t bits.
valarray<_Tp>& operator>>=(const _Tp&);
+
+ /// Multiply elements of array by corresponding elements of @a v.
valarray<_Tp>& operator*=(const valarray<_Tp>&);
+
+ /// Divide elements of array by corresponding elements of @a v.
valarray<_Tp>& operator/=(const valarray<_Tp>&);
+
+ /// Modulo elements of array by corresponding elements of @a v.
valarray<_Tp>& operator%=(const valarray<_Tp>&);
+
+ /// Add corresponding elements of @a v to elements of array.
valarray<_Tp>& operator+=(const valarray<_Tp>&);
+
+ /// Subtract corresponding elements of @a v from elements of array.
valarray<_Tp>& operator-=(const valarray<_Tp>&);
+
+ /// Logical xor corresponding elements of @a v with elements of array.
valarray<_Tp>& operator^=(const valarray<_Tp>&);
+
+ /// Logical or corresponding elements of @a v with elements of array.
valarray<_Tp>& operator|=(const valarray<_Tp>&);
+
+ /// Logical and corresponding elements of @a v with elements of array.
valarray<_Tp>& operator&=(const valarray<_Tp>&);
+
+ /// Left shift elements of array by corresponding elements of @a v.
valarray<_Tp>& operator<<=(const valarray<_Tp>&);
+
+ /// Right shift elements of array by corresponding elements of @a v.
valarray<_Tp>& operator>>=(const valarray<_Tp>&);
template<class _Dom>
@@ -197,18 +427,93 @@ namespace std
// _lib.valarray.members_ member functions:
+ /// Return the number of elements in array.
size_t size() const;
- _Tp sum() const;
+
+ /**
+ * @brief Return the sum of all elements in the array.
+ *
+ * Accumulates the sum of all elements into a Tp using +=. The order
+ * of adding the elements is unspecified.
+ */
+ _Tp sum() const;
+
+ /// Return the minimum element using operator<().
_Tp min() const;
+
+ /// Return the maximum element using operator<().
_Tp max() const;
// // FIXME: Extension
// _Tp product () const;
+ /**
+ * @brief Return a shifted array.
+ *
+ * A new valarray is constructed as a copy of this array with elements
+ * in shifted positions. For an element with index i, the new position
+ * is i - n. The new valarray is the same size as the current one.
+ * New elements without a value are set to 0. Elements whos new
+ * position is outside the bounds of the array are discarded.
+ *
+ * Positive arguments shift toward index 0, discarding elements [0, n).
+ * Negative arguments discard elements from the top of the array.
+ *
+ * @param n Number of element positions to shift.
+ * @return New valarray with elements in shifted positions.
+ */
valarray<_Tp> shift (int) const;
+
+ /**
+ * @brief Return a rotated array.
+ *
+ * A new valarray is constructed as a copy of this array with elements
+ * in shifted positions. For an element with index i, the new position
+ * is (i - n) % size(). The new valarray is the same size as the
+ * current one. Elements that are shifted beyond the array bounds are
+ * shifted into the other end of the array. No elements are lost.
+ *
+ * Positive arguments shift toward index 0, wrapping around the top.
+ * Negative arguments shift towards the top, wrapping around to 0.
+ *
+ * @param n Number of element positions to rotate.
+ * @return New valarray with elements in shifted positions.
+ */
valarray<_Tp> cshift(int) const;
+
+ /**
+ * @brief Apply a function to the array.
+ *
+ * Returns a new valarray with elements assigned to the result of
+ * applying func to the corresponding element of this array. The new
+ * array is the same size as this one.
+ *
+ * @param func Function of Tp returning Tp to apply.
+ * @return New valarray with transformed elements.
+ */
_Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const;
+
+ /**
+ * @brief Apply a function to the array.
+ *
+ * Returns a new valarray with elements assigned to the result of
+ * applying func to the corresponding element of this array. The new
+ * array is the same size as this one.
+ *
+ * @param func Function of const Tp& returning Tp to apply.
+ * @return New valarray with transformed elements.
+ */
_Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const;
+
+ /**
+ * @brief Resize array.
+ *
+ * Resize this array to be @a size and set all elements to @a c. All
+ * references and iterators are invalidated.
+ *
+ * @param size New array size.
+ * @param c New value for all elements.
+ */
void resize(size_t __size, _Tp __c = _Tp());
private:
@@ -221,15 +526,23 @@ namespace std
template<typename _Tp>
inline const _Tp&
valarray<_Tp>::operator[](size_t __i) const
- { return _M_data[__i]; }
+ {
+ __glibcxx_requires_subscript(__i);
+ return _M_data[__i];
+ }
template<typename _Tp>
inline _Tp&
valarray<_Tp>::operator[](size_t __i)
- { return _M_data[__i]; }
+ {
+ __glibcxx_requires_subscript(__i);
+ return _M_data[__i];
+ }
} // std::
-
+
+#include <bits/valarray_after.h>
+
#include <bits/slice_array.h>
#include <bits/gslice.h>
#include <bits/gslice_array.h>
@@ -246,32 +559,35 @@ namespace std
inline
valarray<_Tp>::valarray(size_t __n)
: _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
- { __valarray_default_construct(_M_data, _M_data + __n); }
+ { std::__valarray_default_construct(_M_data, _M_data + __n); }
template<typename _Tp>
inline
valarray<_Tp>::valarray(const _Tp& __t, size_t __n)
: _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
- { __valarray_fill_construct(_M_data, _M_data + __n, __t); }
+ { std::__valarray_fill_construct(_M_data, _M_data + __n, __t); }
template<typename _Tp>
inline
valarray<_Tp>::valarray(const _Tp* __restrict__ __p, size_t __n)
: _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
- { __valarray_copy_construct(__p, __p + __n, _M_data); }
+ {
+ _GLIBCXX_DEBUG_ASSERT(__p != 0 || __n == 0);
+ std::__valarray_copy_construct(__p, __p + __n, _M_data);
+ }
template<typename _Tp>
inline
valarray<_Tp>::valarray(const valarray<_Tp>& __v)
: _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size))
- { __valarray_copy_construct(__v._M_data, __v._M_data + _M_size, _M_data); }
+ { std::__valarray_copy_construct(__v._M_data, __v._M_data + _M_size, _M_data); }
template<typename _Tp>
inline
valarray<_Tp>::valarray(const slice_array<_Tp>& __sa)
: _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz))
{
- __valarray_copy
+ std::__valarray_copy
(__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data));
}
@@ -281,7 +597,7 @@ namespace std
: _M_size(__ga._M_index.size()),
_M_data(__valarray_get_storage<_Tp>(_M_size))
{
- __valarray_copy
+ std::__valarray_copy
(__ga._M_array, _Array<size_t>(__ga._M_index),
_Array<_Tp>(_M_data), _M_size);
}
@@ -291,7 +607,7 @@ namespace std
valarray<_Tp>::valarray(const mask_array<_Tp>& __ma)
: _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz))
{
- __valarray_copy
+ std::__valarray_copy
(__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size);
}
@@ -300,7 +616,7 @@ namespace std
valarray<_Tp>::valarray(const indirect_array<_Tp>& __ia)
: _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz))
{
- __valarray_copy
+ std::__valarray_copy
(__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
}
@@ -308,21 +624,22 @@ namespace std
inline
valarray<_Tp>::valarray(const _Expr<_Dom, _Tp>& __e)
: _M_size(__e.size()), _M_data(__valarray_get_storage<_Tp>(_M_size))
- { __valarray_copy(__e, _M_size, _Array<_Tp>(_M_data)); }
+ { std::__valarray_copy(__e, _M_size, _Array<_Tp>(_M_data)); }
template<typename _Tp>
inline
valarray<_Tp>::~valarray()
{
- __valarray_destroy_elements(_M_data, _M_data + _M_size);
- __valarray_release_memory(_M_data);
+ std::__valarray_destroy_elements(_M_data, _M_data + _M_size);
+ std::__valarray_release_memory(_M_data);
}
template<typename _Tp>
inline valarray<_Tp>&
valarray<_Tp>::operator=(const valarray<_Tp>& __v)
{
- __valarray_copy(__v._M_data, _M_size, _M_data);
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size);
+ std::__valarray_copy(__v._M_data, _M_size, _M_data);
return *this;
}
@@ -330,7 +647,7 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const _Tp& __t)
{
- __valarray_fill(_M_data, _M_size, __t);
+ std::__valarray_fill(_M_data, _M_size, __t);
return *this;
}
@@ -338,8 +655,9 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const slice_array<_Tp>& __sa)
{
- __valarray_copy(__sa._M_array, __sa._M_sz,
- __sa._M_stride, _Array<_Tp>(_M_data));
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __sa._M_sz);
+ std::__valarray_copy(__sa._M_array, __sa._M_sz,
+ __sa._M_stride, _Array<_Tp>(_M_data));
return *this;
}
@@ -347,8 +665,9 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const gslice_array<_Tp>& __ga)
{
- __valarray_copy(__ga._M_array, _Array<size_t>(__ga._M_index),
- _Array<_Tp>(_M_data), _M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ga._M_index.size());
+ std::__valarray_copy(__ga._M_array, _Array<size_t>(__ga._M_index),
+ _Array<_Tp>(_M_data), _M_size);
return *this;
}
@@ -356,8 +675,9 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const mask_array<_Tp>& __ma)
{
- __valarray_copy(__ma._M_array, __ma._M_mask,
- _Array<_Tp>(_M_data), _M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ma._M_sz);
+ std::__valarray_copy(__ma._M_array, __ma._M_mask,
+ _Array<_Tp>(_M_data), _M_size);
return *this;
}
@@ -365,8 +685,9 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const indirect_array<_Tp>& __ia)
{
- __valarray_copy(__ia._M_array, __ia._M_index,
- _Array<_Tp>(_M_data), _M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ia._M_sz);
+ std::__valarray_copy(__ia._M_array, __ia._M_index,
+ _Array<_Tp>(_M_data), _M_size);
return *this;
}
@@ -374,8 +695,9 @@ namespace std
inline valarray<_Tp>&
valarray<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e)
{
- __valarray_copy(__e, _M_size, _Array<_Tp>(_M_data));
- return *this;
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __e.size());
+ std::__valarray_copy(__e, _M_size, _Array<_Tp>(_M_data));
+ return *this;
}
template<typename _Tp>
@@ -458,7 +780,8 @@ namespace std
inline _Tp
valarray<_Tp>::sum() const
{
- return __valarray_sum(_M_data, _M_data + _M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return std::__valarray_sum(_M_data, _M_data + _M_size);
}
// template<typename _Tp>
@@ -475,21 +798,21 @@ namespace std
_Tp* const __a = static_cast<_Tp*>
(__builtin_alloca(sizeof(_Tp) * _M_size));
if (__n == 0) // no shift
- __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+ std::__valarray_copy_construct(_M_data, _M_data + _M_size, __a);
else if (__n > 0) // __n > 0: shift left
{
if (size_t(__n) > _M_size)
- __valarray_default_construct(__a, __a + __n);
+ std::__valarray_default_construct(__a, __a + __n);
else
{
- __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
- __valarray_default_construct(__a+_M_size-__n, __a + _M_size);
+ std::__valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+ std::__valarray_default_construct(__a+_M_size-__n, __a + _M_size);
}
}
else // __n < 0: shift right
{
- __valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n);
- __valarray_default_construct(__a, __a - __n);
+ std::__valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n);
+ std::__valarray_default_construct(__a, __a - __n);
}
return valarray<_Tp> (__a, _M_size);
}
@@ -501,17 +824,17 @@ namespace std
_Tp* const __a = static_cast<_Tp*>
(__builtin_alloca (sizeof(_Tp) * _M_size));
if (__n == 0) // no cshift
- __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+ std::__valarray_copy_construct(_M_data, _M_data + _M_size, __a);
else if (__n > 0) // cshift left
{
- __valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n);
- __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+ std::__valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n);
+ std::__valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
}
else // cshift right
{
- __valarray_copy_construct
+ std::__valarray_copy_construct
(_M_data + _M_size+__n, _M_data + _M_size, __a);
- __valarray_copy_construct
+ std::__valarray_copy_construct
(_M_data, _M_data + _M_size+__n, __a - __n);
}
return valarray<_Tp>(__a, _M_size);
@@ -524,28 +847,30 @@ namespace std
// This complication is so to make valarray<valarray<T> > work
// even though it is not required by the standard. Nobody should
// be saying valarray<valarray<T> > anyway. See the specs.
- __valarray_destroy_elements(_M_data, _M_data + _M_size);
+ std::__valarray_destroy_elements(_M_data, _M_data + _M_size);
if (_M_size != __n)
{
- __valarray_release_memory(_M_data);
+ std::__valarray_release_memory(_M_data);
_M_size = __n;
_M_data = __valarray_get_storage<_Tp>(__n);
}
- __valarray_fill_construct(_M_data, _M_data + __n, __c);
+ std::__valarray_fill_construct(_M_data, _M_data + __n, __c);
}
template<typename _Tp>
inline _Tp
valarray<_Tp>::min() const
{
- return *min_element (_M_data, _M_data+_M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return *std::min_element (_M_data, _M_data+_M_size);
}
template<typename _Tp>
inline _Tp
valarray<_Tp>::max() const
{
- return *max_element (_M_data, _M_data+_M_size);
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return *std::max_element (_M_data, _M_data+_M_size);
}
template<class _Tp>
@@ -594,6 +919,7 @@ namespace std
inline valarray<_Tp>& \
valarray<_Tp>::operator _Op##=(const valarray<_Tp> &__v) \
{ \
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size); \
_Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size, \
_Array<_Tp>(__v._M_data)); \
return *this; \
@@ -641,6 +967,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right)
typename __fun<_Name, _Tp>::result_type> \
operator _Op(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
{ \
+ _GLIBCXX_DEBUG_ASSERT(__v.size() == __w.size()); \
typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure; \
typedef typename __fun<_Name, _Tp>::result_type _Rt; \
return _Expr<_Closure, _Rt>(_Closure(__v, __w)); \
@@ -687,8 +1014,4 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
} // namespace std
-#endif // _CPP_VALARRAY
-
-// Local Variables:
-// mode:c++
-// End:
+#endif /* _GLIBCXX_VALARRAY */
diff --git a/contrib/libstdc++/include/std/std_vector.h b/contrib/libstdc++/include/std/std_vector.h
index 5738ef7..16e50a9 100644
--- a/contrib/libstdc++/include/std/std_vector.h
+++ b/contrib/libstdc++/include/std/std_vector.h
@@ -1,6 +1,6 @@
// <vector> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -58,22 +58,26 @@
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
-#ifndef _CPP_VECTOR
-#define _CPP_VECTOR 1
+#ifndef _GLIBCXX_VECTOR
+#define _GLIBCXX_VECTOR 1
#pragma GCC system_header
#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
+#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_vector.h>
#include <bits/stl_bvector.h>
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <bits/vector.tcc>
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/vector.tcc>
#endif
-#endif /* _CPP_VECTOR */
+#ifdef _GLIBCXX_DEBUG
+# include <debug/vector>
+#endif
+
+#endif /* _GLIBCXX_VECTOR */
diff --git a/contrib/libstdc++/include/stdc++.h b/contrib/libstdc++/include/stdc++.h
new file mode 100644
index 0000000..d350a3c
--- /dev/null
+++ b/contrib/libstdc++/include/stdc++.h
@@ -0,0 +1,82 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+// 17.4.1.2 Headers
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
diff --git a/contrib/libstdc++/libmath/Makefile.am b/contrib/libstdc++/libmath/Makefile.am
index 30d3dce..091b4a4 100644
--- a/contrib/libstdc++/libmath/Makefile.am
+++ b/contrib/libstdc++/libmath/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the math subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -22,23 +22,17 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-AUTOMAKE_OPTIONS = 1.3 cygnus
-
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
noinst_LTLIBRARIES = libmath.la
-libmath_la_LIBADD = @LIBMATHOBJS@
+libmath_la_LIBADD = $(LIBMATHOBJS)
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = stubs.c
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-
-INCLUDES = \
- $(TOPLEVEL_INCLUDES)
+AM_CPPFLAGS = $(CANADIAN_INCLUDES)
# Only compiling "C" sources in this directory.
LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/contrib/libstdc++/libmath/Makefile.in b/contrib/libstdc++/libmath/Makefile.in
index 658627d..677be69 100644
--- a/contrib/libstdc++/libmath/Makefile.in
+++ b/contrib/libstdc++/libmath/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,71 +12,52 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
-ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@
-CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
@@ -83,165 +66,210 @@ CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@
+GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@
+GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@
+GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBMATHOBJS = @LIBMATHOBJS@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
-LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+
+# Only compiling "C" sources in this directory.
+LIBTOOL = @LIBTOOL@ --tag CC
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_MAP = @SYMVER_MAP@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
-baseline_file = @baseline_file@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
+datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
-glibcpp_CXX = @glibcpp_CXX@
-glibcpp_MOFILES = @glibcpp_MOFILES@
-glibcpp_POFILES = @glibcpp_POFILES@
-glibcpp_basedir = @glibcpp_basedir@
-glibcpp_builddir = @glibcpp_builddir@
-glibcpp_localedir = @glibcpp_localedir@
-glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_srcdir = @glibcpp_srcdir@
-glibcpp_thread_h = @glibcpp_thread_h@
-glibcpp_toolexecdir = @glibcpp_toolexecdir@
-glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
-ifGNUmake = @ifGNUmake@
-libio_la = @libio_la@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+mandir = @mandir@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
-AUTOMAKE_OPTIONS = 1.3 cygnus
-
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
noinst_LTLIBRARIES = libmath.la
-libmath_la_LIBADD = @LIBMATHOBJS@
+libmath_la_LIBADD = $(LIBMATHOBJS)
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = stubs.c
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-
-INCLUDES = \
- $(TOPLEVEL_INCLUDES)
-
-
-# Only compiling "C" sources in this directory.
-LIBTOOL = @LIBTOOL@ --tag CC
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libmath_la_LDFLAGS =
-libmath_la_OBJECTS = stubs.lo
-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)
+AM_CPPFLAGS = $(CANADIAN_INCLUDES)
+subdir = libmath
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+
+libmath_la_LDFLAGS =
+am_libmath_la_OBJECTS = stubs.lo
+libmath_la_OBJECTS = $(am_libmath_la_OBJECTS)
+
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libmath_la_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
SOURCES = $(libmath_la_SOURCES)
-OBJECTS = $(libmath_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus libmath/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+all: all-am
-mostlyclean-noinstLTLIBRARIES:
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign libmath/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" = "$$p" && dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libmath.la: $(libmath_la_OBJECTS) $(libmath_la_DEPENDENCIES)
+ $(LINK) $(libmath_la_LDFLAGS) $(libmath_la_OBJECTS) $(libmath_la_LIBADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
+ -rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.o:
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.obj:
+ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.lo:
+ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
@@ -250,132 +278,180 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
-maintainer-clean-libtool:
+ETAGS = etags
+ETAGSFLAGS =
-libmath.la: $(libmath_la_OBJECTS) $(libmath_la_DEPENDENCIES)
- $(LINK) $(libmath_la_LDFLAGS) $(libmath_la_OBJECTS) $(libmath_la_LIBADD) $(LIBS)
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
-mostlyclean-tags:
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = libmath
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
+check-am: all-am
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
+all-am: Makefile $(LTLIBRARIES)
-install-data-am:
+installdirs:
+install: install-am
+install-exec: install-exec-am
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
-clean-am: clean-noinstLTLIBRARIES clean-compile clean-libtool \
- clean-tags clean-generic mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-noinstLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-am
+info: info-am
-maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
-.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+uninstall-am: uninstall-info-am
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am
# 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.
diff --git a/contrib/libstdc++/libmath/mathconf.h b/contrib/libstdc++/libmath/mathconf.h
index 087631a..cd8c92a 100644
--- a/contrib/libstdc++/libmath/mathconf.h
+++ b/contrib/libstdc++/libmath/mathconf.h
@@ -79,11 +79,6 @@ typedef int Int64_t __attribute ((mode (DI)));
# include <nan.h>
#endif
-#ifndef NAN
-# define NAN (nan())
-double nan (void);
-#endif
-
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
diff --git a/contrib/libstdc++/libmath/stubs.c b/contrib/libstdc++/libmath/stubs.c
index 1968bff..797b201 100644
--- a/contrib/libstdc++/libmath/stubs.c
+++ b/contrib/libstdc++/libmath/stubs.c
@@ -34,6 +34,57 @@
we use the crude approximation. We'll do better later. */
+#ifndef HAVE_ACOSF
+float
+acosf(float x)
+{
+ return (float) acos(x);
+}
+#endif
+
+#ifndef HAVE_ACOSL
+long double
+acosl(long double x)
+{
+ return acos((double) x);
+}
+#endif
+
+
+#ifndef HAVE_ASINF
+float
+asinf(float x)
+{
+ return (float) asin(x);
+}
+#endif
+
+#ifndef HAVE_ASINL
+long double
+asinl(long double x)
+{
+ return asin((double) x);
+}
+#endif
+
+
+#ifndef HAVE_ATANF
+float
+atanf(float x)
+{
+ return (float) atan(x);
+}
+#endif
+
+#ifndef HAVE_ATANL
+long double
+atanl(long double x)
+{
+ return atan ((double) x);
+}
+#endif
+
+
#ifndef HAVE_ATAN2F
float
atan2f(float x, float y)
@@ -51,6 +102,23 @@ atan2l(long double x, long double y)
#endif
+#ifndef HAVE_CEILF
+float
+ceilf(float x)
+{
+ return (float) ceil(x);
+}
+#endif
+
+#ifndef HAVE_CEILL
+long double
+ceill(long double x)
+{
+ return ceil((double) x);
+}
+#endif
+
+
#ifndef HAVE_COSF
float
cosf(float x)
@@ -102,6 +170,74 @@ expl(long double x)
#endif
+#ifndef HAVE_FLOORF
+float
+floorf(float x)
+{
+ return (float) floor(x);
+}
+#endif
+
+#ifndef HAVE_FLOORL
+long double
+floorl(long double x)
+{
+ return floor((double) x);
+}
+#endif
+
+
+#ifndef HAVE_FMODF
+float
+fmodf(float x, float y)
+{
+ return (float) fmod(x, y);
+}
+#endif
+
+#ifndef HAVE_FMODL
+long double
+fmodl(long double x, long double y)
+{
+ return fmod((double) x, (double) y);
+}
+#endif
+
+
+#ifndef HAVE_FREXPF
+float
+frexpf(float x, int *exp)
+{
+ return (float) frexp(x, exp);
+}
+#endif
+
+#ifndef HAVE_FREXPL
+long double
+frexpl(long double x, int *exp)
+{
+ return frexp((double) x, exp);
+}
+#endif
+
+
+#ifndef HAVE_SQRTF
+float
+sqrtf(float x)
+{
+ return (float) sqrt(x);
+}
+#endif
+
+#ifndef HAVE_SQRTL
+long double
+sqrtl(long double x)
+{
+ return sqrt((double) x);
+}
+#endif
+
+
/* Compute the hypothenuse of a right triangle with side x and y. */
#ifndef HAVE_HYPOTF
float
@@ -141,6 +277,23 @@ hypotl(long double x, long double y)
+#ifndef HAVE_LDEXPF
+float
+ldexpf(float x, int exp)
+{
+ return (float) ldexp(x, exp);
+}
+#endif
+
+#ifndef HAVE_LDEXPL
+long double
+ldexpl(long double x, int exp)
+{
+ return ldexp((double) x, exp);
+}
+#endif
+
+
#ifndef HAVE_LOGF
float
logf(float x)
@@ -175,6 +328,31 @@ log10l(long double x)
#endif
+#ifndef HAVE_MODFF
+float
+modff(float x, float *iptr)
+{
+ double result, temp;
+
+ result = modf(x, &temp);
+ *iptr = (float) temp;
+ return (float) result;
+}
+#endif
+
+#ifndef HAVE_MODFL
+long double
+modfl(long double x, long double *iptr)
+{
+ double result, temp;
+
+ result = modf((double) x, &temp);
+ *iptr = temp;
+ return result;
+}
+#endif
+
+
#ifndef HAVE_POWF
float
powf(float x, float y)
@@ -226,23 +404,6 @@ sinhl(long double x)
#endif
-#ifndef HAVE_SQRTF
-float
-sqrtf(float x)
-{
- return (float) sqrt(x);
-}
-#endif
-
-#ifndef HAVE_SQRTL
-long double
-sqrtl(long double x)
-{
- return sqrt((double) x);
-}
-#endif
-
-
#ifndef HAVE_TANF
float
tanf(float x)
diff --git a/contrib/libstdc++/libsupc++/Makefile.am b/contrib/libstdc++/libsupc++/Makefile.am
index 8d66e0e..5550686 100644
--- a/contrib/libstdc++/libsupc++/Makefile.am
+++ b/contrib/libstdc++/libsupc++/Makefile.am
@@ -1,73 +1,41 @@
## Makefile for the GNU C++ Support library.
##
-## Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
##
## Process this file with automake to produce Makefile.in.
##
-## This file is part of GNU CC.
+## This file is part of GCC.
##
-## GNU CC is free software; you can redistribute it and/or modify
+## GCC 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.
##
-## GNU CC is distributed in the hope that it will be useful,
+## GCC 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 GNU CC; see the file COPYING. If not, write to
+## along with GCC; see the file COPYING. If not, write to
## the Free Software Foundation, 59 Temple Place - Suite 330,
-## Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = 1.3 cygnus
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-# Cross compiler and multilib support.
-CC = @CC@
-CXX = @glibcpp_CXX@
-toolexecdir = @glibcpp_toolexecdir@
-toolexeclibdir = @glibcpp_toolexeclibdir@
+## Boston, MA 02111-1307, USA.
+include $(top_srcdir)/fragment.am
# Need this library to both be part of libstdc++.a, and installed
# separately too.
-# 1) separate libsupc++.la
+# 1) separate libsupc++.la
toolexeclib_LTLIBRARIES = libsupc++.la
# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
noinst_LTLIBRARIES = libsupc++convenience.la
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
-
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
-CONFIG_CXXFLAGS = \
- @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
-
-# Warning flags to use.
-WARN_CXXFLAGS = \
- @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
-
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
-
-INCLUDES = \
- $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
-
headers = \
- exception new typeinfo cxxabi.h exception_defines.h
+ exception new typeinfo cxxabi.h exception_defines.h
c_sources = \
- cxa_demangle.c \
- dyn-string.c
+ cp-demangle.c
sources = \
del_op.cc \
@@ -80,9 +48,11 @@ sources = \
eh_exception.cc \
eh_globals.cc \
eh_personality.cc \
+ eh_term_handler.cc \
eh_terminate.cc \
eh_throw.cc \
eh_type.cc \
+ eh_unex_handler.cc \
guard.cc \
new_handler.cc \
new_op.cc \
@@ -92,58 +62,52 @@ sources = \
pure.cc \
tinfo.cc \
tinfo2.cc \
- vec.cc
+ vec.cc \
+ vterminate.cc
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
-glibcppinstalldir = $(gxx_include_dir)
-glibcppinstall_HEADERS = $(headers)
+glibcxxinstalldir = $(gxx_include_dir)
+glibcxxinstall_HEADERS = $(headers)
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way. Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it.
+AM_CXXFLAGS = \
+ -fno-implicit-templates \
+ $(LIBSUPCXX_PICFLAGS) \
+ $(WARN_CXXFLAGS) \
+ $(OPTIMIZE_CXXFLAGS) \
+ $(CONFIG_CXXFLAGS)
+
+AM_MAKEFLAGS = \
+ "gxx_include_dir=$(gxx_include_dir)"
-LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
# Use special rules for pulling things out of libiberty. These
# objects should be compiled with the "C" compiler, not the C++
# compiler, and also should not use the C++ includes.
+C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
C_COMPILE = \
- $(CC) $(DEFS) $(GCC_INCLUDES) \
+ $(CC) $(DEFS) $(C_INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-cxa_demangle.c:
- rm -f $@
- $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
-cxa_demangle.lo: cxa_demangle.c
- $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-cxa_demangle.o: cxa_demangle.c
- $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-dyn-string.c:
- rm -f $@
- $(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
-dyn-string.lo: dyn-string.c
- $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-dyn-string.o: dyn-string.c
- $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-
# LTCOMPILE is copied from LTCXXCOMPILE below.
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
- $(DEFS) $(GCC_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
+ $(DEFS) $(C_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+cp-demangle.c:
+ rm -f $@
+ $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
+cp-demangle.lo: cp-demangle.c
+ $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+cp-demangle.o: cp-demangle.c
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-# AM_CXXFLAGS needs to be in each subdirectory so that it can be
-# modified in a per-library or per-sub-library way. Need to manually
-# set this option because CONFIG_CXXFLAGS has to be after
-# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. (ie, --enable-debug)
-AM_CXXFLAGS = \
- -fno-implicit-templates \
- $(LIBSUPCXX_CXXFLAGS) \
- $(WARN_CXXFLAGS) \
- $(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS)
-
-AM_MAKEFLAGS = \
- "gxx_include_dir=$(gxx_include_dir)"
# libstdc++ libtool notes
@@ -167,8 +131,8 @@ AM_MAKEFLAGS = \
# We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared.
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if
# the rules automake generates would be used. We cannot allow g++ to
@@ -177,24 +141,24 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=link $(CXX) \
- @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+ --mode=link $(CXX) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
# We have to have rules modified from the default to counteract SUN make
-# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
-install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+# prepending each of $(glibcxxinstall_HEADERS) with VPATH below.
+install-glibcxxinstallHEADERS: $(glibcxxinstall_HEADERS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
- @list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+ $(mkinstalldirs) $(DESTDIR)$(glibcxxinstalldir)
+ @list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q; \
done
-uninstall-glibcppinstallHEADERS:
+uninstall-glibcxxinstallHEADERS:
@$(NORMAL_UNINSTALL)
- list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+ list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
- rm -f $(DESTDIR)$(glibcppinstalldir)/$$q; \
+ rm -f $(DESTDIR)$(glibcxxinstalldir)/$$q; \
done
diff --git a/contrib/libstdc++/libsupc++/Makefile.in b/contrib/libstdc++/libsupc++/Makefile.in
index 843c7f4..4e2776a 100644
--- a/contrib/libstdc++/libsupc++/Makefile.in
+++ b/contrib/libstdc++/libsupc++/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,70 +12,52 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
-ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
-CCODECVT_C = @CCODECVT_C@
+CC = @CC@
CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
@@ -82,35 +66,73 @@ CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
+CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@
+GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@
+GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@
+GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBMATHOBJS = @LIBMATHOBJS@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_MAP = @SYMVER_MAP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
@@ -118,76 +140,98 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
-baseline_file = @baseline_file@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
+datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
-glibcpp_CXX = @glibcpp_CXX@
-glibcpp_MOFILES = @glibcpp_MOFILES@
-glibcpp_POFILES = @glibcpp_POFILES@
-glibcpp_basedir = @glibcpp_basedir@
-glibcpp_builddir = @glibcpp_builddir@
-glibcpp_localedir = @glibcpp_localedir@
-glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_srcdir = @glibcpp_srcdir@
-glibcpp_thread_h = @glibcpp_thread_h@
-glibcpp_toolexecdir = @glibcpp_toolexecdir@
-glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
-ifGNUmake = @ifGNUmake@
-libio_la = @libio_la@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+mandir = @mandir@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
-AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
-# Cross compiler and multilib support.
-CC = @CC@
-CXX = @glibcpp_CXX@
-toolexecdir = @glibcpp_toolexecdir@
-toolexeclibdir = @glibcpp_toolexeclibdir@
-
-# Need this library to both be part of libstdc++.a, and installed
-# separately too.
-# 1) separate libsupc++.la
-toolexeclib_LTLIBRARIES = libsupc++.la
-# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
-noinst_LTLIBRARIES = libsupc++convenience.la
-
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
CONFIG_CXXFLAGS = \
- @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
-
-# Warning flags to use.
WARN_CXXFLAGS = \
- @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
-
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
-INCLUDES = \
- $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+# Need this library to both be part of libstdc++.a, and installed
+# separately too.
+# 1) separate libsupc++.la
+toolexeclib_LTLIBRARIES = libsupc++.la
+# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
+noinst_LTLIBRARIES = libsupc++convenience.la
headers = \
- exception new typeinfo cxxabi.h exception_defines.h
+ exception new typeinfo cxxabi.h exception_defines.h
c_sources = \
- cxa_demangle.c \
- dyn-string.c
+ cp-demangle.c
sources = \
@@ -201,9 +245,11 @@ sources = \
eh_exception.cc \
eh_globals.cc \
eh_personality.cc \
+ eh_term_handler.cc \
eh_terminate.cc \
eh_throw.cc \
eh_type.cc \
+ eh_unex_handler.cc \
guard.cc \
new_handler.cc \
new_op.cc \
@@ -213,48 +259,48 @@ sources = \
pure.cc \
tinfo.cc \
tinfo2.cc \
- vec.cc
+ vec.cc \
+ vterminate.cc
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
-glibcppinstalldir = $(gxx_include_dir)
-glibcppinstall_HEADERS = $(headers)
-
-LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
-
-# Use special rules for pulling things out of libiberty. These
-# objects should be compiled with the "C" compiler, not the C++
-# compiler, and also should not use the C++ includes.
-C_COMPILE = \
- $(CC) $(DEFS) $(GCC_INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-
-# LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
- $(DEFS) $(GCC_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
+glibcxxinstalldir = $(gxx_include_dir)
+glibcxxinstall_HEADERS = $(headers)
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. (ie, --enable-debug)
+# as the occasion call for it.
AM_CXXFLAGS = \
-fno-implicit-templates \
- $(LIBSUPCXX_CXXFLAGS) \
+ $(LIBSUPCXX_PICFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS)
+ $(CONFIG_CXXFLAGS)
AM_MAKEFLAGS = \
"gxx_include_dir=$(gxx_include_dir)"
+# Use special rules for pulling things out of libiberty. These
+# objects should be compiled with the "C" compiler, not the C++
+# compiler, and also should not use the C++ includes.
+C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
+C_COMPILE = \
+ $(CC) $(DEFS) $(C_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
+ $(DEFS) $(C_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+
# libstdc++ libtool notes
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
@@ -277,8 +323,8 @@ AM_MAKEFLAGS = \
# We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared.
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if
@@ -288,129 +334,124 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=link $(CXX) \
- @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
-
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
-
+ --mode=link $(CXX) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libsupc__convenience_la_LDFLAGS =
-libsupc__convenience_la_LIBADD =
-libsupc__convenience_la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo \
-del_opvnt.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
-eh_globals.lo eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo \
-guard.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo \
-pure.lo tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
-libsupc___la_LDFLAGS =
-libsupc___la_LIBADD =
-libsupc___la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
-eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo eh_globals.lo \
-eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo guard.lo \
-new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
-tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
-CXXFLAGS = @CXXFLAGS@
-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+subdir = libsupc++
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
+
+libsupc___la_LDFLAGS =
+libsupc___la_LIBADD =
+am__objects_1 = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
+ eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
+ eh_globals.lo eh_personality.lo eh_term_handler.lo \
+ eh_terminate.lo eh_throw.lo eh_type.lo eh_unex_handler.lo \
+ guard.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \
+ new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo vterminate.lo
+am__objects_2 = cp-demangle.lo
+am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2)
+libsupc___la_OBJECTS = $(am_libsupc___la_OBJECTS)
+libsupc__convenience_la_LDFLAGS =
+libsupc__convenience_la_LIBADD =
+am_libsupc__convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+libsupc__convenience_la_OBJECTS = $(am_libsupc__convenience_la_OBJECTS)
+
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS = $(glibcppinstall_HEADERS)
-
-DIST_COMMON = Makefile.am Makefile.in
-
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+DIST_SOURCES = $(libsupc___la_SOURCES) \
+ $(libsupc__convenience_la_SOURCES)
+HEADERS = $(glibcxxinstall_HEADERS)
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+DIST_COMMON = $(glibcxxinstall_HEADERS) $(srcdir)/Makefile.in \
+ $(top_srcdir)/fragment.am Makefile.am
+SOURCES = $(libsupc___la_SOURCES) $(libsupc__convenience_la_SOURCES)
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(libsupc__convenience_la_SOURCES) $(libsupc___la_SOURCES)
-OBJECTS = $(libsupc__convenience_la_OBJECTS) $(libsupc___la_OBJECTS)
+all: all-am
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .cc .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus libsupc++/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLTLIBRARIES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign libsupc++/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-mostlyclean-toolexeclibLTLIBRARIES:
-
-clean-toolexeclibLTLIBRARIES:
- -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
-
-distclean-toolexeclibLTLIBRARIES:
-
-maintainer-clean-toolexeclibLTLIBRARIES:
-
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" = "$$p" && dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(LIBTOOL) --mode=install $(toolexeclibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$f"; \
+ $(LIBTOOL) --mode=install $(toolexeclibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$f; \
else :; fi; \
done
uninstall-toolexeclibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+ p="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p"; \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
done
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+clean-toolexeclibLTLIBRARIES:
+ -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" = "$$p" && dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libsupc++.la: $(libsupc___la_OBJECTS) $(libsupc___la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(toolexeclibdir) $(libsupc___la_LDFLAGS) $(libsupc___la_OBJECTS) $(libsupc___la_LIBADD) $(LIBS)
+libsupc++convenience.la: $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_DEPENDENCIES)
+ $(CXXLINK) $(libsupc__convenience_la_LDFLAGS) $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_LIBADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
+ -rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
+.c.o:
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cc.o:
+ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cc.obj:
+ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
@@ -419,187 +460,215 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+glibcxxinstallHEADERS_INSTALL = $(INSTALL_HEADER)
-maintainer-clean-libtool:
+ETAGS = etags
+ETAGSFLAGS =
-libsupc++convenience.la: $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_DEPENDENCIES)
- $(CXXLINK) $(libsupc__convenience_la_LDFLAGS) $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_LIBADD) $(LIBS)
-
-libsupc++.la: $(libsupc___la_OBJECTS) $(libsupc___la_DEPENDENCIES)
- $(CXXLINK) -rpath $(toolexeclibdir) $(libsupc___la_LDFLAGS) $(libsupc___la_OBJECTS) $(libsupc___la_LIBADD) $(LIBS)
-.cc.o:
- $(CXXCOMPILE) -c $<
-.cc.obj:
- $(CXXCOMPILE) -c `cygpath -w $<`
-.cc.lo:
- $(LTCXXCOMPILE) -c $<
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
-mostlyclean-tags:
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = libsupc++
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ $(mkinstalldirs) $(distdir)/..
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
+check-am: all-am
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am: install-toolexeclibLTLIBRARIES
-install-exec: install-exec-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-install-data-am: install-glibcppinstallHEADERS
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) $(DESTDIR)$(glibcxxinstalldir)
+install: install-am
+install-exec: install-exec-am
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-toolexeclibLTLIBRARIES \
- uninstall-glibcppinstallHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) \
- $(DESTDIR)$(glibcppinstalldir)
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLTLIBRARIES \
- mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ clean-toolexeclibLTLIBRARIES mostlyclean-am
-clean-am: clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES \
- clean-compile clean-libtool clean-tags clean-generic \
- mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-noinstLTLIBRARIES \
- distclean-toolexeclibLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-am
+info: info-am
-maintainer-clean-am: maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-toolexeclibLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am: install-glibcxxinstallHEADERS
+
+install-exec-am: install-toolexeclibLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-glibcxxinstallHEADERS uninstall-info-am \
+ uninstall-toolexeclibLTLIBRARIES
-.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \
-clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \
-uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool uninstall-glibcppinstallHEADERS \
-install-glibcppinstallHEADERS tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-cxa_demangle.c:
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES \
+ clean-toolexeclibLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am \
+ install-glibcxxinstallHEADERS install-info install-info-am \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-glibcxxinstallHEADERS \
+ uninstall-info-am uninstall-toolexeclibLTLIBRARIES
+
+
+cp-demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
-cxa_demangle.lo: cxa_demangle.c
- $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-cxa_demangle.o: cxa_demangle.c
- $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-dyn-string.c:
- rm -f $@
- $(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
-dyn-string.lo: dyn-string.c
+cp-demangle.lo: cp-demangle.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
-dyn-string.o: dyn-string.c
+cp-demangle.o: cp-demangle.c
$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
# We have to have rules modified from the default to counteract SUN make
-# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
-install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+# prepending each of $(glibcxxinstall_HEADERS) with VPATH below.
+install-glibcxxinstallHEADERS: $(glibcxxinstall_HEADERS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
- @list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+ $(mkinstalldirs) $(DESTDIR)$(glibcxxinstalldir)
+ @list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q; \
done
-uninstall-glibcppinstallHEADERS:
+uninstall-glibcxxinstallHEADERS:
@$(NORMAL_UNINSTALL)
- list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+ list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
- rm -f $(DESTDIR)$(glibcppinstalldir)/$$q; \
+ rm -f $(DESTDIR)$(glibcxxinstalldir)/$$q; \
done
-
# 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/contrib/libstdc++/libsupc++/cxxabi.h b/contrib/libstdc++/libsupc++/cxxabi.h
index 301fa7f..3553549 100644
--- a/contrib/libstdc++/libsupc++/cxxabi.h
+++ b/contrib/libstdc++/libsupc++/cxxabi.h
@@ -1,21 +1,21 @@
// new abi support -*- C++ -*-
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -39,523 +39,490 @@
is includable from both C and C++. Though the C++ specific parts are not
available in C, naturally enough. */
-#ifndef __CXXABI_H
-#define __CXXABI_H 1
+#ifndef _CXXABI_H
+#define _CXXABI_H 1
+#include <stddef.h>
+
#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ extern "C"
+ {
+#endif
+
+ // Allocate array.
+ void*
+ __cxa_vec_new(size_t __element_count, size_t __element_size,
+ size_t __padding_size, void (*__constructor) (void*),
+ void (*__destructor) (void*));
+
+ void*
+ __cxa_vec_new2(size_t __element_count, size_t __element_size,
+ size_t __padding_size, void (*__constructor) (void*),
+ void (*__destructor) (void*), void *(*__alloc) (size_t),
+ void (*__dealloc) (void*));
+
+ void*
+ __cxa_vec_new3(size_t __element_count, size_t __element_size,
+ size_t __padding_size, void (*__constructor) (void*),
+ void (*__destructor) (void*), void *(*__alloc) (size_t),
+ void (*__dealloc) (void*, size_t));
+
+ // Construct array.
+ void
+ __cxa_vec_ctor(void* __array_address, size_t __element_count,
+ size_t __element_size, void (*__constructor) (void*),
+ void (*__destructor) (void*));
+
+ void
+ __cxa_vec_cctor(void* dest_array, void* src_array, size_t element_count,
+ size_t element_size, void (*constructor) (void*, void*),
+ void (*destructor) (void*));
+
+ // Destruct array.
+ void
+ __cxa_vec_dtor(void* __array_address, size_t __element_count,
+ size_t __element_size, void (*__destructor) (void*));
+
+ void
+ __cxa_vec_cleanup(void* __array_address, size_t __element_count,
+ size_t __element_size, void (*__destructor) (void*));
+
+ // Destruct and release array.
+ void
+ __cxa_vec_delete(void* __array_address, size_t __element_size,
+ size_t __padding_size, void (*__destructor) (void*));
+
+ void
+ __cxa_vec_delete2(void* __array_address, size_t __element_size,
+ size_t __padding_size, void (*__destructor) (void*),
+ void (*__dealloc) (void*));
+
+ void
+ __cxa_vec_delete3(void* __array_address, size_t __element_size,
+ size_t __padding_size, void (*__destructor) (void*),
+ void (*__dealloc) (void*, size_t));
-// We use the compiler builtins __SIZE_TYPE__ and __PTRDIFF_TYPE__ instead of
-// std::size_t and std::ptrdiff_t respectively. This makes us independent of
-// the conformance level of <cstddef> and whether -fhonor-std was supplied.
-// <cstddef> is not currently available during compiler building anyway.
-// Including <stddef.h> would be wrong, as that would rudely place size_t in
-// the global namespace.
+ // The ABI requires a 64-bit type.
+ __extension__ typedef int __guard __attribute__((mode (__DI__)));
-#include <typeinfo>
+ int
+ __cxa_guard_acquire(__guard*);
-namespace __cxxabiv1
-{
+ void
+ __cxa_guard_release(__guard*);
-/* type information for int, float etc */
-class __fundamental_type_info
- : public std::type_info
-{
-public:
- virtual ~__fundamental_type_info ();
-public:
- explicit __fundamental_type_info (const char *__n)
- : std::type_info (__n)
- { }
-};
+ void
+ __cxa_guard_abort(__guard*);
-/* type information for array objects */
-class __array_type_info
- : public std::type_info
-{
-/* abi defined member functions */
-protected:
- virtual ~__array_type_info ();
-public:
- explicit __array_type_info (const char *__n)
- : std::type_info (__n)
- { }
-};
+ // Pure virtual functions.
+ void
+ __cxa_pure_virtual(void);
-/* type information for functions (both member and non-member) */
-class __function_type_info
- : public std::type_info
-{
-/* abi defined member functions */
-public:
- virtual ~__function_type_info ();
-public:
- explicit __function_type_info (const char *__n)
- : std::type_info (__n)
- { }
-
-/* implementation defined member functions */
-protected:
- virtual bool __is_function_p () const;
-};
-
-/* type information for enumerations */
-class __enum_type_info
- : public std::type_info
-{
-/* abi defined member functions */
-public:
- virtual ~__enum_type_info ();
-public:
- explicit __enum_type_info (const char *__n)
- : std::type_info (__n)
- { }
-};
+ // Exception handling.
+ void
+ __cxa_bad_cast();
-/* common type information for simple pointers and pointers to member */
-class __pbase_type_info
- : public std::type_info
-{
-/* abi defined member variables */
-public:
- unsigned int __flags; /* qualification of the target object */
- const std::type_info *__pointee; /* type of pointed to object */
-
-/* abi defined member functions */
-public:
- virtual ~__pbase_type_info ();
-public:
- explicit __pbase_type_info (const char *__n,
- int __quals,
- const std::type_info *__type)
- : std::type_info (__n), __flags (__quals), __pointee (__type)
- { }
+ void
+ __cxa_bad_typeid();
-/* implementation defined types */
-public:
- enum __masks {
- __const_mask = 0x1,
- __volatile_mask = 0x2,
- __restrict_mask = 0x4,
- __incomplete_mask = 0x8,
- __incomplete_class_mask = 0x10
- };
+ // DSO destruction.
+ int
+ __cxa_atexit(void (*)(void*), void*, void*);
-/* implementation defined member functions */
-protected:
- virtual bool __do_catch (const std::type_info *__thr_type,
- void **__thr_obj,
- unsigned __outer) const;
-protected:
- inline virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
- void **__thr_obj,
- unsigned __outer) const;
-};
-
-/* type information for simple pointers */
-class __pointer_type_info
- : public __pbase_type_info
-{
-/* abi defined member functions */
-public:
- virtual ~__pointer_type_info ();
-public:
- explicit __pointer_type_info (const char *__n,
- int __quals,
- const std::type_info *__type)
- : __pbase_type_info (__n, __quals, __type)
- { }
+ int
+ __cxa_finalize(void*);
-/* implementation defined member functions */
-protected:
- virtual bool __is_pointer_p () const;
+ // Demangling routines.
+ char*
+ __cxa_demangle(const char* __mangled_name, char* __output_buffer,
+ size_t* __length, int* __status);
+#ifdef __cplusplus
+ }
+} // namespace __cxxabiv1
+#endif
-protected:
- virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
- void **__thr_obj,
- unsigned __outer) const;
-};
+#ifdef __cplusplus
-class __class_type_info;
+#include <typeinfo>
-/* type information for a pointer to member variable */
-class __pointer_to_member_type_info
- : public __pbase_type_info
+namespace __cxxabiv1
{
-/* abi defined member variables */
-public:
- __class_type_info *__context; /* class of the member */
-
-/* abi defined member functions */
-public:
- virtual ~__pointer_to_member_type_info ();
-public:
- explicit __pointer_to_member_type_info (const char *__n,
- int __quals,
- const std::type_info *__type,
- __class_type_info *__klass)
- : __pbase_type_info (__n, __quals, __type), __context (__klass)
- { }
+ // Type information for int, float etc.
+ class __fundamental_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __fundamental_type_info(const char* __n) : std::type_info(__n) { }
-/* implementation defined member functions */
-protected:
- virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
- void **__thr_obj,
- unsigned __outer) const;
-};
+ virtual
+ ~__fundamental_type_info();
+ };
-/* helper class for __vmi_class_type */
-class __base_class_type_info
-{
-/* abi defined member variables */
-public:
- const __class_type_info* __base_type; /* base class type */
- long __offset_flags; /* offset and info */
-
-/* implementation defined types */
-public:
- enum __offset_flags_masks {
- __virtual_mask = 0x1,
- __public_mask = 0x2,
- __hwm_bit = 2,
- __offset_shift = 8 /* bits to shift offset by */
+ // Type information for array objects.
+ class __array_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __array_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__array_type_info();
};
-
-/* implementation defined member functions */
-public:
- bool __is_virtual_p () const
- { return __offset_flags & __virtual_mask; }
- bool __is_public_p () const
- { return __offset_flags & __public_mask; }
- __PTRDIFF_TYPE__ __offset () const
- {
- // This shift, being of a signed type, is implementation defined. GCC
- // implements such shifts as arithmetic, which is what we want.
- return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> __offset_shift;
- }
-};
-/* type information for a class */
-class __class_type_info
- : public std::type_info
-{
-/* abi defined member functions */
-public:
- virtual ~__class_type_info ();
-public:
- explicit __class_type_info (const char *__n)
- : type_info (__n)
- { }
+ // Type information for functions (both member and non-member).
+ class __function_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __function_type_info(const char* __n) : std::type_info(__n) { }
-/* implementation defined types */
-public:
- /* sub_kind tells us about how a base object is contained within a derived
- object. We often do this lazily, hence the UNKNOWN value. At other times
- we may use NOT_CONTAINED to mean not publicly contained. */
- enum __sub_kind
+ virtual
+ ~__function_type_info();
+
+ protected:
+ // Implementation defined member function.
+ virtual bool
+ __is_function_p() const;
+ };
+
+ // Type information for enumerations.
+ class __enum_type_info : public std::type_info
{
- __unknown = 0, /* we have no idea */
- __not_contained, /* not contained within us (in some */
- /* circumstances this might mean not contained */
- /* publicly) */
- __contained_ambig, /* contained ambiguously */
-
- __contained_virtual_mask = __base_class_type_info::__virtual_mask, /* via a virtual path */
- __contained_public_mask = __base_class_type_info::__public_mask, /* via a public path */
- __contained_mask = 1 << __base_class_type_info::__hwm_bit, /* contained within us */
-
- __contained_private = __contained_mask,
- __contained_public = __contained_mask | __contained_public_mask
+ public:
+ explicit
+ __enum_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__enum_type_info();
};
-public:
- struct __upcast_result;
- struct __dyncast_result;
-
-/* implementation defined member functions */
-protected:
- virtual bool __do_upcast (const __class_type_info *__dst_type, void **__obj_ptr) const;
-
-protected:
- virtual bool __do_catch (const type_info *__thr_type, void **__thr_obj,
- unsigned __outer) const;
-
-
-public:
- /* Helper for upcast. See if DST is us, or one of our bases. */
- /* Return false if not found, true if found. */
- virtual bool __do_upcast (const __class_type_info *__dst,
- const void *__obj,
- __upcast_result &__restrict __result) const;
-
-public:
- /* Indicate whether SRC_PTR of type SRC_TYPE is contained publicly within
- OBJ_PTR. OBJ_PTR points to a base object of our type, which is the
- destination type. SRC2DST indicates how SRC objects might be contained
- within this type. If SRC_PTR is one of our SRC_TYPE bases, indicate the
- virtuality. Returns not_contained for non containment or private
- containment. */
- inline __sub_kind __find_public_src (__PTRDIFF_TYPE__ __src2dst,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr) const;
-
-public:
- /* dynamic cast helper. ACCESS_PATH gives the access from the most derived
- object to this base. DST_TYPE indicates the desired type we want. OBJ_PTR
- points to a base of our type within the complete object. SRC_TYPE
- indicates the static type started from and SRC_PTR points to that base
- within the most derived object. Fill in RESULT with what we find. Return
- true if we have located an ambiguous match. */
- virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
- __sub_kind __access_path,
- const __class_type_info *__dst_type,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr,
- __dyncast_result &__result) const;
-public:
- /* Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE bases are
- inherited by the type started from -- which is not necessarily the
- current type. The current type will be a base of the destination type.
- OBJ_PTR points to the current base. */
- virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr) const;
-};
-
-/* type information for a class with a single non-virtual base */
-class __si_class_type_info
- : public __class_type_info
-{
-/* abi defined member variables */
-public:
- const __class_type_info *__base_type;
-
-/* abi defined member functions */
-public:
- virtual ~__si_class_type_info ();
-public:
- explicit __si_class_type_info (const char *__n,
- const __class_type_info *__base)
- : __class_type_info (__n), __base_type (__base)
+ // Common type information for simple pointers and pointers to member.
+ class __pbase_type_info : public std::type_info
+ {
+ public:
+ unsigned int __flags; // Qualification of the target object.
+ const std::type_info* __pointee; // Type of pointed to object.
+
+ explicit
+ __pbase_type_info(const char* __n, int __quals,
+ const std::type_info* __type)
+ : std::type_info(__n), __flags(__quals), __pointee(__type)
{ }
+
+ virtual
+ ~__pbase_type_info();
+
+ // Implementation defined type.
+ enum __masks
+ {
+ __const_mask = 0x1,
+ __volatile_mask = 0x2,
+ __restrict_mask = 0x4,
+ __incomplete_mask = 0x8,
+ __incomplete_class_mask = 0x10
+ };
+
+ protected:
+ __pbase_type_info(const __pbase_type_info&);
+
+ __pbase_type_info&
+ operator=(const __pbase_type_info&);
+
+ // Implementation defined member functions.
+ virtual bool
+ __do_catch(const std::type_info* __thr_type, void** __thr_obj,
+ unsigned int __outer) const;
+
+ inline virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+ };
-/* implementation defined member functions */
-protected:
- virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
- __sub_kind __access_path,
- const __class_type_info *__dst_type,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr,
- __dyncast_result &__result) const;
- virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__sub_ptr) const;
- virtual bool __do_upcast (const __class_type_info *__dst,
- const void *__obj,
- __upcast_result &__restrict __result) const;
-};
-
-/* type information for a class with multiple and/or virtual bases */
-class __vmi_class_type_info : public __class_type_info {
-/* abi defined member variables */
-public:
- unsigned int __flags; /* details about the class hierarchy */
- unsigned int __base_count; /* number of direct bases */
- __base_class_type_info __base_info[1]; /* array of bases */
- /* The array of bases uses the trailing array struct hack
- so this class is not constructable with a normal constructor. It is
- internally generated by the compiler. */
-
-/* abi defined member functions */
-public:
- virtual ~__vmi_class_type_info ();
-public:
- explicit __vmi_class_type_info (const char *__n,
- int ___flags)
- : __class_type_info (__n), __flags (___flags), __base_count (0)
- { }
+ // Type information for simple pointers.
+ class __pointer_type_info : public __pbase_type_info
+ {
+ public:
+ explicit
+ __pointer_type_info(const char* __n, int __quals,
+ const std::type_info* __type)
+ : __pbase_type_info (__n, __quals, __type) { }
-/* implementation defined types */
-public:
- enum __flags_masks {
- __non_diamond_repeat_mask = 0x1, /* distinct instance of repeated base */
- __diamond_shaped_mask = 0x2, /* diamond shaped multiple inheritance */
- non_public_base_mask = 0x4, /* has non-public direct or indirect base */
- public_base_mask = 0x8, /* has public base (direct) */
-
- __flags_unknown_mask = 0x10
+
+ virtual
+ ~__pointer_type_info();
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __is_pointer_p() const;
+
+ virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
};
-/* implementation defined member functions */
-protected:
- virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
- __sub_kind __access_path,
- const __class_type_info *__dst_type,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr,
- __dyncast_result &__result) const;
- virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
- const void *__obj_ptr,
- const __class_type_info *__src_type,
- const void *__src_ptr) const;
- virtual bool __do_upcast (const __class_type_info *__dst,
- const void *__obj,
- __upcast_result &__restrict __result) const;
-};
-
-/* dynamic cast runtime */
-extern "C"
-void *__dynamic_cast (const void *__src_ptr, /* object started from */
- const __class_type_info *__src_type, /* static type of object */
- const __class_type_info *__dst_type, /* desired target type */
- __PTRDIFF_TYPE__ __src2dst); /* how src and dst are related */
-
- /* src2dst has the following possible values
- >= 0: src_type is a unique public non-virtual base of dst_type
- dst_ptr + src2dst == src_ptr
- -1: unspecified relationship
- -2: src_type is not a public base of dst_type
- -3: src_type is a multiple public non-virtual base of dst_type */
-
-/* array ctor/dtor routines */
-
-/* allocate and construct array */
-extern "C"
-void *__cxa_vec_new (__SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__constructor) (void *),
- void (*__destructor) (void *));
-
-extern "C"
-void *__cxa_vec_new2 (__SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__constructor) (void *),
- void (*__destructor) (void *),
- void *(*__alloc) (__SIZE_TYPE__),
- void (*__dealloc) (void *));
-
-extern "C"
-void *__cxa_vec_new3 (__SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__constructor) (void *),
- void (*__destructor) (void *),
- void *(*__alloc) (__SIZE_TYPE__),
- void (*__dealloc) (void *, __SIZE_TYPE__));
-
-/* construct array */
-extern "C"
-void __cxa_vec_ctor (void *__array_address,
- __SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- void (*__constructor) (void *),
- void (*__destructor) (void *));
-
-extern "C"
-void __cxa_vec_cctor (void *dest_array,
- void *src_array,
- __SIZE_TYPE__ element_count,
- __SIZE_TYPE__ element_size,
- void (*constructor) (void *, void *),
- void (*destructor) (void *));
-
-/* destruct array */
-extern "C"
-void __cxa_vec_dtor (void *__array_address,
- __SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- void (*__destructor) (void *));
-
-/* destruct array */
-extern "C"
-void __cxa_vec_cleanup (void *__array_address,
- __SIZE_TYPE__ __element_count,
- __SIZE_TYPE__ __element_size,
- void (*__destructor) (void *));
-
-/* destruct and release array */
-extern "C"
-void __cxa_vec_delete (void *__array_address,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__destructor) (void *));
-
-extern "C"
-void __cxa_vec_delete2 (void *__array_address,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__destructor) (void *),
- void (*__dealloc) (void *));
-
-extern "C"
-void __cxa_vec_delete3 (void *__array_address,
- __SIZE_TYPE__ __element_size,
- __SIZE_TYPE__ __padding_size,
- void (*__destructor) (void *),
- void (*__dealloc) (void *, __SIZE_TYPE__));
+ class __class_type_info;
+
+ // Type information for a pointer to member variable.
+ class __pointer_to_member_type_info : public __pbase_type_info
+ {
+ public:
+ __class_type_info* __context; // Class of the member.
+
+ explicit
+ __pointer_to_member_type_info(const char* __n, int __quals,
+ const std::type_info* __type,
+ __class_type_info* __klass)
+ : __pbase_type_info(__n, __quals, __type), __context(__klass) { }
-/* guard variables */
+ virtual
+ ~__pointer_to_member_type_info();
-/* The ABI requires a 64-bit type. */
-__extension__ typedef int __guard __attribute__((mode (__DI__)));
+ protected:
+ __pointer_to_member_type_info(const __pointer_to_member_type_info&);
-extern "C"
-int __cxa_guard_acquire (__guard *);
+ __pointer_to_member_type_info&
+ operator=(const __pointer_to_member_type_info&);
-extern "C"
-void __cxa_guard_release (__guard *);
+ // Implementation defined member function.
+ virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+ };
-extern "C"
-void __cxa_guard_abort (__guard *);
+ // Helper class for __vmi_class_type.
+ class __base_class_type_info
+ {
+ public:
+ const __class_type_info* __base_type; // Base class type.
+ long __offset_flags; // Offset and info.
+
+ enum __offset_flags_masks
+ {
+ __virtual_mask = 0x1,
+ __public_mask = 0x2,
+ __hwm_bit = 2,
+ __offset_shift = 8 // Bits to shift offset.
+ };
+
+ // Implementation defined member functions.
+ bool
+ __is_virtual_p() const
+ { return __offset_flags & __virtual_mask; }
-/* pure virtual functions */
+ bool
+ __is_public_p() const
+ { return __offset_flags & __public_mask; }
-extern "C" void
-__cxa_pure_virtual (void);
+ ptrdiff_t
+ __offset() const
+ {
+ // This shift, being of a signed type, is implementation
+ // defined. GCC implements such shifts as arithmetic, which is
+ // what we want.
+ return static_cast<ptrdiff_t>(__offset_flags) >> __offset_shift;
+ }
+ };
-/* exception handling */
+ // Type information for a class.
+ class __class_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __class_type_info (const char *__n) : type_info(__n) { }
+
+ virtual
+ ~__class_type_info ();
+
+ // Implementation defined types.
+ // The type sub_kind tells us about how a base object is contained
+ // within a derived object. We often do this lazily, hence the
+ // UNKNOWN value. At other times we may use NOT_CONTAINED to mean
+ // not publicly contained.
+ enum __sub_kind
+ {
+ // We have no idea.
+ __unknown = 0,
+
+ // Not contained within us (in some circumstances this might
+ // mean not contained publicly)
+ __not_contained,
+
+ // Contained ambiguously.
+ __contained_ambig,
+
+ // Via a virtual path.
+ __contained_virtual_mask = __base_class_type_info::__virtual_mask,
-extern "C" void
-__cxa_bad_cast ();
+ // Via a public path.
+ __contained_public_mask = __base_class_type_info::__public_mask,
-extern "C" void
-__cxa_bad_typeid ();
+ // Contained within us.
+ __contained_mask = 1 << __base_class_type_info::__hwm_bit,
+
+ __contained_private = __contained_mask,
+ __contained_public = __contained_mask | __contained_public_mask
+ };
+
+ struct __upcast_result;
+ struct __dyncast_result;
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const;
+
+ virtual bool
+ __do_catch(const type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+
+ public:
+ // Helper for upcast. See if DST is us, or one of our bases.
+ // Return false if not found, true if found.
+ virtual bool
+ __do_upcast(const __class_type_info* __dst, const void* __obj,
+ __upcast_result& __restrict __result) const;
+
+ // Indicate whether SRC_PTR of type SRC_TYPE is contained publicly
+ // within OBJ_PTR. OBJ_PTR points to a base object of our type,
+ // which is the destination type. SRC2DST indicates how SRC
+ // objects might be contained within this type. If SRC_PTR is one
+ // of our SRC_TYPE bases, indicate the virtuality. Returns
+ // not_contained for non containment or private containment.
+ inline __sub_kind
+ __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+
+ // Helper for dynamic cast. ACCESS_PATH gives the access from the
+ // most derived object to this base. DST_TYPE indicates the
+ // desired type we want. OBJ_PTR points to a base of our type
+ // within the complete object. SRC_TYPE indicates the static type
+ // started from and SRC_PTR points to that base within the most
+ // derived object. Fill in RESULT with what we find. Return true
+ // if we have located an ambiguous match.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
+
+ // Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE
+ // bases are inherited by the type started from -- which is not
+ // necessarily the current type. The current type will be a base
+ // of the destination type. OBJ_PTR points to the current base.
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+ };
-/* DSO destruction */
+ // Type information for a class with a single non-virtual base.
+ class __si_class_type_info : public __class_type_info
+ {
+ public:
+ const __class_type_info* __base_type;
-extern "C" int
-__cxa_atexit (void (*)(void *), void *, void *);
+ explicit
+ __si_class_type_info(const char *__n, const __class_type_info *__base)
+ : __class_type_info(__n), __base_type(__base) { }
-extern "C" int
-__cxa_finalize (void *);
+ virtual
+ ~__si_class_type_info();
-/* demangling routines */
+ protected:
+ __si_class_type_info(const __si_class_type_info&);
-extern "C"
-char *__cxa_demangle (const char *__mangled_name,
- char *__output_buffer,
- __SIZE_TYPE__ *__length,
- int *__status);
+ __si_class_type_info&
+ operator=(const __si_class_type_info&);
-// Returns the type_info for the currently handled exception [15.3/8], or
-// null if there is none.
-extern "C"
-std::type_info *__cxa_current_exception_type ();
+ // Implementation defined member functions.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
-} /* namespace __cxxabiv1 */
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __sub_ptr) const;
-/* User programs should use the alias `abi'. */
-namespace abi = __cxxabiv1;
+ virtual bool
+ __do_upcast(const __class_type_info*__dst, const void*__obj,
+ __upcast_result& __restrict __result) const;
+ };
-#else
-#endif /* __cplusplus */
+ // Type information for a class with multiple and/or virtual bases.
+ class __vmi_class_type_info : public __class_type_info
+ {
+ public:
+ unsigned int __flags; // Details about the class hierarchy.
+ unsigned int __base_count; // Dumber of direct bases.
+
+ // The array of bases uses the trailing array struct hack so this
+ // class is not constructable with a normal constructor. It is
+ // internally generated by the compiler.
+ __base_class_type_info __base_info[1]; // Array of bases.
+
+ explicit
+ __vmi_class_type_info(const char* __n, int ___flags)
+ : __class_type_info(__n), __flags(___flags), __base_count(0) { }
+
+ virtual
+ ~__vmi_class_type_info();
+
+ // Implementation defined types.
+ enum __flags_masks
+ {
+ __non_diamond_repeat_mask = 0x1, // Distinct instance of repeated base.
+ __diamond_shaped_mask = 0x2, // Diamond shaped multiple inheritance.
+ __flags_unknown_mask = 0x10
+ };
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
+
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+
+ virtual bool
+ __do_upcast(const __class_type_info* __dst, const void* __obj,
+ __upcast_result& __restrict __result) const;
+ };
+
+ // Dynamic cast runtime.
+ // src2dst has the following possible values
+ // >-1: src_type is a unique public non-virtual base of dst_type
+ // dst_ptr + src2dst == src_ptr
+ // -1: unspecified relationship
+ // -2: src_type is not a public base of dst_type
+ // -3: src_type is a multiple public non-virtual base of dst_type
+ extern "C" void*
+ __dynamic_cast(const void* __src_ptr, // Starting object.
+ const __class_type_info* __src_type, // Static type of object.
+ const __class_type_info* __dst_type, // Desired target type.
+ ptrdiff_t __src2dst); // How src and dst are related.
+
+
+ // Returns the type_info for the currently handled exception [15.3/8], or
+ // null if there is none.
+ extern "C" std::type_info*
+ __cxa_current_exception_type();
+} // namespace __cxxabiv1
+
+// User programs should use the alias `abi'.
+namespace abi = __cxxabiv1;
+#endif // __cplusplus
-#endif /* __CXXABI_H */
+#endif // __CXXABI_H
diff --git a/contrib/libstdc++/libsupc++/del_op.cc b/contrib/libstdc++/libsupc++/del_op.cc
index f433024..e1859d0 100644
--- a/contrib/libstdc++/libsupc++/del_op.cc
+++ b/contrib/libstdc++/libsupc++/del_op.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
@@ -30,6 +30,7 @@
#include "new"
+// We can't rely on having stdlib.h if we're freestanding.
extern "C" void free (void *);
void
diff --git a/contrib/libstdc++/libsupc++/del_opnt.cc b/contrib/libstdc++/libsupc++/del_opnt.cc
index 032ea68..44a7a92 100644
--- a/contrib/libstdc++/libsupc++/del_opnt.cc
+++ b/contrib/libstdc++/libsupc++/del_opnt.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/del_opv.cc b/contrib/libstdc++/libsupc++/del_opv.cc
index 47d7842..95b1f79 100644
--- a/contrib/libstdc++/libsupc++/del_opv.cc
+++ b/contrib/libstdc++/libsupc++/del_opv.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/del_opvnt.cc b/contrib/libstdc++/libsupc++/del_opvnt.cc
index 3504d99a..01a64f8 100644
--- a/contrib/libstdc++/libsupc++/del_opvnt.cc
+++ b/contrib/libstdc++/libsupc++/del_opvnt.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/eh_alloc.cc b/contrib/libstdc++/libsupc++/eh_alloc.cc
index b328acb..ab285fd 100644
--- a/contrib/libstdc++/libsupc++/eh_alloc.cc
+++ b/contrib/libstdc++/libsupc++/eh_alloc.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- Allocate exception objects.
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -94,7 +94,7 @@ emergency_mutex_init ()
extern "C" void *
-__cxa_allocate_exception(std::size_t thrown_size)
+__cxa_allocate_exception(std::size_t thrown_size) throw()
{
void *ret;
@@ -141,7 +141,7 @@ __cxa_allocate_exception(std::size_t thrown_size)
extern "C" void
-__cxa_free_exception(void *vptr)
+__cxa_free_exception(void *vptr) throw()
{
char *ptr = (char *) vptr;
if (ptr >= &emergency_buffer[0][0]
diff --git a/contrib/libstdc++/libsupc++/eh_aux_runtime.cc b/contrib/libstdc++/libsupc++/eh_aux_runtime.cc
index 118aa91..95c0e25 100644
--- a/contrib/libstdc++/libsupc++/eh_aux_runtime.cc
+++ b/contrib/libstdc++/libsupc++/eh_aux_runtime.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -34,7 +34,6 @@
#include "unwind-cxx.h"
#include "exception_defines.h"
-
extern "C" void
__cxa_bad_cast ()
{
diff --git a/contrib/libstdc++/libsupc++/eh_catch.cc b/contrib/libstdc++/libsupc++/eh_catch.cc
index 4a678eb9..0d2196d 100644
--- a/contrib/libstdc++/libsupc++/eh_catch.cc
+++ b/contrib/libstdc++/libsupc++/eh_catch.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- Exception handling routines for catching.
-// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -35,7 +35,7 @@ using namespace __cxxabiv1;
extern "C" void *
-__cxa_begin_catch (void *exc_obj_in)
+__cxa_begin_catch (void *exc_obj_in) throw()
{
_Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
@@ -65,10 +65,12 @@ __cxa_begin_catch (void *exc_obj_in)
// This exception was rethrown from an immediately enclosing region.
count = -count + 1;
else
- count += 1;
+ {
+ count += 1;
+ globals->uncaughtExceptions -= 1;
+ }
header->handlerCount = count;
- globals->uncaughtExceptions -= 1;
if (header != prev)
{
header->nextException = prev;
diff --git a/contrib/libstdc++/libsupc++/eh_exception.cc b/contrib/libstdc++/libsupc++/eh_exception.cc
index a581be7..5efd1bc 100644
--- a/contrib/libstdc++/libsupc++/eh_exception.cc
+++ b/contrib/libstdc++/libsupc++/eh_exception.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
diff --git a/contrib/libstdc++/libsupc++/eh_globals.cc b/contrib/libstdc++/libsupc++/eh_globals.cc
index 3033619..4276022 100644
--- a/contrib/libstdc++/libsupc++/eh_globals.cc
+++ b/contrib/libstdc++/libsupc++/eh_globals.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- Manage the thread-local exception globals.
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -47,7 +47,6 @@ static int use_thread_key = -1;
static void
get_globals_dtor (void *ptr)
{
- __gthread_key_dtor (globals_key, ptr);
if (ptr)
std::free (ptr);
}
@@ -70,7 +69,7 @@ get_globals_init_once ()
#endif
extern "C" __cxa_eh_globals *
-__cxa_get_globals_fast ()
+__cxa_get_globals_fast () throw()
{
#if __GTHREADS
if (use_thread_key)
@@ -83,7 +82,7 @@ __cxa_get_globals_fast ()
}
extern "C" __cxa_eh_globals *
-__cxa_get_globals ()
+__cxa_get_globals () throw()
{
#if __GTHREADS
__cxa_eh_globals *g;
diff --git a/contrib/libstdc++/libsupc++/eh_personality.cc b/contrib/libstdc++/libsupc++/eh_personality.cc
index 2b315c3..4d5ae57 100644
--- a/contrib/libstdc++/libsupc++/eh_personality.cc
+++ b/contrib/libstdc++/libsupc++/eh_personality.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- The GNU C++ exception personality routine.
// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -170,7 +170,7 @@ empty_exception_spec (lsda_header_info *info, _Unwind_Sword filter_value)
// Using a different personality function name causes link failures
// when trying to mix code using different exception handling models.
-#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
#define PERSONALITY_FUNCTION __gxx_personality_sj0
#define __builtin_eh_return_data_regno(x) x
#else
@@ -232,7 +232,7 @@ PERSONALITY_FUNCTION (int version,
action_record = 0;
handler_switch_value = 0;
-#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
// The given "IP" is an index into the call-site table, with two
// exceptions -- -1 means no-action, and 0 means terminate. But
// since we're using uleb128 values, we've not got random access
@@ -285,7 +285,7 @@ PERSONALITY_FUNCTION (int version,
goto found_something;
}
}
-#endif // _GLIBCPP_SJLJ_EXCEPTIONS
+#endif // _GLIBCXX_SJLJ_EXCEPTIONS
// If ip is not present in the table, call terminate. This is for
// a destructor inside a cleanup, or a library routine the compiler
@@ -443,8 +443,10 @@ PERSONALITY_FUNCTION (int version,
}
}
+ /* For targets with pointers smaller than the word size, we must extend the
+ pointer, and this extension is target dependent. */
_Unwind_SetGR (context, __builtin_eh_return_data_regno (0),
- (_Unwind_Ptr) &xh->unwindHeader);
+ __builtin_extend_pointer (&xh->unwindHeader));
_Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
handler_switch_value);
_Unwind_SetIP (context, landing_pad);
diff --git a/contrib/libstdc++/libsupc++/eh_term_handler.cc b/contrib/libstdc++/libsupc++/eh_term_handler.cc
new file mode 100644
index 0000000..f4f1193
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_term_handler.cc
@@ -0,0 +1,51 @@
+// -*- C++ -*- std::terminate handler
+// Copyright (C) 2002, 2003 Free Software Foundation
+//
+// This file is part of GCC.
+//
+// GCC 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.
+//
+// GCC 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 GCC; 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 "unwind-cxx.h"
+#include <bits/c++config.h>
+
+/* We default to the talkative, informative handler in a normal hosted
+ library. This pulls in the demangler, the dyn-string utilities, and
+ elements of the I/O library. For a low-memory environment, you can return
+ to the earlier "silent death" handler by including <cstdlib>, initializing
+ to "std::abort", and rebuilding the library. In a freestanding mode, we
+ default to this latter approach. */
+
+#if ! _GLIBCXX_HOSTED
+# include <cstdlib>
+#endif
+
+/* The current installed user handler. */
+std::terminate_handler __cxxabiv1::__terminate_handler =
+#if _GLIBCXX_HOSTED
+ __gnu_cxx::__verbose_terminate_handler;
+#else
+ std::abort;
+#endif
+
diff --git a/contrib/libstdc++/libsupc++/eh_terminate.cc b/contrib/libstdc++/libsupc++/eh_terminate.cc
index 58a6ea4..bf9d74d 100644
--- a/contrib/libstdc++/libsupc++/eh_terminate.cc
+++ b/contrib/libstdc++/libsupc++/eh_terminate.cc
@@ -1,21 +1,21 @@
// -*- C++ -*- std::terminate, std::unexpected and friends.
-// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -36,10 +36,6 @@
using namespace __cxxabiv1;
-/* The current installed user handlers. */
-std::terminate_handler __cxxabiv1::__terminate_handler = std::abort;
-std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
-
void
__cxxabiv1::__terminate (std::terminate_handler handler)
{
diff --git a/contrib/libstdc++/libsupc++/eh_throw.cc b/contrib/libstdc++/libsupc++/eh_throw.cc
index 0e13066..55af4ee 100644
--- a/contrib/libstdc++/libsupc++/eh_throw.cc
+++ b/contrib/libstdc++/libsupc++/eh_throw.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- Exception handling routines for throwing.
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -69,7 +69,7 @@ __cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *))
__cxa_eh_globals *globals = __cxa_get_globals ();
globals->uncaughtExceptions += 1;
-#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
_Unwind_SjLj_RaiseException (&header->unwindHeader);
#else
_Unwind_RaiseException (&header->unwindHeader);
@@ -95,7 +95,7 @@ __cxa_rethrow ()
else
header->handlerCount = -header->handlerCount;
-#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
_Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader);
#else
#ifdef _LIBUNWIND_STD_ABI
diff --git a/contrib/libstdc++/libsupc++/eh_type.cc b/contrib/libstdc++/libsupc++/eh_type.cc
index 1c8afac..edd5e7b 100644
--- a/contrib/libstdc++/libsupc++/eh_type.cc
+++ b/contrib/libstdc++/libsupc++/eh_type.cc
@@ -1,20 +1,20 @@
// -*- C++ -*- Exception handling routines for catching.
// Copyright (C) 2001 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
diff --git a/contrib/libstdc++/libsupc++/eh_unex_handler.cc b/contrib/libstdc++/libsupc++/eh_unex_handler.cc
new file mode 100644
index 0000000..a8cabb8
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_unex_handler.cc
@@ -0,0 +1,34 @@
+// -*- C++ -*- std::unexpected handler
+// Copyright (C) 2002 Free Software Foundation
+//
+// This file is part of GCC.
+//
+// GCC 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.
+//
+// GCC 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 GCC; 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 "unwind-cxx.h"
+
+/* The current installed user handler. */
+std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
+
diff --git a/contrib/libstdc++/libsupc++/exception b/contrib/libstdc++/libsupc++/exception
index d76a947..6a1a194 100644
--- a/contrib/libstdc++/libsupc++/exception
+++ b/contrib/libstdc++/libsupc++/exception
@@ -3,20 +3,20 @@
// Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -78,7 +78,7 @@ namespace std
/// Takes a new handler function as an argument, returns the old function.
terminate_handler set_terminate(terminate_handler) throw();
/** The runtime will call this function if %exception handling must be
- * abandoned for any reason. */
+ * abandoned for any reason. It can also be called by the user. */
void terminate() __attribute__ ((__noreturn__));
/// Takes a new handler function as an argument, returns the old function.
@@ -109,6 +109,8 @@ namespace __gnu_cxx
@endcode
to use. For more info, see
http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#4
+
+ In 3.4 and later, this is on by default.
*/
void __verbose_terminate_handler ();
} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/libsupc++/exception_defines.h b/contrib/libstdc++/libsupc++/exception_defines.h
index fca2d83..1466486 100644
--- a/contrib/libstdc++/libsupc++/exception_defines.h
+++ b/contrib/libstdc++/libsupc++/exception_defines.h
@@ -1,6 +1,6 @@
// -fno-exceptions Support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,6 +31,9 @@
// ISO C++ 14882: 19.1 Exception classes
//
+#ifndef _EXCEPTION_DEFINES_H
+#define _EXCEPTION_DEFINES_H 1
+
#ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it.
# define try if (true)
@@ -40,3 +43,5 @@
// Else proceed normally.
# define __throw_exception_again throw
#endif
+
+#endif
diff --git a/contrib/libstdc++/libsupc++/new b/contrib/libstdc++/libsupc++/new
index af19ed8..00e9946 100644
--- a/contrib/libstdc++/libsupc++/new
+++ b/contrib/libstdc++/libsupc++/new
@@ -3,20 +3,20 @@
// Copyright (C) 1994, 1996, 1997, 1998, 2000, 2001, 2002
// Free Software Foundation
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -35,8 +35,8 @@
* http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more.
*/
-#ifndef __NEW__
-#define __NEW__
+#ifndef _NEW
+#define _NEW
#include <cstddef>
#include <exception>
@@ -93,8 +93,8 @@ inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
// Default placement versions of operator delete.
-inline void operator delete (void*, void*) throw() { };
-inline void operator delete[](void*, void*) throw() { };
+inline void operator delete (void*, void*) throw() { }
+inline void operator delete[](void*, void*) throw() { }
//@}
} // extern "C++"
diff --git a/contrib/libstdc++/libsupc++/new_handler.cc b/contrib/libstdc++/libsupc++/new_handler.cc
index 7c6aae0..2f9f6bd 100644
--- a/contrib/libstdc++/libsupc++/new_handler.cc
+++ b/contrib/libstdc++/libsupc++/new_handler.cc
@@ -3,20 +3,20 @@
// Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/new_op.cc b/contrib/libstdc++/libsupc++/new_op.cc
index 6e83b39..29eac93 100644
--- a/contrib/libstdc++/libsupc++/new_op.cc
+++ b/contrib/libstdc++/libsupc++/new_op.cc
@@ -1,20 +1,20 @@
// Support routines for the -*- C++ -*- dynamic memory management.
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/new_opnt.cc b/contrib/libstdc++/libsupc++/new_opnt.cc
index e97ac98..4d7a508 100644
--- a/contrib/libstdc++/libsupc++/new_opnt.cc
+++ b/contrib/libstdc++/libsupc++/new_opnt.cc
@@ -1,20 +1,20 @@
// Support routines for the -*- C++ -*- dynamic memory management.
// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/new_opv.cc b/contrib/libstdc++/libsupc++/new_opv.cc
index 7b1b1ca..74ad49c 100644
--- a/contrib/libstdc++/libsupc++/new_opv.cc
+++ b/contrib/libstdc++/libsupc++/new_opv.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/new_opvnt.cc b/contrib/libstdc++/libsupc++/new_opvnt.cc
index ad5fbf4..0a3f716 100644
--- a/contrib/libstdc++/libsupc++/new_opvnt.cc
+++ b/contrib/libstdc++/libsupc++/new_opvnt.cc
@@ -2,20 +2,20 @@
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
diff --git a/contrib/libstdc++/libsupc++/pure.cc b/contrib/libstdc++/libsupc++/pure.cc
index 1f35133..66ccb7d 100644
--- a/contrib/libstdc++/libsupc++/pure.cc
+++ b/contrib/libstdc++/libsupc++/pure.cc
@@ -1,20 +1,20 @@
// -*- C++ -*-
// Copyright (C) 2000, 2001 Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
@@ -30,7 +30,7 @@
#include <bits/c++config.h>
#include "unwind-cxx.h"
-#ifdef _GLIBCPP_HAVE_UNISTD_H
+#ifdef _GLIBCXX_HAVE_UNISTD_H
# include <unistd.h>
# define writestr(str) write(2, str, sizeof(str) - 1)
# ifdef __GNU_LIBRARY__
diff --git a/contrib/libstdc++/libsupc++/tinfo.cc b/contrib/libstdc++/libsupc++/tinfo.cc
index d6e465e..62fa448 100644
--- a/contrib/libstdc++/libsupc++/tinfo.cc
+++ b/contrib/libstdc++/libsupc++/tinfo.cc
@@ -1,21 +1,21 @@
// Methods for type_info for -*- C++ -*- Run Time Type Identification.
-// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -85,7 +85,7 @@ __do_upcast (const abi::__class_type_info *, void **) const
return false;
}
-};
+}
namespace {
@@ -100,7 +100,7 @@ struct vtable_prefix
ptrdiff_t whole_object;
// Additional padding if necessary.
-#ifdef _GLIBCPP_VTABLE_PADDING
+#ifdef _GLIBCXX_VTABLE_PADDING
ptrdiff_t padding1;
#endif
@@ -108,7 +108,7 @@ struct vtable_prefix
const __class_type_info *whole_type;
// Additional padding if necessary.
-#ifdef _GLIBCPP_VTABLE_PADDING
+#ifdef _GLIBCXX_VTABLE_PADDING
ptrdiff_t padding2;
#endif
@@ -172,7 +172,7 @@ inline bool contained_nonvirtual_p (__class_type_info::__sub_kind access_path)
static const __class_type_info *const nonvirtual_base_type =
static_cast <const __class_type_info *> (0) + 1;
-}; // namespace
+} // namespace
namespace __cxxabiv1
{
@@ -200,7 +200,6 @@ struct __class_type_info::__upcast_result
// if in vbase the __class_type_info of vbase
// if a non-virtual base then 1
// else NULL
- public:
__upcast_result (int d)
:dst_ptr (NULL), part2dst (__unknown), src_details (d), base_type (NULL)
{}
@@ -216,12 +215,17 @@ struct __class_type_info::__dyncast_result
__sub_kind dst2src; // path from target to sub object
int whole_details; // details of the whole class hierarchy
- public:
__dyncast_result (int details_ = __vmi_class_type_info::__flags_unknown_mask)
:dst_ptr (NULL), whole2dst (__unknown),
whole2src (__unknown), dst2src (__unknown),
whole_details (details_)
{}
+
+protected:
+ __dyncast_result(const __dyncast_result&);
+
+ __dyncast_result&
+ operator=(const __dyncast_result&);
};
bool __class_type_info::
@@ -736,4 +740,4 @@ __dynamic_cast (const void *src_ptr, // object started from
return NULL;
}
-}; // namespace __cxxabiv1
+} // namespace __cxxabiv1
diff --git a/contrib/libstdc++/libsupc++/tinfo.h b/contrib/libstdc++/libsupc++/tinfo.h
index b7191900..2c55e03 100644
--- a/contrib/libstdc++/libsupc++/tinfo.h
+++ b/contrib/libstdc++/libsupc++/tinfo.h
@@ -1,7 +1,33 @@
// RTTI support internals for -*- C++ -*-
-// Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001
+// Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2004
// Free Software Foundation
+// This file is part of GCC.
+//
+// GCC 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.
+
+// GCC 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 GCC; 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 "typeinfo"
#include <cstddef>
diff --git a/contrib/libstdc++/libsupc++/tinfo2.cc b/contrib/libstdc++/libsupc++/tinfo2.cc
index 600cdf6..d6a17c8 100644
--- a/contrib/libstdc++/libsupc++/tinfo2.cc
+++ b/contrib/libstdc++/libsupc++/tinfo2.cc
@@ -3,20 +3,20 @@
// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
diff --git a/contrib/libstdc++/libsupc++/typeinfo b/contrib/libstdc++/libsupc++/typeinfo
index 88a2639..1396baa 100644
--- a/contrib/libstdc++/libsupc++/typeinfo
+++ b/contrib/libstdc++/libsupc++/typeinfo
@@ -2,20 +2,20 @@
// Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
// Free Software Foundation
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -32,8 +32,8 @@
* This header provides RTTI support.
*/
-#ifndef __TYPEINFO__
-#define __TYPEINFO__
+#ifndef _TYPEINFO
+#define _TYPEINFO
#include <exception>
diff --git a/contrib/libstdc++/libsupc++/unwind-cxx.h b/contrib/libstdc++/libsupc++/unwind-cxx.h
index b0b0b366..1e17972 100644
--- a/contrib/libstdc++/libsupc++/unwind-cxx.h
+++ b/contrib/libstdc++/libsupc++/unwind-cxx.h
@@ -1,20 +1,20 @@
// -*- C++ -*- Exception handling and frame unwind runtime interface routines.
// Copyright (C) 2001 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
//
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -30,8 +30,8 @@
// This is derived from the C++ ABI for IA-64. Where we diverge
// for cross-architecture compatibility are noted with "@@@".
-#ifndef __UNWIND_CXX_H
-#define __UNWIND_CXX_H 1
+#ifndef _UNWIND_CXX_H
+#define _UNWIND_CXX_H 1
// Level 2: C++ ABI
@@ -168,4 +168,4 @@ __get_exception_header_from_ue (_Unwind_Exception *exc)
} /* namespace __cxxabiv1 */
-#endif // __UNWIND_CXX_H
+#endif // _UNWIND_CXX_H
diff --git a/contrib/libstdc++/libsupc++/vec.cc b/contrib/libstdc++/libsupc++/vec.cc
index 557fd03..86d41d9 100644
--- a/contrib/libstdc++/libsupc++/vec.cc
+++ b/contrib/libstdc++/libsupc++/vec.cc
@@ -1,21 +1,21 @@
// New abi Support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
//
-// This file is part of GNU CC.
+// This file is part of GCC.
//
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC 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.
-// GNU CC is distributed in the hope that it will be useful,
+// GCC 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 GNU CC; see the file COPYING. If not, write to
+// along with GCC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
@@ -42,13 +42,19 @@ namespace __cxxabiv1
{
struct uncatch_exception
{
- uncatch_exception ();
+ uncatch_exception();
~uncatch_exception () { __cxa_begin_catch (&p->unwindHeader); }
- __cxa_exception *p;
+ __cxa_exception* p;
+
+ private:
+ uncatch_exception&
+ operator=(const uncatch_exception&);
+
+ uncatch_exception(const uncatch_exception&);
};
- uncatch_exception::uncatch_exception ()
+ uncatch_exception::uncatch_exception() : p(0)
{
__cxa_eh_globals *globals = __cxa_get_globals_fast ();
@@ -83,7 +89,9 @@ namespace __cxxabiv1
{
std::size_t size = element_count * element_size + padding_size;
char *base = static_cast <char *> (alloc (size));
-
+ if (!base)
+ return base;
+
if (padding_size)
{
base += padding_size;
@@ -116,6 +124,8 @@ namespace __cxxabiv1
{
std::size_t size = element_count * element_size + padding_size;
char *base = static_cast<char *>(alloc (size));
+ if (!base)
+ return base;
if (padding_size)
{
@@ -278,7 +288,10 @@ namespace __cxxabiv1
void (*destructor) (void *),
void (*dealloc) (void *))
{
- char *base = static_cast<char *>(array_address);
+ if (!array_address)
+ return;
+
+ char* base = static_cast<char *>(array_address);
if (padding_size)
{
@@ -308,9 +321,12 @@ namespace __cxxabiv1
void (*destructor) (void *),
void (*dealloc) (void *, std::size_t))
{
- char *base = static_cast <char *> (array_address);
+ if (!array_address)
+ return;
+
+ char* base = static_cast <char *> (array_address);
std::size_t size = 0;
-
+
if (padding_size)
{
std::size_t element_count = reinterpret_cast<std::size_t *> (base)[-1];
diff --git a/contrib/libstdc++/libsupc++/vterminate.cc b/contrib/libstdc++/libsupc++/vterminate.cc
new file mode 100644
index 0000000..b53e9ce
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/vterminate.cc
@@ -0,0 +1,98 @@
+// Verbose terminate_handler -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <bits/c++config.h>
+#include <cstdlib>
+#include <exception>
+#include <exception_defines.h>
+#include <cxxabi.h>
+# include <cstdio>
+
+using namespace std;
+using namespace abi;
+
+namespace __gnu_cxx
+{
+ // A replacement for the standard terminate_handler which prints
+ // more information about the terminating exception (if any) on
+ // stderr.
+ void __verbose_terminate_handler()
+ {
+ static bool terminating;
+ if (terminating)
+ {
+ fputs("terminate called recursively\n", stderr);
+ abort ();
+ }
+ terminating = true;
+
+ // Make sure there was an exception; terminate is also called for an
+ // attempt to rethrow when there is no suitable exception.
+ type_info *t = __cxa_current_exception_type();
+ if (t)
+ {
+ // Note that "name" is the mangled name.
+ char const *name = t->name();
+ {
+ int status = -1;
+ char *dem = 0;
+
+ dem = __cxa_demangle(name, 0, 0, &status);
+
+ fputs("terminate called after throwing an instance of '", stderr);
+ if (status == 0)
+ fputs(dem, stderr);
+ else
+ fputs(name, stderr);
+ fputs("'\n", stderr);
+
+ if (status == 0)
+ free(dem);
+ }
+
+ // If the exception is derived from std::exception, we can
+ // give more information.
+ try { __throw_exception_again; }
+#ifdef __EXCEPTIONS
+ catch (exception &exc)
+ {
+ char const *w = exc.what();
+ fputs(" what(): ", stderr);
+ fputs(w, stderr);
+ fputs("\n", stderr);
+ }
+#endif
+ catch (...) { }
+ }
+ else
+ fputs("terminate called without an active exception\n", stderr);
+
+ abort();
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/linkage.m4 b/contrib/libstdc++/linkage.m4
new file mode 100644
index 0000000..6c8a6a7
--- /dev/null
+++ b/contrib/libstdc++/linkage.m4
@@ -0,0 +1,526 @@
+dnl
+dnl This file contains macros for testing linkage.
+dnl
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_1
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_1], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+ ],
+ [ $1(0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl 3) if not, see if 1) and 2) for argument prepended with '_'
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1], [
+ GLIBCXX_CHECK_MATH_DECL_1($1)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ else
+ GLIBCXX_CHECK_MATH_DECL_1(_$1)
+ if test x$glibcxx_cv_func__$1_use = x"yes"; then
+ AC_CHECK_FUNCS(_$1)
+ fi
+ fi
+])
+
+
+dnl
+dnl Like GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
+dnl of functions at once. It's an all-or-nothing check -- either
+dnl HAVE_XYZ is defined for each of the functions, or for none of them.
+dnl Doing it this way saves significant configure time.
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1], [
+ AC_MSG_CHECKING([for $1 functions])
+ AC_CACHE_VAL(glibcxx_cv_func_$2_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <math.h>],
+ [ `for x in $3; do echo "$x (0);"; done` ],
+ [glibcxx_cv_func_$2_use=yes],
+ [glibcxx_cv_func_$2_use=no])
+ AC_LANG_RESTORE])
+ AC_MSG_RESULT($glibcxx_cv_func_$2_use)
+ if test x$glibcxx_cv_func_$2_use = x"yes"; then
+ AC_CHECK_FUNCS($3)
+ fi
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_2
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_2], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <math.h>],
+ [ $1(0, 0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2], [
+ GLIBCXX_CHECK_MATH_DECL_2($1)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ else
+ GLIBCXX_CHECK_MATH_DECL_2(_$1)
+ if test x$glibcxx_cv_func__$1_use = x"yes"; then
+ AC_CHECK_FUNCS(_$1)
+ fi
+ fi
+])
+
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_3
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_3], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <math.h>],
+ [ $1(0, 0, 0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_3
+AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_3], [
+ GLIBCXX_CHECK_MATH_DECL_3($1)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ else
+ GLIBCXX_CHECK_MATH_DECL_3(_$1)
+ if test x$glibcxx_cv_func__$1_use = x"yes"; then
+ AC_CHECK_FUNCS(_$1)
+ fi
+ fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a stdlib function without parameters
+dnl
+dnl GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_0
+AC_DEFUN([GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_0], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ $1();],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2
+AC_DEFUN([GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ $1(0, 0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a function with THREE parameters
+dnl
+dnl GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3
+AC_DEFUN([GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ $1(0, 0, 0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ fi
+])
+
+dnl
+dnl Because the builtins are picky picky picky about the arguments they take,
+dnl do an explict linkage tests here.
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCXX_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
+AC_DEFUN([GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <math.h>],
+ [ $1(0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_MSG_CHECKING([for $1 linkage])
+ if test x${glibcxx_cv_func_$1_link+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_link, [
+ AC_TRY_LINK([#include <math.h>],
+ [ $1(0);],
+ [glibcxx_cv_func_$1_link=yes], [glibcxx_cv_func_$1_link=no])
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_link)
+ if test x$glibcxx_cv_func_$1_link = x"yes"; then
+ ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED(${ac_tr_func}, 1, [Defined if $1 exists.])
+ fi
+ fi
+])
+
+
+dnl
+dnl Check to see what builtin math functions are supported
+dnl
+dnl check for __builtin_abs
+dnl check for __builtin_fabsf
+dnl check for __builtin_fabs
+dnl check for __builtin_fabl
+dnl check for __builtin_labs
+dnl check for __builtin_sqrtf
+dnl check for __builtin_sqrtl
+dnl check for __builtin_sqrt
+dnl check for __builtin_sinf
+dnl check for __builtin_sin
+dnl check for __builtin_sinl
+dnl check for __builtin_cosf
+dnl check for __builtin_cos
+dnl check for __builtin_cosl
+dnl
+dnl GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+AC_DEFUN([GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT], [
+ dnl Test for builtin math functions.
+ dnl These are made in gcc/c-common.c
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
+
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
+
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
+
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
+ GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
+])
+
+dnl
+dnl Check to see what the underlying c library is like
+dnl These checks need to do two things:
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_STRTOLD if "strtold" is declared and links
+dnl Define HAVE_STRTOF if "strtof" is declared and links
+dnl
+dnl GLIBCXX_CHECK_STDLIB_SUPPORT
+AC_DEFUN([GLIBCXX_CHECK_STDLIB_SUPPORT], [
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+dnl
+dnl Check to see what the underlying c library or math library is like.
+dnl These checks need to do two things:
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is found.
+dnl
+dnl GLIBCXX_CHECK_MATH_SUPPORT
+AC_DEFUN([GLIBCXX_CHECK_MATH_SUPPORT], [
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ dnl Check libm
+ AC_CHECK_LIB(m, sin, libm="-lm")
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libm"
+
+ dnl Check to see if certain C math functions exist.
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(hypot)
+
+ dnl Check to see if basic C math functions have float versions.
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
+ float_trig,
+ acosf asinf atanf \
+ cosf sinf tanf \
+ coshf sinhf tanhf)
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
+ float_round,
+ ceilf floorf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(hypotf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
+
+ dnl Check to see if basic C math functions have long double versions.
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
+ long_double_trig,
+ acosl asinl atanl \
+ cosl sinl tanl \
+ coshl sinhl tanhl)
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
+ long_double_round,
+ ceill floorl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(hypotl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
+ GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
+
+ dnl Some runtimes have these functions with a preceding underscore. Please
+ dnl keep this sync'd with the one above. And if you add any new symbol,
+ dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
+ dnl Check to see if certain C math functions exist.
+
+ dnl Check to see if basic C math functions have float versions.
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
+ _float_trig,
+ _acosf _asinf _atanf \
+ _cosf _sinf _tanf \
+ _coshf _sinhf _tanhf)
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
+ _float_round,
+ _ceilf _floorf)
+
+ dnl Check to see if basic C math functions have long double versions.
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
+ _long_double_trig,
+ _acosl _asinl _atanl \
+ _cosl _sinl _tanl \
+ _coshl _sinhl _tanhl)
+ GLIBCXX_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
+ _long_double_round,
+ _ceill _floorl)
+
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+
+dnl
+dnl Check to see if there is native support for complex
+dnl
+dnl Don't compile bits in math/* if native support exits.
+dnl
+dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
+dnl
+dnl GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+AC_DEFUN([GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT], [
+ dnl Check for complex versions of math functions of platform. This will
+ dnl always pass if libm is available, and fail if it isn't. If it is
+ dnl available, we assume we'll need it later, so add it to LIBS.
+ AC_CHECK_LIB(m, main)
+ AC_REPLACE_MATHFUNCS(copysignf)
+
+ dnl For __signbit to signbit conversions.
+ dnl Not sure why this is done, as these will be macros mostly.
+ dnl Should probably coordinate this with std_cmath.h.
+ AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
+
+ AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"])
+
+ dnl Compile the long double complex functions only if the function
+ dnl provides the non-complex long double functions that are needed.
+ dnl Currently this includes copysignl, which should be
+ dnl cached from the GLIBCXX_CHECK_MATH_SUPPORT macro, above.
+ if test x$ac_cv_func_copysignl = x"yes"; then
+ AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+ AC_SUBST(LIBMATHOBJS)
+])
+
+
+# Check for functions in math library.
+# Ulrich Drepper <drepper@cygnus.com>, 1998.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# serial 1
+#
+dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
+AC_DEFUN([AC_REPLACE_MATHFUNCS],
+[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
diff --git a/contrib/libstdc++/scripts/check_performance b/contrib/libstdc++/scripts/check_performance
new file mode 100755
index 0000000..090dae8
--- /dev/null
+++ b/contrib/libstdc++/scripts/check_performance
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+
+# Script to do performance testing.
+
+# Invocation
+# check_performance SRC_DIR BUILD_DIR
+
+# 1: variables
+#
+SRC_DIR=$1
+BUILD_DIR=$2
+
+# Now that we've successfully translated the numerical option into
+# a symbolic one, we can safely ignore it.
+shift
+
+# This has been true all along. Found out about it the hard way...
+case $BASH_VERSION in
+ 1*)
+ echo 'You need bash 2.x to run check_performance. Exiting.';
+ exit 1 ;;
+ *) ;;
+esac
+
+flags_script=$BUILD_DIR/scripts/testsuite_flags
+INCLUDES="`$flags_script --build-includes` -include bits/stdc++.h"
+FLAGS=`$flags_script --cxxflags`
+THREAD_FLAG='-pthread'
+COMPILER=`$flags_script --build-cxx`
+SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
+ -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
+ST_FLAG="-static"
+LINK=$SH_FLAG
+CXX="$COMPILER $INCLUDES $FLAGS -DNOTHREAD $LINK"
+CXX_THREAD="$COMPILER $INCLUDES $FLAGS $THREAD_FLAG $LINK"
+
+
+TESTS_FILE="testsuite_files_performance"
+
+for NAME in `cat $TESTS_FILE`
+do
+ RUN=true
+ for CYCLE in `sed -n 's,.*\(TEST_[SB][0-9]*\)$,\1,p' $SRC_DIR/testsuite/$NAME`
+ do
+ RUN=false
+ echo $NAME $CYCLE
+ FILE_NAME="`basename $NAME`"
+ EXE_NAME="`echo $FILE_NAME-$CYCLE | sed 's/cc$/exe/'`"
+ $CXX -D$CYCLE $SRC_DIR/testsuite/$NAME -o $EXE_NAME
+ ./$EXE_NAME
+ echo ""
+ done
+ for CYCLE in `sed -n 's,.*\(TEST_[TB][0-9]*\)$,\1,p' $SRC_DIR/testsuite/$NAME`
+ do
+ RUN=false
+ echo $NAME $CYCLE THREAD
+ FILE_NAME="`basename $NAME`"
+ EXE_NAME="`echo $FILE_NAME-$CYCLE | sed 's/cc$/exe/'`"
+ $CXX_THREAD -D$CYCLE $SRC_DIR/testsuite/$NAME -o $EXE_NAME
+ ./$EXE_NAME
+ echo ""
+ done
+ if $RUN; then
+ echo $NAME
+ FILE_NAME="`basename $NAME`"
+ EXE_NAME="`echo $FILE_NAME | sed 's/cc$/exe/'`"
+ $CXX $SRC_DIR/testsuite/$NAME -o $EXE_NAME
+ ./$EXE_NAME
+ echo ""
+ fi
+done
+
+exit 0
diff --git a/contrib/libstdc++/scripts/check_survey.in b/contrib/libstdc++/scripts/check_survey.in
new file mode 100755
index 0000000..2173566
--- /dev/null
+++ b/contrib/libstdc++/scripts/check_survey.in
@@ -0,0 +1,449 @@
+#!/usr/bin/env bash
+
+# Script to do automated testing and data collection for various test
+# files, so that we don't have to do this by hand on every test file.
+# It attempts to collect some diagnostic info about size and speed that
+# should be useful in the future as the library gets tuned for size
+# and speed. In addition, it tests static and shared linkage, iff each
+# has been enabled.
+
+# Invocation
+# check_survey [01]
+
+# 1: variables
+#
+# WHICH determines if you are
+# (0) testing the build binary and headers, or
+# (1) testing the installed binary and headers, or
+WHICH=$1
+if [ "$WHICH"x = 0x ]; then
+ echo "running check_survey"
+ echo "$0: testing the build directory"
+elif [ "$WHICH"x = 1x ]; then
+ echo "running check_survey"
+ echo "$0: testing the install directory"
+else
+ echo 'Usage: check_survey 0 /* test the build directory */'
+ echo ' check_survey 1 /* test the install directory */'
+ exit 1;
+fi
+
+# Now that we've successfully translated the numerical option into
+# a symbolic one, we can safely ignore it.
+shift
+
+# This has been true all along. Found out about it the hard way...
+case $BASH_VERSION in
+ 1*) echo 'You need bash 2.x to run check_survey. Exiting.'; exit 1 ;;
+ *) ;; # ??
+esac
+
+BUILD_DIR=@glibcxx_builddir@
+SRC_DIR=@glibcxx_srcdir@
+PREFIX_DIR=@glibcxx_prefixdir@
+if [ "$WHICH"x = 0x ]; then
+ CXX=`$BUILD_DIR/scripts/testsuite_flags --build-cxx`
+ INCLUDES=`$BUILD_DIR/scripts/testsuite_flags --build-includes`
+else
+ CXX=`$BUILD_DIR/scripts/testsuite_flags --install-cxx`
+ INCLUDES=`$BUILD_DIR/scripts/testsuite_flags --install-includes`
+fi
+CXXFLAGS=`$BUILD_DIR/scripts/testsuite_flags --cxxflags`
+LIBTOOL="$BUILD_DIR/libtool"
+LTEXE="$LIBTOOL --mode=execute"
+LTCXX="$CXX $CXXFLAGS $INCLUDES"
+
+# specific libtool flag(s) to use shared libraries, if any
+SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
+
+# specific libtool flag(s) to use static libraries, if any
+ST_FLAG="-static"
+
+# Set up the testing directory, which should be in a directory called
+# "testsuite" in the root level of the build directory.
+TEST_DIR="$BUILD_DIR/testsuite"
+# help libtool keep quiet
+if [ ! -d ${TEST_DIR}/.libs ]; then
+ mkdir $TEST_DIR/.libs
+fi
+
+# the name of the file that will collect and hold all this useful data:
+RESULTS_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey.txt"
+
+# the name of the log file that will append compiler diagnostics:
+LOG_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey_log.txt"
+
+#
+# 2: clean, make files, append general test info
+#
+
+# Remove old executables.
+rm -rf "$TEST_DIR"/*exe
+rm -rf "$TEST_DIR"/compile.out
+
+# Remove old core files (which now get left in cwd, not $TEST_DIR).
+rm -rf ./*core*
+
+if [ -f $RESULTS_FILE ]; then
+ rm $RESULTS_FILE
+fi
+if [ -f $LOG_FILE ]; then
+ rm $LOG_FILE
+fi
+
+# the names of the specific test files to be run
+TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey_files.txt"
+
+# Make a list of the files we're going to run, or use an old one if it exists.
+if [ ! -f "$TESTS_FILE" ]; then
+ if [ -f "$TEST_DIR/testsuite_files" ]; then
+ cp $TEST_DIR/testsuite_files $TESTS_FILE
+ else
+ echo "making file $TESTS_FILE"
+ for LONG_NAME in $SRC_DIR/testsuite/*/*.cc
+ do
+ DIR_NAME=$(dirname $LONG_NAME)
+ SHORT_NAME="`basename $DIR_NAME`/`basename $LONG_NAME`"
+ echo "$SHORT_NAME" >> $TESTS_FILE
+ done
+ fi
+fi
+
+# Nasty solution to replace GNU date(1)'s %s time_t output function.
+TIMER_COMMAND=$TEST_DIR/printnow.exe
+if [ ! -x "$TIMER_COMMAND" ]; then
+ echo "making utility $TIMER_COMMAND"
+ gcc -o "$TIMER_COMMAND" "$SRC_DIR/testsuite/printnow.c"
+ strip "$TIMER_COMMAND"
+fi
+
+# Copy over the data files for filebufs
+cp $SRC_DIR/testsuite/27_io/*.txt $TEST_DIR
+cp $SRC_DIR/testsuite/27_io/*.tst $TEST_DIR
+chmod u+w $TEST_DIR/*.txt
+chmod u+w $TEST_DIR/*.tst
+
+# Emit useful info about compiler and platform
+echo "host: $(uname -mrsv)" >> $RESULTS_FILE
+echo "compiler: $($CXX -v 2>&1)" >> $RESULTS_FILE
+echo "compiler flags: $CXXFLAGS" >> $RESULTS_FILE
+echo "date: $(date +%Y%m%d)" >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+explanation='+: pass, -b: build failure, -r: run failure, x: disabled'
+printf "%s\n %s\n" 'p == pass/fail execution test' "$explanation" \
+ >> $RESULTS_FILE
+echo "ctime == time to compile and link" >> $RESULTS_FILE
+echo "etime == time for executable to run" >> $RESULTS_FILE
+echo "text == size of the executable text section" >> $RESULTS_FILE
+echo "data == size of the executable data section" >> $RESULTS_FILE
+echo "total == size of the executable" >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+echo "p" | awk '{printf("%s ", $1)}' >> $RESULTS_FILE
+echo "ctime" "etime" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "text" "data" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "total" "name" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+# Counters. These could be members of an array, but they'd all have to
+# become individuals anyhow if we ever change this script to super-portable sh.
+shared_pass=0
+shared_fail=0
+static_pass=0
+static_fail=0
+
+
+#
+# 2.5: support functions
+#
+
+# Figure out how to extract size information from binaries. We take
+# the text of the value we want as an argument, and leave the size in
+# the appropriate variable.
+#
+# We discover what kind of size(1) we are using *once* and build a shell
+# function named 'size_command' to wrap it. (The "function" keyword is
+# redundant here, but helps me read it, so there.) Previously we were
+# re-discovering the size(1) arguments three times for each test; sloooow.
+#
+# It is VERY IMPORTANT not to compare these numbers across platforms.
+# Different size(1)'s extract section information differently. For
+# example, using the native Sun size(1) and GNU size(1) built for Suns
+# on the exact same binary will give very different numbers, due to all
+# the variance in command-line options and arbitrary names of ELF sections.
+#
+# and suddenly we go to 2-space indentations...
+setup_size_command()
+{
+ if size --version 2> /dev/null | grep -c GNU > /dev/null;
+ then # Then we're using a GNU size(1) built for this platform.
+ # We lose .rodata and .data1 and who knows what else... kludge.
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=$(size -B $EXENAME | tail -1 | awk '{print $1}') ;;
+ DATA) DATA=$(size -B $EXENAME | tail -1 | awk '{print $2}') ;;
+ SIZE) SIZE=$(size -B $EXENAME | tail -1 | awk '{print $4}') ;;
+ esac
+ }
+ else
+ # Not using GNU size; check for platform. These numbers seem to match
+ # up to text/data/total, although their meanings seem to be different.
+ # THIS TABLE IS SORTED. KEEP IT THAT WAY.
+ case @host_os@ in
+ *aix*)
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=$(size -X32_64 $EXENAME | awk '{print $2}') ;;
+ DATA) DATA=$(size -X32_64 $EXENAME | awk '{print $4}') ;;
+ SIZE) SIZE=$(size -X32_64 $EXENAME | awk '{print $12}') ;;
+ esac
+ }
+ ;;
+ *hpux*)
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=$(size $EXENAME | awk '{print $1}') ;;
+ DATA) DATA=$(size $EXENAME | awk '{print $3}') ;;
+ SIZE) SIZE=$(size $EXENAME | awk '{print $7}') ;;
+ esac
+ }
+ ;;
+ *irix*)
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=$(size -4 $EXENAME | awk '{print $1}') ;;
+ DATA) DATA=$(size -4 $EXENAME | awk '{print $3}') ;;
+ SIZE) SIZE=$(size -4 $EXENAME | awk '{print $7}') ;;
+ esac
+ }
+ ;;
+ *solaris*)
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=$(size $EXENAME | awk '{print $1}') ;;
+ DATA) DATA=$(size $EXENAME | awk '{print $3}') ;;
+ SIZE) SIZE=$(size $EXENAME | awk '{print $7}') ;;
+ esac
+ }
+ ;;
+ *)
+ echo ' * Warning! Skipping section sizes!' 1>&2
+ function size_command()
+ {
+ case $1 in
+ TEXT) TEXT=0 ;;
+ DATA) DATA=0 ;;
+ SIZE) SIZE=0 ;;
+ esac
+ }
+ ;;
+ esac
+ fi
+}
+
+# Test for file output
+test_for_output()
+{
+ # This checks for emitted output files, which is useful when
+ # testing file-related output. The rules for this working are as
+ # follows: the emitted file must have the ".txt" extension, and be
+ # based on the actual *.cc file's name. For example, 27/filbuf.cc
+ # currently outputs files named 27/filebuf-2.txt and 27/filebuf-3.txt.
+ # Also, the first emitted file must be in the form $NAME-1.txt.
+ # The control file must follow the same constraints, but have a
+ # ".tst" extension. Thus, you have 27/filebuf-2.tst, etc.
+
+ # NAME contains the source name, like 27/filebuf.cc
+ # From that NAME, we want to generate some possible names, using
+ # ls on MATCH, a pattern description generated with sed.
+
+ # this is the name of the resulting diff file, if any
+ DIFF_FILE="`echo $TEST_NAME | sed 's/cc$/diff/'`"
+ # construct wildcard names, ie for $NAME=filebuf.cc, makes "filebuf*.tst"
+ DATA_FILES="`echo $TEST_NAME | sed 's/\.cc/\*\.tst/g'`"
+ # make sure there is at least one, then go
+ ST_E="`echo $TEST_NAME | sed 's/\.cc/\-1\.tst/g'`"
+ if [ -f $ST_E ]; then
+ # list of actual files that match the wildcard above, ie
+ # "filebuf-1.tst"
+ ST_MATCH_LIST="`ls $DATA_FILES`"
+ for i in $ST_MATCH_LIST; do
+ # ST_OUT_FILE is generated in the build directory.
+ PRE_NAME2="$TEST_DIR/`basename $i`"
+ ST_OUT_FILE="`echo $PRE_NAME2 | sed 's/tst$/txt/'`"
+ diff $ST_OUT_FILE $i > $DIFF_FILE
+ if [ -s $DIFF_FILE ]; then
+ RESULT="-r"
+ else
+ RESULT="+"
+ fi
+ rm $DIFF_FILE
+ done
+ else
+ # the file does no output, and didn't abnormally
+ # terminate, so assume passed.
+ RESULT="+"
+ fi
+}
+
+
+#
+# 3: compile, link, execute, time
+#
+# Abstract out the common code for compiling, linking, executing and printing.
+test_file()
+{
+ # NB: S_FLAG has to be last argument because it may be null, and
+ # error checking hasn't been invented yet.
+ NAME=$1
+ EXENAME=$2
+ S_FLAG=$3
+
+ SRC_NAME="$SRC_DIR/testsuite/$1"
+ TEST_NAME="$TEST_DIR/`basename $NAME`"
+
+ # This would be deliciously easy if GNU date's %s were always around.
+ # There are three ways to do this: 1) use the builtin 'time' like we
+ # do later; then getting compiler errors into LOG_FILE is a nightmare.
+ # 2) Grab the output of a formatted date(1) and do the math; harder
+ # and harder as we try compiling at, say, top of the hour; we would
+ # eventually have to calculate time_t anyhow. Or 3) just grab two
+ # time_t's (no more overhead than grabbing two date(1)'s).
+ our_libs="-L$TEST_DIR -lv3test"
+ compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME $our_libs"
+ echo $compiler_invocation >> compile.out 2>&1
+ COMP_TIME_START=$($TIMER_COMMAND)
+ $compiler_invocation >> compile.out 2>&1
+ COMP_TIME_END=$($TIMER_COMMAND)
+
+ if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then
+ C_TIME=$[ $COMP_TIME_END - $COMP_TIME_START ]
+ else
+ C_TIME="0"
+ fi
+
+ if [ -f $EXENAME ]; then
+# rm compile.out
+ size_command TEXT
+ size_command DATA
+ size_command SIZE
+
+ # Actually run the executable and time it. Note that output
+ # printed by the executable will be lost and cannot be redirected,
+ # because we need to capture the output of 'time'. Bummer.
+ TIMEFORMAT='timemark %R'
+ E_TIME_TEXT="$(exec 2>&1; time $LTEXE $EXENAME)"
+ E_ABNORMAL_TERMINATION=$?
+
+ if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
+ RESULT='-r'
+ E_TIME="0"
+ rm -f ./*core
+ # sometimes you want to save all core files for review:
+ #mv ./core $EXENAME.core
+ # sometimes the OS allows you to name core files yourself:
+ #mv ./*core $EXENAME.core
+ #mv ./core* $EXENAME.core
+ else
+ test_for_output
+ # XXX This doesn't always result in a number.
+ # E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
+ E_TIME="0"
+ fi
+
+ # sometimes you want to save all failing exe files for review:
+ if [ "$RESULT" = '+' ]; then
+ rm "$EXENAME"
+ fi
+ else
+ # the file did not compile/link.
+ printf "\n" >> $LOG_FILE
+ `cat compile.out >> $LOG_FILE`
+ rm compile.out
+ RESULT="-b"
+ TEXT="0"
+ DATA="0"
+ SIZE="0"
+ fi
+
+ # update the counters
+ if test "$RESULT" = "+" ; then
+ if test x"$S_FLAG" = x"$ST_FLAG"; then
+ static_pass=`expr $static_pass + 1`
+ else
+ shared_pass=`expr $shared_pass + 1`
+ fi
+ else
+ if test x"$S_FLAG" = x"$ST_FLAG"; then
+ static_fail=`expr $static_fail + 1`
+ else
+ shared_fail=`expr $shared_fail + 1`
+ fi
+ fi
+
+ printf "%s\t" "$RESULT"
+ printf "%-2s %d\t%.3f\t%s\t%s\t%s\t%s %s\n" \
+ "$RESULT" $C_TIME $E_TIME $TEXT $DATA $SIZE $NAME >> $RESULTS_FILE
+}
+
+setup_size_command
+echo ""
+echo "Detailed test results in .${RESULTS_FILE/$BUILD_DIR}"
+echo $explanation
+echo "------------------------------------------------------------------------"
+printf "static\tshared\ttest\n"
+echo "------------------------------------------------------------------------"
+
+TEST_TIME_START=$($TIMER_COMMAND)
+for NAME in `cat $TESTS_FILE`
+do
+ PRE_NAME="$TEST_DIR/`basename $NAME`"
+ ST_NAME="`echo $PRE_NAME | sed 's/cc$/st-exe/'`"
+ SH_NAME="`echo $PRE_NAME | sed 's/cc$/sh-exe/'`"
+
+ if test @enable_static@ = yes; then
+ test_file $NAME $ST_NAME "$ST_FLAG"
+ else
+ printf "x\t"
+ printf "static skipped\n" >> $RESULTS_FILE
+ fi
+ if test @enable_shared@ = yes; then
+ test_file $NAME $SH_NAME "$SH_FLAG"
+ else
+ printf "x\t"
+ printf "shared skipped\n" >> $RESULTS_FILE
+ fi
+ printf "%s\n" "$NAME"
+
+ echo "" >> $RESULTS_FILE
+done
+TEST_TIME_END=$($TIMER_COMMAND)
+
+
+#
+# 4: summary
+#
+# grep can count faster than we can...
+total_failures=`expr ${shared_fail} + ${static_fail}`
+total_successes=`expr ${shared_pass} + ${static_pass}`
+resultstext="pass/fail results: ${static_pass}/${static_fail} static + ${shared_pass}/${shared_fail} shared = ${total_successes}/${total_failures} total"
+if [ $total_failures -eq 0 ]; then
+ resultstext="${resultstext}, WIN WIN"
+fi
+sed -e "/^date:/a\\
+$resultstext" $RESULTS_FILE > ${RESULTS_FILE}.tmp
+mv ${RESULTS_FILE}.tmp $RESULTS_FILE
+
+if [ $TEST_TIME_START -lt $TEST_TIME_END ]; then
+ TEST_TIME=$[ $TEST_TIME_END - $TEST_TIME_START ]
+ echo "testrun == $TEST_TIME seconds"
+ echo "testrun == $TEST_TIME seconds" >> $RESULTS_FILE
+fi
+
+exit 0
diff --git a/contrib/libstdc++/scripts/create_testsuite_files b/contrib/libstdc++/scripts/create_testsuite_files
new file mode 100755
index 0000000..50f2e13
--- /dev/null
+++ b/contrib/libstdc++/scripts/create_testsuite_files
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# Constructs lists of source files (full pathnames) to test. Two
+# files are constructed: testsuite_files, which is used to test with
+# the default dg-runtest command, and testsuite_files_interactive,
+# which is used to test cases that require input to be entered. In
+# addition, both lists are pruned of wchar_t tests if the toolchain
+# under test does not support wchar_t functionality.
+#
+# We mimic the mkcheck script in that the first time this is run, all
+# existing files are listed in "testsuite_files" in the output
+# directory. Subsequent runs pull the list from that file, allowing
+# users to trim the list down to problematic tests, or just run
+# paticular directories or sub-directories of tests.
+#
+# Selecting individual tests can also be done with RUNTESTFLAGS, but
+# that doesn't really do all that we are trying to accomplish here.
+
+LC_ALL=C
+export LC_ALL
+
+# Both of these are in the appropriate testsuite subdirectories.
+srcdir="$1"
+outdir="$2"
+
+tmp="${TMPDIR:-/tmp}/ctt$$"
+tests_file_normal="$outdir/testsuite_files"
+tests_file_inter="$outdir/testsuite_files_interactive"
+tests_file_perf="$outdir/testsuite_files_performance"
+
+cd $srcdir
+# This is the ugly version of "everything but the current directory". It's
+# what has to happen when find(1) doesn't support -mindepth, or -xtype.
+dlist=`echo [0-9][0-9]*`
+for d in [a-z]*; do
+ test -d $d && dlist="$dlist $d"
+done
+find $dlist "(" -type f -o -type l ")" -name "*.cc" -print | sort > $tmp.1
+if test ! -s "$tmp.1"; then
+ exit 1
+fi
+
+# If the library is not configured to support wchar_t, don't run those tests.
+if test -f "$outdir/testsuite_wchar_t"; then
+ mv $tmp.1 $tmp.2
+else
+ grep -v wchar_t $tmp.1 > $tmp.2
+fi
+
+# Now filter out classes of tests. These classes are run using special rules.
+grep _xin $tmp.2 > $tests_file_inter
+grep -v _xin $tmp.2 > $tmp.3
+
+grep performance $tmp.3 > $tests_file_perf
+grep -v performance $tmp.3 > $tmp.4
+
+# ...more filters go here.
+cp $tmp.4 $tests_file_normal
+
+rm $tmp*
+exit 0
diff --git a/contrib/libstdc++/scripts/extract_symvers b/contrib/libstdc++/scripts/extract_symvers
new file mode 100755
index 0000000..c7798b7
--- /dev/null
+++ b/contrib/libstdc++/scripts/extract_symvers
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+#
+# This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+# library without restriction. Specifically, if other files instantiate
+# templates or use macros or inline functions from this file, or you compile
+# this file and link it with other files to produce an executable, this
+# file does not by itself 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.
+
+
+if test ${#} -lt 2 || test $1 = '--help'; then
+ echo "Usage: extract_symvers shared_lib output_file" 1>&2
+ exit 1
+fi
+
+lib=$1
+output=$2
+
+# GNU binutils, somewhere after version 2.11.2, requires -W/--wide to avoid
+# default line truncation. -W is not supported and truncation did not occur
+# by default before that point.
+readelf="readelf --symbols"
+if readelf --help | grep -- --wide > /dev/null; then
+ readelf="$readelf --wide"
+fi
+
+# This avoids weird sorting problems later.
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+
+tmp=extract.$$
+
+${readelf} ${lib} | sed '/\.dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' |\
+awk '{ if ($4 == "FUNC" || $4 == "NOTYPE")
+ printf "%s:%s\n", $4, $8;
+ else if ($4 == "OBJECT")
+ printf "%s:%s:%s\n", $4, $3, $8;
+ }' | sort | uniq > $tmp 2>&1
+# else printf "Huh? What is %s?\n", $8;
+
+
+# I think we'll be doing some more with this file, but for now, dump.
+mv $tmp $output
+
+exit 0
diff --git a/contrib/libstdc++/scripts/testsuite_flags.in b/contrib/libstdc++/scripts/testsuite_flags.in
new file mode 100755
index 0000000..2a74f47
--- /dev/null
+++ b/contrib/libstdc++/scripts/testsuite_flags.in
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+#
+# This script computes the various flags needed to run GNU C++ testsuites
+# (compiler specific as well as library specific).
+#
+# Written by Benjamin Kosnik <bkoz@redhat.com>
+# Gabriel Dos Reis <gdr@codesourcery.com>
+#
+
+# Print a message saying how this script is intended to be invoked
+print_usage() {
+ cat <<EOF
+Usage:
+ testsuite_flags --install-includes
+ --build-includes
+ --build-cxx
+ --install-cxx
+ --cxxflags
+ --cxxpchflags
+EOF
+}
+
+# Establish configure-generated directory structure.
+BUILD_DIR=@glibcxx_builddir@
+SRC_DIR=@glibcxx_srcdir@
+PREFIX_DIR=@glibcxx_prefixdir@
+query=$1
+
+case ${query} in
+ --install-includes)
+ INCLUDES="-I${SRC_DIR}/testsuite"
+ echo ${INCLUDES}
+ ;;
+ --build-includes)
+ INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@ -I${SRC_DIR}/libsupc++
+ -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite"
+ echo ${INCLUDES}
+ ;;
+ --install-cxx)
+ CXX=${PREFIX_DIR}/bin/g++
+ echo ${CXX}
+ ;;
+ --build-cxx)
+ CXX_build="@CXX@"
+ CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
+ echo ${CXX}
+ ;;
+ --cxxflags)
+ CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
+ CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
+ @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
+ echo ${CXXFLAGS_save} ${CXXFLAGS_config}
+ ;;
+ --cxxpchflags)
+ PCHFLAGS="@glibcxx_PCHFLAGS@"
+ echo ${PCHFLAGS}
+ ;;
+ *)
+ print_usagex
+ ;;
+esac
+
+exit 0
diff --git a/contrib/libstdc++/src/Makefile.am b/contrib/libstdc++/src/Makefile.am
index 304c035..ed4c710 100644
--- a/contrib/libstdc++/src/Makefile.am
+++ b/contrib/libstdc++/src/Makefile.am
@@ -22,175 +22,161 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-AUTOMAKE_OPTIONS = 1.3 cygnus
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+include $(top_srcdir)/fragment.am
# Cross compiler support.
-CXX = @glibcpp_CXX@
-glibcpp_srcdir=@glibcpp_srcdir@
-glibcpp_builddir=@glibcpp_builddir@
-toolexecdir = @glibcpp_toolexecdir@
-toolexeclibdir = @glibcpp_toolexeclibdir@
toolexeclib_LTLIBRARIES = libstdc++.la
# Symbol versioning for shared libraries.
-if GLIBCPP_BUILD_VERSIONED_SHLIB
+if GLIBCXX_BUILD_VERSIONED_SHLIB
version_arg = -Wl,--version-script=libstdc++-symbol.ver
-libstdc++-symbol.ver: ${glibcpp_srcdir}/@SYMVER_MAP@
- @LN_S@ ${glibcpp_srcdir}/@SYMVER_MAP@ ./libstdc++-symbol.ver || true
+version_dep = libstdc++-symbol.ver
+libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+ if test "x$(port_specific_symbol_files)" != x; then \
+ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+ rm tmp.top tmp.bottom; \
+ fi
else
version_arg =
-libstdc++-symbol.ver:
+version_dep =
endif
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
-
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
-CONFIG_CXXFLAGS = \
- @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
-
-# Warning flags to use.
-WARN_CXXFLAGS = \
- @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
-
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-
-INCLUDES = \
- -nostdinc++ \
- $(GLIBCPP_INCLUDES) \
- $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
- $(TOPLEVEL_INCLUDES)
# Source files linked in via configuration/make substitution for a
-# particular target.
-target_sources = \
+# particular host.
+host_sources = \
+ atomicity.cc \
codecvt_members.cc \
collate_members.cc \
ctype_members.cc \
messages_members.cc \
monetary_members.cc \
numeric_members.cc \
- time_members.cc
+ time_members.cc
+
+codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
-codecvt_members.cc: ${glibcpp_srcdir}/@CCODECVT_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCODECVT_CC@ . || true
+collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true
-collate_members.cc: ${glibcpp_srcdir}/@CCOLLATE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCOLLATE_CC@ . || true
+ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true
-ctype_members.cc: ${glibcpp_srcdir}/@CCTYPE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCTYPE_CC@ . || true
+messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true
-messages_members.cc: ${glibcpp_srcdir}/@CMESSAGES_CC@
- @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_CC@ . || true
+monetary_members.cc: ${glibcxx_srcdir}/$(CMONEY_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CMONEY_CC) . || true
-monetary_members.cc: ${glibcpp_srcdir}/@CMONEY_CC@
- @LN_S@ ${glibcpp_srcdir}/@CMONEY_CC@ . || true
+numeric_members.cc: ${glibcxx_srcdir}/$(CNUMERIC_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CNUMERIC_CC) . || true
-numeric_members.cc: ${glibcpp_srcdir}/@CNUMERIC_CC@
- @LN_S@ ${glibcpp_srcdir}/@CNUMERIC_CC@ . || true
+time_members.cc: ${glibcxx_srcdir}/$(CTIME_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CTIME_CC) . || true
-time_members.cc: ${glibcpp_srcdir}/@CTIME_CC@
- @LN_S@ ${glibcpp_srcdir}/@CTIME_CC@ . || true
+atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
+atomicity.cc: ${atomicity_file}
+ $(LN_S) ${atomicity_file} ./atomicity.cc || true
# Source files linked in via configuration/make substitution for a
-# particular target, but with ad hoc naming rules.
-target_sources_extra = \
+# particular host, but with ad hoc naming rules.
+host_sources_extra = \
basic_file.cc \
- c++locale.cc
+ c++locale.cc
-c++locale.cc: ${glibcpp_srcdir}/@CLOCALE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_CC@ ./$@ || true
+c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
-basic_file.cc: ${glibcpp_srcdir}/@BASIC_FILE_CC@
- @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_CC@ ./$@ || true
+basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
# Sources present in the src directory.
sources = \
- bitset.cc \
+ allocator.cc \
codecvt.cc \
complex_io.cc \
- concept-inst.cc \
ctype.cc \
- ext-inst.cc \
- fstream.cc \
- fstream-inst.cc \
+ debug.cc \
+ debug_list.cc \
functexcept.cc \
- globals.cc \
- io-inst.cc \
+ globals_locale.cc \
+ globals_io.cc \
ios.cc \
- istream-inst.cc \
+ ios_failure.cc \
+ ios_init.cc \
+ ios_locale.cc \
limits.cc \
+ list.cc \
locale.cc \
- locale-inst.cc \
+ locale_init.cc \
+ locale_facets.cc \
localename.cc \
+ stdexcept.cc \
+ strstream.cc \
+ tree.cc \
+ allocator-inst.cc \
+ concept-inst.cc \
+ fstream-inst.cc \
+ ext-inst.cc \
+ io-inst.cc \
+ istream-inst.cc \
+ locale-inst.cc \
+ locale-misc-inst.cc \
misc-inst.cc \
ostream-inst.cc \
sstream-inst.cc \
- stdexcept.cc \
- stl-inst.cc \
streambuf-inst.cc \
string-inst.cc \
- strstream.cc \
valarray-inst.cc \
- vterminate.cc \
+ wlocale-inst.cc \
wstring-inst.cc \
- ${target_sources} \
- ${target_sources_extra}
+ ${host_sources} \
+ ${host_sources_extra}
VPATH = $(top_srcdir)/src:$(top_srcdir)
libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \
- $(top_builddir)/libmath/libmath.la @libio_la@ \
+ $(top_builddir)/libmath/libmath.la \
$(top_builddir)/libsupc++/libsupc++convenience.la
-libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
+libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
- -version-info @libtool_VERSION@ ${version_arg} \
- -lm @LIBUNWIND_FLAG@
+ -version-info $(libtool_VERSION) ${version_arg} -lm
# Use special rules for the deprecated source files so that they find
# deprecated include files.
-GLIBCPP_INCLUDE_DIR=@glibcpp_builddir@/include
+GLIBCXX_INCLUDE_DIR=$(glibcxx_builddir)/include
strstream.lo: strstream.cc
- $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+ $(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
strstream.o: strstream.cc
- $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
# Use special rules for the concept-checking instantiations so that all
# the generated template functions are also instantiated. Force the checks
# to be on so that the instantiations are actually seen.
concept-inst.lo: concept-inst.cc
- $(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+ $(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
concept-inst.o: concept-inst.cc
- $(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
-
+ $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it.
+# as the occasion calls for it.
AM_CXXFLAGS = \
-fno-implicit-templates \
- $(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS)
+ $(CONFIG_CXXFLAGS)
# libstdc++ libtool notes
@@ -212,7 +198,7 @@ AM_CXXFLAGS = \
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if
# the rules automake generates would be used. We cannot allow g++ to
@@ -221,38 +207,38 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
- @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
# Added bits to build debug library.
-if GLIBCPP_BUILD_DEBUG
+if GLIBCXX_BUILD_DEBUG
all-local: build_debug
install-data-local: install_debug
else
all-local:
-install-data-local:
+install-data-local:
endif
debugdir = debug
# Build parallel set of debug objects here.
-stamp-debug:
+stamp-debug:
if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \
(cd ${debugdir}; \
sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/glibcpp_basedir = \.\./glibcpp_basedir = ..\/../' \
+ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/all-local: build_debug/all-local:/' \
-e 's/install-data-local: install_debug/install-data-local:/' \
< ../Makefile > Makefile) ; \
fi; \
- echo `date` > stamp-debug;
+ echo `date` > stamp-debug;
build_debug: stamp-debug
- (cd ${debugdir} && $(MAKE) CXXFLAGS='@DEBUG_FLAGS@' all)
+ (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all)
# Install debug library here.
-install_debug:
+install_debug:
(cd ${debugdir} && $(MAKE) \
- toolexeclibdir=@glibcpp_toolexeclibdir@/debug install)
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
diff --git a/contrib/libstdc++/src/Makefile.in b/contrib/libstdc++/src/Makefile.in
index 95c1cf8..1fae145 100644
--- a/contrib/libstdc++/src/Makefile.in
+++ b/contrib/libstdc++/src/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.7.8 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,70 +12,53 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+
+VPATH = $(top_srcdir)/src:$(top_srcdir)
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
-ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@
-CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
@@ -82,186 +67,261 @@ CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
+CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE = @GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@
+GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE = @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@
+GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@
+GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@
+GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBMATHOBJS = @LIBMATHOBJS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_MAP = @SYMVER_MAP@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
-baseline_file = @baseline_file@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
+datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
-glibcpp_CXX = @glibcpp_CXX@
-glibcpp_MOFILES = @glibcpp_MOFILES@
-glibcpp_POFILES = @glibcpp_POFILES@
-glibcpp_basedir = @glibcpp_basedir@
-glibcpp_localedir = @glibcpp_localedir@
-glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_thread_h = @glibcpp_thread_h@
-glibcpp_toolexecdir = @glibcpp_toolexecdir@
-glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
-ifGNUmake = @ifGNUmake@
-libio_la = @libio_la@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+mandir = @mandir@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
-AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
-# Cross compiler support.
-CXX = @glibcpp_CXX@
-glibcpp_srcdir = @glibcpp_srcdir@
-glibcpp_builddir = @glibcpp_builddir@
-toolexecdir = @glibcpp_toolexecdir@
-toolexeclibdir = @glibcpp_toolexeclibdir@
-toolexeclib_LTLIBRARIES = libstdc++.la
-@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@version_arg = @GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@-Wl,--version-script=libstdc++-symbol.ver
-@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@version_arg =
-
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
CONFIG_CXXFLAGS = \
- @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
-
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
-# Warning flags to use.
WARN_CXXFLAGS = \
- @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
-# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
-INCLUDES = \
- -nostdinc++ \
- $(GLIBCPP_INCLUDES) \
- $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
- $(TOPLEVEL_INCLUDES)
+# Cross compiler support.
+toolexeclib_LTLIBRARIES = libstdc++.la
+# Symbol versioning for shared libraries.
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
+@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_arg =
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_dep = libstdc++-symbol.ver
+@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_dep =
# Source files linked in via configuration/make substitution for a
-# particular target.
-target_sources = \
+# particular host.
+host_sources = \
+ atomicity.cc \
codecvt_members.cc \
collate_members.cc \
ctype_members.cc \
messages_members.cc \
monetary_members.cc \
numeric_members.cc \
- time_members.cc
+ time_members.cc
+atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
+
# Source files linked in via configuration/make substitution for a
-# particular target, but with ad hoc naming rules.
-target_sources_extra = \
+# particular host, but with ad hoc naming rules.
+host_sources_extra = \
basic_file.cc \
- c++locale.cc
+ c++locale.cc
# Sources present in the src directory.
sources = \
- bitset.cc \
+ allocator.cc \
codecvt.cc \
complex_io.cc \
- concept-inst.cc \
ctype.cc \
- ext-inst.cc \
- fstream.cc \
- fstream-inst.cc \
+ debug.cc \
+ debug_list.cc \
functexcept.cc \
- globals.cc \
- io-inst.cc \
+ globals_locale.cc \
+ globals_io.cc \
ios.cc \
- istream-inst.cc \
+ ios_failure.cc \
+ ios_init.cc \
+ ios_locale.cc \
limits.cc \
+ list.cc \
locale.cc \
- locale-inst.cc \
+ locale_init.cc \
+ locale_facets.cc \
localename.cc \
+ stdexcept.cc \
+ strstream.cc \
+ tree.cc \
+ allocator-inst.cc \
+ concept-inst.cc \
+ fstream-inst.cc \
+ ext-inst.cc \
+ io-inst.cc \
+ istream-inst.cc \
+ locale-inst.cc \
+ locale-misc-inst.cc \
misc-inst.cc \
ostream-inst.cc \
sstream-inst.cc \
- stdexcept.cc \
- stl-inst.cc \
streambuf-inst.cc \
string-inst.cc \
- strstream.cc \
valarray-inst.cc \
- vterminate.cc \
+ wlocale-inst.cc \
wstring-inst.cc \
- ${target_sources} \
- ${target_sources_extra}
-
+ ${host_sources} \
+ ${host_sources_extra}
-VPATH = $(top_srcdir)/src:$(top_srcdir)
libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \
- $(top_builddir)/libmath/libmath.la @libio_la@ \
+ $(top_builddir)/libmath/libmath.la \
$(top_builddir)/libsupc++/libsupc++convenience.la
-libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
+libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
- -version-info @libtool_VERSION@ ${version_arg} \
- -lm @LIBUNWIND_FLAG@
+ -version-info $(libtool_VERSION) ${version_arg} -lm
# Use special rules for the deprecated source files so that they find
# deprecated include files.
-GLIBCPP_INCLUDE_DIR = @glibcpp_builddir@/include
+GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it.
+# as the occasion calls for it.
AM_CXXFLAGS = \
-fno-implicit-templates \
- $(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS)
+ $(CONFIG_CXXFLAGS)
# libstdc++ libtool notes
@@ -283,7 +343,7 @@ AM_CXXFLAGS = \
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if
@@ -293,110 +353,98 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
- @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
debugdir = debug
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libstdc___la_OBJECTS = bitset.lo codecvt.lo complex_io.lo \
-concept-inst.lo ctype.lo ext-inst.lo fstream.lo fstream-inst.lo \
-functexcept.lo globals.lo io-inst.lo ios.lo istream-inst.lo limits.lo \
-locale.lo locale-inst.lo localename.lo misc-inst.lo ostream-inst.lo \
-sstream-inst.lo stdexcept.lo stl-inst.lo streambuf-inst.lo \
-string-inst.lo strstream.lo valarray-inst.lo vterminate.lo \
-wstring-inst.lo codecvt_members.lo collate_members.lo ctype_members.lo \
-messages_members.lo monetary_members.lo numeric_members.lo \
-time_members.lo basic_file.lo c++locale.lo
-CXXFLAGS = @CXXFLAGS@
-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+
+am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
+ ctype_members.lo messages_members.lo monetary_members.lo \
+ numeric_members.lo time_members.lo
+am__objects_2 = basic_file.lo c++locale.lo
+am__objects_3 = allocator.lo codecvt.lo complex_io.lo ctype.lo debug.lo \
+ debug_list.lo functexcept.lo globals_locale.lo globals_io.lo \
+ ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo \
+ list.lo locale.lo locale_init.lo locale_facets.lo localename.lo \
+ stdexcept.lo strstream.lo tree.lo allocator-inst.lo \
+ concept-inst.lo fstream-inst.lo ext-inst.lo io-inst.lo \
+ istream-inst.lo locale-inst.lo locale-misc-inst.lo misc-inst.lo \
+ ostream-inst.lo sstream-inst.lo streambuf-inst.lo \
+ string-inst.lo valarray-inst.lo wlocale-inst.lo wstring-inst.lo \
+ $(am__objects_1) $(am__objects_2)
+am_libstdc___la_OBJECTS = $(am__objects_3)
+libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
+
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp =
+am__depfiles_maybe =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
+DIST_SOURCES = $(libstdc___la_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \
+ Makefile.am
SOURCES = $(libstdc___la_SOURCES)
-OBJECTS = $(libstdc___la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .cc .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-mostlyclean-toolexeclibLTLIBRARIES:
-
-clean-toolexeclibLTLIBRARIES:
- -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
-
-distclean-toolexeclibLTLIBRARIES:
-
-maintainer-clean-toolexeclibLTLIBRARIES:
+all: all-am
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(LIBTOOL) --mode=install $(toolexeclibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$f"; \
+ $(LIBTOOL) --mode=install $(toolexeclibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$f; \
else :; fi; \
done
uninstall-toolexeclibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+ p="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p"; \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
done
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+clean-toolexeclibLTLIBRARIES:
+ -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
+ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" = "$$p" && dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
+ -rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cc.o:
+ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cc.obj:
+ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
@@ -405,213 +453,262 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
-maintainer-clean-libtool:
+ETAGS = etags
+ETAGSFLAGS =
-libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
- $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
-.cc.o:
- $(CXXCOMPILE) -c $<
-.cc.obj:
- $(CXXCOMPILE) -c `cygpath -w $<`
-.cc.lo:
- $(LTCXXCOMPILE) -c $<
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
-mostlyclean-tags:
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ $(mkinstalldirs) $(distdir)/..
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
+check-am: all-am
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am: install-toolexeclibLTLIBRARIES
-install-exec: install-exec-am
+all-am: Makefile $(LTLIBRARIES) all-local
-install-data-am: install-data-local
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
+install: install-am
+install-exec: install-exec-am
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-toolexeclibLTLIBRARIES
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) all-local
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \
+ mostlyclean-am
-clean-am: clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \
- clean-tags clean-generic mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-am
+info: info-am
-maintainer-clean-am: maintainer-clean-toolexeclibLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am: install-toolexeclibLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
-.PHONY: mostlyclean-toolexeclibLTLIBRARIES \
-distclean-toolexeclibLTLIBRARIES clean-toolexeclibLTLIBRARIES \
-maintainer-clean-toolexeclibLTLIBRARIES \
-uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-local \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-local all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+pdf-am:
-@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcpp_srcdir}/@SYMVER_MAP@
-@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@ @LN_S@ ${glibcpp_srcdir}/@SYMVER_MAP@ ./libstdc++-symbol.ver || true
-@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@libstdc++-symbol.ver:
+ps: ps-am
-codecvt_members.cc: ${glibcpp_srcdir}/@CCODECVT_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCODECVT_CC@ . || true
+ps-am:
-collate_members.cc: ${glibcpp_srcdir}/@CCOLLATE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCOLLATE_CC@ . || true
+uninstall-am: uninstall-info-am uninstall-toolexeclibLTLIBRARIES
-ctype_members.cc: ${glibcpp_srcdir}/@CCTYPE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CCTYPE_CC@ . || true
+.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
+ clean-generic clean-libtool clean-toolexeclibLTLIBRARIES ctags \
+ distclean distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-toolexeclibLTLIBRARIES
-messages_members.cc: ${glibcpp_srcdir}/@CMESSAGES_CC@
- @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_CC@ . || true
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ if test "x$(port_specific_symbol_files)" != x; then \
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ rm tmp.top tmp.bottom; \
+@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ fi
-monetary_members.cc: ${glibcpp_srcdir}/@CMONEY_CC@
- @LN_S@ ${glibcpp_srcdir}/@CMONEY_CC@ . || true
+codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
-numeric_members.cc: ${glibcpp_srcdir}/@CNUMERIC_CC@
- @LN_S@ ${glibcpp_srcdir}/@CNUMERIC_CC@ . || true
+collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true
-time_members.cc: ${glibcpp_srcdir}/@CTIME_CC@
- @LN_S@ ${glibcpp_srcdir}/@CTIME_CC@ . || true
+ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true
-c++locale.cc: ${glibcpp_srcdir}/@CLOCALE_CC@
- @LN_S@ ${glibcpp_srcdir}/@CLOCALE_CC@ ./$@ || true
+messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true
-basic_file.cc: ${glibcpp_srcdir}/@BASIC_FILE_CC@
- @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_CC@ ./$@ || true
+monetary_members.cc: ${glibcxx_srcdir}/$(CMONEY_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CMONEY_CC) . || true
+
+numeric_members.cc: ${glibcxx_srcdir}/$(CNUMERIC_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CNUMERIC_CC) . || true
+
+time_members.cc: ${glibcxx_srcdir}/$(CTIME_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CTIME_CC) . || true
+atomicity.cc: ${atomicity_file}
+ $(LN_S) ${atomicity_file} ./atomicity.cc || true
+
+c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
+
+basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
strstream.lo: strstream.cc
- $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+ $(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
strstream.o: strstream.cc
- $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
# Use special rules for the concept-checking instantiations so that all
# the generated template functions are also instantiated. Force the checks
# to be on so that the instantiations are actually seen.
concept-inst.lo: concept-inst.cc
- $(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+ $(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
concept-inst.o: concept-inst.cc
- $(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+ $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
# Added bits to build debug library.
-@GLIBCPP_BUILD_DEBUG_TRUE@all-local: build_debug
-@GLIBCPP_BUILD_DEBUG_TRUE@install-data-local: install_debug
-@GLIBCPP_BUILD_DEBUG_FALSE@all-local:
-@GLIBCPP_BUILD_DEBUG_FALSE@install-data-local:
+@GLIBCXX_BUILD_DEBUG_TRUE@all-local: build_debug
+@GLIBCXX_BUILD_DEBUG_TRUE@install-data-local: install_debug
+@GLIBCXX_BUILD_DEBUG_FALSE@all-local:
+@GLIBCXX_BUILD_DEBUG_FALSE@install-data-local:
# Build parallel set of debug objects here.
-stamp-debug:
+stamp-debug:
if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \
(cd ${debugdir}; \
sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/glibcpp_basedir = \.\./glibcpp_basedir = ..\/../' \
+ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/all-local: build_debug/all-local:/' \
-e 's/install-data-local: install_debug/install-data-local:/' \
< ../Makefile > Makefile) ; \
fi; \
- echo `date` > stamp-debug;
+ echo `date` > stamp-debug;
build_debug: stamp-debug
- (cd ${debugdir} && $(MAKE) CXXFLAGS='@DEBUG_FLAGS@' all)
+ (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all)
# Install debug library here.
-install_debug:
+install_debug:
(cd ${debugdir} && $(MAKE) \
- toolexeclibdir=@glibcpp_toolexeclibdir@/debug install)
-
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
# 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/contrib/libstdc++/src/allocator-inst.cc b/contrib/libstdc++/src/allocator-inst.cc
new file mode 100644
index 0000000..40d7049
--- /dev/null
+++ b/contrib/libstdc++/src/allocator-inst.cc
@@ -0,0 +1,51 @@
+// Explicit instantiation file.
+
+// Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882:
+//
+
+#include <memory>
+#include <ext/mt_allocator.h>
+#include <ext/pool_allocator.h>
+
+namespace std
+{
+ template class allocator<char>;
+ template class allocator<wchar_t>;
+} // namespace std
+
+namespace __gnu_cxx
+{
+ template class __mt_alloc<char>;
+ template class __mt_alloc<wchar_t>;
+
+ template class __pool_alloc<char>;
+ template class __pool_alloc<wchar_t>;
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/src/allocator.cc b/contrib/libstdc++/src/allocator.cc
new file mode 100644
index 0000000..e35aa3e
--- /dev/null
+++ b/contrib/libstdc++/src/allocator.cc
@@ -0,0 +1,169 @@
+// Allocator details.
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882:
+//
+
+#include <bits/c++config.h>
+#include <memory>
+#include <ext/mt_allocator.h>
+#include <ext/pool_allocator.h>
+
+namespace __gnu_internal
+{
+ __glibcxx_mutex_define_initialized(palloc_init_mutex);
+}
+
+namespace __gnu_cxx
+{
+ // Definitions for __pool_alloc_base.
+ __pool_base::_Obj* volatile*
+ __pool_base::_M_get_free_list(size_t __bytes)
+ {
+ size_t __i = ((__bytes + (size_t)_S_align - 1) / (size_t)_S_align - 1);
+ return _S_free_list + __i;
+ }
+
+ mutex_type&
+ __pool_base::_M_get_mutex()
+ { return __gnu_internal::palloc_init_mutex; }
+
+ // Allocate memory in large chunks in order to avoid fragmenting the
+ // heap too much. Assume that __n is properly aligned. We hold the
+ // allocation lock.
+ char*
+ __pool_base::_M_allocate_chunk(size_t __n, int& __nobjs)
+ {
+ char* __result;
+ size_t __total_bytes = __n * __nobjs;
+ size_t __bytes_left = _S_end_free - _S_start_free;
+
+ if (__bytes_left >= __total_bytes)
+ {
+ __result = _S_start_free;
+ _S_start_free += __total_bytes;
+ return __result ;
+ }
+ else if (__bytes_left >= __n)
+ {
+ __nobjs = (int)(__bytes_left / __n);
+ __total_bytes = __n * __nobjs;
+ __result = _S_start_free;
+ _S_start_free += __total_bytes;
+ return __result;
+ }
+ else
+ {
+ // Try to make use of the left-over piece.
+ if (__bytes_left > 0)
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__bytes_left);
+ ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list;
+ *__free_list = (_Obj*)(void*)_S_start_free;
+ }
+
+ size_t __bytes_to_get = (2 * __total_bytes
+ + _M_round_up(_S_heap_size >> 4));
+ _S_start_free = static_cast<char*>(::operator new(__bytes_to_get));
+ if (_S_start_free == 0)
+ {
+ // Try to make do with what we have. That can't hurt. We
+ // do not try smaller requests, since that tends to result
+ // in disaster on multi-process machines.
+ size_t __i = __n;
+ for (; __i <= (size_t) _S_max_bytes; __i += (size_t) _S_align)
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__i);
+ _Obj* __p = *__free_list;
+ if (__p != 0)
+ {
+ *__free_list = __p->_M_free_list_link;
+ _S_start_free = (char*)__p;
+ _S_end_free = _S_start_free + __i;
+ return _M_allocate_chunk(__n, __nobjs);
+ // Any leftover piece will eventually make it to the
+ // right free list.
+ }
+ }
+ _S_end_free = 0; // In case of exception.
+
+ // This should either throw an exception or remedy the situation.
+ // Thus we assume it succeeded.
+ _S_start_free = static_cast<char*>(::operator new(__bytes_to_get));
+ }
+ _S_heap_size += __bytes_to_get;
+ _S_end_free = _S_start_free + __bytes_to_get;
+ return _M_allocate_chunk(__n, __nobjs);
+ }
+ }
+
+ // Returns an object of size __n, and optionally adds to "size
+ // __n"'s free list. We assume that __n is properly aligned. We
+ // hold the allocation lock.
+ void*
+ __pool_base::_M_refill(size_t __n)
+ {
+ int __nobjs = 20;
+ char* __chunk = _M_allocate_chunk(__n, __nobjs);
+ _Obj* volatile* __free_list;
+ _Obj* __result;
+ _Obj* __current_obj;
+ _Obj* __next_obj;
+
+ if (__nobjs == 1)
+ return __chunk;
+ __free_list = _M_get_free_list(__n);
+
+ // Build free list in chunk.
+ __result = (_Obj*)(void*)__chunk;
+ *__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n);
+ for (int __i = 1; ; __i++)
+ {
+ __current_obj = __next_obj;
+ __next_obj = (_Obj*)(void*)((char*)__next_obj + __n);
+ if (__nobjs - 1 == __i)
+ {
+ __current_obj->_M_free_list_link = 0;
+ break;
+ }
+ else
+ __current_obj->_M_free_list_link = __next_obj;
+ }
+ return __result;
+ }
+
+ __pool_base::_Obj* volatile __pool_base::_S_free_list[_S_free_list_size];
+
+ char* __pool_base::_S_start_free = 0;
+
+ char* __pool_base::_S_end_free = 0;
+
+ size_t __pool_base::_S_heap_size = 0;
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/src/codecvt.cc b/contrib/libstdc++/src/codecvt.cc
index bc5508a..2010593 100644
--- a/contrib/libstdc++/src/codecvt.cc
+++ b/contrib/libstdc++/src/codecvt.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,23 +34,30 @@ namespace std
// Definitions for locale::id of standard facets that are specialized.
locale::id codecvt<char, char, mbstate_t>::id;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
locale::id codecvt<wchar_t, char, mbstate_t>::id;
#endif
-#ifdef _GLIBCPP_USE___ENC_TRAITS
+#ifdef _GLIBCXX_USE___ENC_TRAITS
// Definitions for static const data members of __enc_traits.
const int __enc_traits::_S_max_size;
#endif
codecvt<char, char, mbstate_t>::
codecvt(size_t __refs)
- : __codecvt_abstract_base<char, char, mbstate_t>(__refs)
+ : __codecvt_abstract_base<char, char, mbstate_t>(__refs),
+ _M_c_locale_codecvt(_S_get_c_locale())
{ }
codecvt<char, char, mbstate_t>::
- ~codecvt()
+ codecvt(__c_locale __cloc, size_t __refs)
+ : __codecvt_abstract_base<char, char, mbstate_t>(__refs),
+ _M_c_locale_codecvt(_S_clone_c_locale(__cloc))
{ }
+
+ codecvt<char, char, mbstate_t>::
+ ~codecvt()
+ { _S_destroy_c_locale(_M_c_locale_codecvt); }
codecvt_base::result
codecvt<char, char, mbstate_t>::
@@ -59,7 +66,7 @@ namespace std
extern_type* __to, extern_type*,
extern_type*& __to_next) const
{
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// According to the resolution of DR19, "If returns noconv [...]
// there are no changes to the values in [to, to_limit)."
__from_next = __from;
@@ -80,10 +87,9 @@ namespace std
codecvt<char, char, mbstate_t>::
do_in(state_type&, const extern_type* __from,
const extern_type*, const extern_type*& __from_next,
- intern_type* __to, intern_type*,
- intern_type*& __to_next) const
+ intern_type* __to, intern_type*, intern_type*& __to_next) const
{
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
// According to the resolution of DR19, "If returns noconv [...]
// there are no changes to the values in [to, to_limit)."
__from_next = __from;
@@ -103,54 +109,49 @@ namespace std
int
codecvt<char, char, mbstate_t>::
- do_length (const state_type&, const extern_type* __from,
+ do_length (state_type&, const extern_type* __from,
const extern_type* __end, size_t __max) const
- { return min(__max, static_cast<size_t>(__end - __from)); }
+ {
+ size_t __d = static_cast<size_t>(__end - __from);
+ return std::min(__max, __d);
+ }
int
codecvt<char, char, mbstate_t>::
do_max_length() const throw()
{ return 1; }
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
// codecvt<wchar_t, char, mbstate_t> required specialization
codecvt<wchar_t, char, mbstate_t>::
codecvt(size_t __refs)
- : __codecvt_abstract_base<wchar_t, char, mbstate_t>(__refs)
+ : __codecvt_abstract_base<wchar_t, char, mbstate_t>(__refs),
+ _M_c_locale_codecvt(_S_get_c_locale())
{ }
codecvt<wchar_t, char, mbstate_t>::
- ~codecvt()
+ codecvt(__c_locale __cloc, size_t __refs)
+ : __codecvt_abstract_base<wchar_t, char, mbstate_t>(__refs),
+ _M_c_locale_codecvt(_S_clone_c_locale(__cloc))
{ }
+
+ codecvt<wchar_t, char, mbstate_t>::
+ ~codecvt()
+ { _S_destroy_c_locale(_M_c_locale_codecvt); }
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_unshift(state_type&, extern_type* __to,
extern_type*, extern_type*& __to_next) const
{
+ // XXX Probably wrong for stateful encodings
__to_next = __to;
return noconv;
}
- int
- codecvt<wchar_t, char, mbstate_t>::
- do_encoding() const throw()
- { return sizeof(wchar_t); }
-
bool
codecvt<wchar_t, char, mbstate_t>::
do_always_noconv() const throw()
{ return false; }
-
- int
- codecvt<wchar_t, char, mbstate_t>::
- do_length(const state_type&, const extern_type* __from,
- const extern_type* __end, size_t __max) const
- { return min(__max, static_cast<size_t>(__end - __from)); }
-
- int
- codecvt<wchar_t, char, mbstate_t>::
- do_max_length() const throw()
- { return 1; }
-#endif // _GLIBCPP_USE_WCHAR_T
+#endif // _GLIBCXX_USE_WCHAR_T
} // namespace std
diff --git a/contrib/libstdc++/src/complex_io.cc b/contrib/libstdc++/src/complex_io.cc
index a6d502f..6d2ca56 100644
--- a/contrib/libstdc++/src/complex_io.cc
+++ b/contrib/libstdc++/src/complex_io.cc
@@ -59,7 +59,7 @@ namespace std
operator<<(basic_ostream<char, char_traits<char> >&,
const complex<long double>&);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template
basic_istream<wchar_t, char_traits<wchar_t> >&
operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&,
@@ -89,5 +89,5 @@ namespace std
basic_ostream<wchar_t, char_traits<wchar_t> >&
operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
const complex<long double>&);
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //_GLIBCXX_USE_WCHAR_T
} // namespace std
diff --git a/contrib/libstdc++/src/concept-inst.cc b/contrib/libstdc++/src/concept-inst.cc
index e173549..c8a3dd4 100644
--- a/contrib/libstdc++/src/concept-inst.cc
+++ b/contrib/libstdc++/src/concept-inst.cc
@@ -36,7 +36,7 @@
#include <bits/concept_check.h>
-#ifdef _GLIBCPP_CONCEPT_CHECKS
+#ifdef _GLIBCXX_CONCEPT_CHECKS
#include <memory>
#include <iterator>
@@ -54,7 +54,7 @@ namespace __gnu_cxx
_Instantiate(_InputIteratorConcept<char const*> );
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
_Instantiate(_InputIteratorConcept<wchar_t*> );
_Instantiate(_InputIteratorConcept<wchar_t const*> );
@@ -75,7 +75,7 @@ namespace __gnu_cxx
_Instantiate(_OutputIteratorConcept<std::ostreambuf_iterator<
char, std::char_traits<char> >, char> );
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
_Instantiate(_OutputIteratorConcept<std::ostreambuf_iterator<
wchar_t, std::char_traits<wchar_t> >, wchar_t> );
#endif
@@ -90,7 +90,7 @@ namespace __gnu_cxx
_Instantiate(_RandomAccessIteratorConcept<
__normal_iterator<char*, std::string> > );
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
_Instantiate(_RandomAccessIteratorConcept<
__normal_iterator<wchar_t const*,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
diff --git a/contrib/libstdc++/src/ctype.cc b/contrib/libstdc++/src/ctype.cc
index 3d5ee61..777ff41 100644
--- a/contrib/libstdc++/src/ctype.cc
+++ b/contrib/libstdc++/src/ctype.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -30,15 +30,23 @@
namespace std
{
- // XXX At some point, just rename this file to ctype_members_char.cc
- // and compile it as a separate file instead of including it here.
- // Platform-specific initialization code for ctype tables.
- #include <bits/ctype_noninline.h>
+ // Definitions for static const data members of ctype_base.
+ const ctype_base::mask ctype_base::space;
+ const ctype_base::mask ctype_base::print;
+ const ctype_base::mask ctype_base::cntrl;
+ const ctype_base::mask ctype_base::upper;
+ const ctype_base::mask ctype_base::lower;
+ const ctype_base::mask ctype_base::alpha;
+ const ctype_base::mask ctype_base::digit;
+ const ctype_base::mask ctype_base::punct;
+ const ctype_base::mask ctype_base::xdigit;
+ const ctype_base::mask ctype_base::alnum;
+ const ctype_base::mask ctype_base::graph;
// Definitions for locale::id of standard facets that are specialized.
locale::id ctype<char>::id;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
locale::id ctype<wchar_t>::id;
#endif
@@ -51,7 +59,7 @@ namespace std
return static_cast<const ctype<char>&>(*(__tmp->_M_facets[__i]));
}
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
const ctype<wchar_t>&
use_facet<ctype<wchar_t> >(const locale& __loc)
@@ -62,18 +70,10 @@ namespace std
}
#endif
- // Definitions for static const data members of ctype_base.
- const ctype_base::mask ctype_base::space;
- const ctype_base::mask ctype_base::print;
- const ctype_base::mask ctype_base::cntrl;
- const ctype_base::mask ctype_base::upper;
- const ctype_base::mask ctype_base::lower;
- const ctype_base::mask ctype_base::alpha;
- const ctype_base::mask ctype_base::digit;
- const ctype_base::mask ctype_base::punct;
- const ctype_base::mask ctype_base::xdigit;
- const ctype_base::mask ctype_base::alnum;
- const ctype_base::mask ctype_base::graph;
+ // XXX At some point, just rename this file to ctype_configure_char.cc
+ // and compile it as a separate file instead of including it here.
+ // Platform-specific initialization code for ctype tables.
+ #include <bits/ctype_noninline.h>
const size_t ctype<char>::table_size;
@@ -84,54 +84,16 @@ namespace std
delete[] this->table();
}
- // These are dummy placeholders as these virtual functions are never called.
- bool
- ctype<char>::do_is(mask, char_type) const
- { return false; }
-
- const char*
- ctype<char>::do_is(const char_type* __c, const char_type*, mask*) const
- { return __c; }
-
- const char*
- ctype<char>::do_scan_is(mask, const char_type* __c, const char_type*) const
- { return __c; }
-
- const char*
- ctype<char>::do_scan_not(mask, const char_type* __c, const char_type*) const
- { return __c; }
-
- char
- ctype<char>::do_widen(char __c) const
- { return __c; }
-
- const char*
- ctype<char>::do_widen(const char* __lo, const char* __hi, char* __dest) const
- {
- memcpy(__dest, __lo, __hi - __lo);
- return __hi;
- }
-
- char
- ctype<char>::do_narrow(char __c, char /*__dfault*/) const
- { return __c; }
-
- const char*
- ctype<char>::do_narrow(const char* __lo, const char* __hi,
- char /*__dfault*/, char* __dest) const
- {
- memcpy(__dest, __lo, __hi - __lo);
- return __hi;
- }
-
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::ctype(size_t __refs)
- : __ctype_abstract_base<wchar_t>(__refs)
- { _M_c_locale_ctype = _S_c_locale; }
+ : __ctype_abstract_base<wchar_t>(__refs),
+ _M_c_locale_ctype(_S_get_c_locale()), _M_narrow_ok(false)
+ { _M_initialize_ctype(); }
ctype<wchar_t>::ctype(__c_locale __cloc, size_t __refs)
- : __ctype_abstract_base<wchar_t>(__refs)
- { _M_c_locale_ctype = _S_clone_c_locale(__cloc); }
+ : __ctype_abstract_base<wchar_t>(__refs),
+ _M_c_locale_ctype(_S_clone_c_locale(__cloc)), _M_narrow_ok(false)
+ { _M_initialize_ctype(); }
ctype<wchar_t>::~ctype()
{ _S_destroy_c_locale(_M_c_locale_ctype); }
@@ -139,9 +101,13 @@ namespace std
template<>
ctype_byname<wchar_t>::ctype_byname(const char* __s, size_t __refs)
: ctype<wchar_t>(__refs)
- {
- _S_destroy_c_locale(_M_c_locale_ctype);
- _S_create_c_locale(_M_c_locale_ctype, __s);
+ {
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
+ this->_M_initialize_ctype();
+ }
}
#endif
} // namespace std
diff --git a/contrib/libstdc++/src/debug.cc b/contrib/libstdc++/src/debug.cc
new file mode 100644
index 0000000..05ebc2f
--- /dev/null
+++ b/contrib/libstdc++/src/debug.cc
@@ -0,0 +1,660 @@
+// Debugging mode support code -*- C++ -*-
+
+// Copyright (C) 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <debug/debug.h>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <algorithm>
+#include <cstdlib>
+#include <cassert>
+#include <cstring>
+#include <cstdio>
+#include <cctype>
+
+using namespace std;
+
+namespace __gnu_debug
+{
+ const char* _S_debug_messages[] =
+ {
+ "function requires a valid iterator range [%1.name;, %2.name;)",
+ "attempt to insert into container with a singular iterator",
+ "attempt to insert into container with an iterator"
+ " from a different container",
+ "attempt to erase from container with a %2.state; iterator",
+ "attempt to erase from container with an iterator"
+ " from a different container",
+ "attempt to subscript container with out-of-bounds index %2;,"
+ " but container only holds %3; elements",
+ "attempt to access an element in an empty container",
+ "elements in iterator range [%1.name;, %2.name;)"
+ " are not partitioned by the value %3;",
+ "elements in iterator range [%1.name;, %2.name;)"
+ " are not partitioned by the predicate %3; and value %4;",
+ "elements in iterator range [%1.name;, %2.name;) are not sorted",
+ "elements in iterator range [%1.name;, %2.name;)"
+ " are not sorted according to the predicate %3;",
+ "elements in iterator range [%1.name;, %2.name;) do not form a heap",
+ "elements in iterator range [%1.name;, %2.name;)"
+ " do not form a heap with respect to the predicate %3;",
+ "attempt to write through a singular bitset reference",
+ "attempt to read from a singular bitset reference",
+ "attempt to flip a singular bitset reference",
+ "attempt to splice a list into itself",
+ "attempt to splice lists with inequal allocators",
+ "attempt to splice elements referenced by a %1.state; iterator",
+ "attempt to splice an iterator from a different container",
+ "splice destination %1.name;"
+ " occurs within source range [%2.name;, %3.name;)",
+ "attempt to initialize an iterator that will immediately become singular",
+ "attempt to copy-construct an iterator from a singular iterator",
+ "attempt to construct a constant iterator"
+ " from a singular mutable iterator",
+ "attempt to copy from a singular iterator",
+ "attempt to dereference a %1.state; iterator",
+ "attempt to increment a %1.state; iterator",
+ "attempt to decrement a %1.state; iterator",
+ "attempt to subscript a %1.state; iterator %2; step from"
+ " its current position, which falls outside its dereferenceable range",
+ "attempt to advance a %1.state; iterator %2; steps,"
+ " which falls outside its valid range",
+ "attempt to retreat a %1.state; iterator %2; steps,"
+ " which falls outside its valid range",
+ "attempt to compare a %1.state; iterator to a %2.state; iterator",
+ "attempt to compare iterators from different sequences",
+ "attempt to order a %1.state; iterator to a %2.state; iterator",
+ "attempt to order iterators from different sequences",
+ "attempt to compute the difference between a %1.state;"
+ " iterator to a %2.state; iterator",
+ "attempt to compute the different between two iterators"
+ " from different sequences",
+ "attempt to dereference an end-of-stream istream_iterator",
+ "attempt to increment an end-of-stream istream_iterator",
+ "attempt to output via an ostream_iterator with no associated stream",
+ "attempt to dereference an end-of-stream istreambuf_iterator"
+ " (this is a GNU extension)",
+ "attempt to increment an end-of-stream istreambuf_iterator"
+ };
+
+ void
+ _Safe_sequence_base::
+ _M_detach_all()
+ {
+ for (_Safe_iterator_base* __iter = _M_iterators; __iter; )
+ {
+ _Safe_iterator_base* __old = __iter;
+ __iter = __iter->_M_next;
+ __old->_M_attach(0, false);
+ }
+
+ for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; )
+ {
+ _Safe_iterator_base* __old = __iter2;
+ __iter2 = __iter2->_M_next;
+ __old->_M_attach(0, true);
+ }
+ }
+
+ void
+ _Safe_sequence_base::
+ _M_detach_singular()
+ {
+ for (_Safe_iterator_base* __iter = _M_iterators; __iter; )
+ {
+ _Safe_iterator_base* __old = __iter;
+ __iter = __iter->_M_next;
+ if (__old->_M_singular())
+ __old->_M_attach(0, false);
+ }
+
+ for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; )
+ {
+ _Safe_iterator_base* __old = __iter2;
+ __iter2 = __iter2->_M_next;
+ if (__old->_M_singular())
+ __old->_M_attach(0, true);
+ }
+ }
+
+ void
+ _Safe_sequence_base::
+ _M_revalidate_singular()
+ {
+ _Safe_iterator_base* __iter;
+ for (__iter = _M_iterators; __iter; __iter = __iter->_M_next)
+ {
+ __iter->_M_version = _M_version;
+ __iter = __iter->_M_next;
+ }
+
+ for (__iter = _M_const_iterators; __iter; __iter = __iter->_M_next)
+ {
+ __iter->_M_version = _M_version;
+ __iter = __iter->_M_next;
+ }
+ }
+
+ void
+ _Safe_sequence_base::
+ _M_swap(_Safe_sequence_base& __x)
+ {
+ swap(_M_iterators, __x._M_iterators);
+ swap(_M_const_iterators, __x._M_const_iterators);
+ swap(_M_version, __x._M_version);
+ _Safe_iterator_base* __iter;
+ for (__iter = _M_iterators; __iter; __iter = __iter->_M_next)
+ __iter->_M_sequence = this;
+ for (__iter = __x._M_iterators; __iter; __iter = __iter->_M_next)
+ __iter->_M_sequence = &__x;
+ for (__iter = _M_const_iterators; __iter; __iter = __iter->_M_next)
+ __iter->_M_sequence = this;
+ for (__iter = __x._M_const_iterators; __iter; __iter = __iter->_M_next)
+ __iter->_M_sequence = &__x;
+ }
+
+ void
+ _Safe_iterator_base::
+ _M_attach(_Safe_sequence_base* __seq, bool __constant)
+ {
+ _M_detach();
+
+ // Attach to the new sequence (if there is one)
+ if (__seq)
+ {
+ _M_sequence = __seq;
+ _M_version = _M_sequence->_M_version;
+ _M_prior = 0;
+ if (__constant)
+ {
+ _M_next = _M_sequence->_M_const_iterators;
+ if (_M_next)
+ _M_next->_M_prior = this;
+ _M_sequence->_M_const_iterators = this;
+ }
+ else
+ {
+ _M_next = _M_sequence->_M_iterators;
+ if (_M_next)
+ _M_next->_M_prior = this;
+ _M_sequence->_M_iterators = this;
+ }
+ }
+ }
+
+ void
+ _Safe_iterator_base::
+ _M_detach()
+ {
+ if (_M_sequence)
+ {
+ // Remove us from this sequence's list
+ if (_M_prior)
+ _M_prior->_M_next = _M_next;
+ if (_M_next)
+ _M_next->_M_prior = _M_prior;
+
+ if (_M_sequence->_M_const_iterators == this)
+ _M_sequence->_M_const_iterators = _M_next;
+ if (_M_sequence->_M_iterators == this)
+ _M_sequence->_M_iterators = _M_next;
+ }
+
+ _M_sequence = 0;
+ _M_version = 0;
+ _M_prior = 0;
+ _M_next = 0;
+ }
+
+ bool
+ _Safe_iterator_base::
+ _M_singular() const
+ { return !_M_sequence || _M_version != _M_sequence->_M_version; }
+
+ bool
+ _Safe_iterator_base::
+ _M_can_compare(const _Safe_iterator_base& __x) const
+ {
+ return (!_M_singular() && !__x._M_singular()
+ && _M_sequence == __x._M_sequence);
+ }
+
+ void
+ _Error_formatter::_Parameter::
+ _M_print_field(const _Error_formatter* __formatter, const char* __name) const
+ {
+ assert(this->_M_kind != _Parameter::__unused_param);
+ const int __bufsize = 64;
+ char __buf[__bufsize];
+
+ if (_M_kind == __iterator)
+ {
+ if (strcmp(__name, "name") == 0)
+ {
+ assert(_M_variant._M_iterator._M_name);
+ __formatter->_M_print_word(_M_variant._M_iterator._M_name);
+ }
+ else if (strcmp(__name, "address") == 0)
+ {
+ __formatter->_M_format_word(__buf, __bufsize, "%p",
+ _M_variant._M_iterator._M_address);
+ __formatter->_M_print_word(__buf);
+ }
+ else if (strcmp(__name, "type") == 0)
+ {
+ assert(_M_variant._M_iterator._M_type);
+ // TBD: demangle!
+ __formatter->_M_print_word(_M_variant._M_iterator._M_type->name());
+ }
+ else if (strcmp(__name, "constness") == 0)
+ {
+ static const char* __constness_names[__last_constness] =
+ {
+ "<unknown>",
+ "constant",
+ "mutable"
+ };
+ __formatter->_M_print_word(__constness_names[_M_variant._M_iterator._M_constness]);
+ }
+ else if (strcmp(__name, "state") == 0)
+ {
+ static const char* __state_names[__last_state] =
+ {
+ "<unknown>",
+ "singular",
+ "dereferenceable (start-of-sequence)",
+ "dereferenceable",
+ "past-the-end"
+ };
+ __formatter->_M_print_word(__state_names[_M_variant._M_iterator._M_state]);
+ }
+ else if (strcmp(__name, "sequence") == 0)
+ {
+ assert(_M_variant._M_iterator._M_sequence);
+ __formatter->_M_format_word(__buf, __bufsize, "%p",
+ _M_variant._M_iterator._M_sequence);
+ __formatter->_M_print_word(__buf);
+ }
+ else if (strcmp(__name, "seq_type") == 0)
+ {
+ // TBD: demangle!
+ assert(_M_variant._M_iterator._M_seq_type);
+ __formatter->_M_print_word(_M_variant._M_iterator._M_seq_type->name());
+ }
+ else
+ assert(false);
+ }
+ else if (_M_kind == __sequence)
+ {
+ if (strcmp(__name, "name") == 0)
+ {
+ assert(_M_variant._M_sequence._M_name);
+ __formatter->_M_print_word(_M_variant._M_sequence._M_name);
+ }
+ else if (strcmp(__name, "address") == 0)
+ {
+ assert(_M_variant._M_sequence._M_address);
+ __formatter->_M_format_word(__buf, __bufsize, "%p",
+ _M_variant._M_sequence._M_address);
+ __formatter->_M_print_word(__buf);
+ }
+ else if (strcmp(__name, "type") == 0)
+ {
+ // TBD: demangle!
+ assert(_M_variant._M_sequence._M_type);
+ __formatter->_M_print_word(_M_variant._M_sequence._M_type->name());
+ }
+ else
+ assert(false);
+ }
+ else if (_M_kind == __integer)
+ {
+ if (strcmp(__name, "name") == 0)
+ {
+ assert(_M_variant._M_integer._M_name);
+ __formatter->_M_print_word(_M_variant._M_integer._M_name);
+ }
+ else
+ assert(false);
+ }
+ else if (_M_kind == __string)
+ {
+ if (strcmp(__name, "name") == 0)
+ {
+ assert(_M_variant._M_string._M_name);
+ __formatter->_M_print_word(_M_variant._M_string._M_name);
+ }
+ else
+ assert(false);
+ }
+ else
+ {
+ assert(false);
+ }
+ }
+
+ void
+ _Error_formatter::_Parameter::
+ _M_print_description(const _Error_formatter* __formatter) const
+ {
+ const int __bufsize = 128;
+ char __buf[__bufsize];
+
+ if (_M_kind == __iterator)
+ {
+ __formatter->_M_print_word("iterator ");
+ if (_M_variant._M_iterator._M_name)
+ {
+ __formatter->_M_format_word(__buf, __bufsize, "\"%s\" ",
+ _M_variant._M_iterator._M_name);
+ __formatter->_M_print_word(__buf);
+ }
+
+ __formatter->_M_format_word(__buf, __bufsize, "@ 0x%p {\n",
+ _M_variant._M_iterator._M_address);
+ __formatter->_M_print_word(__buf);
+ if (_M_variant._M_iterator._M_type)
+ {
+ __formatter->_M_print_word("type = ");
+ _M_print_field(__formatter, "type");
+
+ if (_M_variant._M_iterator._M_constness != __unknown_constness)
+ {
+ __formatter->_M_print_word(" (");
+ _M_print_field(__formatter, "constness");
+ __formatter->_M_print_word(" iterator)");
+ }
+ __formatter->_M_print_word(";\n");
+ }
+
+ if (_M_variant._M_iterator._M_state != __unknown_state)
+ {
+ __formatter->_M_print_word(" state = ");
+ _M_print_field(__formatter, "state");
+ __formatter->_M_print_word(";\n");
+ }
+
+ if (_M_variant._M_iterator._M_sequence)
+ {
+ __formatter->_M_print_word(" references sequence ");
+ if (_M_variant._M_iterator._M_seq_type)
+ {
+ __formatter->_M_print_word("with type `");
+ _M_print_field(__formatter, "seq_type");
+ __formatter->_M_print_word("' ");
+ }
+
+ __formatter->_M_format_word(__buf, __bufsize, "@ 0x%p\n",
+ _M_variant._M_sequence._M_address);
+ __formatter->_M_print_word(__buf);
+ }
+ __formatter->_M_print_word("}\n");
+ }
+ else if (_M_kind == __sequence)
+ {
+ __formatter->_M_print_word("sequence ");
+ if (_M_variant._M_sequence._M_name)
+ {
+ __formatter->_M_format_word(__buf, __bufsize, "\"%s\" ",
+ _M_variant._M_sequence._M_name);
+ __formatter->_M_print_word(__buf);
+ }
+
+ __formatter->_M_format_word(__buf, __bufsize, "@ 0x%p {\n",
+ _M_variant._M_sequence._M_address);
+ __formatter->_M_print_word(__buf);
+
+ if (_M_variant._M_sequence._M_type)
+ {
+ __formatter->_M_print_word(" type = ");
+ _M_print_field(__formatter, "type");
+ __formatter->_M_print_word(";\n");
+ }
+ __formatter->_M_print_word("}\n");
+ }
+ }
+
+ const _Error_formatter&
+ _Error_formatter::_M_message(_Debug_msg_id __id) const
+ { return this->_M_message(_S_debug_messages[__id]); }
+
+ void
+ _Error_formatter::_M_error() const
+ {
+ const int __bufsize = 128;
+ char __buf[__bufsize];
+
+ // Emit file & line number information
+ _M_column = 1;
+ _M_wordwrap = false;
+ if (_M_file)
+ {
+ _M_format_word(__buf, __bufsize, "%s:", _M_file);
+ _M_print_word(__buf);
+ _M_column += strlen(__buf);
+ }
+
+ if (_M_line > 0)
+ {
+ _M_format_word(__buf, __bufsize, "%u:", _M_line);
+ _M_print_word(__buf);
+ _M_column += strlen(__buf);
+ }
+
+ _M_wordwrap = true;
+ _M_print_word("error: ");
+
+ // Print the error message
+ assert(_M_text);
+ _M_print_string(_M_text);
+ _M_print_word(".\n");
+
+ // Emit descriptions of the objects involved in the operation
+ _M_wordwrap = false;
+ bool __has_noninteger_parameters = false;
+ for (unsigned int __i = 0; __i < _M_num_parameters; ++__i)
+ {
+ if (_M_parameters[__i]._M_kind == _Parameter::__iterator
+ || _M_parameters[__i]._M_kind == _Parameter::__sequence)
+ {
+ if (!__has_noninteger_parameters)
+ {
+ _M_first_line = true;
+ _M_print_word("\nObjects involved in the operation:\n");
+ __has_noninteger_parameters = true;
+ }
+ _M_parameters[__i]._M_print_description(this);
+ }
+ }
+
+ abort();
+ }
+
+ template<typename _Tp>
+ void
+ _Error_formatter::_M_format_word(char* __buf,
+ int __n __attribute__((__unused__)),
+ const char* __fmt, _Tp __s) const
+ {
+#ifdef _GLIBCXX_USE_C99
+ std::snprintf(__buf, __n, __fmt, __s);
+#else
+ std::sprintf(__buf, __fmt, __s);
+#endif
+ }
+
+
+ void
+ _Error_formatter::_M_print_word(const char* __word) const
+ {
+ if (!_M_wordwrap)
+ {
+ fprintf(stderr, "%s", __word);
+ return;
+ }
+
+ size_t __length = strlen(__word);
+ if (__length == 0)
+ return;
+
+ if ((_M_column + __length < _M_max_length)
+ || (__length >= _M_max_length && _M_column == 1))
+ {
+ // If this isn't the first line, indent
+ if (_M_column == 1 && !_M_first_line)
+ {
+ char __spacing[_M_indent + 1];
+ for (int i = 0; i < _M_indent; ++i)
+ __spacing[i] = ' ';
+ __spacing[_M_indent] = '\0';
+ fprintf(stderr, "%s", __spacing);
+ _M_column += _M_indent;
+ }
+
+ fprintf(stderr, "%s", __word);
+ _M_column += __length;
+
+ if (__word[__length - 1] == '\n')
+ {
+ _M_first_line = false;
+ _M_column = 1;
+ }
+ }
+ else
+ {
+ _M_column = 1;
+ _M_print_word("\n");
+ _M_print_word(__word);
+ }
+ }
+
+ void
+ _Error_formatter::
+ _M_print_string(const char* __string) const
+ {
+ const char* __start = __string;
+ const char* __end = __start;
+ const int __bufsize = 128;
+ char __buf[__bufsize];
+
+ while (*__start)
+ {
+ if (*__start != '%')
+ {
+ // [__start, __end) denotes the next word
+ __end = __start;
+ while (isalnum(*__end)) ++__end;
+ if (__start == __end) ++__end;
+ if (isspace(*__end)) ++__end;
+
+ assert(__end - __start + 1< __bufsize);
+ _M_format_word(__buf, __end - __start + 1, "%s", __start);
+ _M_print_word(__buf);
+ __start = __end;
+
+ // Skip extra whitespace
+ while (*__start == ' ')
+ ++__start;
+
+ continue;
+ }
+
+ ++__start;
+ assert(*__start);
+ if (*__start == '%')
+ {
+ _M_print_word("%");
+ ++__start;
+ continue;
+ }
+
+ // Get the parameter number
+ assert(*__start >= '1' && *__start <= '9');
+ size_t __param = *__start - '0';
+ --__param;
+ assert(__param < _M_num_parameters);
+
+ // '.' separates the parameter number from the field
+ // name, if there is one.
+ ++__start;
+ if (*__start != '.')
+ {
+ assert(*__start == ';');
+ ++__start;
+ __buf[0] = '\0';
+ if (_M_parameters[__param]._M_kind == _Parameter::__integer)
+ {
+ _M_format_word(__buf, __bufsize, "%ld",
+ _M_parameters[__param]._M_variant._M_integer._M_value);
+ _M_print_word(__buf);
+ }
+ else if (_M_parameters[__param]._M_kind == _Parameter::__string)
+ _M_print_string(_M_parameters[__param]._M_variant._M_string._M_value);
+ continue;
+ }
+
+ // Extract the field name we want
+ enum { __max_field_len = 16 };
+ char __field[__max_field_len];
+ int __field_idx = 0;
+ ++__start;
+ while (*__start != ';')
+ {
+ assert(*__start);
+ assert(__field_idx < __max_field_len-1);
+ __field[__field_idx++] = *__start++;
+ }
+ ++__start;
+ __field[__field_idx] = 0;
+
+ _M_parameters[__param]._M_print_field(this, __field);
+ }
+ }
+
+ // Instantiations.
+ template
+ void
+ _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
+ const void* __s) const;
+
+ template
+ void
+ _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
+ long __s) const;
+
+ template
+ void
+ _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
+ std::size_t __s) const;
+
+ template
+ void
+ _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
+ const char* __s) const;
+} // namespace __gnu_debug
diff --git a/contrib/libstdc++/src/debug_list.cc b/contrib/libstdc++/src/debug_list.cc
new file mode 100644
index 0000000..3d14b28
--- /dev/null
+++ b/contrib/libstdc++/src/debug_list.cc
@@ -0,0 +1,34 @@
+// Debugging mode support code for list -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+#define _GLIBCXX_DEBUG
+
+#include <bits/c++config.h>
+
+#include "list.cc"
diff --git a/contrib/libstdc++/src/ext-inst.cc b/contrib/libstdc++/src/ext-inst.cc
index 4896b11..4be3fed6 100644
--- a/contrib/libstdc++/src/ext-inst.cc
+++ b/contrib/libstdc++/src/ext-inst.cc
@@ -1,6 +1,6 @@
// Explicit instantiation file.
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -34,11 +34,18 @@
#include <ext/rope>
#include <ext/stdio_filebuf.h>
+namespace __gnu_internal
+{
+ const int min_len = __gnu_cxx::_Rope_constants::_S_max_rope_depth + 1;
+}
+
namespace __gnu_cxx
{
+ using namespace __gnu_internal;
+
template
const unsigned long
- rope<char, std::allocator<char> >::_S_min_len;
+ rope<char, std::allocator<char> >::_S_min_len[min_len];
template
char
@@ -47,10 +54,10 @@ namespace __gnu_cxx
template class stdio_filebuf<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template
- const unsigned long
- rope<wchar_t, std::allocator<wchar_t> >::_S_min_len;
+ const unsigned long
+ rope<wchar_t, std::allocator<wchar_t> >::_S_min_len[min_len];
template
wchar_t
diff --git a/contrib/libstdc++/src/fstream-inst.cc b/contrib/libstdc++/src/fstream-inst.cc
index 8b866c0..4d9eae5 100644
--- a/contrib/libstdc++/src/fstream-inst.cc
+++ b/contrib/libstdc++/src/fstream-inst.cc
@@ -38,25 +38,25 @@ namespace std
{
// filebuf
template class basic_filebuf<char, char_traits<char> >;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_filebuf<wchar_t, char_traits<wchar_t> >;
#endif
// ifstream
template class basic_ifstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ifstream<wchar_t>;
#endif
// ofstream
template class basic_ofstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ofstream<wchar_t>;
#endif
// fstream
template class basic_fstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_fstream<wchar_t>;
#endif
} // namespace std
diff --git a/contrib/libstdc++/src/functexcept.cc b/contrib/libstdc++/src/functexcept.cc
index dab6f2f..fb158a6 100644
--- a/contrib/libstdc++/src/functexcept.cc
+++ b/contrib/libstdc++/src/functexcept.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,6 +32,12 @@
#include <new>
#include <typeinfo>
#include <ios>
+#ifdef _GLIBCXX_USE_NLS
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+#else
+# define _(msgid) (msgid)
+#endif
namespace std
{
@@ -54,43 +60,43 @@ namespace std
void
__throw_logic_error(const char* __s)
- { throw logic_error(__s); }
+ { throw logic_error(_(__s)); }
void
__throw_domain_error(const char* __s)
- { throw domain_error(__s); }
+ { throw domain_error(_(__s)); }
void
__throw_invalid_argument(const char* __s)
- { throw invalid_argument(__s); }
+ { throw invalid_argument(_(__s)); }
void
__throw_length_error(const char* __s)
- { throw length_error(__s); }
+ { throw length_error(_(__s)); }
void
__throw_out_of_range(const char* __s)
- { throw out_of_range(__s); }
+ { throw out_of_range(_(__s)); }
void
__throw_runtime_error(const char* __s)
- { throw runtime_error(__s); }
+ { throw runtime_error(_(__s)); }
void
__throw_range_error(const char* __s)
- { throw range_error(__s); }
+ { throw range_error(_(__s)); }
void
__throw_overflow_error(const char* __s)
- { throw overflow_error(__s); }
+ { throw overflow_error(_(__s)); }
void
__throw_underflow_error(const char* __s)
- { throw underflow_error(__s); }
+ { throw underflow_error(_(__s)); }
void
__throw_ios_failure(const char* __s)
- { throw ios_base::failure(__s); }
+ { throw ios_base::failure(_(__s)); }
#else
void
__throw_bad_exception(void)
diff --git a/contrib/libstdc++/src/globals_io.cc b/contrib/libstdc++/src/globals_io.cc
new file mode 100644
index 0000000..bf70f47c
--- /dev/null
+++ b/contrib/libstdc++/src/globals_io.cc
@@ -0,0 +1,129 @@
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 "bits/c++config.h"
+#include "bits/gthr.h"
+#include <fstream>
+#include <istream>
+#include <ostream>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+
+// On AIX, and perhaps other systems, library initialization order is
+// not guaranteed. For example, the static initializers for the main
+// program might run before the static initializers for this library.
+// That means that we cannot rely on static initialization in the
+// library; there is no guarantee that things will get initialized in
+// time. This file contains definitions of all global variables that
+// require initialization as arrays of characters.
+
+// NB: asm directives can rename these non-exported, namespace
+// __gnu_cxx symbols into exported, namespace std symbols with the
+// appropriate symbol version name.
+// The rename syntax is
+// asm (".symver currentname,oldname@@GLIBCXX_3.2")
+// In macro form:
+// _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2)
+
+namespace std
+{
+ // Standard stream objects.
+ // NB: Iff <iostream> is included, these definitions become wonky.
+ typedef char fake_istream[sizeof(istream)]
+ __attribute__ ((aligned(__alignof__(istream))));
+ typedef char fake_ostream[sizeof(ostream)]
+ __attribute__ ((aligned(__alignof__(ostream))));
+ fake_istream cin;
+ fake_ostream cout;
+ fake_ostream cerr;
+ fake_ostream clog;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef char fake_wistream[sizeof(wistream)]
+ __attribute__ ((aligned(__alignof__(wistream))));
+ typedef char fake_wostream[sizeof(wostream)]
+ __attribute__ ((aligned(__alignof__(wostream))));
+ fake_wistream wcin;
+ fake_wostream wcout;
+ fake_wostream wcerr;
+ fake_wostream wclog;
+#endif
+} // namespace std
+
+namespace __gnu_internal
+{
+ using namespace std;
+ using namespace __gnu_cxx;
+
+ // We use different stream buffer types depending on whether
+ // ios_base::sync_with_stdio(false) has been called.
+ typedef char fake_stdiobuf[sizeof(stdio_sync_filebuf<char>)]
+ __attribute__ ((aligned(__alignof__(stdio_sync_filebuf<char>))));
+ fake_stdiobuf buf_cout_sync;
+ fake_stdiobuf buf_cin_sync;
+ fake_stdiobuf buf_cerr_sync;
+
+ typedef char fake_filebuf[sizeof(stdio_filebuf<char>)]
+ __attribute__ ((aligned(__alignof__(stdio_filebuf<char>))));
+ fake_filebuf buf_cout;
+ fake_filebuf buf_cin;
+ fake_filebuf buf_cerr;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef char fake_wstdiobuf[sizeof(stdio_sync_filebuf<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(stdio_sync_filebuf<wchar_t>))));
+ fake_wstdiobuf buf_wcout_sync;
+ fake_wstdiobuf buf_wcin_sync;
+ fake_wstdiobuf buf_wcerr_sync;
+
+ typedef char fake_wfilebuf[sizeof(stdio_filebuf<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(stdio_filebuf<wchar_t>))));
+ fake_wfilebuf buf_wcout;
+ fake_wfilebuf buf_wcin;
+ fake_wfilebuf buf_wcerr;
+#endif
+
+ // Globals for once-only runtime initialization of mutex objects. This
+ // allows static initialization of these objects on systems that need a
+ // function call to initialize a mutex. For example, see stl_threads.h.
+#ifdef __GTHREAD_MUTEX_INIT
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+ __gthread_once_t _GLIBCXX_once = __GTHREAD_ONCE_INIT;
+ __gthread_mutex_t _GLIBCXX_mutex;
+ __gthread_mutex_t *_GLIBCXX_mutex_address;
+
+ // Once-only initializer function for _GLIBCXX_mutex.
+ void
+ _GLIBCXX_mutex_init ()
+ { __GTHREAD_MUTEX_INIT_FUNCTION (&_GLIBCXX_mutex); }
+
+ // Once-only initializer function for _GLIBCXX_mutex_address.
+ void
+ _GLIBCXX_mutex_address_init ()
+ { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCXX_mutex_address); }
+#endif
+} // namespace __gnu_internal
diff --git a/contrib/libstdc++/src/globals_locale.cc b/contrib/libstdc++/src/globals_locale.cc
new file mode 100644
index 0000000..67192c4
--- /dev/null
+++ b/contrib/libstdc++/src/globals_locale.cc
@@ -0,0 +1,210 @@
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <locale>
+
+// On AIX, and perhaps other systems, library initialization order is
+// not guaranteed. For example, the static initializers for the main
+// program might run before the static initializers for this library.
+// That means that we cannot rely on static initialization in the
+// library; there is no guarantee that things will get initialized in
+// time. This file contains definitions of all global variables that
+// require initialization as arrays of characters.
+
+// NB: asm directives can rename these non-exported, namespace
+// __gnu_cxx symbols into exported, namespace std symbols with the
+// appropriate symbol version name.
+// The rename syntax is
+// asm (".symver currentname,oldname@@GLIBCXX_3.2")
+// In macro form:
+// _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2)
+
+namespace __gnu_internal
+{
+ using namespace std;
+
+ typedef char fake_locale_Impl[sizeof(locale::_Impl)]
+ __attribute__ ((aligned(__alignof__(locale::_Impl))));
+ fake_locale_Impl c_locale_impl;
+
+ typedef char fake_locale[sizeof(locale)]
+ __attribute__ ((aligned(__alignof__(locale))));
+ fake_locale c_locale;
+
+ typedef char fake_name_vec[sizeof(char*)]
+ __attribute__ ((aligned(__alignof__(char*))));
+ fake_name_vec name_vec[6 + _GLIBCXX_NUM_CATEGORIES];
+
+ typedef char fake_names[sizeof(char[2])]
+ __attribute__ ((aligned(__alignof__(char[2]))));
+ fake_names name_c[6 + _GLIBCXX_NUM_CATEGORIES];
+
+ typedef char fake_facet_vec[sizeof(locale::facet*)]
+ __attribute__ ((aligned(__alignof__(locale::facet*))));
+ fake_facet_vec facet_vec[_GLIBCXX_NUM_FACETS];
+
+ typedef char fake_cache_vec[sizeof(locale::facet*)]
+ __attribute__ ((aligned(__alignof__(locale::facet*))));
+ fake_cache_vec cache_vec[_GLIBCXX_NUM_FACETS];
+
+ typedef char fake_ctype_c[sizeof(std::ctype<char>)]
+ __attribute__ ((aligned(__alignof__(std::ctype<char>))));
+ fake_ctype_c ctype_c;
+
+ typedef char fake_collate_c[sizeof(std::collate<char>)]
+ __attribute__ ((aligned(__alignof__(std::collate<char>))));
+ fake_collate_c collate_c;
+
+ typedef char fake_numpunct_c[sizeof(numpunct<char>)]
+ __attribute__ ((aligned(__alignof__(numpunct<char>))));
+ fake_numpunct_c numpunct_c;
+
+ typedef char fake_num_get_c[sizeof(num_get<char>)]
+ __attribute__ ((aligned(__alignof__(num_get<char>))));
+ fake_num_get_c num_get_c;
+
+ typedef char fake_num_put_c[sizeof(num_put<char>)]
+ __attribute__ ((aligned(__alignof__(num_put<char>))));
+ fake_num_put_c num_put_c;
+
+ typedef char fake_codecvt_c[sizeof(codecvt<char, char, mbstate_t>)]
+ __attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>))));
+ fake_codecvt_c codecvt_c;
+
+ typedef char fake_moneypunct_c[sizeof(moneypunct<char, true>)]
+ __attribute__ ((aligned(__alignof__(moneypunct<char, true>))));
+ fake_moneypunct_c moneypunct_ct;
+ fake_moneypunct_c moneypunct_cf;
+
+ typedef char fake_money_get_c[sizeof(money_get<char>)]
+ __attribute__ ((aligned(__alignof__(money_get<char>))));
+ fake_money_get_c money_get_c;
+
+ typedef char fake_money_put_c[sizeof(money_put<char>)]
+ __attribute__ ((aligned(__alignof__(money_put<char>))));
+ fake_money_put_c money_put_c;
+
+ typedef char fake_timepunct_c[sizeof(__timepunct<char>)]
+ __attribute__ ((aligned(__alignof__(__timepunct<char>))));
+ fake_timepunct_c timepunct_c;
+
+ typedef char fake_time_get_c[sizeof(time_get<char>)]
+ __attribute__ ((aligned(__alignof__(time_get<char>))));
+ fake_time_get_c time_get_c;
+
+ typedef char fake_time_put_c[sizeof(time_put<char>)]
+ __attribute__ ((aligned(__alignof__(time_put<char>))));
+ fake_time_put_c time_put_c;
+
+ typedef char fake_messages_c[sizeof(messages<char>)]
+ __attribute__ ((aligned(__alignof__(messages<char>))));
+ fake_messages_c messages_c;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(std::ctype<wchar_t>))));
+ fake_wtype_w ctype_w;
+
+ typedef char fake_wollate_w[sizeof(std::collate<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(std::collate<wchar_t>))));
+ fake_wollate_w collate_w;
+
+ typedef char fake_numpunct_w[sizeof(numpunct<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(numpunct<wchar_t>))));
+ fake_numpunct_w numpunct_w;
+
+ typedef char fake_num_get_w[sizeof(num_get<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(num_get<wchar_t>))));
+ fake_num_get_w num_get_w;
+
+ typedef char fake_num_put_w[sizeof(num_put<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(num_put<wchar_t>))));
+ fake_num_put_w num_put_w;
+
+ typedef char fake_wodecvt_w[sizeof(codecvt<wchar_t, char, mbstate_t>)]
+ __attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>))));
+ fake_wodecvt_w codecvt_w;
+
+ typedef char fake_moneypunct_w[sizeof(moneypunct<wchar_t, true>)]
+ __attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>))));
+ fake_moneypunct_w moneypunct_wt;
+ fake_moneypunct_w moneypunct_wf;
+
+ typedef char fake_money_get_w[sizeof(money_get<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
+ fake_money_get_w money_get_w;
+
+ typedef char fake_money_put_w[sizeof(money_put<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
+ fake_money_put_w money_put_w;
+
+ typedef char fake_timepunct_w[sizeof(__timepunct<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(__timepunct<wchar_t>))));
+ fake_timepunct_w timepunct_w;
+
+ typedef char fake_time_get_w[sizeof(time_get<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(time_get<wchar_t>))));
+ fake_time_get_w time_get_w;
+
+ typedef char fake_time_put_w[sizeof(time_put<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(time_put<wchar_t>))));
+ fake_time_put_w time_put_w;
+
+ typedef char fake_messages_w[sizeof(messages<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(messages<wchar_t>))));
+ fake_messages_w messages_w;
+#endif
+
+ // Storage for "C" locale caches.
+ typedef char fake_num_cache_c[sizeof(std::__numpunct_cache<char>)]
+ __attribute__ ((aligned(__alignof__(std::__numpunct_cache<char>))));
+ fake_num_cache_c numpunct_cache_c;
+
+ typedef char fake_money_cache_c[sizeof(std::__moneypunct_cache<char, true>)]
+ __attribute__ ((aligned(__alignof__(std::__moneypunct_cache<char, true>))));
+ fake_money_cache_c moneypunct_cache_ct;
+ fake_money_cache_c moneypunct_cache_cf;
+
+ typedef char fake_time_cache_c[sizeof(std::__timepunct_cache<char>)]
+ __attribute__ ((aligned(__alignof__(std::__timepunct_cache<char>))));
+ fake_time_cache_c timepunct_cache_c;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef char fake_num_cache_w[sizeof(std::__numpunct_cache<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(std::__numpunct_cache<wchar_t>))));
+ fake_num_cache_w numpunct_cache_w;
+
+ typedef char fake_money_cache_w[sizeof(std::__moneypunct_cache<wchar_t,true>)]
+ __attribute__ ((aligned(__alignof__(std::__moneypunct_cache<wchar_t,true>))));
+ fake_money_cache_w moneypunct_cache_wt;
+ fake_money_cache_w moneypunct_cache_wf;
+
+ typedef char fake_time_cache_w[sizeof(std::__timepunct_cache<wchar_t>)]
+ __attribute__ ((aligned(__alignof__(std::__timepunct_cache<wchar_t>))));
+ fake_time_cache_w timepunct_cache_w;
+#endif
+} // namespace __gnu_internal
diff --git a/contrib/libstdc++/src/io-inst.cc b/contrib/libstdc++/src/io-inst.cc
index 31f53b4..0b407ef 100644
--- a/contrib/libstdc++/src/io-inst.cc
+++ b/contrib/libstdc++/src/io-inst.cc
@@ -1,6 +1,6 @@
// Explicit instantiation file.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,27 +34,26 @@
#include <ios>
#include <iomanip>
-#include <iostream>
namespace std
{
// basic_ios
template class basic_ios<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ios<wchar_t>;
#endif
// iomanip
template class _Setfill<char>;
template _Setfill<char> setfill(char);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class _Setfill<wchar_t>;
template _Setfill<wchar_t> setfill(wchar_t);
#endif
// iostream
template class basic_iostream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_iostream<wchar_t>;
#endif
} // namespace std
diff --git a/contrib/libstdc++/src/ios.cc b/contrib/libstdc++/src/ios.cc
index 00dbe12..12ffe2f 100644
--- a/contrib/libstdc++/src/ios.cc
+++ b/contrib/libstdc++/src/ios.cc
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -33,45 +33,11 @@
//
#include <ios>
-#include <ostream>
-#include <istream>
-#include <fstream>
+#include <limits>
#include <bits/atomicity.h>
-#include <ext/stdio_filebuf.h>
-#ifdef _GLIBCPP_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-namespace __gnu_cxx
-{
- // Extern declarations for global objects in src/globals.cc.
- extern stdio_filebuf<char> buf_cout;
- extern stdio_filebuf<char> buf_cin;
- extern stdio_filebuf<char> buf_cerr;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- extern stdio_filebuf<wchar_t> buf_wcout;
- extern stdio_filebuf<wchar_t> buf_wcin;
- extern stdio_filebuf<wchar_t> buf_wcerr;
-#endif
-} // namespace __gnu_cxx
namespace std
{
- using namespace __gnu_cxx;
-
- extern istream cin;
- extern ostream cout;
- extern ostream cerr;
- extern ostream clog;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- extern wistream wcin;
- extern wostream wcout;
- extern wostream wcerr;
- extern wostream wclog;
-#endif
-
// Definitions for static const data members of __ios_flags.
const __ios_flags::__int_type __ios_flags::_S_boolalpha;
const __ios_flags::__int_type __ios_flags::_S_dec;
@@ -140,102 +106,33 @@ namespace std
const ios_base::seekdir ios_base::end;
const int ios_base::_S_local_word_size;
- int ios_base::Init::_S_ios_base_init = 0;
- bool ios_base::Init::_S_synced_with_stdio = true;
- ios_base::failure::failure(const string& __str) throw()
- {
- strncpy(_M_name, __str.c_str(), _M_bufsize);
- _M_name[_M_bufsize - 1] = '\0';
- }
+ _Atomic_word ios_base::Init::_S_refcount;
- ios_base::failure::~failure() throw()
- { }
-
- const char*
- ios_base::failure::what() const throw()
- { return _M_name; }
-
- void
- ios_base::Init::_S_ios_create(bool __sync)
- {
- size_t __out_size = __sync ? 0 : static_cast<size_t>(BUFSIZ);
-#ifdef _GLIBCPP_HAVE_ISATTY
- size_t __in_size =
- (__sync || isatty (0)) ? 1 : static_cast<size_t>(BUFSIZ);
-#else
- size_t __in_size = 1;
-#endif
-
- // NB: The file globals.cc creates the four standard files
- // with NULL buffers. At this point, we swap out the dummy NULL
- // [io]stream objects and buffers with the real deal.
- new (&buf_cout) stdio_filebuf<char>(stdout, ios_base::out, __out_size);
- new (&buf_cin) stdio_filebuf<char>(stdin, ios_base::in, __in_size);
- new (&buf_cerr) stdio_filebuf<char>(stderr, ios_base::out, __out_size);
-
- new (&cout) ostream(&buf_cout);
- new (&cin) istream(&buf_cin);
- new (&cerr) ostream(&buf_cerr);
- new (&clog) ostream(&buf_cerr);
- cout.init(&buf_cout);
- cin.init(&buf_cin);
- cerr.init(&buf_cerr);
- clog.init(&buf_cerr);
- cin.tie(&cout);
- cerr.flags(ios_base::unitbuf);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- new (&buf_wcout) stdio_filebuf<wchar_t>(stdout, ios_base::out, __out_size);
- new (&buf_wcin) stdio_filebuf<wchar_t>(stdin, ios_base::in, __in_size);
- new (&buf_wcerr) stdio_filebuf<wchar_t>(stderr, ios_base::out, __out_size);
- new (&wcout) wostream(&buf_wcout);
- new (&wcin) wistream(&buf_wcin);
- new (&wcerr) wostream(&buf_wcerr);
- new (&wclog) wostream(&buf_wcerr);
- wcout.init(&buf_wcout);
- wcin.init(&buf_wcin);
- wcerr.init(&buf_wcerr);
- wclog.init(&buf_wcerr);
- wcin.tie(&wcout);
- wcerr.flags(ios_base::unitbuf);
-#endif
- }
+ bool ios_base::Init::_S_synced_with_stdio = true;
- void
- ios_base::Init::_S_ios_destroy()
+ ios_base::ios_base()
+ : _M_precision(), _M_width(), _M_flags(), _M_exception(),
+ _M_streambuf_state(), _M_callbacks(0), _M_word_zero(),
+ _M_word_size(_S_local_word_size), _M_word(_M_local_word), _M_ios_locale()
{
- // Explicitly call dtors to free any memory that is dynamically
- // allocated by filebuf ctor or member functions, but don't
- // deallocate all memory by calling operator delete.
- buf_cout.~stdio_filebuf();
- buf_cin.~stdio_filebuf();
- buf_cerr.~stdio_filebuf();
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- buf_wcout.~stdio_filebuf();
- buf_wcin.~stdio_filebuf();
- buf_wcerr.~stdio_filebuf();
-#endif
+ // Do nothing: basic_ios::init() does it.
+ // NB: _M_callbacks and _M_word must be zero for non-initialized
+ // ios_base to go through ~ios_base gracefully.
}
-
- ios_base::Init::Init()
+
+ // 27.4.2.7 ios_base constructors/destructors
+ ios_base::~ios_base()
{
- if (_S_ios_base_init == 0)
+ _M_call_callbacks(erase_event);
+ _M_dispose_callbacks();
+ if (_M_word != _M_local_word)
{
- // Standard streams default to synced with "C" operations.
- ios_base::Init::_S_synced_with_stdio = true;
- _S_ios_create(ios_base::Init::_S_synced_with_stdio);
+ delete [] _M_word;
+ _M_word = 0;
}
- ++_S_ios_base_init;
}
- ios_base::Init::~Init()
- {
- if (--_S_ios_base_init == 0)
- _S_ios_destroy();
- }
-
// 27.4.2.5 ios_base storage functions
int
ios_base::xalloc() throw()
@@ -243,12 +140,16 @@ namespace std
// Implementation note: Initialize top to zero to ensure that
// initialization occurs before main() is started.
static _Atomic_word _S_top = 0;
- return __exchange_and_add(&_S_top, 1) + 4;
+ return __gnu_cxx::__exchange_and_add(&_S_top, 1) + 4;
}
+ void
+ ios_base::register_callback(event_callback __fn, int __index)
+ { _M_callbacks = new _Callback_list(__fn, __index, _M_callbacks); }
+
// 27.4.2.5 iword/pword storage
ios_base::_Words&
- ios_base::_M_grow_words(int ix)
+ ios_base::_M_grow_words(int ix, bool iword)
{
// Precondition: _M_word_size <= ix
int newsize = _S_local_word_size;
@@ -264,7 +165,12 @@ namespace std
{
_M_streambuf_state |= badbit;
if (_M_streambuf_state & _M_exception)
- __throw_ios_failure("ios_base::_M_grow_words failure");
+ __throw_ios_failure(__N("ios_base::_M_grow_words "
+ "allocation failed"));
+ if (iword)
+ _M_word_zero._M_iword = 0;
+ else
+ _M_word_zero._M_pword = 0;
return _M_word_zero;
}
for (int i = 0; i < _M_word_size; i++)
@@ -279,7 +185,11 @@ namespace std
{
_M_streambuf_state |= badbit;
if (_M_streambuf_state & _M_exception)
- __throw_ios_failure("ios_base::_M_grow_words failure");
+ __throw_ios_failure(__N("ios_base::_M_grow_words is not valid"));
+ if (iword)
+ _M_word_zero._M_iword = 0;
+ else
+ _M_word_zero._M_pword = 0;
return _M_word_zero;
}
}
@@ -287,51 +197,6 @@ namespace std
_M_word_size = newsize;
return _M_word[ix];
}
-
- // Called only by basic_ios<>::init.
- void
- ios_base::_M_init()
- {
- // NB: May be called more than once
- _M_precision = 6;
- _M_width = 0;
- _M_flags = skipws | dec;
- _M_ios_locale = locale();
- }
-
- // 27.4.2.3 ios_base locale functions
- locale
- ios_base::imbue(const locale& __loc)
- {
- locale __old = _M_ios_locale;
- _M_ios_locale = __loc;
- _M_call_callbacks(imbue_event);
- return __old;
- }
-
- ios_base::ios_base() : _M_callbacks(0), _M_word_size(_S_local_word_size),
- _M_word(_M_local_word)
- {
- // Do nothing: basic_ios::init() does it.
- // NB: _M_callbacks and _M_word must be zero for non-initialized
- // ios_base to go through ~ios_base gracefully.
- }
-
- // 27.4.2.7 ios_base constructors/destructors
- ios_base::~ios_base()
- {
- _M_call_callbacks(erase_event);
- _M_dispose_callbacks();
- if (_M_word != _M_local_word)
- {
- delete [] _M_word;
- _M_word = 0;
- }
- }
-
- void
- ios_base::register_callback(event_callback __fn, int __index)
- { _M_callbacks = new _Callback_list(__fn, __index, _M_callbacks); }
void
ios_base::_M_call_callbacks(event __e) throw()
@@ -359,23 +224,4 @@ namespace std
}
_M_callbacks = 0;
}
-
- bool
- ios_base::sync_with_stdio(bool __sync)
- {
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- // 49. Underspecification of ios_base::sync_with_stdio
- bool __ret = ios_base::Init::_S_synced_with_stdio;
-#endif
-
- // Turn off sync with C FILE* for cin, cout, cerr, clog iff
- // currently synchronized.
- if (!__sync && __ret)
- {
- ios_base::Init::_S_synced_with_stdio = false;
- ios_base::Init::_S_ios_destroy();
- ios_base::Init::_S_ios_create(ios_base::Init::_S_synced_with_stdio);
- }
- return __ret;
- }
-} // namespace std
+} // namespace std
diff --git a/contrib/libstdc++/src/ios_failure.cc b/contrib/libstdc++/src/ios_failure.cc
new file mode 100644
index 0000000..0d99ba3
--- /dev/null
+++ b/contrib/libstdc++/src/ios_failure.cc
@@ -0,0 +1,48 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 27.4.2.1.1 Class ios_base::failure
+//
+
+#include <ios>
+
+namespace std
+{
+ ios_base::failure::failure(const string& __str) throw()
+ : _M_msg(__str) { }
+
+ ios_base::failure::~failure() throw()
+ { }
+
+ const char*
+ ios_base::failure::what() const throw()
+ { return _M_msg.c_str(); }
+} // namespace std
diff --git a/contrib/libstdc++/src/ios_init.cc b/contrib/libstdc++/src/ios_init.cc
new file mode 100644
index 0000000..ae7b8e1
--- /dev/null
+++ b/contrib/libstdc++/src/ios_init.cc
@@ -0,0 +1,196 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 27.4 Iostreams base classes
+//
+
+#include <ios>
+#include <ostream>
+#include <istream>
+#include <fstream>
+#include <bits/atomicity.h>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+
+namespace __gnu_internal
+{
+ using namespace __gnu_cxx;
+
+ // Extern declarations for global objects in src/globals.cc.
+ extern stdio_sync_filebuf<char> buf_cout_sync;
+ extern stdio_sync_filebuf<char> buf_cin_sync;
+ extern stdio_sync_filebuf<char> buf_cerr_sync;
+
+ extern stdio_filebuf<char> buf_cout;
+ extern stdio_filebuf<char> buf_cin;
+ extern stdio_filebuf<char> buf_cerr;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern stdio_sync_filebuf<wchar_t> buf_wcout_sync;
+ extern stdio_sync_filebuf<wchar_t> buf_wcin_sync;
+ extern stdio_sync_filebuf<wchar_t> buf_wcerr_sync;
+
+ extern stdio_filebuf<wchar_t> buf_wcout;
+ extern stdio_filebuf<wchar_t> buf_wcin;
+ extern stdio_filebuf<wchar_t> buf_wcerr;
+#endif
+} // namespace __gnu_internal
+
+namespace std
+{
+ using namespace __gnu_internal;
+
+ extern istream cin;
+ extern ostream cout;
+ extern ostream cerr;
+ extern ostream clog;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern wistream wcin;
+ extern wostream wcout;
+ extern wostream wcerr;
+ extern wostream wclog;
+#endif
+
+ ios_base::Init::Init()
+ {
+ if (__gnu_cxx::__exchange_and_add(&_S_refcount, 1) == 0)
+ {
+ // Standard streams default to synced with "C" operations.
+ _S_synced_with_stdio = true;
+
+ new (&buf_cout_sync) stdio_sync_filebuf<char>(stdout);
+ new (&buf_cin_sync) stdio_sync_filebuf<char>(stdin);
+ new (&buf_cerr_sync) stdio_sync_filebuf<char>(stderr);
+
+ // The standard streams are constructed once only and never
+ // destroyed.
+ new (&cout) ostream(&buf_cout_sync);
+ new (&cin) istream(&buf_cin_sync);
+ new (&cerr) ostream(&buf_cerr_sync);
+ new (&clog) ostream(&buf_cerr_sync);
+ cin.tie(&cout);
+ cerr.flags(ios_base::unitbuf);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ new (&buf_wcout_sync) stdio_sync_filebuf<wchar_t>(stdout);
+ new (&buf_wcin_sync) stdio_sync_filebuf<wchar_t>(stdin);
+ new (&buf_wcerr_sync) stdio_sync_filebuf<wchar_t>(stderr);
+
+ new (&wcout) wostream(&buf_wcout_sync);
+ new (&wcin) wistream(&buf_wcin_sync);
+ new (&wcerr) wostream(&buf_wcerr_sync);
+ new (&wclog) wostream(&buf_wcerr_sync);
+ wcin.tie(&wcout);
+ wcerr.flags(ios_base::unitbuf);
+#endif
+
+ // NB: Have to set refcount above one, so that standard
+ // streams are not re-initialized with uses of ios_base::Init
+ // besides <iostream> static object, ie just using <ios> with
+ // ios_base::Init objects.
+ __gnu_cxx::__atomic_add(&_S_refcount, 1);
+ }
+ }
+
+ ios_base::Init::~Init()
+ {
+ if (__gnu_cxx::__exchange_and_add(&_S_refcount, -1) == 2)
+ {
+ // Catch any exceptions thrown by basic_ostream::flush()
+ try
+ {
+ // Flush standard output streams as required by 27.4.2.1.6
+ cout.flush();
+ cerr.flush();
+ clog.flush();
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ wcout.flush();
+ wcerr.flush();
+ wclog.flush();
+#endif
+ }
+ catch (...)
+ { }
+ }
+ }
+
+ bool
+ ios_base::sync_with_stdio(bool __sync)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 49. Underspecification of ios_base::sync_with_stdio
+ bool __ret = ios_base::Init::_S_synced_with_stdio;
+
+ // Turn off sync with C FILE* for cin, cout, cerr, clog iff
+ // currently synchronized.
+ if (!__sync && __ret)
+ {
+ ios_base::Init::_S_synced_with_stdio = __sync;
+
+ // Explicitly call dtors to free any memory that is
+ // dynamically allocated by filebuf ctor or member functions,
+ // but don't deallocate all memory by calling operator delete.
+ buf_cout_sync.~stdio_sync_filebuf<char>();
+ buf_cin_sync.~stdio_sync_filebuf<char>();
+ buf_cerr_sync.~stdio_sync_filebuf<char>();
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ buf_wcout_sync.~stdio_sync_filebuf<wchar_t>();
+ buf_wcin_sync.~stdio_sync_filebuf<wchar_t>();
+ buf_wcerr_sync.~stdio_sync_filebuf<wchar_t>();
+#endif
+
+ // Create stream buffers for the standard streams and use
+ // those buffers without destroying and recreating the
+ // streams.
+ new (&buf_cout) stdio_filebuf<char>(stdout, ios_base::out);
+ new (&buf_cin) stdio_filebuf<char>(stdin, ios_base::in);
+ new (&buf_cerr) stdio_filebuf<char>(stderr, ios_base::out);
+ cout.rdbuf(&buf_cout);
+ cin.rdbuf(&buf_cin);
+ cerr.rdbuf(&buf_cerr);
+ clog.rdbuf(&buf_cerr);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ new (&buf_wcout) stdio_filebuf<wchar_t>(stdout, ios_base::out);
+ new (&buf_wcin) stdio_filebuf<wchar_t>(stdin, ios_base::in);
+ new (&buf_wcerr) stdio_filebuf<wchar_t>(stderr, ios_base::out);
+ wcout.rdbuf(&buf_wcout);
+ wcin.rdbuf(&buf_wcin);
+ wcerr.rdbuf(&buf_wcerr);
+ wclog.rdbuf(&buf_wcerr);
+#endif
+ }
+ return __ret;
+ }
+} // namespace std
diff --git a/contrib/libstdc++/src/ios_locale.cc b/contrib/libstdc++/src/ios_locale.cc
new file mode 100644
index 0000000..008a485
--- /dev/null
+++ b/contrib/libstdc++/src/ios_locale.cc
@@ -0,0 +1,60 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 27.4 Iostreams base classes
+//
+
+#include <ios>
+#include <locale>
+
+namespace std
+{
+ // Called only by basic_ios<>::init.
+ void
+ ios_base::_M_init()
+ {
+ // NB: May be called more than once
+ _M_precision = 6;
+ _M_width = 0;
+ _M_flags = skipws | dec;
+ _M_ios_locale = locale();
+ }
+
+ // 27.4.2.3 ios_base locale functions
+ locale
+ ios_base::imbue(const locale& __loc)
+ {
+ locale __old = _M_ios_locale;
+ _M_ios_locale = __loc;
+ _M_call_callbacks(imbue_event);
+ return __old;
+ }
+} // namespace std
diff --git a/contrib/libstdc++/src/istream-inst.cc b/contrib/libstdc++/src/istream-inst.cc
index f2c72fd..6b454ee 100644
--- a/contrib/libstdc++/src/istream-inst.cc
+++ b/contrib/libstdc++/src/istream-inst.cc
@@ -54,7 +54,7 @@ namespace std
template istream& operator>>(istream&, _Setprecision);
template istream& operator>>(istream&, _Setw);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_istream<wchar_t>;
template wistream& ws(wistream&);
template wistream& operator>>(wistream&, wchar_t&);
diff --git a/contrib/libstdc++/src/limits.cc b/contrib/libstdc++/src/limits.cc
index 294673e..700009c 100644
--- a/contrib/libstdc++/src/limits.cc
+++ b/contrib/libstdc++/src/limits.cc
@@ -159,7 +159,7 @@ namespace std
// wchar_t
// This used to be problematic...
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
const bool numeric_limits<wchar_t>::is_specialized;
const int numeric_limits<wchar_t>::digits;
const int numeric_limits<wchar_t>::digits10;
@@ -182,7 +182,7 @@ namespace std
const bool numeric_limits<wchar_t>::traps;
const bool numeric_limits<wchar_t>::tinyness_before;
const float_round_style numeric_limits<wchar_t>::round_style;
-#endif // _GLIBCPP_USE_WCHAR_T
+#endif // _GLIBCXX_USE_WCHAR_T
// short
const bool numeric_limits<short>::is_specialized;
diff --git a/contrib/libstdc++/src/list.cc b/contrib/libstdc++/src/list.cc
new file mode 100644
index 0000000..ec94053
--- /dev/null
+++ b/contrib/libstdc++/src/list.cc
@@ -0,0 +1,141 @@
+// std::list utilities implementation -*- C++ -*-
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+#include <list>
+
+namespace _GLIBCXX_STD
+{
+ void
+ _List_node_base::swap(_List_node_base& __x, _List_node_base& __y)
+ {
+ if ( __x._M_next != &__x )
+ {
+ if ( __y._M_next != &__y )
+ {
+ // Both __x and __y are not empty.
+ std::swap(__x._M_next,__y._M_next);
+ std::swap(__x._M_prev,__y._M_prev);
+ __x._M_next->_M_prev = __x._M_prev->_M_next = &__x;
+ __y._M_next->_M_prev = __y._M_prev->_M_next = &__y;
+ }
+ else
+ {
+ // __x is not empty, __y is empty.
+ __y._M_next = __x._M_next;
+ __y._M_prev = __x._M_prev;
+ __y._M_next->_M_prev = __y._M_prev->_M_next = &__y;
+ __x._M_next = __x._M_prev = &__x;
+ }
+ }
+ else if ( __y._M_next != &__y )
+ {
+ // __x is empty, __y is not empty.
+ __x._M_next = __y._M_next;
+ __x._M_prev = __y._M_prev;
+ __x._M_next->_M_prev = __x._M_prev->_M_next = &__x;
+ __y._M_next = __y._M_prev = &__y;
+ }
+ }
+
+ void
+ _List_node_base::transfer(_List_node_base * const __first,
+ _List_node_base * const __last)
+ {
+ if (this != __last)
+ {
+ // Remove [first, last) from its old position.
+ __last->_M_prev->_M_next = this;
+ __first->_M_prev->_M_next = __last;
+ this->_M_prev->_M_next = __first;
+
+ // Splice [first, last) into its new position.
+ _List_node_base* const __tmp = this->_M_prev;
+ this->_M_prev = __last->_M_prev;
+ __last->_M_prev = __first->_M_prev;
+ __first->_M_prev = __tmp;
+ }
+ }
+
+ void
+ _List_node_base::reverse()
+ {
+ _List_node_base* __tmp = this;
+ do
+ {
+ std::swap(__tmp->_M_next, __tmp->_M_prev);
+ __tmp = __tmp->_M_prev; // Old next node is now prev.
+ }
+ while (__tmp != this);
+ }
+
+ void
+ _List_node_base::hook(_List_node_base* const __position)
+ {
+ this->_M_next = __position;
+ this->_M_prev = __position->_M_prev;
+ __position->_M_prev->_M_next = this;
+ __position->_M_prev = this;
+ }
+
+ void
+ _List_node_base::unhook()
+ {
+ _List_node_base* const __next_node = this->_M_next;
+ _List_node_base* const __prev_node = this->_M_prev;
+ __prev_node->_M_next = __next_node;
+ __next_node->_M_prev = __prev_node;
+ }
+} // namespace std
+
diff --git a/contrib/libstdc++/src/locale-inst.cc b/contrib/libstdc++/src/locale-inst.cc
index 8da410f..3aeb553 100644
--- a/contrib/libstdc++/src/locale-inst.cc
+++ b/contrib/libstdc++/src/locale-inst.cc
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -31,531 +32,285 @@
// ISO C++ 14882: 22.1 Locales
//
-#include <cstdlib>
-#include <clocale>
-#include <cstring>
#include <locale>
+// Instantiation configuration.
+#ifndef C
+# define C char
+#endif
+
namespace std
{
// moneypunct, money_get, and money_put
- template class moneypunct<char, false>;
- template class moneypunct<char, true>;
- template class moneypunct_byname<char, false>;
- template class moneypunct_byname<char, true>;
- template class money_get<char, istreambuf_iterator<char> >;
- template class money_put<char, ostreambuf_iterator<char> >;
- template class __locale_cache<numpunct<char> >;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template class moneypunct<wchar_t, false>;
- template class moneypunct<wchar_t, true>;
- template class moneypunct_byname<wchar_t, false>;
- template class moneypunct_byname<wchar_t, true>;
- template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
- template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
- template class __locale_cache<numpunct<wchar_t> >;
-#endif
-
- // numpunct, numpunct_byname, num_get, and num_put
- template class numpunct<char>;
- template class numpunct_byname<char>;
- template class num_get<char, istreambuf_iterator<char> >;
- template class num_put<char, ostreambuf_iterator<char> >;
+ template class moneypunct<C, false>;
+ template class moneypunct<C, true>;
+ template struct __moneypunct_cache<C, false>;
+ template struct __moneypunct_cache<C, true>;
+ template class moneypunct_byname<C, false>;
+ template class moneypunct_byname<C, true>;
+ template class money_get<C, istreambuf_iterator<C> >;
+ template class money_put<C, ostreambuf_iterator<C> >;
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
- long) const;
+ istreambuf_iterator<C>
+ money_get<C, istreambuf_iterator<C> >::
+ _M_extract<true>(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&, string&) const;
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
- unsigned long) const;
+ istreambuf_iterator<C>
+ money_get<C, istreambuf_iterator<C> >::
+ _M_extract<false>(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&, string&) const;
-#ifdef _GLIBCPP_USE_LONG_LONG
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
- long long) const;
+ ostreambuf_iterator<C>
+ money_put<C, ostreambuf_iterator<C> >::
+ _M_insert<true>(ostreambuf_iterator<C>, ios_base&, C,
+ const string_type&) const;
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
- unsigned long long) const;
-#endif
-
- template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
- double) const;
-
- template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
- long double) const;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template class numpunct<wchar_t>;
- template class numpunct_byname<wchar_t>;
- template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
- template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
+ ostreambuf_iterator<C>
+ money_put<C, ostreambuf_iterator<C> >::
+ _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
+ const string_type&) const;
+ // numpunct, numpunct_byname, num_get, and num_put
+ template class numpunct<C>;
+ template struct __numpunct_cache<C>;
+ template class numpunct_byname<C>;
+ template class num_get<C, istreambuf_iterator<C> >;
+ template class num_put<C, ostreambuf_iterator<C> >;
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
- long) const;
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ long&) const;
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
- unsigned long) const;
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned short&) const;
-#ifdef _GLIBCPP_USE_LONG_LONG
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
- long long) const;
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned int&) const;
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
- unsigned long long) const;
-#endif
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned long&) const;
+#ifdef _GLIBCXX_USE_LONG_LONG
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- double) const;
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ long long&) const;
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- long double) const;
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned long long&) const;
#endif
-#if 1
- // XXX GLIBCXX_ABI Deprecated, compatibility only.
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
- long) const;
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ long) const;
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
- unsigned long) const;
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ unsigned long) const;
-#ifdef _GLIBCPP_USE_LONG_LONG
+#ifdef _GLIBCXX_USE_LONG_LONG
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
- long long) const;
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ long long) const;
template
- ostreambuf_iterator<char>
- num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
- unsigned long long) const;
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ unsigned long long) const;
#endif
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, long) const;
-
- template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, unsigned long) const;
-
-#ifdef _GLIBCPP_USE_LONG_LONG
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, long long) const;
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
+ double) const;
template
- ostreambuf_iterator<wchar_t>
- num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, unsigned long long) const;
-#endif
-#endif
-
-#endif
-
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
+ long double) const;
+
// time_get and time_put
- template class __timepunct<char>;
- template class time_put<char, ostreambuf_iterator<char> >;
- template class time_put_byname<char, ostreambuf_iterator<char> >;
- template class time_get<char, istreambuf_iterator<char> >;
- template class time_get_byname<char, istreambuf_iterator<char> >;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template class __timepunct<wchar_t>;
- template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
- template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
- template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
- template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
-#endif
+ template class __timepunct<C>;
+ template struct __timepunct_cache<C>;
+ template class time_put<C, ostreambuf_iterator<C> >;
+ template class time_put_byname<C, ostreambuf_iterator<C> >;
+ template class time_get<C, istreambuf_iterator<C> >;
+ template class time_get_byname<C, istreambuf_iterator<C> >;
// messages
- template class messages<char>;
- template class messages_byname<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
- template class messages<wchar_t>;
- template class messages_byname<wchar_t>;
-#endif
+ template class messages<C>;
+ template class messages_byname<C>;
// ctype
- inline template class __ctype_abstract_base<char>;
- template class ctype_byname<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
- inline template class __ctype_abstract_base<wchar_t>;
- template class ctype_byname<wchar_t>;
-#endif
+ inline template class __ctype_abstract_base<C>;
+ template class ctype_byname<C>;
// codecvt
- inline template class __codecvt_abstract_base<char, char, mbstate_t>;
- template class codecvt_byname<char, char, mbstate_t>;
-#ifdef _GLIBCPP_USE_WCHAR_T
- inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
- template class codecvt_byname<wchar_t, char, mbstate_t>;
-#endif
+ inline template class __codecvt_abstract_base<C, char, mbstate_t>;
+ template class codecvt_byname<C, char, mbstate_t>;
// collate
- template class collate<char>;
- template class collate_byname<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
- template class collate<wchar_t>;
- template class collate_byname<wchar_t>;
-#endif
+ template class collate<C>;
+ template class collate_byname<C>;
// use_facet
// NB: use_facet<ctype> is specialized
template
- const codecvt<char, char, mbstate_t>&
- use_facet<codecvt<char, char, mbstate_t> >(const locale&);
+ const codecvt<C, char, mbstate_t>&
+ use_facet<codecvt<C, char, mbstate_t> >(const locale&);
template
- const collate<char>&
- use_facet<collate<char> >(const locale&);
+ const collate<C>&
+ use_facet<collate<C> >(const locale&);
template
- const numpunct<char>&
- use_facet<numpunct<char> >(const locale&);
+ const numpunct<C>&
+ use_facet<numpunct<C> >(const locale&);
template
- const num_put<char>&
- use_facet<num_put<char> >(const locale&);
+ const num_put<C>&
+ use_facet<num_put<C> >(const locale&);
template
- const num_get<char>&
- use_facet<num_get<char> >(const locale&);
+ const num_get<C>&
+ use_facet<num_get<C> >(const locale&);
template
- const moneypunct<char, true>&
- use_facet<moneypunct<char, true> >(const locale&);
+ const moneypunct<C, true>&
+ use_facet<moneypunct<C, true> >(const locale&);
template
- const moneypunct<char, false>&
- use_facet<moneypunct<char, false> >(const locale&);
+ const moneypunct<C, false>&
+ use_facet<moneypunct<C, false> >(const locale&);
template
- const money_put<char>&
- use_facet<money_put<char> >(const locale&);
+ const money_put<C>&
+ use_facet<money_put<C> >(const locale&);
template
- const money_get<char>&
- use_facet<money_get<char> >(const locale&);
+ const money_get<C>&
+ use_facet<money_get<C> >(const locale&);
template
- const __timepunct<char>&
- use_facet<__timepunct<char> >(const locale&);
+ const __timepunct<C>&
+ use_facet<__timepunct<C> >(const locale&);
template
- const time_put<char>&
- use_facet<time_put<char> >(const locale&);
+ const time_put<C>&
+ use_facet<time_put<C> >(const locale&);
template
- const time_get<char>&
- use_facet<time_get<char> >(const locale&);
+ const time_get<C>&
+ use_facet<time_get<C> >(const locale&);
template
- const messages<char>&
- use_facet<messages<char> >(const locale&);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- const codecvt<wchar_t, char, mbstate_t>&
- use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
-
- template
- const collate<wchar_t>&
- use_facet<collate<wchar_t> >(const locale&);
-
- template
- const numpunct<wchar_t>&
- use_facet<numpunct<wchar_t> >(const locale&);
-
- template
- const num_put<wchar_t>&
- use_facet<num_put<wchar_t> >(const locale&);
-
- template
- const num_get<wchar_t>&
- use_facet<num_get<wchar_t> >(const locale&);
-
- template
- const moneypunct<wchar_t, true>&
- use_facet<moneypunct<wchar_t, true> >(const locale&);
-
- template
- const moneypunct<wchar_t, false>&
- use_facet<moneypunct<wchar_t, false> >(const locale&);
-
- template
- const money_put<wchar_t>&
- use_facet<money_put<wchar_t> >(const locale&);
-
- template
- const money_get<wchar_t>&
- use_facet<money_get<wchar_t> >(const locale&);
-
- template
- const __timepunct<wchar_t>&
- use_facet<__timepunct<wchar_t> >(const locale&);
-
- template
- const time_put<wchar_t>&
- use_facet<time_put<wchar_t> >(const locale&);
-
- template
- const time_get<wchar_t>&
- use_facet<time_get<wchar_t> >(const locale&);
-
- template
- const messages<wchar_t>&
- use_facet<messages<wchar_t> >(const locale&);
-#endif
+ const messages<C>&
+ use_facet<messages<C> >(const locale&);
// has_facet
template
bool
- has_facet<ctype<char> >(const locale&);
-
- template
- bool
- has_facet<codecvt<char, char, mbstate_t> >(const locale&);
-
- template
- bool
- has_facet<collate<char> >(const locale&);
-
- template
- bool
- has_facet<numpunct<char> >(const locale&);
+ has_facet<ctype<C> >(const locale&);
template
bool
- has_facet<num_put<char> >(const locale&);
+ has_facet<codecvt<C, char, mbstate_t> >(const locale&);
template
bool
- has_facet<num_get<char> >(const locale&);
+ has_facet<collate<C> >(const locale&);
template
bool
- has_facet<moneypunct<char> >(const locale&);
+ has_facet<numpunct<C> >(const locale&);
template
bool
- has_facet<money_put<char> >(const locale&);
+ has_facet<num_put<C> >(const locale&);
template
bool
- has_facet<money_get<char> >(const locale&);
+ has_facet<num_get<C> >(const locale&);
template
bool
- has_facet<__timepunct<char> >(const locale&);
+ has_facet<moneypunct<C> >(const locale&);
template
bool
- has_facet<time_put<char> >(const locale&);
+ has_facet<money_put<C> >(const locale&);
template
bool
- has_facet<time_get<char> >(const locale&);
+ has_facet<money_get<C> >(const locale&);
template
bool
- has_facet<messages<char> >(const locale&);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- bool
- has_facet<ctype<wchar_t> >(const locale&);
+ has_facet<__timepunct<C> >(const locale&);
template
bool
- has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+ has_facet<time_put<C> >(const locale&);
template
bool
- has_facet<collate<wchar_t> >(const locale&);
+ has_facet<time_get<C> >(const locale&);
template
bool
- has_facet<numpunct<wchar_t> >(const locale&);
+ has_facet<messages<C> >(const locale&);
- template
- bool
- has_facet<num_put<wchar_t> >(const locale&);
- template
- bool
- has_facet<num_get<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<moneypunct<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<money_put<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<money_get<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<__timepunct<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<time_put<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<time_get<wchar_t> >(const locale&);
-
- template
- bool
- has_facet<messages<wchar_t> >(const locale&);
-#endif
-
- // __use_cache
- template
- const __locale_cache<numpunct<char> >&
- __use_cache<numpunct<char> >(const locale& __loc);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- const __locale_cache<numpunct<wchar_t> >&
- __use_cache<numpunct<wchar_t> >(const locale& __loc);
-#endif
-
- // locale
- template
- char*
- __add_grouping<char>(char*, char, char const*, char const*,
- char const*, char const*);
-
- template
- bool
- __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
-
- template class __pad<char, char_traits<char> >;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- wchar_t*
- __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
- wchar_t const*, wchar_t const*);
+ // locale functions.
template
- bool
- __verify_grouping<wchar_t>(const basic_string<wchar_t>&,
- basic_string<wchar_t>&);
+ C*
+ __add_grouping<C>(C*, C, char const*, size_t,
+ C const*, C const*);
- template class __pad<wchar_t, char_traits<wchar_t> >;
-#endif
+ template class __pad<C, char_traits<C> >;
template
int
- __convert_from_v(char*, const int, const char*, double,
- const __c_locale&, int);
-
- template
- int
- __convert_from_v(char*, const int, const char*, long double,
- const __c_locale&, int);
-
- template
- int
- __convert_from_v(char*, const int, const char*, long,
- const __c_locale&, int);
-
- template
- int
- __convert_from_v(char*, const int, const char*, unsigned long,
- const __c_locale&, int);
-
-#ifdef _GLIBCPP_USE_LONG_LONG
- template
- int
- __convert_from_v(char*, const int, const char*, long long,
- const __c_locale&, int);
-
- template
- int
- __convert_from_v(char*, const int, const char*, unsigned long long,
- const __c_locale&, int);
-#endif
-
- template
- int
- __int_to_char(char*, const int, unsigned long, const char*,
- ios_base::fmtflags, bool);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template
- int
- __int_to_char(wchar_t*, const int, unsigned long, const wchar_t*,
- ios_base::fmtflags, bool);
-#endif
-
-#ifdef _GLIBCPP_USE_LONG_LONG
- template
- int
- __int_to_char(char*, const int, unsigned long long, const char*,
+ __int_to_char(C*, unsigned long, const C*,
ios_base::fmtflags, bool);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_LONG_LONG
template
int
- __int_to_char(wchar_t*, const int, unsigned long long, const wchar_t*,
+ __int_to_char(C*, unsigned long long, const C*,
ios_base::fmtflags, bool);
#endif
-#endif
} // namespace std
diff --git a/contrib/libstdc++/src/locale-misc-inst.cc b/contrib/libstdc++/src/locale-misc-inst.cc
new file mode 100644
index 0000000..e7ecb03
--- /dev/null
+++ b/contrib/libstdc++/src/locale-misc-inst.cc
@@ -0,0 +1,47 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#include <locale>
+
+namespace std
+{
+ template
+ int
+ __convert_from_v(char*, const int, const char*, double,
+ const __c_locale&, int);
+
+ template
+ int
+ __convert_from_v(char*, const int, const char*, long double,
+ const __c_locale&, int);
+} // namespace std
diff --git a/contrib/libstdc++/src/locale.cc b/contrib/libstdc++/src/locale.cc
index 17ccdc2..623eb26 100644
--- a/contrib/libstdc++/src/locale.cc
+++ b/contrib/libstdc++/src/locale.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -28,22 +28,14 @@
#include <clocale>
#include <cstring>
+#include <cstdlib> // For getenv
#include <cctype>
#include <cwctype> // For towupper, etc.
#include <locale>
#include <bits/atomicity.h>
-namespace __gnu_cxx
-{
- // Defined in globals.cc.
- extern std::locale c_locale;
- extern std::locale::_Impl c_locale_impl;
-} // namespace __gnu_cxx
-
namespace std
{
- using namespace __gnu_cxx;
-
// Definitions for static const data members of locale.
const locale::category locale::none;
const locale::category locale::ctype;
@@ -54,116 +46,18 @@ namespace std
const locale::category locale::messages;
const locale::category locale::all;
- // In the future, GLIBCXX_ABI > 5 should remove all uses of
- // _GLIBCPP_ASM_SYMVER in this file, and remove exports of any
- // static data members of locale.
- locale::_Impl* locale::_S_classic;
+ // These are no longer exported.
+ locale::_Impl* locale::_S_classic;
locale::_Impl* locale::_S_global;
const size_t locale::_S_categories_size;
- _GLIBCPP_ASM_SYMVER(_ZNSt6locale18_S_categories_sizeE, _ZNSt6locale17_S_num_categoriesE, GLIBCPP_3.2)
- const size_t locale::_S_extra_categories_size;
-
- // Definitions for static const data members of locale::id
- _Atomic_word locale::id::_S_highwater; // init'd to 0 by linker
-
- // Definitions for static const data members of locale::_Impl
- const locale::id* const
- locale::_Impl::_S_id_ctype[] =
- {
- &std::ctype<char>::id,
- &codecvt<char, char, mbstate_t>::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &std::ctype<wchar_t>::id,
- &codecvt<wchar_t, char, mbstate_t>::id,
-#endif
- 0
- };
-
- const locale::id* const
- locale::_Impl::_S_id_numeric[] =
- {
- &num_get<char>::id,
- &num_put<char>::id,
- &numpunct<char>::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &num_get<wchar_t>::id,
- &num_put<wchar_t>::id,
- &numpunct<wchar_t>::id,
-#endif
- 0
- };
-
- const locale::id* const
- locale::_Impl::_S_id_collate[] =
- {
- &std::collate<char>::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &std::collate<wchar_t>::id,
-#endif
- 0
- };
-
- const locale::id* const
- locale::_Impl::_S_id_time[] =
- {
- &__timepunct<char>::id,
- &time_get<char>::id,
- &time_put<char>::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &__timepunct<wchar_t>::id,
- &time_get<wchar_t>::id,
- &time_put<wchar_t>::id,
-#endif
- 0
- };
-
- const locale::id* const
- locale::_Impl::_S_id_monetary[] =
- {
- &money_get<char>::id,
- &money_put<char>::id,
- &moneypunct<char, false>::id,
- &moneypunct<char, true >::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &money_get<wchar_t>::id,
- &money_put<wchar_t>::id,
- &moneypunct<wchar_t, false>::id,
- &moneypunct<wchar_t, true >::id,
-#endif
- 0
- };
- const locale::id* const
- locale::_Impl::_S_id_messages[] =
- {
- &std::messages<char>::id,
-#ifdef _GLIBCPP_USE_WCHAR_T
- &std::messages<wchar_t>::id,
+#ifdef __GTHREADS
+ __gthread_once_t locale::_S_once = __GTHREAD_ONCE_INIT;
#endif
- 0
- };
-
- const locale::id* const* const
- locale::_Impl::_S_facet_categories[] =
- {
- // Order must match the decl order in class locale.
- locale::_Impl::_S_id_ctype,
- locale::_Impl::_S_id_numeric,
- locale::_Impl::_S_id_collate,
- locale::_Impl::_S_id_time,
- locale::_Impl::_S_id_monetary,
- locale::_Impl::_S_id_messages,
- 0
- };
-
- locale::locale() throw()
- {
- _S_initialize();
- (_M_impl = _S_global)->_M_add_reference();
- }
locale::locale(const locale& __other) throw()
- { (_M_impl = __other._M_impl)->_M_add_reference(); }
+ : _M_impl(__other._M_impl)
+ { _M_impl->_M_add_reference(); }
// This is used to initialize global and classic locales, and
// assumes that the _Impl objects are constructed correctly.
@@ -171,141 +65,22 @@ namespace std
locale::locale(_Impl* __ip) throw() : _M_impl(__ip)
{ }
- locale::locale(const char* __s)
- {
- if (__s)
- {
- _S_initialize();
- if (strcmp(__s, "C") == 0 || strcmp(__s, "POSIX") == 0)
- (_M_impl = _S_classic)->_M_add_reference();
- else if (strcmp(__s, "") != 0)
- _M_impl = new _Impl(__s, 1);
- else
- {
- // Get it from the environment.
- char* __env = getenv("LC_ALL");
- // If LC_ALL is set we are done.
- if (__env && strcmp(__env, "") != 0)
- {
- if (strcmp(__env, "C") == 0 || strcmp(__env, "POSIX") == 0)
- (_M_impl = _S_classic)->_M_add_reference();
- else
- _M_impl = new _Impl(__env, 1);
- }
- else
- {
- char* __res;
- // LANG may set a default different from "C".
- char* __env = getenv("LANG");
- if (!__env || strcmp(__env, "") == 0 || strcmp(__env, "C") == 0
- || strcmp(__env, "POSIX") == 0)
- __res = strdup("C");
- else
- __res = strdup(__env);
-
- // Scan the categories looking for the first one
- // different from LANG.
- size_t __i = 0;
- if (strcmp(__res, "C") == 0)
- for (; __i < _S_categories_size
- + _S_extra_categories_size; ++__i)
- {
- __env = getenv(_S_categories[__i]);
- if (__env && strcmp(__env, "") != 0
- && strcmp(__env, "C") != 0
- && strcmp(__env, "POSIX") != 0)
- break;
- }
- else
- for (; __i < _S_categories_size
- + _S_extra_categories_size; ++__i)
- {
- __env = getenv(_S_categories[__i]);
- if (__env && strcmp(__env, "") != 0
- && strcmp(__env, __res) != 0)
- break;
- }
-
- // If one is found, build the complete string of
- // the form LC_CTYPE=xxx;LC_NUMERIC=yyy; and so on...
- if (__i < _S_categories_size + _S_extra_categories_size)
- {
- string __str;
- for (size_t __j = 0; __j < __i; ++__j)
- {
- __str += _S_categories[__j];
- __str += '=';
- __str += __res;
- __str += ';';
- }
- __str += _S_categories[__i];
- __str += '=';
- __str += __env;
- __str += ';';
- __i++;
- for (; __i < _S_categories_size
- + _S_extra_categories_size; ++__i)
- {
- __env = getenv(_S_categories[__i]);
- if (!__env || strcmp(__env, "") == 0)
- {
- __str += _S_categories[__i];
- __str += '=';
- __str += __res;
- __str += ';';
- }
- else if (strcmp(__env, "C") == 0
- || strcmp(__env, "POSIX") == 0)
- {
- __str += _S_categories[__i];
- __str += "=C;";
- }
- else
- {
- __str += _S_categories[__i];
- __str += '=';
- __str += __env;
- __str += ';';
- }
- }
- __str.erase(__str.end() - 1);
- _M_impl = new _Impl(__str.c_str(), 1);
- }
- // ... otherwise either an additional instance of
- // the "C" locale or LANG.
- else if (strcmp(__res, "C") == 0)
- (_M_impl = _S_classic)->_M_add_reference();
- else
- _M_impl = new _Impl(__res, 1);
- free(__res);
- }
- }
- }
- else
- __throw_runtime_error("attempt to create locale from NULL name");
- }
-
- locale::locale(const locale& __base, const char* __s, category __cat)
- {
- // NB: There are complicated, yet more efficient ways to do
- // this. Building up locales on a per-category way is tedious, so
- // let's do it this way until people complain.
- locale __add(__s);
- _M_coalesce(__base, __add, __cat);
- }
-
- locale::locale(const locale& __base, const locale& __add, category __cat)
- { _M_coalesce(__base, __add, __cat); }
-
locale::~locale() throw()
{ _M_impl->_M_remove_reference(); }
bool
locale::operator==(const locale& __rhs) const throw()
{
- string __name = this->name();
- return (_M_impl == __rhs._M_impl
- || (__name != "*" && __name == __rhs.name()));
+ bool __ret = false;
+ if (_M_impl == __rhs._M_impl)
+ __ret = true;
+ else
+ {
+ const string __name = this->name();
+ if (__name != "*" && __name == __rhs.name())
+ __ret = true;
+ }
+ return __ret;
}
const locale&
@@ -317,26 +92,6 @@ namespace std
return *this;
}
- locale
- locale::global(const locale& __other)
- {
- // XXX MT
- _S_initialize();
- _Impl* __old = _S_global;
- __other._M_impl->_M_add_reference();
- _S_global = __other._M_impl;
- if (_S_global->_M_check_same_name()
- && (strcmp(_S_global->_M_names[0], "*") != 0))
- setlocale(LC_ALL, __other.name().c_str());
-
- // Reference count sanity check: one reference removed for the
- // subsition of __other locale, one added by return-by-value. Net
- // difference: zero. When the returned locale object's destrutor
- // is called, then the reference count is decremented and possibly
- // destroyed.
- return locale(__old);
- }
-
string
locale::name() const
{
@@ -348,9 +103,7 @@ namespace std
__ret += _S_categories[0];
__ret += '=';
__ret += _M_impl->_M_names[0];
- for (size_t __i = 1;
- __i < _S_categories_size + _S_extra_categories_size;
- ++__i)
+ for (size_t __i = 1; __i < _S_categories_size; ++__i)
{
__ret += ';';
__ret += _S_categories[__i];
@@ -361,49 +114,6 @@ namespace std
return __ret;
}
- const locale&
- locale::classic()
- {
- // Locking protocol: singleton-called-before-threading-starts
- if (!_S_classic)
- {
- try
- {
- // 26 Standard facets, 2 references.
- // One reference for _S_classic, one for _S_global
- _S_classic = new (&c_locale_impl) _Impl(0, 2, true);
- _S_global = _S_classic;
- new (&c_locale) locale(_S_classic);
- }
- catch(...)
- {
- // Just call destructor, so that locale_impl_c's memory is
- // not deallocated via a call to delete.
- if (_S_classic)
- _S_classic->~_Impl();
- _S_classic = _S_global = 0;
- __throw_exception_again;
- }
- }
- return c_locale;
- }
-
- void
- locale::_M_coalesce(const locale& __base, const locale& __add,
- category __cat)
- {
- __cat = _S_normalize_category(__cat);
- _M_impl = new _Impl(*__base._M_impl, 1);
-
- try
- { _M_impl->_M_replace_categories(__add._M_impl, __cat); }
- catch (...)
- {
- _M_impl->_M_remove_reference();
- __throw_exception_again;
- }
- }
-
locale::category
locale::_S_normalize_category(category __cat)
{
@@ -430,7 +140,7 @@ namespace std
case LC_TIME:
__ret = time;
break;
-#ifdef _GLIBCPP_HAVE_LC_MESSAGES
+#ifdef _GLIBCXX_HAVE_LC_MESSAGES
case LC_MESSAGES:
__ret = messages;
break;
@@ -439,129 +149,225 @@ namespace std
__ret = all;
break;
default:
- __throw_runtime_error("bad locale category");
+ __throw_runtime_error(__N("locale::_S_normalize_category "
+ "category not found"));
}
}
return __ret;
}
- __c_locale
- locale::facet::_S_c_locale;
-
- char locale::facet::_S_c_name[2];
+ // locale::facet
+ __c_locale locale::facet::_S_c_locale;
- locale::facet::
- ~facet() { }
+ const char locale::facet::_S_c_name[2] = "C";
- locale::facet::
- facet(size_t __refs) throw() : _M_references(__refs ? 1 : 0)
- { }
+#ifdef __GTHREADS
+ __gthread_once_t locale::facet::_S_once = __GTHREAD_ONCE_INIT;
+#endif
- void
- locale::facet::
- _M_add_reference() throw()
- { __atomic_add(&_M_references, 1); }
+ void
+ locale::facet::_S_initialize_once()
+ {
+ // Initialize the underlying locale model.
+ _S_create_c_locale(_S_c_locale, _S_c_name);
+ }
- void
- locale::facet::
- _M_remove_reference() throw()
+ __c_locale
+ locale::facet::_S_get_c_locale()
{
- if (__exchange_and_add(&_M_references, -1) == 1)
+#ifdef __GHTREADS
+ if (__gthread_active_p())
+ __gthread_once(&_S_once, _S_initialize_once);
+ else
+#endif
{
- try
- { delete this; }
- catch (...)
- { }
+ if (!_S_c_locale)
+ _S_initialize_once();
}
+ return _S_c_locale;
}
-
- locale::id::id()
- { }
- // Definitions for static const data members of time_base
- template<>
- const char*
- __timepunct<char>::_S_timezones[14] =
- {
- "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET",
- "IST", "EET", "CST", "JST"
- };
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- template<>
- const wchar_t*
- __timepunct<wchar_t>::_S_timezones[14] =
- {
- L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST",
- L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"
- };
-#endif
+ const char*
+ locale::facet::_S_get_c_name()
+ { return _S_c_name; }
+
+ locale::facet::
+ ~facet() { }
- // Definitions for static const data members of money_base
- const money_base::pattern
- money_base::_S_default_pattern = { {symbol, sign, none, value} };
+ // locale::_Impl
+ locale::_Impl::
+ ~_Impl() throw()
+ {
+ if (_M_facets)
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ if (_M_facets[__i])
+ _M_facets[__i]->_M_remove_reference();
+ delete [] _M_facets;
+
+ if (_M_caches)
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ if (_M_caches[__i])
+ _M_caches[__i]->_M_remove_reference();
+ delete [] _M_caches;
+
+ if (_M_names)
+ for (size_t __i = 0; __i < _S_categories_size; ++__i)
+ delete [] _M_names[__i];
+ delete [] _M_names;
+ }
- const char* __num_base::_S_atoms_in = "0123456789eEabcdfABCDF";
- const char* __num_base::_S_atoms_out ="-+xX0123456789abcdef0123456789ABCDEF";
+ // Clone existing _Impl object.
+ locale::_Impl::
+ _Impl(const _Impl& __imp, size_t __refs)
+ : _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size),
+ _M_caches(0), _M_names(0)
+ {
+ try
+ {
+ _M_facets = new const facet*[_M_facets_size];
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ {
+ _M_facets[__i] = __imp._M_facets[__i];
+ if (_M_facets[__i])
+ _M_facets[__i]->_M_add_reference();
+ }
+ _M_caches = new const facet*[_M_facets_size];
+ for (size_t __j = 0; __j < _M_facets_size; ++__j)
+ {
+ _M_caches[__j] = __imp._M_caches[__j];
+ if (_M_caches[__j])
+ _M_caches[__j]->_M_add_reference();
+ }
+ _M_names = new char*[_S_categories_size];
+ for (size_t __k = 0; __k < _S_categories_size; ++__k)
+ _M_names[__k] = 0;
+
+ // Name all the categories.
+ for (size_t __l = 0; __l < _S_categories_size; ++__l)
+ {
+ char* __new = new char[std::strlen(__imp._M_names[__l]) + 1];
+ std::strcpy(__new, __imp._M_names[__l]);
+ _M_names[__l] = __new;
+ }
+ }
+ catch(...)
+ {
+ this->~_Impl();
+ __throw_exception_again;
+ }
+ }
- // _GLIBCPP_RESOLVE_LIB_DEFECTS
- // According to the resolution of DR 231, about 22.2.2.2.2, p11,
- // "str.precision() is specified in the conversion specification".
void
- __num_base::_S_format_float(const ios_base& __io, char* __fptr,
- char __mod, streamsize/* unused post DR 231 */)
+ locale::_Impl::
+ _M_replace_category(const _Impl* __imp,
+ const locale::id* const* __idpp)
{
- ios_base::fmtflags __flags = __io.flags();
- *__fptr++ = '%';
- // [22.2.2.2.2] Table 60
- if (__flags & ios_base::showpos)
- *__fptr++ = '+';
- if (__flags & ios_base::showpoint)
- *__fptr++ = '#';
-
- // As per DR 231: _always_, not only when
- // __flags & ios_base::fixed || __prec > 0
- *__fptr++ = '.';
- *__fptr++ = '*';
-
- if (__mod)
- *__fptr++ = __mod;
- ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
- // [22.2.2.2.2] Table 58
- if (__fltfield == ios_base::fixed)
- *__fptr++ = 'f';
- else if (__fltfield == ios_base::scientific)
- *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
- else
- *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
- *__fptr = '\0';
+ for (; *__idpp; ++__idpp)
+ _M_replace_facet(__imp, *__idpp);
}
void
- __num_base::_S_format_int(const ios_base& __io, char* __fptr, char __mod,
- char __modl)
+ locale::_Impl::
+ _M_replace_facet(const _Impl* __imp, const locale::id* __idp)
{
- ios_base::fmtflags __flags = __io.flags();
- *__fptr++ = '%';
- // [22.2.2.2.2] Table 60
- if (__flags & ios_base::showpos)
- *__fptr++ = '+';
- if (__flags & ios_base::showbase)
- *__fptr++ = '#';
- *__fptr++ = 'l';
-
- // For long long types.
- if (__modl)
- *__fptr++ = __modl;
-
- ios_base::fmtflags __bsefield = __flags & ios_base::basefield;
- if (__bsefield == ios_base::hex)
- *__fptr++ = (__flags & ios_base::uppercase) ? 'X' : 'x';
- else if (__bsefield == ios_base::oct)
- *__fptr++ = 'o';
- else
- *__fptr++ = __mod;
- *__fptr = '\0';
+ size_t __index = __idp->_M_id();
+ if ((__index > (__imp->_M_facets_size - 1))
+ || !__imp->_M_facets[__index])
+ __throw_runtime_error(__N("locale::_Impl::_M_replace_facet"));
+ _M_install_facet(__idp, __imp->_M_facets[__index]);
+ }
+
+ void
+ locale::_Impl::
+ _M_install_facet(const locale::id* __idp, const facet* __fp)
+ {
+ if (__fp)
+ {
+ size_t __index = __idp->_M_id();
+
+ // Check size of facet vector to ensure adequate room.
+ if (__index > _M_facets_size - 1)
+ {
+ const size_t __new_size = __index + 4;
+
+ // New facet array.
+ const facet** __oldf = _M_facets;
+ const facet** __newf;
+ __newf = new const facet*[__new_size];
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ __newf[__i] = _M_facets[__i];
+ for (size_t __l = _M_facets_size; __l < __new_size; ++__l)
+ __newf[__l] = 0;
+
+ // New cache array.
+ const facet** __oldc = _M_caches;
+ const facet** __newc;
+ try
+ {
+ __newc = new const facet*[__new_size];
+ }
+ catch(...)
+ {
+ delete [] __newf;
+ __throw_exception_again;
+ }
+ for (size_t __j = 0; __j < _M_facets_size; ++__j)
+ __newc[__j] = _M_caches[__j];
+ for (size_t __k = _M_facets_size; __k < __new_size; ++__k)
+ __newc[__k] = 0;
+
+ _M_facets_size = __new_size;
+ _M_facets = __newf;
+ _M_caches = __newc;
+ delete [] __oldf;
+ delete [] __oldc;
+ }
+
+ __fp->_M_add_reference();
+ const facet*& __fpr = _M_facets[__index];
+ if (__fpr)
+ {
+ // Replacing an existing facet. Order matters.
+ __fpr->_M_remove_reference();
+ __fpr = __fp;
+ }
+ else
+ {
+ // Installing a newly created facet into an empty
+ // _M_facets container, say a newly-constructed,
+ // swanky-fresh _Impl.
+ _M_facets[__index] = __fp;
+ }
+
+ // Ideally, it would be nice to only remove the caches that
+ // are now incorrect. However, some of the caches depend on
+ // multiple facets, and we only know about one facet
+ // here. It's no great loss: the first use of the new facet
+ // will create a new, correctly cached facet anyway.
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ {
+ const facet* __cpr = _M_caches[__i];
+ if (__cpr)
+ {
+ __cpr->_M_remove_reference();
+ _M_caches[__i] = 0;
+ }
+ }
+ }
+ }
+
+
+ // locale::id
+ // Definitions for static const data members of locale::id
+ _Atomic_word locale::id::_S_refcount; // init'd to 0 by linker
+
+ size_t
+ locale::id::_M_id() const
+ {
+ if (!_M_index)
+ _M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
+ return _M_index - 1;
}
} // namespace std
+
diff --git a/contrib/libstdc++/src/locale_facets.cc b/contrib/libstdc++/src/locale_facets.cc
new file mode 100644
index 0000000..db8c9e0
--- /dev/null
+++ b/contrib/libstdc++/src/locale_facets.cc
@@ -0,0 +1,93 @@
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <locale>
+
+namespace std
+{
+ // Definitions for static const data members of time_base.
+ template<>
+ const char*
+ __timepunct_cache<char>::_S_timezones[14] =
+ {
+ "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET",
+ "IST", "EET", "CST", "JST"
+ };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ const wchar_t*
+ __timepunct_cache<wchar_t>::_S_timezones[14] =
+ {
+ L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST",
+ L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"
+ };
+#endif
+
+ // Definitions for static const data members of money_base.
+ const money_base::pattern
+ money_base::_S_default_pattern = { {symbol, sign, none, value} };
+
+ const char* money_base::_S_atoms = "-0123456789";
+
+ const char* __num_base::_S_atoms_in = "-+xX0123456789abcdefABCDEF";
+ const char* __num_base::_S_atoms_out ="-+xX0123456789abcdef0123456789ABCDEF";
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // According to the resolution of DR 231, about 22.2.2.2.2, p11,
+ // "str.precision() is specified in the conversion specification".
+ void
+ __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod)
+ {
+ ios_base::fmtflags __flags = __io.flags();
+ *__fptr++ = '%';
+ // [22.2.2.2.2] Table 60
+ if (__flags & ios_base::showpos)
+ *__fptr++ = '+';
+ if (__flags & ios_base::showpoint)
+ *__fptr++ = '#';
+
+ // As per DR 231: _always_, not only when
+ // __flags & ios_base::fixed || __prec > 0
+ *__fptr++ = '.';
+ *__fptr++ = '*';
+
+ if (__mod)
+ *__fptr++ = __mod;
+ ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
+ // [22.2.2.2.2] Table 58
+ if (__fltfield == ios_base::fixed)
+ *__fptr++ = 'f';
+ else if (__fltfield == ios_base::scientific)
+ *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
+ else
+ *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
+ *__fptr = '\0';
+ }
+} // namespace std
+
diff --git a/contrib/libstdc++/src/locale_init.cc b/contrib/libstdc++/src/locale_init.cc
new file mode 100644
index 0000000..7252bc5
--- /dev/null
+++ b/contrib/libstdc++/src/locale_init.cc
@@ -0,0 +1,347 @@
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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 <clocale>
+#include <cstring>
+#include <cstdlib> // For getenv, free.
+#include <cctype>
+#include <cwctype> // For towupper, etc.
+#include <locale>
+#include <bits/atomicity.h>
+#include <bits/concurrence.h>
+
+namespace __gnu_internal
+{
+ // Defined in globals.cc.
+ extern std::locale c_locale;
+ extern std::locale::_Impl c_locale_impl;
+
+ extern std::locale::facet* facet_vec[_GLIBCXX_NUM_FACETS];
+ extern char* name_vec[6 + _GLIBCXX_NUM_CATEGORIES];
+ extern char name_c[6 + _GLIBCXX_NUM_CATEGORIES][2];
+
+ extern std::ctype<char> ctype_c;
+ extern std::collate<char> collate_c;
+ extern std::numpunct<char> numpunct_c;
+ extern std::num_get<char> num_get_c;
+ extern std::num_put<char> num_put_c;
+ extern std::codecvt<char, char, mbstate_t> codecvt_c;
+ extern std::moneypunct<char, false> moneypunct_cf;
+ extern std::moneypunct<char, true> moneypunct_ct;
+ extern std::money_get<char> money_get_c;
+ extern std::money_put<char> money_put_c;
+ extern std::__timepunct<char> timepunct_c;
+ extern std::time_get<char> time_get_c;
+ extern std::time_put<char> time_put_c;
+ extern std::messages<char> messages_c;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern std::ctype<wchar_t> ctype_w;
+ extern std::collate<wchar_t> collate_w;
+ extern std::numpunct<wchar_t> numpunct_w;
+ extern std::num_get<wchar_t> num_get_w;
+ extern std::num_put<wchar_t> num_put_w;
+ extern std::codecvt<wchar_t, char, mbstate_t> codecvt_w;
+ extern std::moneypunct<wchar_t, false> moneypunct_wf;
+ extern std::moneypunct<wchar_t, true> moneypunct_wt;
+ extern std::money_get<wchar_t> money_get_w;
+ extern std::money_put<wchar_t> money_put_w;
+ extern std::__timepunct<wchar_t> timepunct_w;
+ extern std::time_get<wchar_t> time_get_w;
+ extern std::time_put<wchar_t> time_put_w;
+ extern std::messages<wchar_t> messages_w;
+#endif
+
+ // And the caches....
+ extern std::locale::facet* cache_vec[_GLIBCXX_NUM_FACETS];
+ extern std::__numpunct_cache<char> numpunct_cache_c;
+ extern std::__moneypunct_cache<char, false> moneypunct_cache_cf;
+ extern std::__moneypunct_cache<char, true> moneypunct_cache_ct;
+ extern std::__timepunct_cache<char> timepunct_cache_c;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern std::__numpunct_cache<wchar_t> numpunct_cache_w;
+ extern std::__moneypunct_cache<wchar_t, false> moneypunct_cache_wf;
+ extern std::__moneypunct_cache<wchar_t, true> moneypunct_cache_wt;
+ extern std::__timepunct_cache<wchar_t> timepunct_cache_w;
+#endif
+
+ // Mutex objects for locale initialization.
+ __glibcxx_mutex_define_initialized(locale_cons_mutex);
+ __glibcxx_mutex_define_initialized(locale_global_mutex);
+} // namespace __gnu_internal
+
+namespace std
+{
+ using namespace __gnu_internal;
+
+ locale::locale() throw() : _M_impl(0)
+ {
+ _S_initialize();
+ __glibcxx_mutex_lock(__gnu_internal::locale_cons_mutex);
+ _S_global->_M_add_reference();
+ _M_impl = _S_global;
+ __glibcxx_mutex_unlock(__gnu_internal::locale_cons_mutex);
+ }
+
+ locale
+ locale::global(const locale& __other)
+ {
+ _S_initialize();
+ __glibcxx_mutex_lock(__gnu_internal::locale_global_mutex);
+ _Impl* __old = _S_global;
+ __other._M_impl->_M_add_reference();
+ _S_global = __other._M_impl;
+ if (__other.name() != "*")
+ setlocale(LC_ALL, __other.name().c_str());
+ __glibcxx_mutex_unlock(__gnu_internal::locale_global_mutex);
+
+ // Reference count sanity check: one reference removed for the
+ // subsition of __other locale, one added by return-by-value. Net
+ // difference: zero. When the returned locale object's destrutor
+ // is called, then the reference count is decremented and possibly
+ // destroyed.
+ return locale(__old);
+ }
+
+ const locale&
+ locale::classic()
+ {
+ _S_initialize();
+ return c_locale;
+ }
+
+ void
+ locale::_S_initialize_once()
+ {
+ // 2 references.
+ // One reference for _S_classic, one for _S_global
+ _S_classic = new (&c_locale_impl) _Impl(2);
+ _S_global = _S_classic;
+ new (&c_locale) locale(_S_classic);
+ }
+
+ void
+ locale::_S_initialize()
+ {
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ __gthread_once(&_S_once, _S_initialize_once);
+#endif
+ if (!_S_classic)
+ _S_initialize_once();
+ }
+
+ // Definitions for static const data members of locale::_Impl
+ const locale::id* const
+ locale::_Impl::_S_id_ctype[] =
+ {
+ &std::ctype<char>::id,
+ &codecvt<char, char, mbstate_t>::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &std::ctype<wchar_t>::id,
+ &codecvt<wchar_t, char, mbstate_t>::id,
+#endif
+ 0
+ };
+
+ const locale::id* const
+ locale::_Impl::_S_id_numeric[] =
+ {
+ &num_get<char>::id,
+ &num_put<char>::id,
+ &numpunct<char>::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &num_get<wchar_t>::id,
+ &num_put<wchar_t>::id,
+ &numpunct<wchar_t>::id,
+#endif
+ 0
+ };
+
+ const locale::id* const
+ locale::_Impl::_S_id_collate[] =
+ {
+ &std::collate<char>::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &std::collate<wchar_t>::id,
+#endif
+ 0
+ };
+
+ const locale::id* const
+ locale::_Impl::_S_id_time[] =
+ {
+ &__timepunct<char>::id,
+ &time_get<char>::id,
+ &time_put<char>::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &__timepunct<wchar_t>::id,
+ &time_get<wchar_t>::id,
+ &time_put<wchar_t>::id,
+#endif
+ 0
+ };
+
+ const locale::id* const
+ locale::_Impl::_S_id_monetary[] =
+ {
+ &money_get<char>::id,
+ &money_put<char>::id,
+ &moneypunct<char, false>::id,
+ &moneypunct<char, true >::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &money_get<wchar_t>::id,
+ &money_put<wchar_t>::id,
+ &moneypunct<wchar_t, false>::id,
+ &moneypunct<wchar_t, true >::id,
+#endif
+ 0
+ };
+
+ const locale::id* const
+ locale::_Impl::_S_id_messages[] =
+ {
+ &std::messages<char>::id,
+#ifdef _GLIBCXX_USE_WCHAR_T
+ &std::messages<wchar_t>::id,
+#endif
+ 0
+ };
+
+ const locale::id* const* const
+ locale::_Impl::_S_facet_categories[] =
+ {
+ // Order must match the decl order in class locale.
+ locale::_Impl::_S_id_ctype,
+ locale::_Impl::_S_id_numeric,
+ locale::_Impl::_S_id_collate,
+ locale::_Impl::_S_id_time,
+ locale::_Impl::_S_id_monetary,
+ locale::_Impl::_S_id_messages,
+ 0
+ };
+
+ // Construct "C" _Impl.
+ locale::_Impl::
+ _Impl(size_t __refs) throw()
+ : _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS),
+ _M_caches(0), _M_names(0)
+ {
+ _M_facets = new (&facet_vec) const facet*[_M_facets_size];
+ _M_caches = new (&cache_vec) const facet*[_M_facets_size];
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
+ _M_facets[__i] = _M_caches[__i] = 0;
+
+ // Name all the categories.
+ _M_names = new (&name_vec) char*[_S_categories_size];
+ for (size_t __j = 0; __j < _S_categories_size; ++__j)
+ {
+ _M_names[__j] = new (&name_c[__j]) char[2];
+ std::strcpy(_M_names[__j], locale::facet::_S_get_c_name());
+ }
+
+ // This is needed as presently the C++ version of "C" locales
+ // != data in the underlying locale model for __timepunct,
+ // numpunct, and moneypunct. Also, the "C" locales must be
+ // constructed in a way such that they are pre-allocated.
+ // NB: Set locale::facets(ref) count to one so that each individual
+ // facet is not destroyed when the locale (and thus locale::_Impl) is
+ // destroyed.
+ _M_init_facet(new (&ctype_c) std::ctype<char>(0, false, 1));
+ _M_init_facet(new (&codecvt_c) codecvt<char, char, mbstate_t>(1));
+
+ typedef __numpunct_cache<char> num_cache_c;
+ num_cache_c* __npc = new (&numpunct_cache_c) num_cache_c(2);
+ _M_init_facet(new (&numpunct_c) numpunct<char>(__npc, 1));
+
+ _M_init_facet(new (&num_get_c) num_get<char>(1));
+ _M_init_facet(new (&num_put_c) num_put<char>(1));
+ _M_init_facet(new (&collate_c) std::collate<char>(1));
+
+ typedef __moneypunct_cache<char, false> money_cache_cf;
+ typedef __moneypunct_cache<char, true> money_cache_ct;
+ money_cache_cf* __mpcf = new (&moneypunct_cache_cf) money_cache_cf(2);
+ _M_init_facet(new (&moneypunct_cf) moneypunct<char, false>(__mpcf, 1));
+ money_cache_ct* __mpct = new (&moneypunct_cache_ct) money_cache_ct(2);
+ _M_init_facet(new (&moneypunct_ct) moneypunct<char, true>(__mpct, 1));
+
+ _M_init_facet(new (&money_get_c) money_get<char>(1));
+ _M_init_facet(new (&money_put_c) money_put<char>(1));
+
+ typedef __timepunct_cache<char> time_cache_c;
+ time_cache_c* __tpc = new (&timepunct_cache_c) time_cache_c(2);
+ _M_init_facet(new (&timepunct_c) __timepunct<char>(__tpc, 1));
+
+ _M_init_facet(new (&time_get_c) time_get<char>(1));
+ _M_init_facet(new (&time_put_c) time_put<char>(1));
+ _M_init_facet(new (&messages_c) std::messages<char>(1));
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _M_init_facet(new (&ctype_w) std::ctype<wchar_t>(1));
+ _M_init_facet(new (&codecvt_w) codecvt<wchar_t, char, mbstate_t>(1));
+
+ typedef __numpunct_cache<wchar_t> num_cache_w;
+ num_cache_w* __npw = new (&numpunct_cache_w) num_cache_w(2);
+ _M_init_facet(new (&numpunct_w) numpunct<wchar_t>(__npw, 1));
+
+ _M_init_facet(new (&num_get_w) num_get<wchar_t>(1));
+ _M_init_facet(new (&num_put_w) num_put<wchar_t>(1));
+ _M_init_facet(new (&collate_w) std::collate<wchar_t>(1));
+
+ typedef __moneypunct_cache<wchar_t, false> money_cache_wf;
+ typedef __moneypunct_cache<wchar_t, true> money_cache_wt;
+ money_cache_wf* __mpwf = new (&moneypunct_cache_wf) money_cache_wf(2);
+ _M_init_facet(new (&moneypunct_wf) moneypunct<wchar_t, false>(__mpwf, 1));
+ money_cache_wt* __mpwt = new (&moneypunct_cache_wt) money_cache_wt(2);
+ _M_init_facet(new (&moneypunct_wt) moneypunct<wchar_t, true>(__mpwt, 1));
+
+ _M_init_facet(new (&money_get_w) money_get<wchar_t>(1));
+ _M_init_facet(new (&money_put_w) money_put<wchar_t>(1));
+
+ typedef __timepunct_cache<wchar_t> time_cache_w;
+ time_cache_w* __tpw = new (&timepunct_cache_w) time_cache_w(2);
+ _M_init_facet(new (&timepunct_w) __timepunct<wchar_t>(__tpw, 1));
+
+ _M_init_facet(new (&time_get_w) time_get<wchar_t>(1));
+ _M_init_facet(new (&time_put_w) time_put<wchar_t>(1));
+ _M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
+#endif
+
+ // This locale is safe to pre-cache, after all the facets have
+ // been created and installed.
+ _M_caches[numpunct<char>::id._M_id()] = __npc;
+ _M_caches[moneypunct<char, false>::id._M_id()] = __mpcf;
+ _M_caches[moneypunct<char, true>::id._M_id()] = __mpct;
+ _M_caches[__timepunct<char>::id._M_id()] = __tpc;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _M_caches[numpunct<wchar_t>::id._M_id()] = __npw;
+ _M_caches[moneypunct<wchar_t, false>::id._M_id()] = __mpwf;
+ _M_caches[moneypunct<wchar_t, true>::id._M_id()] = __mpwt;
+ _M_caches[__timepunct<wchar_t>::id._M_id()] = __tpw;
+#endif
+ }
+} // namespace std
diff --git a/contrib/libstdc++/src/localename.cc b/contrib/libstdc++/src/localename.cc
index ec35fdb..503d055 100644
--- a/contrib/libstdc++/src/localename.cc
+++ b/contrib/libstdc++/src/localename.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -30,361 +30,265 @@
#include <cstring>
#include <locale>
-namespace __gnu_cxx
-{
- using namespace std;
-
- // Defined in globals.cc.
- extern locale::facet* facet_vec[_GLIBCPP_NUM_FACETS];
- extern locale::facet* facet_cache_vec[2 * _GLIBCPP_NUM_FACETS];
- extern char* facet_name[6 + _GLIBCPP_NUM_CATEGORIES];
-
- extern std::ctype<char> ctype_c;
- extern std::collate<char> collate_c;
- extern numpunct<char> numpunct_c;
- extern num_get<char> num_get_c;
- extern num_put<char> num_put_c;
- extern codecvt<char, char, mbstate_t> codecvt_c;
- extern moneypunct<char, false> moneypunct_fc;
- extern moneypunct<char, true> moneypunct_tc;
- extern money_get<char> money_get_c;
- extern money_put<char> money_put_c;
- extern __timepunct<char> timepunct_c;
- extern time_get<char> time_get_c;
- extern time_put<char> time_put_c;
- extern std::messages<char> messages_c;
-#ifdef _GLIBCPP_USE_WCHAR_T
- extern std::ctype<wchar_t> ctype_w;
- extern std::collate<wchar_t> collate_w;
- extern numpunct<wchar_t> numpunct_w;
- extern num_get<wchar_t> num_get_w;
- extern num_put<wchar_t> num_put_w;
- extern codecvt<wchar_t, char, mbstate_t> codecvt_w;
- extern moneypunct<wchar_t, false> moneypunct_fw;
- extern moneypunct<wchar_t, true> moneypunct_tw;
- extern money_get<wchar_t> money_get_w;
- extern money_put<wchar_t> money_put_w;
- extern __timepunct<wchar_t> timepunct_w;
- extern time_get<wchar_t> time_get_w;
- extern time_put<wchar_t> time_put_w;
- extern std::messages<wchar_t> messages_w;
-#endif
-
- extern std::__locale_cache<numpunct<char> > locale_cache_np_c;
-#ifdef _GLIBCPP_USE_WCHAR_T
- extern std::__locale_cache<numpunct<wchar_t> > locale_cache_np_w;
-#endif
-} // namespace __gnu_cxx
-
namespace std
{
using namespace __gnu_cxx;
- locale::_Impl::
- ~_Impl() throw()
+
+ locale::locale(const char* __s) : _M_impl(0)
{
- // Clean up facets, then caches. No cache refcounts for now.
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- if (_M_facets[__i])
- _M_facets[__i]->_M_remove_reference();
- for (size_t __i = _M_facets_size; __i < 2*_M_facets_size; ++__i)
- if (_M_facets[__i])
- delete (__locale_cache_base*)_M_facets[__i];
- delete [] _M_facets;
+ if (__s)
+ {
+ _S_initialize();
+ if (std::strcmp(__s, "C") == 0 || std::strcmp(__s, "POSIX") == 0)
+ (_M_impl = _S_classic)->_M_add_reference();
+ else if (std::strcmp(__s, "") != 0)
+ _M_impl = new _Impl(__s, 1);
+ else
+ {
+ // Get it from the environment.
+ char* __env = std::getenv("LC_ALL");
+ // If LC_ALL is set we are done.
+ if (__env && std::strcmp(__env, "") != 0)
+ {
+ if (std::strcmp(__env, "C") == 0
+ || std::strcmp(__env, "POSIX") == 0)
+ (_M_impl = _S_classic)->_M_add_reference();
+ else
+ _M_impl = new _Impl(__env, 1);
+ }
+ else
+ {
+ // LANG may set a default different from "C".
+ string __res;
+ char* __env = std::getenv("LANG");
+ if (!__env || std::strcmp(__env, "") == 0
+ || std::strcmp(__env, "C") == 0
+ || std::strcmp(__env, "POSIX") == 0)
+ __res = "C";
+ else
+ __res = __env;
+
+ // Scan the categories looking for the first one
+ // different from LANG.
+ size_t __i = 0;
+ if (__res == "C")
+ for (; __i < _S_categories_size; ++__i)
+ {
+ __env = std::getenv(_S_categories[__i]);
+ if (__env && std::strcmp(__env, "") != 0
+ && std::strcmp(__env, "C") != 0
+ && std::strcmp(__env, "POSIX") != 0)
+ break;
+ }
+ else
+ for (; __i < _S_categories_size; ++__i)
+ {
+ __env = std::getenv(_S_categories[__i]);
+ if (__env && std::strcmp(__env, "") != 0
+ && __res != __env)
+ break;
+ }
+
+ // If one is found, build the complete string of
+ // the form LC_CTYPE=xxx;LC_NUMERIC=yyy; and so on...
+ if (__i < _S_categories_size)
+ {
+ string __str;
+ for (size_t __j = 0; __j < __i; ++__j)
+ {
+ __str += _S_categories[__j];
+ __str += '=';
+ __str += __res;
+ __str += ';';
+ }
+ __str += _S_categories[__i];
+ __str += '=';
+ __str += __env;
+ __str += ';';
+ __i++;
+ for (; __i < _S_categories_size; ++__i)
+ {
+ __env = std::getenv(_S_categories[__i]);
+ if (!__env || std::strcmp(__env, "") == 0)
+ {
+ __str += _S_categories[__i];
+ __str += '=';
+ __str += __res;
+ __str += ';';
+ }
+ else if (std::strcmp(__env, "C") == 0
+ || std::strcmp(__env, "POSIX") == 0)
+ {
+ __str += _S_categories[__i];
+ __str += "=C;";
+ }
+ else
+ {
+ __str += _S_categories[__i];
+ __str += '=';
+ __str += __env;
+ __str += ';';
+ }
+ }
+ __str.erase(__str.end() - 1);
+ _M_impl = new _Impl(__str.c_str(), 1);
+ }
+ // ... otherwise either an additional instance of
+ // the "C" locale or LANG.
+ else if (__res == "C")
+ (_M_impl = _S_classic)->_M_add_reference();
+ else
+ _M_impl = new _Impl(__res.c_str(), 1);
+ }
+ }
+ }
+ else
+ __throw_runtime_error(__N("locale::locale NULL not valid"));
+ }
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
- delete [] _M_names[__i];
+ locale::locale(const locale& __base, const char* __s, category __cat)
+ : _M_impl(0)
+ {
+ // NB: There are complicated, yet more efficient ways to do
+ // this. Building up locales on a per-category way is tedious, so
+ // let's do it this way until people complain.
+ locale __add(__s);
+ _M_coalesce(__base, __add, __cat);
}
- // Clone existing _Impl object.
- locale::_Impl::
- _Impl(const _Impl& __imp, size_t __refs)
- : _M_references(__refs), _M_facets_size(__imp._M_facets_size) // XXX
+ locale::locale(const locale& __base, const locale& __add, category __cat)
+ : _M_impl(0)
+ { _M_coalesce(__base, __add, __cat); }
+
+ void
+ locale::_M_coalesce(const locale& __base, const locale& __add,
+ category __cat)
{
- try
+ __cat = _S_normalize_category(__cat);
+ _M_impl = new _Impl(*__base._M_impl, 1);
+
+ try
+ { _M_impl->_M_replace_categories(__add._M_impl, __cat); }
+ catch (...)
{
- // Space for facets and matching caches
- _M_facets = new facet*[2*_M_facets_size];
- for (size_t __i = 0; __i < 2*_M_facets_size; ++__i)
- _M_facets[__i] = 0;
- }
- catch(...)
- {
- delete [] _M_facets;
+ _M_impl->_M_remove_reference();
__throw_exception_again;
}
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- {
- _M_facets[__i] = __imp._M_facets[__i];
- if (_M_facets[__i])
- _M_facets[__i]->_M_add_reference();
- }
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
- {
- char* __new = new char[strlen(__imp._M_names[__i]) + 1];
- strcpy(__new, __imp._M_names[__i]);
- _M_names[__i] = __new;
- }
}
// Construct named _Impl.
locale::_Impl::
_Impl(const char* __s, size_t __refs)
- : _M_references(__refs), _M_facets_size(_GLIBCPP_NUM_FACETS)
+ : _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS),
+ _M_caches(0), _M_names(0)
{
- // Initialize the underlying locale model, which also checks
- // to see if the given name is valid.
+ // Initialize the underlying locale model, which also checks to
+ // see if the given name is valid.
__c_locale __cloc;
locale::facet::_S_create_c_locale(__cloc, __s);
try
{
- // Space for facets and matching caches
- _M_facets = new facet*[2*_M_facets_size];
- for (size_t __i = 0; __i < 2*_M_facets_size; ++__i)
+ _M_facets = new const facet*[_M_facets_size];
+ for (size_t __i = 0; __i < _M_facets_size; ++__i)
_M_facets[__i] = 0;
- }
- catch(...)
- {
- delete [] _M_facets;
- __throw_exception_again;
- }
+ _M_caches = new const facet*[_M_facets_size];
+ for (size_t __j = 0; __j < _M_facets_size; ++__j)
+ _M_caches[__j] = 0;
+ _M_names = new char*[_S_categories_size];
+ for (size_t __k = 0; __k < _S_categories_size; ++__k)
+ _M_names[__k] = 0;
- // Name all the categories.
- size_t __len = strlen(__s);
- if (!strchr(__s, ';'))
- {
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
+ // Name all the categories.
+ const size_t __len = std::strlen(__s);
+ if (!std::strchr(__s, ';'))
{
- _M_names[__i] = new char[__len + 1];
- strcpy(_M_names[__i], __s);
+ for (size_t __i = 0; __i < _S_categories_size; ++__i)
+ {
+ _M_names[__i] = new char[__len + 1];
+ std::strcpy(_M_names[__i], __s);
+ }
}
- }
- else
- {
- const char* __beg = __s;
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
+ else
{
- __beg = strchr(__beg, '=') + 1;
- const char* __end = strchr(__beg, ';');
- if (!__end)
- __end = __s + __len;
- char* __new = new char[__end - __beg + 1];
- memcpy(__new, __beg, __end - __beg);
- __new[__end - __beg] = '\0';
- _M_names[__i] = __new;
+ const char* __beg = __s;
+ for (size_t __i = 0; __i < _S_categories_size; ++__i)
+ {
+ __beg = std::strchr(__beg, '=') + 1;
+ const char* __end = std::strchr(__beg, ';');
+ if (!__end)
+ __end = __s + __len;
+ char* __new = new char[__end - __beg + 1];
+ std::memcpy(__new, __beg, __end - __beg);
+ __new[__end - __beg] = '\0';
+ _M_names[__i] = __new;
+ }
}
- }
-
- // Construct all standard facets and add them to _M_facets.
- _M_init_facet(new std::ctype<char>(__cloc, 0, false));
- _M_init_facet(new codecvt<char, char, mbstate_t>);
- _M_init_facet(new numpunct<char>(__cloc));
- _M_init_facet(new num_get<char>);
- _M_init_facet(new num_put<char>);
- _M_init_facet(new std::collate<char>(__cloc));
- _M_init_facet(new moneypunct<char, false>(__cloc, __s));
- _M_init_facet(new moneypunct<char, true>(__cloc, __s));
- _M_init_facet(new money_get<char>);
- _M_init_facet(new money_put<char>);
- _M_init_facet(new __timepunct<char>(__cloc, __s));
- _M_init_facet(new time_get<char>);
- _M_init_facet(new time_put<char>);
- _M_init_facet(new std::messages<char>(__cloc, __s));
+
+ // Construct all standard facets and add them to _M_facets.
+ _M_init_facet(new std::ctype<char>(__cloc, 0, false));
+ _M_init_facet(new codecvt<char, char, mbstate_t>(__cloc));
+ _M_init_facet(new numpunct<char>(__cloc));
+ _M_init_facet(new num_get<char>);
+ _M_init_facet(new num_put<char>);
+ _M_init_facet(new std::collate<char>(__cloc));
+ _M_init_facet(new moneypunct<char, false>(__cloc, __s));
+ _M_init_facet(new moneypunct<char, true>(__cloc, __s));
+ _M_init_facet(new money_get<char>);
+ _M_init_facet(new money_put<char>);
+ _M_init_facet(new __timepunct<char>(__cloc, __s));
+ _M_init_facet(new time_get<char>);
+ _M_init_facet(new time_put<char>);
+ _M_init_facet(new std::messages<char>(__cloc, __s));
-#ifdef _GLIBCPP_USE_WCHAR_T
- _M_init_facet(new std::ctype<wchar_t>(__cloc));
- _M_init_facet(new codecvt<wchar_t, char, mbstate_t>);
- _M_init_facet(new numpunct<wchar_t>(__cloc));
- _M_init_facet(new num_get<wchar_t>);
- _M_init_facet(new num_put<wchar_t>);
- _M_init_facet(new std::collate<wchar_t>(__cloc));
- _M_init_facet(new moneypunct<wchar_t, false>(__cloc, __s));
- _M_init_facet(new moneypunct<wchar_t, true>(__cloc, __s));
- _M_init_facet(new money_get<wchar_t>);
- _M_init_facet(new money_put<wchar_t>);
- _M_init_facet(new __timepunct<wchar_t>(__cloc, __s));
- _M_init_facet(new time_get<wchar_t>);
- _M_init_facet(new time_put<wchar_t>);
- _M_init_facet(new std::messages<wchar_t>(__cloc, __s));
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _M_init_facet(new std::ctype<wchar_t>(__cloc));
+ _M_init_facet(new codecvt<wchar_t, char, mbstate_t>(__cloc));
+ _M_init_facet(new numpunct<wchar_t>(__cloc));
+ _M_init_facet(new num_get<wchar_t>);
+ _M_init_facet(new num_put<wchar_t>);
+ _M_init_facet(new std::collate<wchar_t>(__cloc));
+ _M_init_facet(new moneypunct<wchar_t, false>(__cloc, __s));
+ _M_init_facet(new moneypunct<wchar_t, true>(__cloc, __s));
+ _M_init_facet(new money_get<wchar_t>);
+ _M_init_facet(new money_put<wchar_t>);
+ _M_init_facet(new __timepunct<wchar_t>(__cloc, __s));
+ _M_init_facet(new time_get<wchar_t>);
+ _M_init_facet(new time_put<wchar_t>);
+ _M_init_facet(new std::messages<wchar_t>(__cloc, __s));
#endif
- locale::facet::_S_destroy_c_locale(__cloc);
- }
-
- // Construct "C" _Impl.
- locale::_Impl::
- _Impl(facet**, size_t __refs, bool)
- : _M_references(__refs), _M_facets_size(_GLIBCPP_NUM_FACETS)
- {
- // Initialize the underlying locale model.
- locale::facet::_S_c_name[0] = 'C';
- locale::facet::_S_c_name[1] = '\0';
- locale::facet::_S_create_c_locale(locale::facet::_S_c_locale,
- locale::facet::_S_c_name);
-
- // Space for facets and matching caches
- _M_facets = new(&facet_cache_vec) facet*[2*_M_facets_size];
- for (size_t __i = 0; __i < 2*_M_facets_size; ++__i)
- _M_facets[__i] = 0;
-
- // Name all the categories.
- for (size_t __i = 0;
- __i < _S_categories_size + _S_extra_categories_size; ++__i)
- {
- _M_names[__i] = new (&facet_name[__i]) char[2];
- strcpy(_M_names[__i], locale::facet::_S_c_name);
+ locale::facet::_S_destroy_c_locale(__cloc);
}
-
- // This is needed as presently the C++ version of "C" locales
- // != data in the underlying locale model for __timepunct,
- // numpunct, and moneypunct. Also, the "C" locales must be
- // constructed in a way such that they are pre-allocated.
- // NB: Set locale::facets(ref) count to one so that each individual
- // facet is not destroyed when the locale (and thus locale::_Impl) is
- // destroyed.
- _M_init_facet(new (&ctype_c) std::ctype<char>(0, false, 1));
- _M_init_facet(new (&codecvt_c) codecvt<char, char, mbstate_t>(1));
- _M_init_facet(new (&numpunct_c) numpunct<char>(1));
- _M_init_facet(new (&num_get_c) num_get<char>(1));
- _M_init_facet(new (&num_put_c) num_put<char>(1));
- _M_init_facet(new (&collate_c) std::collate<char>(1));
- _M_init_facet(new (&moneypunct_fc) moneypunct<char, false>(1));
- _M_init_facet(new (&moneypunct_tc) moneypunct<char, true>(1));
- _M_init_facet(new (&money_get_c) money_get<char>(1));
- _M_init_facet(new (&money_put_c) money_put<char>(1));
- _M_init_facet(new (&timepunct_c) __timepunct<char>(1));
- _M_init_facet(new (&time_get_c) time_get<char>(1));
- _M_init_facet(new (&time_put_c) time_put<char>(1));
- _M_init_facet(new (&messages_c) std::messages<char>(1));
-#ifdef _GLIBCPP_USE_WCHAR_T
- _M_init_facet(new (&ctype_w) std::ctype<wchar_t>(1));
- _M_init_facet(new (&codecvt_w) codecvt<wchar_t, char, mbstate_t>(1));
- _M_init_facet(new (&numpunct_w) numpunct<wchar_t>(1));
- _M_init_facet(new (&num_get_w) num_get<wchar_t>(1));
- _M_init_facet(new (&num_put_w) num_put<wchar_t>(1));
- _M_init_facet(new (&collate_w) std::collate<wchar_t>(1));
- _M_init_facet(new (&moneypunct_fw) moneypunct<wchar_t, false>(1));
- _M_init_facet(new (&moneypunct_tw) moneypunct<wchar_t, true>(1));
- _M_init_facet(new (&money_get_w) money_get<wchar_t>(1));
- _M_init_facet(new (&money_put_w) money_put<wchar_t>(1));
- _M_init_facet(new (&timepunct_w) __timepunct<wchar_t>(1));
- _M_init_facet(new (&time_get_w) time_get<wchar_t>(1));
- _M_init_facet(new (&time_put_w) time_put<wchar_t>(1));
- _M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
-#endif
-
- // Initialize the static locale caches for C locale.
-
- locale ltmp(this); // Doesn't bump refcount
- _M_add_reference(); // Bump so destructor doesn't trash us
-
- // These need to be built in static allocated memory. There must
- // be a better way to do this!
- __locale_cache<numpunct<char> >* __lc =
- new (&locale_cache_np_c) __locale_cache<numpunct<char> >(ltmp, true);
- _M_facets[numpunct<char>::id._M_id() + _M_facets_size] =
- reinterpret_cast<locale::facet*>(__lc);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
- __locale_cache<numpunct<wchar_t> >* __wlc =
- new (&locale_cache_np_w) __locale_cache<numpunct<wchar_t> >(ltmp, true);
- _M_facets[numpunct<wchar_t>::id._M_id() + _M_facets_size] =
- reinterpret_cast<locale::facet*>(__wlc);
-#endif
+ catch(...)
+ {
+ locale::facet::_S_destroy_c_locale(__cloc);
+ this->~_Impl();
+ __throw_exception_again;
+ }
}
-
+
void
locale::_Impl::
_M_replace_categories(const _Impl* __imp, category __cat)
{
- category __mask;
for (size_t __ix = 0; __ix < _S_categories_size; ++__ix)
{
- __mask = 1 << __ix;
+ const category __mask = 1 << __ix;
if (__mask & __cat)
{
// Need to replace entry in _M_facets with other locale's info.
_M_replace_category(__imp, _S_facet_categories[__ix]);
// If both have names, go ahead and mangle.
- if (strcmp(_M_names[__ix], "*") != 0
- && strcmp(__imp->_M_names[__ix], "*") != 0)
+ if (std::strcmp(_M_names[__ix], "*") != 0
+ && std::strcmp(__imp->_M_names[__ix], "*") != 0)
{
+ char* __new = new char[std::strlen(__imp->_M_names[__ix]) + 1];
+ std::strcpy(__new, __imp->_M_names[__ix]);
delete [] _M_names[__ix];
- char* __new = new char[strlen(__imp->_M_names[__ix]) + 1];
- strcpy(__new, __imp->_M_names[__ix]);
_M_names[__ix] = __new;
}
}
}
}
-
- void
- locale::_Impl::
- _M_replace_category(const _Impl* __imp, const locale::id* const* __idpp)
- {
- for (; *__idpp; ++__idpp)
- _M_replace_facet(__imp, *__idpp);
- }
-
- void
- locale::_Impl::
- _M_replace_facet(const _Impl* __imp, const locale::id* __idp)
- {
- size_t __index = __idp->_M_id();
- if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index])
- __throw_runtime_error("no locale facet");
- _M_install_facet(__idp, __imp->_M_facets[__index]);
- }
-
- void
- locale::_Impl::
- _M_install_facet(const locale::id* __idp, facet* __fp)
- {
- if (__fp)
- {
- size_t __index = __idp->_M_id();
-
- // Check size of facet vector to ensure adequate room.
- if (__index > _M_facets_size - 1)
- {
- facet** __old = _M_facets;
- facet** __new;
- const size_t __new_size = __index + 4;
- __new = new facet*[2 * __new_size];
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- __new[__i] = _M_facets[__i];
- for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2)
- __new[__i2] = 0;
- // Also copy caches and clear extra space
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- __new[__i + __new_size] = _M_facets[__i + _M_facets_size];
- for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2)
- __new[__i2 + __new_size] = 0;
-
- _M_facets_size = __new_size;
- _M_facets = __new;
- delete [] __old;
- }
-
- __fp->_M_add_reference();
- facet*& __fpr = _M_facets[__index];
- if (__fpr)
- {
- // Replacing an existing facet. Order matters.
- __fpr->_M_remove_reference();
- __fpr = __fp;
- }
- else
- {
- // Installing a newly created facet into an empty
- // _M_facets container, say a newly-constructed,
- // swanky-fresh _Impl.
- _M_facets[__index] = __fp;
- }
- }
- }
} // namespace std
diff --git a/contrib/libstdc++/src/misc-inst.cc b/contrib/libstdc++/src/misc-inst.cc
index 61cb1b3..b9bc298 100644
--- a/contrib/libstdc++/src/misc-inst.cc
+++ b/contrib/libstdc++/src/misc-inst.cc
@@ -1,6 +1,6 @@
// Explicit instantiation file.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -38,6 +38,7 @@
#include <algorithm>
#include <vector>
#include <bits/atomicity.h>
+#include <ext/stdio_sync_filebuf.h>
namespace std
{
@@ -54,7 +55,7 @@ namespace std
template
basic_istream<char>&
getline(basic_istream<char>&, string&);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template
basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
@@ -68,40 +69,14 @@ namespace std
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
#endif
-#ifdef _GLIBCPP_INST_ATOMICITY_LOCK
- template volatile int __Atomicity_lock<0>::_S_atomicity_lock;
-#endif
-
-#if 1
- // XXX
- // 2002-05-24 These are no longer needed and should eventually be deleted.
- template
- string*
- __uninitialized_fill_n_aux<string*, size_t, string>
- (string*, size_t, string const &, __false_type);
-
- template
- string*
- __uninitialized_copy_aux<vector<string>::const_iterator, string *>
- (vector<string>::const_iterator, vector<string>::const_iterator,
- string*, __false_type);
-#endif
} // namespace std
-#ifdef _GLIBCPP_NEED_GENERIC_MUTEX
namespace __gnu_cxx
{
-#ifdef __GTHREAD_MUTEX_INIT
- __gthread_mutex_t _Atomic_add_mutex = __GTHREAD_MUTEX_INIT;
-#else
- // generic atomicity.h without static initialization
- __gthread_mutex_t _Atomic_add_mutex;
- __gthread_once_t _Atomic_add_mutex_once = __GTHREAD_ONCE_INIT;
- void __gthread_atomic_add_mutex_once()
- {
- __GTHREAD_MUTEX_INIT_FUNCTION (&_Atomic_add_mutex);
- }
+ template class stdio_sync_filebuf<char>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template class stdio_sync_filebuf<wchar_t>;
#endif
} // namespace __gnu_cxx
-#endif // _GLIBCPP_NEED_GLOBAL_MUTEX
+
diff --git a/contrib/libstdc++/src/ostream-inst.cc b/contrib/libstdc++/src/ostream-inst.cc
index b834640..c4e2394 100644
--- a/contrib/libstdc++/src/ostream-inst.cc
+++ b/contrib/libstdc++/src/ostream-inst.cc
@@ -56,7 +56,7 @@ namespace std
template ostream& operator<<(ostream&, _Setprecision);
template ostream& operator<<(ostream&, _Setw);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ostream<wchar_t>;
template wostream& endl(wostream&);
template wostream& ends(wostream&);
diff --git a/contrib/libstdc++/src/sstream-inst.cc b/contrib/libstdc++/src/sstream-inst.cc
index 6c0272b..3295c2f 100644
--- a/contrib/libstdc++/src/sstream-inst.cc
+++ b/contrib/libstdc++/src/sstream-inst.cc
@@ -38,25 +38,25 @@ namespace std
{
// stringbuf
template class basic_stringbuf<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_stringbuf<wchar_t>;
#endif
// istringstream
template class basic_istringstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_istringstream<wchar_t>;
#endif
// ostringstream
template class basic_ostringstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ostringstream<wchar_t>;
#endif
// stringstream
template class basic_stringstream<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_stringstream<wchar_t>;
#endif
} // namespace std
diff --git a/contrib/libstdc++/src/stdexcept.cc b/contrib/libstdc++/src/stdexcept.cc
index d39d41f..5db7c68 100644
--- a/contrib/libstdc++/src/stdexcept.cc
+++ b/contrib/libstdc++/src/stdexcept.cc
@@ -1,6 +1,6 @@
// Methods for Exception Support for -*- C++ -*-
-// Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ namespace std
logic_error::logic_error(const string& __arg)
: exception(), _M_msg(__arg) { }
- logic_error::~logic_error() throw() { };
+ logic_error::~logic_error() throw() { }
const char*
logic_error::what() const throw()
@@ -60,7 +60,7 @@ namespace std
runtime_error::runtime_error(const string& __arg)
: exception(), _M_msg(__arg) { }
- runtime_error::~runtime_error() throw() { };
+ runtime_error::~runtime_error() throw() { }
const char*
runtime_error::what() const throw()
diff --git a/contrib/libstdc++/src/streambuf-inst.cc b/contrib/libstdc++/src/streambuf-inst.cc
index 438752e..5d1879a 100644
--- a/contrib/libstdc++/src/streambuf-inst.cc
+++ b/contrib/libstdc++/src/streambuf-inst.cc
@@ -39,18 +39,18 @@ namespace std
{
// streambuf
template class basic_streambuf<char>;
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_streambuf<wchar_t>;
#endif
template
streamsize
- __copy_streambufs(basic_ios<char>&, basic_streambuf<char>*,
+ __copy_streambufs(basic_streambuf<char>*,
basic_streambuf<char>*);
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
template
streamsize
- __copy_streambufs(basic_ios<wchar_t>&, basic_streambuf<wchar_t>*,
+ __copy_streambufs(basic_streambuf<wchar_t>*,
basic_streambuf<wchar_t>*);
#endif
} //std
diff --git a/contrib/libstdc++/src/string-inst.cc b/contrib/libstdc++/src/string-inst.cc
index 3fcaf51..e01dbca 100644
--- a/contrib/libstdc++/src/string-inst.cc
+++ b/contrib/libstdc++/src/string-inst.cc
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -42,7 +42,7 @@
# define C char
#endif
-namespace std
+namespace std
{
typedef basic_string<C> S;
@@ -50,17 +50,7 @@ namespace std
template S operator+(const C*, const S&);
template S operator+(C, const S&);
template S operator+(const S&, const S&);
-} // namespace std
-
-namespace __gnu_cxx
-{
- using std::S;
- template bool operator==(const S::iterator&, const S::iterator&);
- template bool operator==(const S::const_iterator&, const S::const_iterator&);
-}
-namespace std
-{
// Only one template keyword allowed here.
// See core issue #46 (NAD)
// http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
@@ -74,54 +64,10 @@ namespace std
S::basic_string(S::iterator, S::iterator, const allocator<C>&);
template
- S::basic_string(S::const_iterator, S::const_iterator, const allocator<C>&);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator,
- input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator, input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, const C*, const C*,
- input_iterator_tag);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, C*, C*);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);
-
- template
C*
S::_S_construct(S::iterator, S::iterator,
const allocator<C>&, forward_iterator_tag);
- template
- C*
- S::_S_construct(S::const_iterator, S::const_iterator,
- const allocator<C>&, forward_iterator_tag);
-
template
C*
S::_S_construct(C*, C*, const allocator<C>&, forward_iterator_tag);
@@ -130,8 +76,11 @@ namespace std
C*
S::_S_construct(const C*, const C*, const allocator<C>&,
forward_iterator_tag);
-
- template
- void
- __destroy_aux<S*>(S*, S*, __false_type);
} // namespace std
+
+namespace __gnu_cxx
+{
+ using std::S;
+ template bool operator==(const S::iterator&, const S::iterator&);
+ template bool operator==(const S::const_iterator&, const S::const_iterator&);
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/src/strstream.cc b/contrib/libstdc++/src/strstream.cc
index 00f5b73..832a19c 100644
--- a/contrib/libstdc++/src/strstream.cc
+++ b/contrib/libstdc++/src/strstream.cc
@@ -59,7 +59,7 @@ namespace std
: _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(true),
_M_frozen(false), _M_constant(false)
{
- streamsize n = max(initial_capacity, streamsize(16));
+ streamsize n = std::max(initial_capacity, streamsize(16));
char* buf = _M_alloc(n);
if (buf)
@@ -148,7 +148,7 @@ namespace std
if (pptr() == epptr() && _M_dynamic && !_M_frozen && !_M_constant)
{
ptrdiff_t old_size = epptr() - pbase();
- ptrdiff_t new_size = max(ptrdiff_t(2 * old_size), ptrdiff_t(1));
+ ptrdiff_t new_size = std::max(ptrdiff_t(2 * old_size), ptrdiff_t(1));
char* buf = _M_alloc(new_size);
if (buf)
@@ -168,7 +168,7 @@ namespace std
if (reposition_get)
setg(buf, buf + old_get_offset, buf +
- max(old_get_offset, old_size));
+ std::max(old_get_offset, old_size));
_M_free(old_buffer);
}
@@ -194,7 +194,7 @@ namespace std
gbump(-1);
return _Traits::not_eof(c);
}
- else if (c == static_cast<int_type>(gptr()[-1]))
+ else if (c == _Traits::to_int_type(gptr()[-1]))
{ // KLUDGE
gbump(-1);
return c;
diff --git a/contrib/libstdc++/src/tree.cc b/contrib/libstdc++/src/tree.cc
new file mode 100644
index 0000000..0cef30c
--- /dev/null
+++ b/contrib/libstdc++/src/tree.cc
@@ -0,0 +1,431 @@
+// RB tree utilities implementation -*- C++ -*-
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ */
+
+#include <bits/stl_tree.h>
+
+namespace std
+{
+ _Rb_tree_node_base*
+ _Rb_tree_increment(_Rb_tree_node_base* __x)
+ {
+ if (__x->_M_right != 0)
+ {
+ __x = __x->_M_right;
+ while (__x->_M_left != 0)
+ __x = __x->_M_left;
+ }
+ else
+ {
+ _Rb_tree_node_base* __y = __x->_M_parent;
+ while (__x == __y->_M_right)
+ {
+ __x = __y;
+ __y = __y->_M_parent;
+ }
+ if (__x->_M_right != __y)
+ __x = __y;
+ }
+ return __x;
+ }
+
+ const _Rb_tree_node_base*
+ _Rb_tree_increment(const _Rb_tree_node_base* __x)
+ {
+ return _Rb_tree_increment(const_cast<_Rb_tree_node_base*>(__x));
+ }
+
+ _Rb_tree_node_base*
+ _Rb_tree_decrement(_Rb_tree_node_base* __x)
+ {
+ if (__x->_M_color == _S_red
+ && __x->_M_parent->_M_parent == __x)
+ __x = __x->_M_right;
+ else if (__x->_M_left != 0)
+ {
+ _Rb_tree_node_base* __y = __x->_M_left;
+ while (__y->_M_right != 0)
+ __y = __y->_M_right;
+ __x = __y;
+ }
+ else
+ {
+ _Rb_tree_node_base* __y = __x->_M_parent;
+ while (__x == __y->_M_left)
+ {
+ __x = __y;
+ __y = __y->_M_parent;
+ }
+ __x = __y;
+ }
+ return __x;
+ }
+
+ const _Rb_tree_node_base*
+ _Rb_tree_decrement(const _Rb_tree_node_base* __x)
+ {
+ return _Rb_tree_decrement(const_cast<_Rb_tree_node_base*>(__x));
+ }
+
+ void
+ _Rb_tree_rotate_left(_Rb_tree_node_base* const __x,
+ _Rb_tree_node_base*& __root)
+ {
+ _Rb_tree_node_base* const __y = __x->_M_right;
+
+ __x->_M_right = __y->_M_left;
+ if (__y->_M_left !=0)
+ __y->_M_left->_M_parent = __x;
+ __y->_M_parent = __x->_M_parent;
+
+ if (__x == __root)
+ __root = __y;
+ else if (__x == __x->_M_parent->_M_left)
+ __x->_M_parent->_M_left = __y;
+ else
+ __x->_M_parent->_M_right = __y;
+ __y->_M_left = __x;
+ __x->_M_parent = __y;
+ }
+
+ void
+ _Rb_tree_rotate_right(_Rb_tree_node_base* const __x,
+ _Rb_tree_node_base*& __root)
+ {
+ _Rb_tree_node_base* const __y = __x->_M_left;
+
+ __x->_M_left = __y->_M_right;
+ if (__y->_M_right != 0)
+ __y->_M_right->_M_parent = __x;
+ __y->_M_parent = __x->_M_parent;
+
+ if (__x == __root)
+ __root = __y;
+ else if (__x == __x->_M_parent->_M_right)
+ __x->_M_parent->_M_right = __y;
+ else
+ __x->_M_parent->_M_left = __y;
+ __y->_M_right = __x;
+ __x->_M_parent = __y;
+ }
+
+ void
+ _Rb_tree_insert_and_rebalance(const bool __insert_left,
+ _Rb_tree_node_base* __x,
+ _Rb_tree_node_base* __p,
+ _Rb_tree_node_base& __header)
+ {
+ _Rb_tree_node_base *& __root = __header._M_parent;
+
+ // Initialize fields in new node to insert.
+ __x->_M_parent = __p;
+ __x->_M_left = 0;
+ __x->_M_right = 0;
+ __x->_M_color = _S_red;
+
+ // Insert.
+ // Make new node child of parent and maintain root, leftmost and
+ // rightmost nodes.
+ // N.B. First node is always inserted left.
+ if (__insert_left)
+ {
+ __p->_M_left = __x; // also makes leftmost = __x when __p == &__header
+
+ if (__p == &__header)
+ {
+ __header._M_parent = __x;
+ __header._M_right = __x;
+ }
+ else if (__p == __header._M_left)
+ __header._M_left = __x; // maintain leftmost pointing to min node
+ }
+ else
+ {
+ __p->_M_right = __x;
+
+ if (__p == __header._M_right)
+ __header._M_right = __x; // maintain rightmost pointing to max node
+ }
+ // Rebalance.
+ while (__x != __root
+ && __x->_M_parent->_M_color == _S_red)
+ {
+ _Rb_tree_node_base* const __xpp = __x->_M_parent->_M_parent;
+
+ if (__x->_M_parent == __xpp->_M_left)
+ {
+ _Rb_tree_node_base* const __y = __xpp->_M_right;
+ if (__y && __y->_M_color == _S_red)
+ {
+ __x->_M_parent->_M_color = _S_black;
+ __y->_M_color = _S_black;
+ __xpp->_M_color = _S_red;
+ __x = __xpp;
+ }
+ else
+ {
+ if (__x == __x->_M_parent->_M_right)
+ {
+ __x = __x->_M_parent;
+ _Rb_tree_rotate_left(__x, __root);
+ }
+ __x->_M_parent->_M_color = _S_black;
+ __xpp->_M_color = _S_red;
+ _Rb_tree_rotate_right(__xpp, __root);
+ }
+ }
+ else
+ {
+ _Rb_tree_node_base* const __y = __xpp->_M_left;
+ if (__y && __y->_M_color == _S_red)
+ {
+ __x->_M_parent->_M_color = _S_black;
+ __y->_M_color = _S_black;
+ __xpp->_M_color = _S_red;
+ __x = __xpp;
+ }
+ else
+ {
+ if (__x == __x->_M_parent->_M_left)
+ {
+ __x = __x->_M_parent;
+ _Rb_tree_rotate_right(__x, __root);
+ }
+ __x->_M_parent->_M_color = _S_black;
+ __xpp->_M_color = _S_red;
+ _Rb_tree_rotate_left(__xpp, __root);
+ }
+ }
+ }
+ __root->_M_color = _S_black;
+ }
+
+ _Rb_tree_node_base*
+ _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
+ _Rb_tree_node_base& __header)
+ {
+ _Rb_tree_node_base *& __root = __header._M_parent;
+ _Rb_tree_node_base *& __leftmost = __header._M_left;
+ _Rb_tree_node_base *& __rightmost = __header._M_right;
+ _Rb_tree_node_base* __y = __z;
+ _Rb_tree_node_base* __x = 0;
+ _Rb_tree_node_base* __x_parent = 0;
+
+ if (__y->_M_left == 0) // __z has at most one non-null child. y == z.
+ __x = __y->_M_right; // __x might be null.
+ else
+ if (__y->_M_right == 0) // __z has exactly one non-null child. y == z.
+ __x = __y->_M_left; // __x is not null.
+ else
+ {
+ // __z has two non-null children. Set __y to
+ __y = __y->_M_right; // __z's successor. __x might be null.
+ while (__y->_M_left != 0)
+ __y = __y->_M_left;
+ __x = __y->_M_right;
+ }
+ if (__y != __z)
+ {
+ // relink y in place of z. y is z's successor
+ __z->_M_left->_M_parent = __y;
+ __y->_M_left = __z->_M_left;
+ if (__y != __z->_M_right)
+ {
+ __x_parent = __y->_M_parent;
+ if (__x) __x->_M_parent = __y->_M_parent;
+ __y->_M_parent->_M_left = __x; // __y must be a child of _M_left
+ __y->_M_right = __z->_M_right;
+ __z->_M_right->_M_parent = __y;
+ }
+ else
+ __x_parent = __y;
+ if (__root == __z)
+ __root = __y;
+ else if (__z->_M_parent->_M_left == __z)
+ __z->_M_parent->_M_left = __y;
+ else
+ __z->_M_parent->_M_right = __y;
+ __y->_M_parent = __z->_M_parent;
+ std::swap(__y->_M_color, __z->_M_color);
+ __y = __z;
+ // __y now points to node to be actually deleted
+ }
+ else
+ { // __y == __z
+ __x_parent = __y->_M_parent;
+ if (__x)
+ __x->_M_parent = __y->_M_parent;
+ if (__root == __z)
+ __root = __x;
+ else
+ if (__z->_M_parent->_M_left == __z)
+ __z->_M_parent->_M_left = __x;
+ else
+ __z->_M_parent->_M_right = __x;
+ if (__leftmost == __z)
+ if (__z->_M_right == 0) // __z->_M_left must be null also
+ __leftmost = __z->_M_parent;
+ // makes __leftmost == _M_header if __z == __root
+ else
+ __leftmost = _Rb_tree_node_base::_S_minimum(__x);
+ if (__rightmost == __z)
+ if (__z->_M_left == 0) // __z->_M_right must be null also
+ __rightmost = __z->_M_parent;
+ // makes __rightmost == _M_header if __z == __root
+ else // __x == __z->_M_left
+ __rightmost = _Rb_tree_node_base::_S_maximum(__x);
+ }
+ if (__y->_M_color != _S_red)
+ {
+ while (__x != __root && (__x == 0 || __x->_M_color == _S_black))
+ if (__x == __x_parent->_M_left)
+ {
+ _Rb_tree_node_base* __w = __x_parent->_M_right;
+ if (__w->_M_color == _S_red)
+ {
+ __w->_M_color = _S_black;
+ __x_parent->_M_color = _S_red;
+ _Rb_tree_rotate_left(__x_parent, __root);
+ __w = __x_parent->_M_right;
+ }
+ if ((__w->_M_left == 0 ||
+ __w->_M_left->_M_color == _S_black) &&
+ (__w->_M_right == 0 ||
+ __w->_M_right->_M_color == _S_black))
+ {
+ __w->_M_color = _S_red;
+ __x = __x_parent;
+ __x_parent = __x_parent->_M_parent;
+ }
+ else
+ {
+ if (__w->_M_right == 0
+ || __w->_M_right->_M_color == _S_black)
+ {
+ __w->_M_left->_M_color = _S_black;
+ __w->_M_color = _S_red;
+ _Rb_tree_rotate_right(__w, __root);
+ __w = __x_parent->_M_right;
+ }
+ __w->_M_color = __x_parent->_M_color;
+ __x_parent->_M_color = _S_black;
+ if (__w->_M_right)
+ __w->_M_right->_M_color = _S_black;
+ _Rb_tree_rotate_left(__x_parent, __root);
+ break;
+ }
+ }
+ else
+ {
+ // same as above, with _M_right <-> _M_left.
+ _Rb_tree_node_base* __w = __x_parent->_M_left;
+ if (__w->_M_color == _S_red)
+ {
+ __w->_M_color = _S_black;
+ __x_parent->_M_color = _S_red;
+ _Rb_tree_rotate_right(__x_parent, __root);
+ __w = __x_parent->_M_left;
+ }
+ if ((__w->_M_right == 0 ||
+ __w->_M_right->_M_color == _S_black) &&
+ (__w->_M_left == 0 ||
+ __w->_M_left->_M_color == _S_black))
+ {
+ __w->_M_color = _S_red;
+ __x = __x_parent;
+ __x_parent = __x_parent->_M_parent;
+ }
+ else
+ {
+ if (__w->_M_left == 0 || __w->_M_left->_M_color == _S_black)
+ {
+ __w->_M_right->_M_color = _S_black;
+ __w->_M_color = _S_red;
+ _Rb_tree_rotate_left(__w, __root);
+ __w = __x_parent->_M_left;
+ }
+ __w->_M_color = __x_parent->_M_color;
+ __x_parent->_M_color = _S_black;
+ if (__w->_M_left)
+ __w->_M_left->_M_color = _S_black;
+ _Rb_tree_rotate_right(__x_parent, __root);
+ break;
+ }
+ }
+ if (__x) __x->_M_color = _S_black;
+ }
+ return __y;
+ }
+
+ unsigned int
+ _Rb_tree_black_count(const _Rb_tree_node_base* __node,
+ const _Rb_tree_node_base* __root)
+ {
+ if (__node == 0)
+ return 0;
+ unsigned int __sum = 0;
+ do
+ {
+ if (__node->_M_color == _S_black)
+ ++__sum;
+ if (__node == __root)
+ break;
+ __node = __node->_M_parent;
+ }
+ while (1);
+ return __sum;
+ }
+} // namespace std
diff --git a/contrib/libstdc++/src/wlocale-inst.cc b/contrib/libstdc++/src/wlocale-inst.cc
new file mode 100644
index 0000000..fa5059d
--- /dev/null
+++ b/contrib/libstdc++/src/wlocale-inst.cc
@@ -0,0 +1,39 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#include <bits/c++config.h>
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+#define C wchar_t
+#include "locale-inst.cc"
+#endif
diff --git a/contrib/libstdc++/src/wstring-inst.cc b/contrib/libstdc++/src/wstring-inst.cc
index 0200fd4..2bcdcfc 100644
--- a/contrib/libstdc++/src/wstring-inst.cc
+++ b/contrib/libstdc++/src/wstring-inst.cc
@@ -1,6 +1,39 @@
+// wide string support -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ 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, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself 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.
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
#include <bits/c++config.h>
-#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef _GLIBCXX_USE_WCHAR_T
#define C wchar_t
#include "string-inst.cc"
#endif
OpenPOWER on IntegriCloud